From c39f2b5a699b8869e1896ef9658b7124f1c1e39e Mon Sep 17 00:00:00 2001 From: Foxster <77606385+therealFoxster@users.noreply.github.com> Date: Thu, 6 Oct 2022 14:29:19 -0700 Subject: [PATCH] Update DontEatMyContent (1.0.0 -> 1.0.2) Add -(void)resetForVideoWithAspectRatio:(double) as fallback in case -(void)singleVideo:(id)aspectRatioDidChange:(CGFloat) never gets called --- uYouPlus.xm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/uYouPlus.xm b/uYouPlus.xm index 203b9af..6618d45 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -927,6 +927,7 @@ NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *cen - (void)didSwipeToExitFullscreen { %orig; deactivate(); } +// Get video aspect ratio; doesn't work for some users; see -(void)resetForVideoWithAspectRatio:(double) - (void)singleVideo:(id)arg1 aspectRatioDidChange:(CGFloat)arg2 { aspectRatio = arg2; if (aspectRatio == 0.0) { @@ -958,6 +959,21 @@ NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *cen %orig(NO); } %end + +%hook YTVideoZoomOverlayController +// Get video aspect ratio; fallback for -(void)singleVideo:(id)aspectRatioDidChange:(CGFloat) +- (void)resetForVideoWithAspectRatio:(double)arg1 { + aspectRatio = arg1; + %log; + if (aspectRatio == 0.0) {} + else if (aspectRatio < THRESHOLD) { + deactivate(); + } else { + activate(); + } + %orig(arg1); +} +%end %end // gDontEatMyContent // DontEatMycontent - detecting device model