Files
Nexior/src/components/episode/Player.vue
T
2022-02-20 17:18:18 +08:00

39 lines
626 B
Vue

<template>
<vue-plyr :options="options">
<video controls playsinline :data-poster="preview">
<source size="1080" :src="resource" type="video/mp4" />
</video>
</vue-plyr>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import VuePlyr from 'vue-plyr';
import 'vue-plyr/dist/vue-plyr.css';
interface IData {
options: {};
}
export default defineComponent({
components: {
VuePlyr
},
props: {
resource: {
type: String,
required: true
},
preview: {
type: String
}
},
data(): IData {
return {
options: {}
};
}
});
</script>