From 9af049cd6510fef65097ae22f98f4fbdf4a665e2 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:07:41 -0500 Subject: [PATCH] Update uYouPlus.xm --- Sources/uYouPlus.xm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 8ed236b..b2eba39 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -786,15 +786,28 @@ BOOL isAd(YTIElementRenderer *self) { // Bring back the Red Progress Bar and Gray Buffer Progress %group gRedProgressBar -%hook YTInlinePlayerBarContainerView +%hook YTSegmentableInlinePlayerBarView +- (void)setBufferedProgressBarColor:(id)arg1 { + [UIColor colorWithRed:1.00 green:1.00 blue:1.00 alpha:0.50]; +} +%end + +%hook YTInlinePlayerBarContainerView // Red Progress Bar - Old (Compatible for v17.33.2-v19.10.7) - (id)quietProgressBarColor { return [UIColor redColor]; } %end -%hook YTSegmentableInlinePlayerBarView -- (void)setBufferedProgressBarColor:(id)arg1 { - [UIColor colorWithRed:1.00 green:1.00 blue:1.00 alpha:0.50]; +%hook YTPlayerBarRectangleDecorationView // Red Progress Bar - New (Compatible for v19.10.7-latest) +- (void)drawRectangleDecorationWithSideMasks:(CGRect)rect { + if (IS_ENABLED(@"redProgressBar_enabled")) { + YTIPlayerBarDecorationModel *model = [self valueForKey:@"_model"]; + int overlayMode = model.playingState.overlayMode; + model.playingState.overlayMode = 1; + %orig; + model.playingState.overlayMode = overlayMode; + } else + %orig; } %end %end