2023-07-21 17:16:59 +03:00
|
|
|
<script lang="ts" setup>
|
2023-07-22 02:23:14 +03:00
|
|
|
import '@vime/core/themes/default.css';
|
|
|
|
import { Player, DefaultUi, Video } from '@vime/vue-next';
|
|
|
|
|
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-22 02:23:14 +03:00
|
|
|
|
2023-07-21 17:16:59 +03:00
|
|
|
</script>
|
|
|
|
<template>
|
2023-07-22 02:23:14 +03:00
|
|
|
<Player playsinline style="width: 100%">
|
|
|
|
<Video>
|
|
|
|
<source :data-src="src" :type="videoType!" />
|
|
|
|
</Video>
|
|
|
|
<DefaultUi>
|
|
|
|
</DefaultUi>
|
|
|
|
</Player>
|
2023-07-21 17:16:59 +03:00
|
|
|
</template>
|