Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit c39f2b5

Browse files
Update DontEatMyContent (1.0.0 -> 1.0.2)
Add -(void)resetForVideoWithAspectRatio:(double) as fallback in case -(void)singleVideo:(id)aspectRatioDidChange:(CGFloat) never gets called
1 parent f66d9a4 commit c39f2b5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

uYouPlus.xm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,7 @@ NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *cen
927927
- (void)didSwipeToExitFullscreen {
928928
%orig; deactivate();
929929
}
930+
// Get video aspect ratio; doesn't work for some users; see -(void)resetForVideoWithAspectRatio:(double)
930931
- (void)singleVideo:(id)arg1 aspectRatioDidChange:(CGFloat)arg2 {
931932
aspectRatio = arg2;
932933
if (aspectRatio == 0.0) {
@@ -958,6 +959,21 @@ NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *cen
958959
%orig(NO);
959960
}
960961
%end
962+
963+
%hook YTVideoZoomOverlayController
964+
// Get video aspect ratio; fallback for -(void)singleVideo:(id)aspectRatioDidChange:(CGFloat)
965+
- (void)resetForVideoWithAspectRatio:(double)arg1 {
966+
aspectRatio = arg1;
967+
%log;
968+
if (aspectRatio == 0.0) {}
969+
else if (aspectRatio < THRESHOLD) {
970+
deactivate();
971+
} else {
972+
activate();
973+
}
974+
%orig(arg1);
975+
}
976+
%end
961977
%end // gDontEatMyContent
962978

963979
// DontEatMycontent - detecting device model

0 commit comments

Comments
 (0)