mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 02:46:46 +08:00
提交修改
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="video-box" @click="clickVideo" @dblclick="dbclickVideo">
|
<view class="video-box" @click="clickVideo">
|
||||||
<video id="myVideo" style="width: 100%;"
|
<video id="myVideo" style="width: 100%;"
|
||||||
:src="url"
|
:src="url"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
@error="videoErrorCallback"
|
|
||||||
:initial-time="videoPlayingTime"
|
:initial-time="videoPlayingTime"
|
||||||
|
@error="videoErrorCallback"
|
||||||
|
@touchend="onPlayerTouchend"
|
||||||
@play="onPlayerPlay"
|
@play="onPlayerPlay"
|
||||||
@pause="onPlayerPause"
|
@pause="onPlayerPause"
|
||||||
@ended="onPlayerEnded"
|
@ended="onPlayerEnded"
|
||||||
@@ -187,6 +188,22 @@
|
|||||||
dblclickVideo(){
|
dblclickVideo(){
|
||||||
console.log("双击了");
|
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){
|
onPlayerLoad(e){
|
||||||
this.contrlShow=false;
|
this.contrlShow=false;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user