Repository navigation
Add Android TV UI module with UIController - #124
Open
MattiasBuelens wants to merge 3 commits into
Open
MattiasBuelens wants to merge 3 commits into
MattiasBuelens wants to merge 3 commits into
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
devin-ai-integration
Bot
force-pushed
the
feature/tv-skeleton
branch
from
October 14, 2026 15:09
b7f369b to
826d633
Compare
MattiasBuelens
added this pull request to stack #123
October 14, 2026 15:39
devin-ai-integration
Bot
force-pushed
the
feature/tv-skeleton
branch
2 times, most recently
from
October 14, 2026 15:56
c9a7d31 to
83559dd
Compare
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>
devin-ai-integration
Bot
force-pushed
the
feature/tv-skeleton
branch
from
October 15, 2026 11:09
83559dd to
28567fb
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a new
:ui-tvmodule (artifactcom.theoplayer.android-ui:android-ui-tv, packagecom.theoplayer.android.ui.tv) with aUIControllerthat is controlled with a TV remote. It builds on:ui-commonandandroidx.tv:tv-material, and doesn't depend on:uior Material3. All public API is opt-in through the new@ExperimentalTvUiApi.Shared controller core
The mobile and TV controllers now share their layout-independent logic through
@InternalUiApibuilding blocks in:ui-common:rememberControlsVisibility(firstPlay, paused, forceVisible, hideDelay): when the controls are shown or hidden, plus the auto-hide timer.rememberUIControllerScope(theoplayerView, player)andrememberUIState(scope, errorState, pictureInPictureState): the menu stack and which state is active (Error,Menu,ControlsorHidden).UIControllerCore(...): providesLocalPlayer,LocalTHEOplayerViewandLocalUIControllerErrorState, closes an open menu on Back, applieshandlePlayerKeys, and renders the background, the content transition and the slot layout. Renderers pass their owncontentTransform, plus an extramodifierandcontrolsModifier.Mobile keeps tap-to-toggle,
playerAspectRatio, casting and slide transitions for menus. TV adds its own D-pad and Back handling plus focus, and uses fade transitions.PlayerAnimations(andLocalPlayerAnimations) moved to:ui-common. The package is stillcom.theoplayer.android.ui.theme. It has a newcontrolsHideDelay(2 s by default) that sets how long the controls stay visible after user interaction. Both themes takeplayerAnimations.Changes on mobile:
PlayerAnimations.controlsHideDelaycan be configured.PlayerAnimations' constructor andcopy.TV
UIControllerbehaviorcontrolsHideDelay(5 s on TV) without key presses.handlePlayerKeysmeans any key shows the controls, and media keys work even while the controls are hidden. While the controls are hidden, Center/Enter toggles play/pause and Left/Right seek ±10 s, and each of these also shows the controls. While they are visible, keys go to the focused control. An open menu or the error overlay always receives keys.focusRestorer+focusGroup). It lands on the first focusable control or returns to the last focused one.Robolectric tests in
:ui-tvcover key handling, auto-hide, Back, focus and errors. A new:uitest covers Back closing a menu on mobile.Link to Devin session: https://dolby.devinenterprise.com/sessions/6307f9268b9b47fbab4169cde6216af1
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/6307f9268b9b47fbab4169cde6216af1?variant=devin
Requested by: @MattiasBuelens