mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 09:26:45 +08:00
提交修改
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user