Merge PR 25 locally for testing

This commit is contained in:
Benjiyaya
2026-08-27 11:50:18 +08:00
13 changed files with 636 additions and 38 deletions
@@ -38,7 +38,10 @@
}: Props = $props();
let errorOpen = $state(false);
const previewUrl = $derived(previewPath ? assetUrl(previewPath) : null);
// '#t=0.1' media fragment: with preload="metadata" browsers paint NOTHING
// until playback, so every clip preview sat black ("no picture, but sound").
// The fragment makes the browser seek+paint a first frame without playing.
const previewUrl = $derived(previewPath ? assetUrl(previewPath) + '#t=0.1' : null);
$effect(() => {
void previewPath;
@@ -81,7 +81,7 @@
<img class="thumb-media" src={thumb.src} alt="" loading="lazy" />
{:else if thumb?.kind === 'video'}
<!-- svelte-ignore a11y_media_has_caption -->
<video class="thumb-media" src={thumb.src} muted playsinline preload="metadata"></video>
<video class="thumb-media" src={thumb.src + '#t=0.1'} muted playsinline preload="metadata"></video>
{:else}
<span class="thumb-slate">#{scene.order_index}</span>
{/if}