Skip to content

Add Android TV side-panel menus - #126

Open
MattiasBuelens wants to merge 6 commits into
feature/tv-controlsfrom
feature/tv-menus
Open

MattiasBuelens wants to merge 6 commits into
feature/tv-controlsfrom
feature/tv-menus

Conversation

@MattiasBuelens

@MattiasBuelens MattiasBuelens commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the language and settings menus to android-ui-tv. They open as an M3 modal side sheet on the end edge of the player, styled after YouTube's Android TV player. Names and state overloads mirror the mobile menus (all @ExperimentalTvUiApi):

fun MenuScope.Menu(modifier, title, content: @Composable ColumnScope.() -> Unit) // 320 dp side panel, Back closes it
fun MenuScope.LanguageMenuButton(...) / SettingsMenuButton(...)
fun MenuScope.LanguageMenu()   // "Audio ›", "Subtitles ›" rows -> AudioTrackMenu() / SubtitleMenu()
fun MenuScope.SettingsMenu()   // "Quality ›", "Playback rate ›" rows -> QualityMenu() / PlaybackRateMenu()
fun AudioTrackList(...) / SubtitleTrackList(...) / QualityList(...) / PlaybackRateList(...)
  • The panel overlays the full-size video, because the UI lives inside THEOplayer's theo_ui_container. It slides in from the end edge when opened from the controls; switching between menus crossfades.
  • Each row is a tv-material ListItem card (surfaceVariant, 8 dp apart). Submenu rows have a leading icon and a trailing ›. The selected list item has a trailing check. When a list opens, it scrolls to and focuses the selected item (focusRestorer(selectedRequester)). Picking an item closes that submenu, the same as mobile.
  • Unlike mobile, LanguageMenu only shows the compact rows. There's no expanded side-by-side form, since the panel is narrow.
  • The formatting helpers move to :ui-common as @InternalUiApi so both modules can use them: formatTrackName (backing :ui's public formatTrackLabel), formatPlaybackRate, formatBandwidth, formatActiveQualityLabel, defaultPlaybackRates, and the util/ track-label helpers. No public API changes in :ui.

The Robolectric tests drive the menus with D-pad keys, because tv-material components don't react to touch clicks. They cover button visibility, focus on open, track/quality/rate selection, and Back from a submenu, then from the menu, back to the controls.

Link to Devin session: https://dolby.devinenterprise.com/sessions/0a6e1645d4f141408a29401d199e8716
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/0a6e1645d4f141408a29401d199e8716?variant=devin
Requested by: @MattiasBuelens

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

MattiasBuelens and others added 4 commits October 15, 2026 11:06
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@MattiasBuelens
MattiasBuelens added this pull request to stack #123 October 15, 2026 11:10
MattiasBuelens and others added 2 commits October 15, 2026 12:45
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant