Don't kill the app when closing through PiP

This commit is contained in:
Bnyro 2023-01-27 16:29:59 +01:00
parent 9ec166dcef
commit a3e0c40a0f

View File

@ -1439,10 +1439,8 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
updateCaptionsLanguage(null)
} else if (lifecycle.currentState == Lifecycle.State.CREATED) {
// close button got clicked in PiP mode
// destroying the fragment, player and notification
onDestroy()
// finish the activity
activity?.finishAndRemoveTask()
// pause the video and keep the app alive
exoPlayer.pause()
} else {
// enable exoPlayer controls again
exoPlayerView.useController = true