Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

good catch. Stopping seek is timeline seeking only

Alan Trebugeaisf48ea093399f
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index e1dc8894..62bb0273 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -3274,18 +3274,22 @@ export default function VideoEditor() {
setAutoSuggestZoomsTrigger(0);
}, []);
- function handleSeek(time: number) {
+ function handleSeek(time: number, options: { pause?: boolean } = {}) {
const playback = videoPlaybackRef.current;
const video = playback?.video;
if (!video) return;
- if (!video.paused) {
+ if (options.pause && !video.paused) {
playback?.pause();
}
video.currentTime = mapTimelineTimeToSourceTime(time * 1000) / 1000;
}
+ const handleTimelineSeek = useCallback((time: number) => {
+ handleSeek(time, { pause: true });
+ }, []);
+
const handleSelectZoom = useCallback((id: string | null) => {
setSelectedZoomId(id);
if (id) {
@@ -6271,7 +6275,7 @@ export default function VideoEditor() {
videoDuration={duration}
currentTime={currentTime}
playheadTime={timelinePlayheadTime}
- onSeek={handleSeek}
+ onSeek={handleTimelineSeek}
videoPath={videoPath}
cursorTelemetry={normalizedCursorTelemetry}
autoSuggestZoomsTrigger={autoSuggestZoomsTrigger}