Summary
The YTM Mini Mode extension pops YouTube Music out into a dedicated mini-player window. However, when the mini-player window is in focus, media keys on the keyboard (Play/Pause, Next Track, Previous Track) do not control YouTube Music playback. This is a significant UX gap — a mini-player that does not respond to hardware media keys defeats a primary use case of the extension: controlling music without switching context.
Problem
- Media key events (
MediaPlayPause, MediaTrackNext, MediaTrackPrevious) dispatched at the OS level are only handled by the active/focused tab in the main browser window.
- When the mini-player window (the popped-out
picture-in-picture-style window) has focus, media keys have no effect on YouTube Music playback.
- Users who use hardware keyboards with media keys or headphone/headset controls expect these to work regardless of which window is focused.
- This is a commonly reported friction point in browser extensions that implement pop-out players.
Impact
- Users must switch back to the main YouTube Music tab to use media keys, directly undermining the extension's purpose.
- Headphone users who rely on inline media controls cannot use them while the mini-player is their active window.
Proposed Solution
I would like to implement media key forwarding using the Web Extensions API within the content script or background service worker:
- In the mini-player window: Listen for
keydown events matching MediaPlayPause, MediaTrackNext, MediaTrackPrevious.
- Message passing: Use
chrome.runtime.sendMessage / browser.runtime.sendMessage to forward the key event to the background script.
- In the background script: Use
chrome.tabs.sendMessage to relay the command to the main YouTube Music tab's content script.
- In the content script (YTM tab): Dispatch a synthetic click on the relevant YTM player button (
yt-icon-button[aria-label="Play pause"], next/previous buttons).
This approach works entirely within the existing message-passing architecture the extension already uses, requires no new permissions, and is fully compatible with both Manifest V2 (Firefox) and Manifest V3 (Chrome).
I am happy to implement and test this across both browsers. Could you please assign this issue to me?
Labels: enhancement, feature request, help wanted, GSSoC 2026
Summary
The YTM Mini Mode extension pops YouTube Music out into a dedicated mini-player window. However, when the mini-player window is in focus, media keys on the keyboard (Play/Pause, Next Track, Previous Track) do not control YouTube Music playback. This is a significant UX gap — a mini-player that does not respond to hardware media keys defeats a primary use case of the extension: controlling music without switching context.
Problem
MediaPlayPause,MediaTrackNext,MediaTrackPrevious) dispatched at the OS level are only handled by the active/focused tab in the main browser window.picture-in-picture-style window) has focus, media keys have no effect on YouTube Music playback.Impact
Proposed Solution
I would like to implement media key forwarding using the Web Extensions API within the content script or background service worker:
keydownevents matchingMediaPlayPause,MediaTrackNext,MediaTrackPrevious.chrome.runtime.sendMessage/browser.runtime.sendMessageto forward the key event to the background script.chrome.tabs.sendMessageto relay the command to the main YouTube Music tab's content script.yt-icon-button[aria-label="Play pause"], next/previous buttons).This approach works entirely within the existing message-passing architecture the extension already uses, requires no new permissions, and is fully compatible with both Manifest V2 (Firefox) and Manifest V3 (Chrome).
I am happy to implement and test this across both browsers. Could you please assign this issue to me?
Labels:
enhancement,feature request,help wanted,GSSoC 2026