7 changed files with 86 additions and 10 deletions
-
3package.json
-
13src/common/utils.js
-
45src/components/Video/index.vue
-
7src/views/Index/components/CaseDetails/index.vue
-
2src/views/Index/components/Cooperation/index.vue
-
5src/views/Index/components/HardwareDetails/index.vue
-
21yarn.lock
@ -0,0 +1,45 @@ |
|||||
|
<template> |
||||
|
<div class="video_container"> |
||||
|
<vue3videoPlay |
||||
|
v-bind="options" |
||||
|
poster="https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/ironMan.jpg" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import vue3videoPlay from 'vue3-video-play' // 引入组件 |
||||
|
import 'vue3-video-play/dist/style.css' // 引入css |
||||
|
import { reactive } from 'vue' |
||||
|
const options = reactive({ |
||||
|
width: '100%', //播放器高度 |
||||
|
height: 'auto', //播放器高度 |
||||
|
color: '#409eff', //主题色 |
||||
|
title: '', //视频名称 |
||||
|
src: 'https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4', //视频源 |
||||
|
muted: true, //静音 |
||||
|
webFullScreen: false, |
||||
|
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //播放倍速 |
||||
|
autoPlay: false, //自动播放 |
||||
|
loop: false, //循环播放 |
||||
|
mirror: false, //镜像画面 |
||||
|
ligthOff: false, //关灯模式 |
||||
|
volume: 0.3, //默认音量大小 |
||||
|
control: true, //是否显示控制 |
||||
|
controlBtns: [ |
||||
|
'audioTrack', |
||||
|
'quality', |
||||
|
'speedRate', |
||||
|
'volume', |
||||
|
'setting', |
||||
|
'pip', |
||||
|
'pageFullScreen', |
||||
|
'fullScreen', |
||||
|
], //显示所有按钮, |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.video_container { |
||||
|
} |
||||
|
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue