Minor fixes

This commit is contained in:
WardPearce
2026-02-18 18:17:00 +13:00
parent 6fce303904
commit 82522c3a65
2 changed files with 3 additions and 8 deletions
@@ -5,7 +5,7 @@
const captionTracks: Record<string, string> = {};
// Configurable settings for captions
let captionFontSize: string = $state('16px');
let captionFontSize: string = $state('1em');
let captionColor: string = $state('white');
let captionBackgroundColor: string = $state('rgba(0, 0, 0, 0.7)');
let captionOpacity: number = $state(1);
@@ -67,14 +67,12 @@
let {
video,
playerContainer,
currentTime = $bindable(),
showControls = $bindable()
}: {
video: VideoPlay;
currentTime: number;
showControls: boolean;
playerContainer: HTMLElement;
} = $props();
onMount(async () => {
@@ -107,10 +105,7 @@
(cue: VTTCue) => cue.endTime
)}
<div
{@attach draggable(() => [
bounds(BoundsFrom.element(playerContainer)),
touchAction('manipulation')
])}
{@attach draggable(() => [bounds(BoundsFrom.viewport()), touchAction('manipulation')])}
style="z-index: 5;cursor: grab;"
>
{#if currentCaption?.text}
@@ -873,7 +873,7 @@
}}
bind:this={playerContainer}
>
<ClosedCaptions video={data.video} {playerContainer} bind:currentTime bind:showControls />
<ClosedCaptions video={data.video} bind:currentTime bind:showControls />
<video
controls={false}