2023-07-21 17:16:59 +03:00
|
|
|
<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';
|
2023-07-21 17:16:59 +03:00
|
|
|
|
|
|
|
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);
|
2023-07-21 17:16:59 +03:00
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<VuePlyr>
|
2023-07-21 20:23:33 +03:00
|
|
|
<video controls playsinline :src="src" :type="videoType!" style="height: 84vh;">
|
2023-07-21 17:16:59 +03:00
|
|
|
</video>
|
|
|
|
</VuePlyr>
|
|
|
|
</template>
|