Skip to content

Commit

Permalink
Prevent uYou's playback from colliding with YouTube's
Browse files Browse the repository at this point in the history
  • Loading branch information
therealFoxster committed Dec 26, 2023
1 parent e4d1875 commit b594765
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sources/uYouPlusPatches.xm
Original file line number Diff line number Diff line change
Expand Up @@ -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, *)) {
Expand Down

0 comments on commit b594765

Please sign in to comment.