Video component can now fetch content from remote

This commit is contained in:
2026-04-15 13:41:03 +02:00
parent 832f6d2f27
commit aec836fe6a
4 changed files with 26 additions and 4 deletions

View File

@@ -1,14 +1,25 @@
<script lang="ts">
let {
src,
thumb,
remote,
}: {
src: string;
thumb?: string;
remote?: boolean;
} = $props();
let space = remote ? "https://files.natconf.dev/cdn/" : "";
</script>
<!-- Muted video element -->
<video controls class="video-block" muted>
<source src={src} type="video/mp4">
Video is broken, sorry!
<video
controls
class="video-block"
muted
preload="none"
poster={thumb ? space + thumb : "/common/video-placeholder.webp"}>
<source src={space + src} type="video/mp4">
Video is broken, sorry!
</video>