This commit is contained in:
Bryce Hackel 2024-04-13 22:59:27 -07:00
parent a43f8ff13e
commit 420cff5432
No known key found for this signature in database
GPG key ID: F031960F08455E88
2 changed files with 1 additions and 6 deletions

View file

@ -662,21 +662,16 @@ BOOL isAd(YTIElementRenderer *self) {
// This only applies to landscape videos
%group gDisablePullToFull
%hook YTWatchPullToFullController
// New variable to store the controller
- (BOOL)shouldRecognizeOverscrollEventsFromWatchOverscrollController:(id)arg1 {
NSLog(@"bhackel - shouldRecognizeOverscrollEventsFromWatchOverscrollController");
// Get the current player orientation
YTWatchViewController *watchViewController = self.playerViewSource;
NSUInteger allowedFullScreenOrientations = [watchViewController allowedFullScreenOrientations];
NSLog(@"bhackel - current orientation: %lu", allowedFullScreenOrientations);
// Check if the current player orientation is portrait
if (allowedFullScreenOrientations == UIInterfaceOrientationMaskAllButUpsideDown
|| allowedFullScreenOrientations == UIInterfaceOrientationMaskPortrait
|| allowedFullScreenOrientations == UIInterfaceOrientationMaskPortraitUpsideDown) {
NSLog(@"bhackel - allow pull to full: YES");
return %orig;
} else {
NSLog(@"bhackel - allow pull to full: NO");
return NO;
}
}

View file

@ -229,7 +229,7 @@ extern NSBundle *uYouPlusBundle();
SWITCH_ITEM2(LOC(@"PINCH_TO_ZOOM"), LOC(@"PINCH_TO_ZOOM_DESC"), @"pinchToZoom_enabled");
SWITCH_ITEM(LOC(@"YT_MINIPLAYER"), LOC(@"YT_MINIPLAYER_DESC"), @"ytMiniPlayer_enabled");
SWITCH_ITEM2(LOC(@"STOCK_VOLUME_HUD"), LOC(@"STOCK_VOLUME_HUD_DESC"), @"stockVolumeHUD_enabled");
SWITCH_ITEM2(LOC(@"Disable portrait fullscreen gesture"), LOC(@"Disable the drag gesture to enter vertical fullscreen"), @"disablePullToFull_enabled");
SWITCH_ITEM2(LOC(@"Disable pull-to-fullscreen gesture"), LOC(@"Disable the drag gesture to enter vertical fullscreen. Only applies to landscape videos."), @"disablePullToFull_enabled");
# pragma mark - Video controls overlay options
SECTION_HEADER(LOC(@"VIDEO_PLAYER_OPTIONS"));