Don't switch to landscape for portrait videos (#2665)

This commit is contained in:
dumdum7
2022-06-14 03:19:12 +02:00
committed by GitHub
parent 900ba936a9
commit 582ffa1420
2 changed files with 17 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
* Support submitting stash-box scene updates for scenes with stash ids. ([#2577](https://github.com/stashapp/stash/pull/2577))
### 🐛 Bug fixes
* Fix portrait videos orienting incorrectly in full-screen mode. ([#2665](https://github.com/stashapp/stash/pull/2665))
* Fix scene scrubber stopping scrolling after editing scene or marker. ([#2600](https://github.com/stashapp/stash/pull/2600))
* Fix folder-based galleries not auto-tagging correctly if folder name contains `.` characters. ([#2658](https://github.com/stashapp/stash/pull/2658))
* Fix scene cover in scene edit panel not being updated when changing scenes. ([#2657](https://github.com/stashapp/stash/pull/2657))

View File

@@ -185,15 +185,6 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
});
settings.updateDisplay();
(player as any).landscapeFullscreen({
fullscreen: {
enterOnRotate: true,
exitOnRotate: true,
alwaysInLandscapeMode: true,
iOS: false,
},
});
(player as any).markers();
(player as any).offset();
(player as any).sourceSelector();
@@ -495,6 +486,22 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
if (!auto && scene.paths?.screenshot) player.poster(scene.paths.screenshot);
else player.poster("");
const isLandscape =
scene.file.height &&
scene.file.width &&
scene.file.width > scene.file.height;
if (isLandscape) {
(player as any).landscapeFullscreen({
fullscreen: {
enterOnRotate: true,
exitOnRotate: true,
alwaysInLandscapeMode: true,
iOS: false,
},
});
}
// clear the offset before loading anything new.
// otherwise, the offset will be applied to the next file when
// currentTime is called.