|
@@ -26,15 +26,13 @@
|
|
|
<!-- 视频页面 -->
|
|
|
<div v-if="myType === 'video'" class="hotspot-page-swiper hotspot-page-video">
|
|
|
<template v-for="(item, index) in curList" :key="item.url">
|
|
|
- <video
|
|
|
+ <VideoPlay
|
|
|
v-if="index === myInd"
|
|
|
- id="videoID"
|
|
|
class="hotspot-page-video"
|
|
|
- controls
|
|
|
:src="item.url"
|
|
|
- autoplay
|
|
|
- disablePictureInPicture
|
|
|
- controlsList="nodownload noplaybackrate"
|
|
|
+ control
|
|
|
+ :volume="0.6"
|
|
|
+ :controlBtns="['audioTrack', 'volume', 'speedRate']"
|
|
|
/>
|
|
|
</template>
|
|
|
</div>
|
|
@@ -110,6 +108,7 @@
|
|
|
<script>
|
|
|
import { Swiper, SwiperSlide } from 'swiper/vue';
|
|
|
import 'swiper/css';
|
|
|
+ import { videoPlay as VideoPlay } from 'vue3-video-play/lib';
|
|
|
import { parseUrlParams } from '@/utils';
|
|
|
|
|
|
import ModelIcon from '@hotspot/assets/images/icon-model@2x.png';
|
|
@@ -128,6 +127,7 @@
|
|
|
components: {
|
|
|
Swiper,
|
|
|
SwiperSlide,
|
|
|
+ VideoPlay,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -188,17 +188,7 @@
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getData().then(() => {
|
|
|
- this.$nextTick(() => {
|
|
|
- const list = document.getElementsByTagName('video');
|
|
|
- for (let i = 0; i < list.length; i++) {
|
|
|
- const item = list[i];
|
|
|
- item.addEventListener('contextmenu', (e) => {
|
|
|
- e.preventDefault();
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+ this.getData();
|
|
|
},
|
|
|
methods: {
|
|
|
async getData() {
|