fix: crash when pip not supported

This commit is contained in:
Bnyro 2023-08-05 10:25:19 +02:00
parent f2c2834e3f
commit c83a8ee1b7

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)