flowbite video

This commit is contained in:
matthieu42morin 2024-04-18 20:39:37 +02:00
parent a9754a0e02
commit 4caa6f5906
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<script lang="ts">
import { twMerge } from 'tailwind-merge';
export let src: string;
export let type: string = 'video/mp4';
export let trackSrc: string = '';
export let srclang: string = 'en';
export let label: string = 'english_captions';
let videoClass = twMerge($$props.class);
</script>
<video {...$$restProps} class={videoClass}>
<source {src} {type} />
<slot />
<track src={trackSrc} kind="captions" {srclang} {label} />
Your browser does not support the video tag.
</video>
<!--
@component
[Go to docs](https://flowbite-svelte.com/)
## Props
@prop export let src: string;
@prop export let type: string = 'video/mp4';
@prop export let trackSrc: string = '';
@prop export let srclang: string = 'en';
@prop export let label: string = 'english_captions';
-->