提交修改

This commit is contained in:
daihh
2022-11-17 19:56:30 +08:00
parent 7297d37a25
commit 63bc86aee8

View File

@@ -1,10 +1,11 @@
<template>
<view class="video-box" @click="clickVideo" @dblclick="dbclickVideo">
<view class="video-box" @click="clickVideo">
<video id="myVideo" style="width: 100%;"
:src="url"
:controls="false"
@error="videoErrorCallback"
:initial-time="videoPlayingTime"
@error="videoErrorCallback"
@touchend="onPlayerTouchend"
@play="onPlayerPlay"
@pause="onPlayerPause"
@ended="onPlayerEnded"
@@ -187,6 +188,22 @@
dblclickVideo(){
console.log("双击了");
},
onPlayerTouchend(e){
// this.onPlayerPause()
this.touchNum ++
setTimeout(()=>{
if(this.touchNum == 1){
// console.log('单击')
}else if(this.touchNum >= 2){
if(this.isPlaying){
this.onPlayerPause()
} else {
this.onPlayerPlay()
}
}
this.touchNum = 0
},250)
},
onPlayerLoad(e){
this.contrlShow=false;
},