mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
fix uYou crashes on 18.49.3+, see https://github.com/iCrazeiOS/uYouCrashFix
This commit is contained in:
parent
1d5f61cfbf
commit
449a8a99d6
2 changed files with 23 additions and 1 deletions
|
|
@ -1,6 +1,15 @@
|
|||
#import "../Tweaks/YouTubeHeader/YTCommonColorPalette.h"
|
||||
#import "uYouPlus.h"
|
||||
|
||||
@interface YTSingleVideoController : NSObject
|
||||
-(float)playbackRate;
|
||||
-(void)setPlaybackRate:(float)arg1;
|
||||
@end
|
||||
|
||||
@interface YTPlayerViewController : UIViewController
|
||||
-(YTSingleVideoController *)activeVideo;
|
||||
@end
|
||||
|
||||
// Prevent uYou player bar from showing when not playing downloaded media
|
||||
@interface PlayerManager : NSObject
|
||||
- (float)progress;
|
||||
|
|
|
|||
|
|
@ -80,6 +80,19 @@
|
|||
%end
|
||||
%end
|
||||
|
||||
// Fix uYou playback speed crashes YT v18.49.3+, see https://github.com/iCrazeiOS/uYouCrashFix
|
||||
%hook YTPlayerViewController
|
||||
%new
|
||||
-(float)currentPlaybackRateForVarispeedSwitchController:(id)arg1 {
|
||||
return [[self activeVideo] playbackRate];
|
||||
}
|
||||
|
||||
%new
|
||||
-(void)varispeedSwitchController:(id)arg1 didSelectRate:(float)arg2 {
|
||||
[[self activeVideo] setPlaybackRate:arg2];
|
||||
}
|
||||
%end
|
||||
|
||||
// Fix streched artwork in uYou's player view - https://github.com/MiRO92/uYou-for-YouTube/issues/287
|
||||
%hook ArtworkImageView
|
||||
- (id)imageView {
|
||||
|
|
@ -196,5 +209,5 @@ BOOL isYTPlaybackActive = NO;
|
|||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"disableAgeRestriction"];
|
||||
|
||||
// Disable uYou's playback speed controls (prevent crash on video playback https://github.com/therealFoxster/uYouPlus/issues/2#issuecomment-1894912963)
|
||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showPlaybackRate"];
|
||||
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showPlaybackRate"];
|
||||
}
|
||||
Loading…
Reference in a new issue