aboutsummaryrefslogtreecommitdiff
path: root/pages/editor.tsx
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-05-22 11:21:23 +0200
committerlonkaars <loek@pipeframe.xyz>2021-05-22 11:21:23 +0200
commitf81776aca5314ebf9308ba74ccddf21485d83ed1 (patch)
treea3560f64ec365f3d5624fbf7b35e349c83096ac0 /pages/editor.tsx
parent3565d8c5bfeae0b9ce7fd25d83fadbf5a1747048 (diff)
timeline cursor moves video time
Diffstat (limited to 'pages/editor.tsx')
-rw-r--r--pages/editor.tsx4
1 files changed, 4 insertions, 0 deletions
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 <>