From f81776aca5314ebf9308ba74ccddf21485d83ed1 Mon Sep 17 00:00:00 2001
From: lonkaars <loek@pipeframe.xyz>
Date: Sat, 22 May 2021 11:21:23 +0200
Subject: timeline cursor moves video time

---
 pages/editor.tsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'pages/editor.tsx')

diff --git a/pages/editor.tsx b/pages/editor.tsx
index 7a7a52b..8f0637b 100644
--- a/pages/editor.tsx
+++ b/pages/editor.tsx
@@ -166,6 +166,10 @@ function TimelineEditor(props: {
 		var frame = Math.max(0, Math.round(getFrameAtOffset(x - 240, timelineZoom)) - 1);
 		setFrame(frame);
 		scrubberSpring.start({ frame });
+		if(props.player.player) {
+			var player = props.player.player;
+			player.currentTime = props.player.frameToTimestamp(frame + 1);
+		}
 	}, { domTarget: scrubberDragRef, eventOptions: { passive: false } });
 
 	return <>
-- 
cgit v1.2.3

