[PR #2571] [MERGED] feat(youtube): in-app volume control for the YouTube Music DJ player #5667

Closed
opened 2026-10-22 04:18:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2571
Author: @Romuromylus
Created: 6/15/2026
Status: ✅ Merged
Merged: 6/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/youtube-player-volume


📝 Commits (2)

  • ff18e45 feat(youtube): add in-app volume control to the YouTube Music DJ player
  • 3b39876 fix(youtube): preserve last audible volume on unmute + sync volume across devices

📊 Changes

2 files changed (+80 additions, -6 deletions)

View changed files

📝 packages/client/src/components/chat/YouTubePlayer.tsx (+69 -5)
📝 packages/client/src/stores/ui.store.ts (+11 -1)

📄 Description

Linked issue

Closes #2570

Why this change

YouTube Music DJ mode had no app-side volume control. youtubeVolume was only ever set by the DJ agent, so the sole manual lever was YouTube's native in-iframe volume slider (visible when the video is expanded). That control is cross-origin — we can't restyle it or change its behavior — and in our small 246x138 embed it collapses the instant the cursor leaves the speaker icon, so it's nearly impossible to grab and drag. In practice there was no reliable way to manually set YouTube volume.

The Spotify mini-player has had an always-visible inline volume control for a long time; this brings YouTube mode to parity.

What changed

  • Added an always-visible mute button + volume slider to the YouTube player, inline in the desktop top-bar pill (at lg) and in the mobile expanded widget — mirroring the Spotify mini-player. Being inline, there's no hover-reveal gap and nothing to chase.
  • Persisted the value in the UI store as youtubePlayerVolume (default 70; store version 46 -> 47 with a migration that backfills 70).
  • The player applies the volume to the IFrame via setVolume() on ready, on track load, and whenever the value changes.
  • The DJ's youtube_control volume now folds into the same persisted value, so the slider stays the single source of truth.

Scope is purely additive: the Spotify path and the DJ agent flow are untouched.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

What I ran / observed:

  • pnpm check (Impeccable guard + ESLint + all tsc + production build) passes locally with exit 0.
  • Built and deployed the branch to a running production container; container came up healthy.
  • In a desktop browser (lg width) against the live deploy: the volume control renders inline on the YouTube pill next to play/stop. Dragging/clicking the slider changes the volume, and the control stays put when the cursor moves away (the original native-control complaint is gone). The control also renders in the idle "Ready for Music DJ" state and applies once a track loads.

Still to verify manually before ticking the boxes above:

  • Mobile viewport: the control was added to the mobile expanded widget but has not been exercised on a real mobile layout.
  • Empty/error states beyond idle, and any light-theme variants.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Before: YouTube volume could only be changed via YouTube's native in-iframe speaker, which collapses on mouse-out in the small embed.
After: an always-visible mute + slider sits on the YouTube pill (and mobile widget), like Spotify's.

Summary by CodeRabbit

  • New Features
    • Added YouTube volume slider control for adjusting playback volume
    • Added mute/unmute button to quickly silence videos
    • Volume preferences are now saved and restored across sessions
    • Volume controls available on both mobile and desktop interfaces

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2571 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 6/15/2026 **Status:** ✅ Merged **Merged:** 6/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/youtube-player-volume` --- ### 📝 Commits (2) - [`ff18e45`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ff18e45a2a750f97218901ef8fcf13e4ac63d6e3) feat(youtube): add in-app volume control to the YouTube Music DJ player - [`3b39876`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3b39876520f89b419dcef26b837101a0106540de) fix(youtube): preserve last audible volume on unmute + sync volume across devices ### 📊 Changes **2 files changed** (+80 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/YouTubePlayer.tsx` (+69 -5) 📝 `packages/client/src/stores/ui.store.ts` (+11 -1) </details> ### 📄 Description ## Linked issue Closes #2570 ## Why this change YouTube Music DJ mode had no app-side volume control. `youtubeVolume` was only ever set by the DJ agent, so the sole manual lever was YouTube's native in-iframe volume slider (visible when the video is expanded). That control is cross-origin — we can't restyle it or change its behavior — and in our small 246x138 embed it collapses the instant the cursor leaves the speaker icon, so it's nearly impossible to grab and drag. In practice there was no reliable way to manually set YouTube volume. The Spotify mini-player has had an always-visible inline volume control for a long time; this brings YouTube mode to parity. ## What changed - Added an always-visible mute button + volume slider to the YouTube player, inline in the desktop top-bar pill (at `lg`) and in the mobile expanded widget — mirroring the Spotify mini-player. Being inline, there's no hover-reveal gap and nothing to chase. - Persisted the value in the UI store as `youtubePlayerVolume` (default 70; store version 46 -> 47 with a migration that backfills 70). - The player applies the volume to the IFrame via `setVolume()` on ready, on track load, and whenever the value changes. - The DJ's `youtube_control` volume now folds into the same persisted value, so the slider stays the single source of truth. Scope is purely additive: the Spotify path and the DJ agent flow are untouched. ## Validation <!-- I leave these for the human maintainer to tick after re-verifying. --> - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes What I ran / observed: - `pnpm check` (Impeccable guard + ESLint + all `tsc` + production build) passes locally with exit 0. - Built and deployed the branch to a running production container; container came up healthy. - In a desktop browser (`lg` width) against the live deploy: the volume control renders inline on the YouTube pill next to play/stop. Dragging/clicking the slider changes the volume, and the control stays put when the cursor moves away (the original native-control complaint is gone). The control also renders in the idle "Ready for Music DJ" state and applies once a track loads. Still to verify manually before ticking the boxes above: - Mobile viewport: the control was added to the mobile expanded widget but has not been exercised on a real mobile layout. - Empty/error states beyond idle, and any light-theme variants. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Before: YouTube volume could only be changed via YouTube's native in-iframe speaker, which collapses on mouse-out in the small embed. After: an always-visible mute + slider sits on the YouTube pill (and mobile widget), like Spotify's. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added YouTube volume slider control for adjusting playback volume * Added mute/unmute button to quickly silence videos * Volume preferences are now saved and restored across sessions * Volume controls available on both mobile and desktop interfaces <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:18:18 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5667
No description provided.