Repository navigation
Add Android TV playback controls - #125
Open
MattiasBuelens wants to merge 11 commits into
Open
MattiasBuelens wants to merge 11 commits into
MattiasBuelens wants to merge 11 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-controls
branch
from
October 14, 2026 17:31
b3a95e6 to
528b4bb
Compare
MattiasBuelens
force-pushed
the
feature/tv-controls
branch
from
October 14, 2026 17:53
0340eb4 to
b0bac3d
Compare
devin-ai-integration
Bot
force-pushed
the
feature/tv-controls
branch
from
October 14, 2026 17:59
b0bac3d to
ee514c7
Compare
MattiasBuelens
added this pull request to stack #123
October 15, 2026 08:20
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>
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-controls
branch
from
October 15, 2026 11:09
badfff7 to
e84a46e
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 the first Android TV controls to
android-ui-tv(packagecom.theoplayer.android.ui.tv). They have the same names as the mobile components, mirror their parameters and KDoc, are all@ExperimentalTvUiApi, and are built on the shared:ui-commonstate holders:Each component also has a
(state: XxxState, …)overload, marked@ExperimentalPlayerStateApi.Slidertv-materialhas noSlider, so this adds a generic, focusable D-padSlidermodeled after Material3's:keyStep.isDraggingand changes the value bykeyRepeatStepper key repeat.onValueChangeFinishedfires on key-up, and also when focus is lost or the slider gets disabled mid-drag.SeekBarkey handlingSeekBarwrapsSliderand follows Google's Playback controls on TV guide:seekOffsetseconds and keeps the current play/pause state, using the newSeekBarState.seekTo(value).onValueChange) and resumes on key-up (onValueChangeFinished).LoadingSpinnertv-materialhas noCircularProgressIndicator, so the indeterminate one is copied (with attribution) from Material3'sProgressIndicator.ktinto an internalCircularProgressIndicator, so it matches mobile (rounded ends, same motion). Like on mobile,LoadingSpinnerwraps it inAnimatedVisibilitywith a delayedfadeInand an immediate exit.Shared resources and theme
:ui'sstrings.xmland theplay/pause/languagedrawables move to:ui-common, so:ui-tvcan use them undernonTransitiveRClass. Resource names are unchanged, so app overrides of@string/theoplayer_ui_*keep working. Kotlin code that uses these resources now refers tocom.theoplayer.android.ui.common.R.formatTime: stays public in:uiand delegates to the new@InternalUiApi formatPlaybackTimein:ui-common.md_theme_*palette,PlayerColorsandLocalPlayerColorsmove to:ui-common.PlayerColorskeeps its package.THEOplayerTvThemenow defaults to the THEOplayer dark scheme (yellow#FFC50Fprimary) instead oftv-material's stock purple.border/borderVariantmap tooutline/outlineVariant. The theme also gets a newplayerColorsparameter, which the TVLiveButtonuses for its live/DVR dot.Tests
New Robolectric tests in
:ui-tv:PlayButton: play, pause and replay.Slider: single press, held drag, clamping, disabled state, finishing on focus loss or disable, syncing an external value.SeekBar: focus, single press, held scrub, clamping, disabled state, and finishing a scrub on disable or on focus loss.SeekBarStateTestcoversseekTo.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