mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 00:13:46 +01:00
Merge af2d1fa6b0 into 39fd8a6550
This commit is contained in:
commit
2565f8f8b1
1 changed files with 13 additions and 5 deletions
|
|
@ -361,7 +361,7 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = PatchComponent(
|
|||
},
|
||||
nativeControlsForTouch: false,
|
||||
playbackRates: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
|
||||
inactivityTimeout: 2000,
|
||||
inactivityTimeout: 700,
|
||||
preload: "none",
|
||||
playsinline: true,
|
||||
techOrder: ["chromecast", "html5"],
|
||||
|
|
@ -895,15 +895,23 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = PatchComponent(
|
|||
);
|
||||
}, [getPlayer, scene]);
|
||||
|
||||
const pausedBeforeScrubber = useRef(true);
|
||||
|
||||
function onScrubberScroll() {
|
||||
if (started.current) {
|
||||
getPlayer()?.pause();
|
||||
const player = getPlayer();
|
||||
if (started.current && player) {
|
||||
pausedBeforeScrubber.current = player.paused();
|
||||
player.pause();
|
||||
}
|
||||
}
|
||||
|
||||
function onScrubberSeek(seconds: number) {
|
||||
if (started.current) {
|
||||
getPlayer()?.currentTime(seconds);
|
||||
const player = getPlayer();
|
||||
if (started.current && player) {
|
||||
player.currentTime(seconds);
|
||||
if (!pausedBeforeScrubber.current) {
|
||||
player.play();
|
||||
}
|
||||
} else {
|
||||
setTime(seconds);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue