Add missing initial update to the subtitle button in the session demo
The button gets only updated after an onTracksChanged callback but isn't set to the initial state similar to other changes triggered by callbacks (e.g. updateRepeatSwitchUI) PiperOrigin-RevId: 522274800
This commit is contained in:
parent
3fc61bb7c7
commit
14ba173dfe
@ -135,6 +135,7 @@ class PlayerActivity : AppCompatActivity() {
|
||||
updateMediaMetadataUI(controller.mediaMetadata)
|
||||
updateShuffleSwitchUI(controller.shuffleModeEnabled)
|
||||
updateRepeatSwitchUI(controller.repeatMode)
|
||||
playerView.setShowSubtitleButton(controller.currentTracks.isTypeSupported(TRACK_TYPE_TEXT))
|
||||
|
||||
controller.addListener(
|
||||
object : Player.Listener {
|
||||
|
Loading…
x
Reference in New Issue
Block a user