Merge pull request #4800 from Bnyro/master

fix: crash when the app was closed for a while
This commit is contained in:
Bnyro 2023-09-17 15:24:26 +02:00 committed by GitHub
commit 5e30895d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(),