Repository navigation
feat(tv-remote): add play, pause and stop buttons and map TV media keys - #4626
Conversation
…TV keys Samsung Tizen and LG webOS now accept tv-remote media-rewind (MediaRewind, 412) and media-fast-forward (MediaFastForward, 417) through a shared MEDIA_KEYS set in tv-cdp. Tizen also accepts media-play-pause (MediaPlayPause, 10252), which Samsung lists as its own remote key. webOS keeps refusing media-play-pause: it has separate Play (415) and Pause (19) key codes and no toggle.
Add media-play, media-pause and media-stop to the TV remote contract. Android TV sends KEYCODE_MEDIA_PLAY (126), KEYCODE_MEDIA_PAUSE (127) and KEYCODE_MEDIA_STOP (86). Samsung Tizen and LG webOS send the shared TV codes MediaPlay (415), MediaPause (19) and MediaStop (413), so webOS can play and pause without a play-pause toggle. Tizen also accepts media-next (MediaTrackNext, 10233) and media-previous (MediaTrackPrevious, 10232). tvOS and Vega OS refuse the new buttons.
|
This looks ready at f359dbe, and I found nothing that needs a change before merge. CI is green (16 checks, none failing) and there are no conflicts. Not blocking, and you can take or leave these: the Tizen-only key codes in packages/provider-tizen/src/keys.ts are not asserted by any test, so a small keys test like the one tv-cdp has for MEDIA_KEYS would pin them; the provider README status lines also drop the "React Native Web app" wording, which is unrelated to media keys; and the webOS refusal test calls the interactor directly, while production refuses earlier through the tvRemote runtime fact, so an optional assertion on that fact would cover the real route. The device outcomes rest on your runs on the Samsung M7, LG 32LQ63006LA and Android TV emulator. |
Summary
New contract buttons
media-play,media-pauseandmedia-stopsend Android TV keyevents 126, 127 and 86. The Tizen and webOS plugins now map these media buttons:media-playMediaPlaymedia-pauseMediaPausemedia-stopMediaStopmedia-rewindMediaRewindmedia-fast-forwardMediaFastForwardmedia-play-pauseMediaPlayPausemedia-nextMediaTrackNextmedia-previousMediaTrackPreviousLG has no play-pause toggle or track keys. Shared codes live in
tv-cdpMEDIA_KEYS. tvOS and Vega OS refuse the new buttons.Sources: Samsung (Table 3), LG, W3C, Android.
16 files. Scope expansion:
help tvno longer claims every TV backend acceptsmenu/home; README status lines drop the app framework. No linked issue.Validation
pnpm check:affected --run --head f359dbee9, base80075b641: format, lint, typecheck, layering, fallow, build, vitest-related passed.unit: 5 unrelated failures (proxy-blocked HTTP,npm pack), also failing on80075b641here.pnpm gate command-docs,docs-links,docs-prose: passed.Local CLI and plugin builds:
media-play,media-pauseandmedia-stopas media keys 126, 127 and 86.The 0.21.37 CLI rejects the new names, so they need a release.
🤖 Generated with Claude Code