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