feat: cut clip from Player mode (X/Z keys, scissors button)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-23 02:27:21 -04:00
parent d964c97fe6
commit ac7cb70cb7
4 changed files with 105 additions and 1 deletions

View File

@@ -38,12 +38,14 @@
hasCaptions,
onToggleCaptions,
onOpenCaptionSettings,
onCutClip,
}: {
visible: boolean;
captionsEnabled: boolean;
hasCaptions: boolean;
onToggleCaptions: () => void;
onOpenCaptionSettings: () => void;
onCutClip: (position: 'at' | 'before') => void;
} = $props();
let showSpeedSelector = $state(false);
@@ -225,6 +227,14 @@
{/if}
</div>
<button
class="ctrl-btn"
onclick={() => onCutClip('at')}
oncontextmenu={(e) => { e.preventDefault(); onCutClip('before'); }}
title="Cut clip at playhead (X) · Right-click: 10s before (Z)"
type="button"
><Scissors size={16} /></button>
{#if hasCaptions}
<button
class="ctrl-btn"