Skip to content

Commit

Permalink
feat: don't hide controls after a timeout when video is paused
Browse files Browse the repository at this point in the history
Related #44
  • Loading branch information
ricardodalarme committed Jun 19, 2023
1 parent a721e8c commit 245591c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ fun EnhancedVideoPlayer(
currentTime = exoPlayer.currentPosition
}

LaunchedEffect(isControlsVisible) {
if (isControlsVisible && controlsVisibilityDurationInMs > 0) {
LaunchedEffect(isControlsVisible, isPlaying) {
if (
isControlsVisible && isPlaying && controlsVisibilityDurationInMs > 0
) {
delay(controlsVisibilityDurationInMs)
isControlsVisible = false
}
Expand Down

0 comments on commit 245591c

Please sign in to comment.