Skip to content

feat(tv-remote): add play, pause and stop buttons and map TV media keys - #4626

Merged
thymikee merged 2 commits into
callstack:mainfrom
alimek:feat/tv-media-keys
Nov 17, 2026
Merged

thymikee merged 2 commits into
callstack:mainfrom
alimek:feat/tv-media-keys

Conversation

@alimek

@alimek alimek commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New contract buttons media-play, media-pause and media-stop send Android TV keyevents 126, 127 and 86. The Tizen and webOS plugins now map these media buttons:

Button Key / code keyCode Tizen webOS
media-play MediaPlay 415 yes yes
media-pause MediaPause 19 yes yes
media-stop MediaStop 413 yes yes
media-rewind MediaRewind 412 yes yes
media-fast-forward MediaFastForward 417 yes yes
media-play-pause MediaPlayPause 10252 yes refused
media-next MediaTrackNext 10233 yes refused
media-previous MediaTrackPrevious 10232 yes refused

LG has no play-pause toggle or track keys. Shared codes live in tv-cdp MEDIA_KEYS. tvOS and Vega OS refuse the new buttons.

Sources: Samsung (Table 3), LG, W3C, Android.

agent-device tv-remote press media-pause

16 files. Scope expansion: help tv no longer claims every TV backend accepts menu/home; README status lines drop the app framework. No linked issue.

Validation

  • pnpm check:affected --run --head f359dbee9, base 80075b641: format, lint, typecheck, layering, fallow, build, vitest-related passed. unit: 5 unrelated failures (proxy-blocked HTTP, npm pack), also failing on 80075b641 here.
  • pnpm gate command-docs, docs-links, docs-prose: passed.
  • New provider tests fail on the base key maps.

Local CLI and plugin builds:

  • Samsung M7 (Tizen 9.0): the page received each key above.
  • LG 32LQ63006LA (webOS 22): the player reacted to its five keys; refused buttons failed before dispatch.
  • Android TV emulator (API 36): Android received media-play, media-pause and media-stop as media keys 126, 127 and 86.

The 0.21.37 CLI rejects the new names, so they need a release.

🤖 Generated with Claude Code

…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.
@thymikee

Copy link
Copy Markdown
Member

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.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 17, 2026
@thymikee
thymikee merged commit 28e846b into callstack:main Nov 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants