diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt index 2130613a8..09cd1974f 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt @@ -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)