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

21 lines
463 B
Vue
Raw Normal View History

<script lang="ts" setup>
import 'vue-plyr/dist/vue-plyr.css';
// @ts-ignore
import VuePlyr from 'vue-plyr';
2023-07-21 20:23:33 +03:00
import mime from 'mime';
interface Props {
src: string
}
let { src } = defineProps<Props>();
2023-07-21 20:23:33 +03:00
let selectedPath = useSelectedPath();
let videoType = mime.getType(selectedPath.value);
</script>
<template>
<VuePlyr>
2023-07-21 20:23:33 +03:00
<video controls playsinline :src="src" :type="videoType!" style="height: 84vh;">
</video>
</VuePlyr>
</template>