You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wire up default keyboard shortcuts in the audio and video preset skins for both the HTML and React packages. The hotkey system (coordinator, actions, ARIA support) was already implemented — this adds the actual <media-hotkey> / <MediaHotkey> declarations to each skin so users get working keyboard controls out of the box.
Video skins (HTML + React): Same as audio plus f fullscreen, c subtitles, i PiP.
Import hotkey custom element registration in HTML audio/video ui.ts entry files.
Implementation notes
The video skin includes three extra bindings (fullscreen, subtitles, PiP) that don't apply to audio-only playback. All bindings use the declarative <media-hotkey> element in HTML and the <MediaHotkey> React component, both of which were already landed in prior PRs (#1238, #1239, #1241).
Testing
Covered by the existing hotkey element and coordinator tests from prior PRs. The preset skins are declarative templates — the hotkey elements are already tested at the component level.
Note
Low Risk
Low risk: changes are declarative UI additions that register and attach hotkey bindings, with primary risk being unexpected keybinding conflicts or behavior changes in embedded contexts.
Overview Adds default hotkeys to the preset player skins so keyboard controls work out of the box in both packages/html and packages/react.
HTML audio/video skins now include <media-hotkey> declarations for common actions (play/pause, mute, seek, volume, rate; plus fullscreen/subtitles/PiP on video), and the HTML audio/ui.ts + video/ui.ts entrypoints now import ../ui/hotkey to ensure the custom element is registered.
React AudioSkin and VideoSkin similarly render <MediaHotkey> components with the same default bindings.
Reviewed by Cursor Bugbot for commit d25c1c3. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1263, #505
Summary
Wire up default keyboard shortcuts in the audio and video preset skins for both the HTML and React packages. The hotkey system (coordinator, actions, ARIA support) was already implemented — this adds the actual
<media-hotkey>/<MediaHotkey>declarations to each skin so users get working keyboard controls out of the box.Changes
hotkeycustom element registration in HTML audio/videoui.tsentry files.Implementation notes
The video skin includes three extra bindings (fullscreen, subtitles, PiP) that don't apply to audio-only playback. All bindings use the declarative
<media-hotkey>element in HTML and the<MediaHotkey>React component, both of which were already landed in prior PRs (#1238, #1239, #1241).Testing
Covered by the existing hotkey element and coordinator tests from prior PRs. The preset skins are declarative templates — the hotkey elements are already tested at the component level.
Note
Low Risk
Low risk: changes are declarative UI additions that register and attach hotkey bindings, with primary risk being unexpected keybinding conflicts or behavior changes in embedded contexts.
Overview
Adds default hotkeys to the preset player skins so keyboard controls work out of the box in both
packages/htmlandpackages/react.HTML
audio/videoskins now include<media-hotkey>declarations for common actions (play/pause, mute, seek, volume, rate; plus fullscreen/subtitles/PiP on video), and the HTMLaudio/ui.ts+video/ui.tsentrypoints now import../ui/hotkeyto ensure the custom element is registered.React
AudioSkinandVideoSkinsimilarly render<MediaHotkey>components with the same default bindings.Reviewed by Cursor Bugbot for commit d25c1c3. Bugbot is set up for automated code reviews on this repo. Configure here.