Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion pkg/sqlite/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ func TestMain(m *testing.M) {
// initialise empty config - needed by some migrations
_ = config.InitializeEmpty()


ret := runTests(m)
os.Exit(ret)
}
Expand Down
5 changes: 4 additions & 1 deletion ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
enterOnRotate: true,
exitOnRotate: true,
lockOnRotate: true,
lockToLandscapeOnEnter: isLandscape,
lockToLandscapeOnEnter: uiConfig?.disableMobileMediaAutoRotateEnabled
? false
: isLandscape,
},
touchControls: {
disabled: true,
Expand Down Expand Up @@ -680,6 +682,7 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
autoplay,
interfaceConfig?.autostartVideo,
uiConfig?.alwaysStartFromBeginning,
uiConfig?.disableMobileMediaAutoRotateEnabled,
_initialTimestamp,
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions ui/v2.5/src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ui/v2.5/src/locales/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions ui/v2.5/src/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions ui/v2.5/src/locales/sv-SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
Expand Down