Skip to content

Commit

Permalink
Merge pull request #159 from Geletinousamigo/main
Browse files Browse the repository at this point in the history
Fix #157: Avoiding seekBack and seekForward, while controls are visible
  • Loading branch information
chikoski committed May 17, 2024
2 parents 7c9d07d + b09ec22 commit fc5dcc0
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
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 fc5dcc0

Please sign in to comment.