fix: crash when the app was closed for a while

This commit is contained in:
Bnyro 2023-09-17 15:24:28 +02:00
parent d1979c21e0
commit 0b40039e96

View File

@ -639,8 +639,9 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
viewModel.player = null viewModel.player = null
if (this::exoPlayer.isInitialized) exoPlayer.pause()
// disable the auto PiP mode for SDK >= 32 // disable the auto PiP mode for SDK >= 32
exoPlayer.pause()
if (PlayerHelper.pipEnabled) { if (PlayerHelper.pipEnabled) {
PictureInPictureCompat.setPictureInPictureParams( PictureInPictureCompat.setPictureInPictureParams(
requireActivity(), requireActivity(),