Skip to content

🎥 Make videos programmatically with React

fix: "Jump to Beginning" button should jump to "Mark In" frame if active

Manmeet6830880ecf0e
diff --git a/packages/cli/src/editor/components/PlayPause.tsx b/packages/cli/src/editor/components/PlayPause.tsx
index 2ffaf8a97c..20cdae7fab 100644
--- a/packages/cli/src/editor/components/PlayPause.tsx
+++ b/packages/cli/src/editor/components/PlayPause.tsx
@@ -153,12 +153,12 @@ export const PlayPause: React.FC<{
}, [frameForward]);
const jumpToStart = useCallback(() => {
- seek(0);
- }, [seek]);
+ seek(inFrame ?? 0);
+ }, [seek, inFrame]);
const jumpToEnd = useCallback(() => {
- seek(getCurrentDuration() - 1);
- }, [seek]);
+ seek(outFrame ?? getCurrentDuration() - 1);
+ }, [seek, outFrame]);
const keybindings = useKeybinding();