Skip to content

Commit

Permalink
Fix android#157: Avoiding seekBack and seekForward, while controls ar…
Browse files Browse the repository at this point in the history
…e visible
  • Loading branch information
Geletinousamigo committed Mar 24, 2024
1 parent 2b4fc33 commit b09ec22
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -281,12 +281,16 @@ private fun Modifier.dPadEvents(
pulseState: VideoPlayerPulseState
): Modifier = this.handleDPadKeyEvents(
onLeft = {
exoPlayer.seekBack()
pulseState.setType(BACK)
if (!videoPlayerState.controlsVisible) {
exoPlayer.seekBack()
pulseState.setType(BACK)
}
},
onRight = {
exoPlayer.seekForward()
pulseState.setType(FORWARD)
if (!videoPlayerState.controlsVisible) {
exoPlayer.seekForward()
pulseState.setType(FORWARD)
}
},
onUp = { videoPlayerState.showControls() },
onDown = { videoPlayerState.showControls() },
Expand Down

0 comments on commit b09ec22

Please sign in to comment.