From 199ad1ce3bfc0ad7355f4e8c587e0e16adb3af45 Mon Sep 17 00:00:00 2001 From: cottongin Date: Tue, 22 Sep 2026 19:09:27 -0400 Subject: [PATCH] fix: transport shortcuts work in Player mode via runTransportAction fallback Co-authored-by: Cursor --- src/App.svelte | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 91393bd..b30059d 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -13,11 +13,16 @@ import PlayerControls from '$lib/components/PlayerControls.svelte'; import PlayerTimeline from '$lib/components/PlayerTimeline.svelte'; import { loadPreferences, preferences, setClipListPosition, setClipListWidth, setAppMode } from '$lib/stores/preferences.svelte'; - import { getSelectedClipId, removeClip } from '$lib/stores/clips.svelte'; - import { adjustShuttle, resetShuttleRate, toggleFullscreen } from '$lib/transport/playback'; + import { getSelectedClipId, removeClip, markInPoint, markOutPoint } from '$lib/stores/clips.svelte'; + import { + adjustShuttle, + resetShuttleRate, + toggleFullscreen, + runTransportAction, + type TransportKeyAction, + } from '$lib/transport/playback'; import { session } from '$lib/stores/videoSession.svelte'; import { listen } from '@tauri-apps/api/event'; - import type { TransportKeyAction } from '$lib/transport/playback'; let showSetupWizard = $state(true); let showPreferences = $state(false); @@ -90,7 +95,11 @@ }); function dispatchTransport(action: TransportKeyAction) { - transportControls?.handleKeyAction(action); + if (transportControls) { + transportControls.handleKeyAction(action); + } else { + runTransportAction(action, markInPoint, markOutPoint); + } } function handleResizeStart(e: MouseEvent) {