From 217d671a349f828edda6ba1372e84eaece581884 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 26 Sep 2024 16:05:35 +0200 Subject: [PATCH] fix: pip controls don't work if auto-PiP is disabled --- .../java/com/github/libretube/ui/fragments/PlayerFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d47c69ab2..81acaa88f 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 @@ -244,7 +244,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { private val playerListener = object : Player.Listener { override fun onIsPlayingChanged(isPlaying: Boolean) { - if (PlayerHelper.pipEnabled) { + if (PlayerHelper.pipEnabled || PictureInPictureCompat.isInPictureInPictureMode(mainActivity)) { PictureInPictureCompat.setPictureInPictureParams(requireActivity(), pipParams) }