Skip to content

Commit

Permalink
uYouLocal crash workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
level3tjg committed Jun 23, 2022
1 parent f2cb699 commit 2116d96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
displayLanguage:(NSString *)displayLanguage;
@end

// uYouLocal fix
@interface YTLocalPlaybackController : NSObject
- (id)activeVideo;
@end

// BigYTMiniPlayer
@interface YTMainAppVideoPlayerOverlayView : UIView
- (UIViewController *)_viewControllerForAncestor;
Expand Down
8 changes: 8 additions & 0 deletions uYouPlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ BOOL ytMiniPlayer() {
}
%end

// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/140
%hook YTLocalPlaybackController
%new
- (id)activeVideoController {
return [self activeVideo];
}
%end

// YTClassicVideoQuality: https://github.com/PoomSmart/YTClassicVideoQuality
%hook YTVideoQualitySwitchControllerFactory
- (id)videoQualitySwitchControllerWithParentResponder:(id)responder {
Expand Down

0 comments on commit 2116d96

Please sign in to comment.