mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 03:32:08 +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
|
%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 {
|
%ctor {
|
||||||
%init;
|
%init;
|
||||||
if (@available(iOS 16, *)) {
|
if (@available(iOS 16, *)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue