Steps to reproduce
- Enable "TalkBack" on your Android device
- Go to play any video
- Tap on player area -> TalkBack says "show player controls"
- Activate it to make Player controls show
- Tap on pause button -> video is paused, but accessibility focus is not on the player anymore. Ideally the focus should fall on play button. Same thing when tapping on play button.
Here is the xml of my exoplayer controls, the playerPlayPauseContainer is inside the exoplayer control view xml file.
<FrameLayout
android:id="@+id/playerPlayPauseContainer"
android:layout_width="46dp"
android:layout_height="66dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5">
<com.cw.app.ui.playback.PlayerControlButton
android:id="@id/exo_play"
style="@style/PlaybackControlButton.PlayPause"
android:contentDescription="@string/playback_play"
app:srcCompat="@drawable/ic_playback_hollow_play" />
<com.cw.app.ui.playback.PlayerControlButton
android:id="@id/exo_pause"
style="@style/PlaybackControlButton.PlayPause"
android:contentDescription="@string/playback_pause"
app:srcCompat="@drawable/ic_playback_pause" />
</FrameLayout>
This is causing inconvenience to our users who use TalkBack. After they tap play/pause button, they would need to navigate all the way back to the controls on the player.
I tried to manually set accessibility focus in Google IMA "VideoStreamPlayer" onPlay() and onPause() events, but didn't work. It looks like the player controls aren't able to be set accessibility focus easily. Is there something we can do? Thanks!
ExoPlayer version number: 2.11.3 and 2.14.1
Android version: Android 10; Android 7
Android device: Samsung Tab A; Nexus 9
Steps to reproduce
Here is the xml of my exoplayer controls, the
playerPlayPauseContaineris inside the exoplayer control view xml file.This is causing inconvenience to our users who use TalkBack. After they tap play/pause button, they would need to navigate all the way back to the controls on the player.
I tried to manually set accessibility focus in Google IMA "VideoStreamPlayer" onPlay() and onPause() events, but didn't work. It looks like the player controls aren't able to be set accessibility focus easily. Is there something we can do? Thanks!
ExoPlayer version number: 2.11.3 and 2.14.1
Android version: Android 10; Android 7
Android device: Samsung Tab A; Nexus 9