Update uYouPlus.xm

This commit is contained in:
arichornlover 2024-04-07 18:07:41 -05:00 committed by GitHub
parent 293f3e2f98
commit 9af049cd65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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