diff --git a/Sources/uYouPlusPatches.xm b/Sources/uYouPlusPatches.xm index d05f611..9926bd4 100644 --- a/Sources/uYouPlusPatches.xm +++ b/Sources/uYouPlusPatches.xm @@ -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, *)) {