mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Don't kill the app when closing through PiP
This commit is contained in:
parent
9ec166dcef
commit
a3e0c40a0f
@ -1439,10 +1439,8 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
|||||||
updateCaptionsLanguage(null)
|
updateCaptionsLanguage(null)
|
||||||
} else if (lifecycle.currentState == Lifecycle.State.CREATED) {
|
} else if (lifecycle.currentState == Lifecycle.State.CREATED) {
|
||||||
// close button got clicked in PiP mode
|
// close button got clicked in PiP mode
|
||||||
// destroying the fragment, player and notification
|
// pause the video and keep the app alive
|
||||||
onDestroy()
|
exoPlayer.pause()
|
||||||
// finish the activity
|
|
||||||
activity?.finishAndRemoveTask()
|
|
||||||
} else {
|
} else {
|
||||||
// enable exoPlayer controls again
|
// enable exoPlayer controls again
|
||||||
exoPlayerView.useController = true
|
exoPlayerView.useController = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user