File tree 1 file changed +8
-1
lines changed
extensions/youtube/src/main/java/app/revanced/extension/youtube/patches
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
package app .revanced .extension .youtube .patches ;
2
2
3
3
import app .revanced .extension .youtube .settings .Settings ;
4
+ import app .revanced .extension .youtube .shared .PlayerType ;
4
5
import app .revanced .extension .youtube .shared .ShortsPlayerState ;
5
6
6
7
@ SuppressWarnings ("unused" )
@@ -23,7 +24,13 @@ public static boolean isBackgroundPlaybackAllowed(boolean original) {
23
24
// 7. Close the Short
24
25
// 8. Resume playing the regular video
25
26
// 9. Minimize the app (PIP should appear)
26
- return !ShortsPlayerState .isOpen ();
27
+ if (ShortsPlayerState .isOpen ()) {
28
+ return false ;
29
+ }
30
+
31
+ // Check if the video player is opened and it's not playing in the feed.
32
+ PlayerType current = PlayerType .getCurrent ();
33
+ return !current .isNoneOrHidden () && current != PlayerType .INLINE_MINIMAL ;
27
34
}
28
35
29
36
/**
You can’t perform that action at this time.
0 commit comments