Fix unresponsive screen when closing through PiP

This commit is contained in:
Bnyro 2023-01-27 16:32:45 +01:00
parent a3e0c40a0f
commit 34c0d8d72e

View File

@ -1437,11 +1437,11 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
viewModel.isFullscreen.value = false viewModel.isFullscreen.value = false
updateCaptionsLanguage(null) updateCaptionsLanguage(null)
} else if (lifecycle.currentState == Lifecycle.State.CREATED) { } else {
// close button got clicked in PiP mode // close button got clicked in PiP mode
// pause the video and keep the app alive // pause the video and keep the app alive
exoPlayer.pause() if (lifecycle.currentState == Lifecycle.State.CREATED) exoPlayer.pause()
} else {
// enable exoPlayer controls again // enable exoPlayer controls again
exoPlayerView.useController = true exoPlayerView.useController = true