From 4e23d5691a07185723887815c6fffa22ea65b376 Mon Sep 17 00:00:00 2001 From: k1nho Date: Fri, 30 Aug 2024 16:22:40 -0400 Subject: [PATCH] upt --- frontend/src/components/VideoPlayer.svelte | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/VideoPlayer.svelte b/frontend/src/components/VideoPlayer.svelte index 640597a..a3fb67a 100644 --- a/frontend/src/components/VideoPlayer.svelte +++ b/frontend/src/components/VideoPlayer.svelte @@ -34,7 +34,7 @@ setCurrentTime, resetVideo, } = videoStore; - let { videoNode, editMode, cutEnd, isTrackPlaying, setIsTrackPlaying } = + let { timelineNode, editMode, cutEnd, isTrackPlaying, setIsTrackPlaying } = toolingStore; onMount(() => { @@ -70,7 +70,7 @@ function handleStop() { if (video) video.pause(); - $currentTime = $videoNode ? $videoNode.start : 0; + $currentTime = $timelineNode ? $timelineNode.start : 0; } function handleMute() { @@ -78,12 +78,12 @@ } function handleTimeupdate() { - if ($videoNode && $currentTime >= $videoNode.end) + if ($timelineNode && $currentTime >= $timelineNode.end) EventsEmit("evt_clip_move", 1); } function seekVideo() { - if ($videoNode) setCurrentTime($videoNode.start); + if ($timelineNode) setCurrentTime($timelineNode.start); if ($isTrackPlaying) video.play(); } @@ -107,8 +107,8 @@ id="video" class="block h-full w-full object-contain bg-gprimary rounded-md" - src={$videoNode - ? $source + `#t=${$videoNode.start},${$videoNode.end}` + src={$timelineNode + ? $source + `#t=${$timelineNode.start},${$timelineNode.end}` : $source} bind:this={video} bind:duration={$duration} @@ -131,9 +131,9 @@ {#if $source} - {#if $videoNode} + {#if $timelineNode}
- {$videoNode.name} + {$timelineNode.name}
{/if}