Refine video ui (#229)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
2997079593
commit
a0eb57c21a
113 files changed
+1740
-2556
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div class="video">
|
||||
<vue-plyr :options="options">
|
||||
<video controls crossorigin="anonymous" playsinline>
|
||||
<source size="1080" :src="modelValue?.video_url" type="video/mp4" />
|
||||
</video>
|
||||
</vue-plyr>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
// @ts-ignore
|
||||
import VuePlyr from '@skjnldsv/vue-plyr';
|
||||
// @ts-ignore
|
||||
import { IKlingVideo } from '@/models';
|
||||
import '@skjnldsv/vue-plyr/dist/vue-plyr.css';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'VideoPlayer',
|
||||
components: { VuePlyr },
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Object as () => IKlingVideo | undefined,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: { quality: { default: '1080p' } }
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.video {
|
||||
max-width: 800px;
|
||||
max-height: 450px;
|
||||
border-radius: 15px;
|
||||
overflow: hidden;
|
||||
.plyr--video,
|
||||
video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user