Add support for disabling mobile media-viewer's fullscreen auto-rotate (#4416)

This commit is contained in:
flubber1234 2024-01-16 04:00:58 +00:00 committed by GitHub
parent 403f7c54ef
commit 29677696fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 2 deletions

View file

@ -539,7 +539,6 @@ func TestMain(m *testing.M) {
// initialise empty config - needed by some migrations
_ = config.InitializeEmpty()
ret := runTests(m)
os.Exit(ret)
}

View file

@ -553,7 +553,9 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
enterOnRotate: true,
exitOnRotate: true,
lockOnRotate: true,
lockToLandscapeOnEnter: isLandscape,
lockToLandscapeOnEnter: uiConfig?.disableMobileMediaAutoRotateEnabled
? false
: isLandscape,
},
touchControls: {
disabled: true,
@ -679,6 +681,7 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
autoplay,
interfaceConfig?.autostartVideo,
uiConfig?.alwaysStartFromBeginning,
uiConfig?.disableMobileMediaAutoRotateEnabled,
_initialTimestamp,
]);

View file

@ -278,6 +278,12 @@ export const SettingsInterfacePanel: React.FC = () => {
checked={ui.enableChromecast ?? undefined}
onChange={(v) => saveUI({ enableChromecast: v })}
/>
<BooleanSetting
id="disable-mobile-media-auto-rotate"
headingID="config.ui.scene_player.options.disable_mobile_media_auto_rotate"
checked={ui.disableMobileMediaAutoRotateEnabled ?? undefined}
onChange={(v) => saveUI({ disableMobileMediaAutoRotateEnabled: v })}
/>
<BooleanSetting
id="show-scrubber"
headingID="config.ui.scene_player.options.show_scrubber"

View file

@ -60,6 +60,9 @@ export interface IUIConfig {
// if true the chromecast option will enabled
enableChromecast?: boolean;
// if true the fullscreen mobile media auto-rotate option will be disabled
disableMobileMediaAutoRotateEnabled?: boolean;
// if true continue scene will always play from the beginning
alwaysStartFromBeginning?: boolean;
// if true enable activity tracking

View file

@ -701,6 +701,7 @@
"heading": "Continue playlist by default"
},
"enable_chromecast": "Enable Chromecast",
"disable_mobile_media_auto_rotate": "Disable auto-rotate of fullscreen media on Mobile",
"show_ab_loop_controls": "Show AB Loop plugin controls",
"show_scrubber": "Show Scrubber",
"track_activity": "Track Activity",

View file

@ -690,6 +690,7 @@
"heading": "Continuer la liste de lecture par défaut"
},
"enable_chromecast": "Activer Chromecast",
"disable_mobile_media_auto_rotate": "Désactiver la rotation automatique des médias en plein écran sur mobile",
"show_scrubber": "Montrer la barre de progression",
"track_activity": "Suivre l'activité",
"vr_tag": {

View file

@ -680,6 +680,7 @@
"heading": "VR Tagg"
},
"enable_chromecast": "Aktivera Chromecast",
"disable_mobile_media_auto_rotate": "Inaktivera automatisk rotering av helskärmsmedia på mobil",
"show_ab_loop_controls": "Visa AB-loop plugin kontroller"
}
},