From 1964481ff2d10a8685ee5c769df3f60dbcb11541 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Thu, 5 May 2022 11:03:46 +1000 Subject: [PATCH] Play scene when scrubber clicked (#2546) --- ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx b/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx index 71fedf131..50decfa13 100644 --- a/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx +++ b/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx @@ -412,7 +412,12 @@ export const ScenePlayer: React.FC = ({ playerRef.current?.pause(); }; const onScrubberSeek = (seconds: number) => { - playerRef.current?.currentTime(seconds); + const player = playerRef.current; + if (player) { + player.play()?.then(() => { + player.currentTime(seconds); + }); + } }; const isPortrait =