<script setup lang="ts">
interface Props {
  src: string
  type?: 'mp4' | 'webm'
}

const props = withDefaults(defineProps<Props>(), {
  type: 'mp4',
})
</script>

<template>
  <video v-if="props.src">
    <source :src="props.src" :type="`video/${props.type}`" v-bind="$attrs" />
  </video>
</template>
