This commit is contained in:
Nguyễn Đạt
2022-09-28 10:52:39 +07:00
committed by GitHub
parent b56461a439
commit 2657f8ca7c
+4 -7
View File
@@ -881,9 +881,7 @@ static void replaceTab(YTIGuideResponse *response) {
%end %end
%end %end
#define UNSUPPORTED_DEVICES @[@"iPhone14,3", @"iPhone14,6", @"iPhone14,8"] // DontEatMyContent - @therealFoxster: https://github.com/therealFoxster/DontEatMyContent
#define THRESHOLD 1.99
double aspectRatio = 16/9; double aspectRatio = 16/9;
bool zoomedToFill = false; bool zoomedToFill = false;
@@ -892,7 +890,6 @@ NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *cen
%group gDontEatMyContent %group gDontEatMyContent
%hook YTPlayerViewController %hook YTPlayerViewController
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
YTPlayerView *playerView = [self playerView]; YTPlayerView *playerView = [self playerView];
UIView *renderingViewContainer = MSHookIvar<UIView *>(playerView, "_renderingViewContainer"); UIView *renderingViewContainer = MSHookIvar<UIView *>(playerView, "_renderingViewContainer");
@@ -917,6 +914,7 @@ NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *cen
} else { } else {
center(); center();
} }
%orig(animated); %orig(animated);
} }
- (void)didPressToggleFullscreen { - (void)didPressToggleFullscreen {
@@ -958,18 +956,17 @@ NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *cen
zoomedToFill = true; zoomedToFill = true;
deactivate(); deactivate();
} }
%orig(pinchGestureRecognizer); %orig(pinchGestureRecognizer);
} }
- (void)flashAndHideSnapIndicator {} - (void)flashAndHideSnapIndicator {}
// https://github.com/lgariv/UniZoom/blob/master/Tweak.xm // https://github.com/lgariv/UniZoom/blob/master/Tweak.xm
- (void)setSnapIndicatorVisible:(bool)arg1 { - (void)setSnapIndicatorVisible:(bool)arg1 {
%orig(NO); %orig(NO);
} }
%end %end
%end %end // gDontEatMyContent
// DontEatMycontent - detecting device model
// https://stackoverflow.com/a/11197770/19227228 // https://stackoverflow.com/a/11197770/19227228
NSString* deviceName() { NSString* deviceName() {
struct utsname systemInfo; struct utsname systemInfo;