pause the player when PiP is disabled

This commit is contained in:
Bnyro 2022-12-08 18:27:41 +01:00
parent 92c60302e8
commit 55417a76b2

View File

@ -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)