Feature request: Media Session API integration for OS media controls
When VSC changes video.playbackRate, the browser's Media Session (surfaced by Windows 11 SMTC flyout, macOS Now Playing, ChromeOS/Android media notifications) does not reflect the new rate. Reported position/duration in those OS controls drifts because the OS assumes 1.0×.
Additionally, hardware media keys and OS-level seek buttons currently route to the page's own handlers only — VSC's advance/rewind/faster/slower shortcuts aren't exposed to Media Session, so users can't drive VSC from a headset button, keyboard media keys, or the SMTC flyout.
Proposed:
- When VSC updates
playbackRate on the active video, call navigator.mediaSession.setPositionState({ duration, position, playbackRate }) on the same element.
- Register
setActionHandler('seekforward' | 'seekbackward') mapped to the existing advance / rewind actions (opt-in setting, off by default to avoid clobbering site handlers).
MDN refs: Media Session API, setPositionState.
Thanks for the great work on Video Speed Controller!
Feature request: Media Session API integration for OS media controls
When VSC changes
video.playbackRate, the browser's Media Session (surfaced by Windows 11 SMTC flyout, macOS Now Playing, ChromeOS/Android media notifications) does not reflect the new rate. Reported position/duration in those OS controls drifts because the OS assumes1.0×.Additionally, hardware media keys and OS-level seek buttons currently route to the page's own handlers only — VSC's
advance/rewind/faster/slowershortcuts aren't exposed to Media Session, so users can't drive VSC from a headset button, keyboard media keys, or the SMTC flyout.Proposed:
playbackRateon the active video, callnavigator.mediaSession.setPositionState({ duration, position, playbackRate })on the same element.setActionHandler('seekforward' | 'seekbackward')mapped to the existingadvance/rewindactions (opt-in setting, off by default to avoid clobbering site handlers).MDN refs: Media Session API, setPositionState.
Thanks for the great work on Video Speed Controller!