uYouPlus Sync

Added the new stuff from qnblackcat’s uYouPlus.
This commit is contained in:
arichornlover 2024-04-24 06:22:12 -05:00 committed by GitHub
parent 7dedb8d6cb
commit 52937e16cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,7 @@ static int contrastMode() {
}
//
# pragma mark - Tweaks
# pragma mark - Other hooks
// Activate FLEX
%hook YTAppDelegate
@ -52,6 +52,33 @@ static int contrastMode() {
}
%end
// Fixes uYou crash when trying to play video (#1422)
@interface YTVarispeedSwitchController : NSObject
@end
@interface YTPlayerOverlayManager : NSObject
@property (nonatomic, assign) float currentPlaybackRate;
@property (nonatomic, strong, readonly) YTVarispeedSwitchController *varispeedController;
- (void)varispeedSwitchController:(YTVarispeedSwitchController *)varispeed didSelectRate:(float)rate;
- (void)setCurrentPlaybackRate:(float)rate;
- (void)setPlaybackRate:(float)rate;
@end
%hook YTPlayerOverlayManager
%property (nonatomic, assign) float currentPlaybackRate;
%new
- (void)setCurrentPlaybackRate:(float)rate {
[self varispeedSwitchController:self.varispeedController didSelectRate:rate];
}
%new
- (void)setPlaybackRate:(float)rate {
[self varispeedSwitchController:self.varispeedController didSelectRate:rate];
}
%end
// Enable Alternate Icons
%hook UIApplication
- (BOOL)supportsAlternateIcons {
@ -678,7 +705,6 @@ BOOL isAd(YTIElementRenderer *self) {
%end
%end
// Video Controls Overlay Options
// Hide CC / Hide Autoplay switch / Hide YTMusic Button / Enable Share Button / Enable Save to Playlist Button
%hook YTMainAppControlsOverlayView