Merge pull request #4370 from Bnyro/master

fix: crash when pip not supported
This commit is contained in:
Bnyro 2023-08-05 10:24:44 +02:00 committed by GitHub
commit 2e5a02cff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -622,10 +622,12 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
// disable the auto PiP mode for SDK >= 32
exoPlayer.pause()
PictureInPictureCompat.setPictureInPictureParams(
requireActivity(),
pipParams
)
if (PlayerHelper.pipEnabled) {
PictureInPictureCompat.setPictureInPictureParams(
requireActivity(),
pipParams
)
}
handler.removeCallbacksAndMessages(null)