Skip to content

Commit f3b36b7

Browse files
committed
Workaround for uYou Playback speed control
1 parent 833c0dc commit f3b36b7

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

Sources/uYouPlusPatches.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
#import <YouTubeHeader/YTCommonColorPalette.h>
2+
#import <YouTubeHeader/YTPlayerViewController.h>
3+
#import <YouTubeHeader/YTSingleVideoController.h>
24
#import <YouTubeHeader/GOODialogView.h>
35
#import "uYouPlus.h"
46

5-
@interface YTSingleVideoController : NSObject
6-
-(float)playbackRate;
7-
-(void)setPlaybackRate:(float)arg1;
8-
@end
9-
10-
@interface YTPlayerViewController : UIViewController
11-
-(YTSingleVideoController *)activeVideo;
12-
@end
13-
147
@interface PlayerManager : NSObject
158
// Prevent uYou player bar from showing when not playing downloaded media
169
- (float)progress;

Sources/uYouPlusPatches.xm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,17 @@ static void refreshUYouAppearance() {
239239
}
240240
%end
241241

242+
%hook YTPlayerViewController
243+
244+
- (id)varispeedController {
245+
id controller = %orig;
246+
if (controller == nil && [self respondsToSelector:@selector(overlayManager)])
247+
controller = [self.overlayManager varispeedController];
248+
return controller;
249+
}
250+
251+
%end
252+
242253
%ctor {
243254
%init;
244255
// if (@available(iOS 16, *)) {

Tweaks/YouTubeHeader

0 commit comments

Comments
 (0)