Skip to content

Commit

Permalink
Add support for disabling mobile media-viewer's fullscreen auto-rotate (
Browse files Browse the repository at this point in the history
  • Loading branch information
flubber1234 authored and halkeye committed Sep 1, 2024
1 parent 499a27e commit 8ab0260
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 2 deletions.
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 @@ -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,
Expand Down Expand Up @@ -679,6 +681,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

0 comments on commit 8ab0260

Please sign in to comment.