diff --git a/YTLite.h b/YTLite.h index 0eb015e..74e4c0a 100644 --- a/YTLite.h +++ b/YTLite.h @@ -48,6 +48,7 @@ BOOL kNoRelatedVids; BOOL kNoPromotionCards; BOOL kNoWatermarks; BOOL kMiniplayer; +BOOL kPortraitFullscreen; BOOL kDisableAutoplay; BOOL kNoContentWarning; BOOL kClassicQuality; diff --git a/YTLite.x b/YTLite.x index ea1f43b..42cd97f 100644 --- a/YTLite.x +++ b/YTLite.x @@ -242,6 +242,11 @@ - (void)updateMiniBarPlayerStateFromRenderer { if (!kMiniplayer) %orig; } %end +// Portrait Fullscreen +%hook YTWatchViewController +- (unsigned long long)allowedFullScreenOrientations { return kPortraitFullscreen ? UIInterfaceOrientationMaskAllButUpsideDown : %orig; } +%end + // Disable Autoplay %hook YTPlaybackConfig - (void)setStartPlayback:(BOOL)arg1 { kDisableAutoplay ? %orig(NO) : %orig; } @@ -705,6 +710,7 @@ static void reloadPrefs() { kNoPromotionCards = [prefs[@"noPromotionCards"] boolValue] ?: NO; kNoWatermarks = [prefs[@"noWatermarks"] boolValue] ?: NO; kMiniplayer = [prefs[@"miniplayer"] boolValue] ?: NO; + kPortraitFullscreen = [prefs[@"portraitFullscreen"] boolValue] ?: NO; kDisableAutoplay = [prefs[@"disableAutoplay"] boolValue] ?: NO; kNoContentWarning = [prefs[@"noContentWarning"] boolValue] ?: NO; kClassicQuality = [prefs[@"classicQuality"] boolValue] ?: NO; @@ -769,6 +775,7 @@ static void reloadPrefs() { @"noPromotionCards" : @(kNoPromotionCards), @"noWatermarks" : @(kNoWatermarks), @"miniplayer" : @(kMiniplayer), + @"portraitFullscreen" : @(kPortraitFullscreen), @"disableAutoplay" : @(kDisableAutoplay), @"noContentWarning" : @(kNoContentWarning), @"classicQuality" : @(kClassicQuality), diff --git a/layout/Library/Application Support/YTLite.bundle/en.lproj/Localizable.strings b/layout/Library/Application Support/YTLite.bundle/en.lproj/Localizable.strings index 9c480da..a6069a8 100644 --- a/layout/Library/Application Support/YTLite.bundle/en.lproj/Localizable.strings +++ b/layout/Library/Application Support/YTLite.bundle/en.lproj/Localizable.strings @@ -47,6 +47,8 @@ "Player" = "Player"; "Miniplayer" = "Enable mini player"; "MiniplayerDesc" = "Enables the mini player for videos that were not originally designed for it, such as videos targeted for children."; +"PortraitFullscreen" = "Portrait fullscreen mode"; +"PortraitFullscreenDesc" = "Enables portrait fullscreen mode support."; "DisableAutoplay" = "Disable Autoplay videos"; "DisableAutoplayDesc" = "Prevents video playback after opening."; "NoContentWarning" = "Skip content warning"; diff --git a/layout/Library/Application Support/YTLite.bundle/es.lproj/Localizable.strings b/layout/Library/Application Support/YTLite.bundle/es.lproj/Localizable.strings index db57713..1a3d444 100644 --- a/layout/Library/Application Support/YTLite.bundle/es.lproj/Localizable.strings +++ b/layout/Library/Application Support/YTLite.bundle/es.lproj/Localizable.strings @@ -47,6 +47,8 @@ "Player" = "Reproductor"; "Miniplayer" = "Activar mini reproductor"; "MiniplayerDesc" = "Activa el mini reproductor para vídeos que no fueron diseñados originalmente para ello, como los vídeos dirigidos a niños."; +"PortraitFullscreen" = "Portrait fullscreen mode"; +"PortraitFullscreenDesc" = "Enables portrait fullscreen mode support."; "DisableAutoplay" = "Desactivar reproducción automática"; "DisableAutoplayDesc" = "Evita la reproducción automática de vídeos después de abrirlos."; "NoContentWarning" = "Omitir advertencia de contenido"; diff --git a/layout/Library/Application Support/YTLite.bundle/fr.lproj/Localizable.strings b/layout/Library/Application Support/YTLite.bundle/fr.lproj/Localizable.strings index d1167d9..bda8f0c 100644 --- a/layout/Library/Application Support/YTLite.bundle/fr.lproj/Localizable.strings +++ b/layout/Library/Application Support/YTLite.bundle/fr.lproj/Localizable.strings @@ -47,6 +47,8 @@ "Player" = "Lecteur"; "Miniplayer" = "Activer le mini-lecteur"; "MiniplayerDesc" = "Active le mini-lecteur pour les vidéos qui n'étaient pas initialement conçues pour cela, comme les vidéos destinées aux enfants."; +"PortraitFullscreen" = "Portrait fullscreen mode"; +"PortraitFullscreenDesc" = "Enables portrait fullscreen mode support."; "DisableAutoplay" = "Désactiver la lecture automatique des vidéos"; "DisableAutoplayDesc" = "Empêche la lecture des vidéos après ouverture."; "NoContentWarning" = "Passer l'avertissement de contenu"; diff --git a/layout/Library/Application Support/YTLite.bundle/ru.lproj/Localizable.strings b/layout/Library/Application Support/YTLite.bundle/ru.lproj/Localizable.strings index e1ec0c0..41606e8 100644 --- a/layout/Library/Application Support/YTLite.bundle/ru.lproj/Localizable.strings +++ b/layout/Library/Application Support/YTLite.bundle/ru.lproj/Localizable.strings @@ -47,6 +47,8 @@ "Player" = "Настройки плеера"; "Miniplayer" = "Разрешить миниплеер"; "MiniplayerDesc" = "Принудительно активирует миниплеер для видео, в которых изначально не был предназначен (например, видеоролики для детей)."; +"PortraitFullscreen" = "Портретный полноэкранный режим"; +"PortraitFullscreenDesc" = "Активирует поддержку портретного полноэкранного режима."; "DisableAutoplay" = "Запретить автовоспроизведение"; "DisableAutoplayDesc" = "Принудительно запрещает автовоспроизведение видео при его открытии."; "NoContentWarning" = "Пропускать предупреждения"; diff --git a/layout/Library/Application Support/YTLite.bundle/zh-Hans.lproj/Localizable.strings b/layout/Library/Application Support/YTLite.bundle/zh-Hans.lproj/Localizable.strings index 5e42eee..529c9fc 100644 --- a/layout/Library/Application Support/YTLite.bundle/zh-Hans.lproj/Localizable.strings +++ b/layout/Library/Application Support/YTLite.bundle/zh-Hans.lproj/Localizable.strings @@ -47,6 +47,8 @@ "Player" = "播放器"; "Miniplayer" = "启用迷你播放器"; "MiniplayerDesc" = "启用迷你播放器来播放最初不是为其设计的视频,例如针对儿童的视频。"; +"PortraitFullscreen" = "Portrait fullscreen mode"; +"PortraitFullscreenDesc" = "Enables portrait fullscreen mode support."; "DisableAutoplay" = "禁用自动播放视频"; "DisableAutoplayDesc" = "打开后防止视频自动播放。"; "NoContentWarning" = "跳过内容警告"; diff --git a/layout/Library/Application Support/YTLite.bundle/zh-Hant.lproj/Localizable.strings b/layout/Library/Application Support/YTLite.bundle/zh-Hant.lproj/Localizable.strings index 94d7ef0..edeb990 100644 --- a/layout/Library/Application Support/YTLite.bundle/zh-Hant.lproj/Localizable.strings +++ b/layout/Library/Application Support/YTLite.bundle/zh-Hant.lproj/Localizable.strings @@ -47,6 +47,8 @@ "Player" = "播放器"; "Miniplayer" = "啟用迷你播放器"; "MiniplayerDesc" = "對於原本不支援迷你播放器的影片(例如針對兒童的影片),啟用迷你播放器"; +"PortraitFullscreen" = "Portrait fullscreen mode"; +"PortraitFullscreenDesc" = "Enables portrait fullscreen mode support."; "DisableAutoplay" = "停用自動播放"; "DisableAutoplayDesc" = "在打開應用程式後防止自動播放影片"; "NoContentWarning" = "略過內容警告"; diff --git a/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm.deb b/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm.deb index 957cebb..923c0b0 100644 Binary files a/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm.deb and b/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm.deb differ diff --git a/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm64.deb b/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm64.deb index 4807340..db500ee 100644 Binary files a/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm64.deb and b/packages/com.dvntm.ytlite_2.2.1_iphoneos-arm64.deb differ