Prevent uYou's playback from colliding with YouTube's

This commit is contained in:
Foxster 2023-12-25 17:17:09 -08:00
parent e4d1875ae8
commit b594765d69

View file

@ -159,6 +159,19 @@ static void refreshUYouAppearance() {
}
%end
// Prevent uYou's playback from colliding with YouTube's
BOOL isYTPlaybackActive = NO;
%hook HAMPlayerInternal
- (void)play { %orig; isYTPlaybackActive = YES; }
- (void)terminate { %orig; isYTPlaybackActive = NO; }
%end
%hook PlayerManager
- (void)play {
if (isYTPlaybackActive) return;
%orig;
}
%end
%ctor {
%init;
if (@available(iOS 16, *)) {