extractify.zip/components/media/video-player.vue
Ask

25 lines
537 B
Vue

{2c1b1c1313272907c70fc0acc457861164b2aff6 true 537 video-player.vue 0xc002b72540}

<script lang="ts" setup>
import '@vime/core/themes/default.css';
import { Player, DefaultUi, Video } from '@vime/vue-next';
import mime from 'mime';
interface Props {
src: string
}
let { src } = defineProps<Props>();
let selectedPath = useSelectedPath();
let videoType = mime.getType(selectedPath.value);
</script>
<template>
<Player playsinline style="width: 100%">
<Video>
<source :data-src="src" :type="videoType!" />
</Video>
<DefaultUi>
</DefaultUi>
</Player>
</template>