Video component can now fetch content from remote
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user