Skip to content

Commit

Permalink
upt
Browse files Browse the repository at this point in the history
  • Loading branch information
k1nho committed Aug 30, 2024
1 parent 11036be commit 4e23d56
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions frontend/src/components/VideoPlayer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
setCurrentTime,
resetVideo,
} = videoStore;
let { videoNode, editMode, cutEnd, isTrackPlaying, setIsTrackPlaying } =
let { timelineNode, editMode, cutEnd, isTrackPlaying, setIsTrackPlaying } =
toolingStore;
onMount(() => {
Expand Down Expand Up @@ -70,20 +70,20 @@
function handleStop() {
if (video) video.pause();
$currentTime = $videoNode ? $videoNode.start : 0;
$currentTime = $timelineNode ? $timelineNode.start : 0;
}
function handleMute() {
muted = !muted;
}
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();
}
Expand All @@ -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}
Expand All @@ -131,9 +131,9 @@
</div>
<!-- Video Controls -->
{#if $source}
{#if $videoNode}
{#if $timelineNode}
<div class="text-center text-lg font-semibold">
{$videoNode.name}
{$timelineNode.name}
</div>
{/if}
<div
Expand Down

0 comments on commit 4e23d56

Please sign in to comment.