mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Merge pull request #2302 from Bnyro/master
Pause the player when leaving app and PiP disabled
This commit is contained in:
commit
7b644f3198
@ -1392,7 +1392,9 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
||||
fun onUserLeaveHint() {
|
||||
if (usePiP() && shouldStartPiP()) {
|
||||
activity?.enterPictureInPictureMode(getPipParams())
|
||||
return
|
||||
}
|
||||
if (!PlayerHelper.pipEnabled) exoPlayer.pause()
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
|
Loading…
Reference in New Issue
Block a user