mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-01-11 22:40:19 +00:00
Prevent uYou's playback from colliding with YouTube's
This commit is contained in:
parent
e4d1875ae8
commit
b594765d69
1 changed files with 13 additions and 0 deletions
|
|
@ -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, *)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue