|
@@ -105,10 +105,9 @@
|
|
},
|
|
},
|
|
doPause( ){
|
|
doPause( ){
|
|
this.updateBlurtime()
|
|
this.updateBlurtime()
|
|
|
|
+ this.onPlay = false
|
|
let myPlayer = this.$refs.videoPlayer.player;
|
|
let myPlayer = this.$refs.videoPlayer.player;
|
|
myPlayer && myPlayer.pause()
|
|
myPlayer && myPlayer.pause()
|
|
- console.log("doPause", myPlayer)
|
|
|
|
- this.onPlay = false
|
|
|
|
},
|
|
},
|
|
doPlay(){
|
|
doPlay(){
|
|
this.updateBlurtime()
|
|
this.updateBlurtime()
|
|
@@ -158,20 +157,20 @@
|
|
tick( force = false) {
|
|
tick( force = false) {
|
|
let media = this.media;
|
|
let media = this.media;
|
|
this.tickNum ++
|
|
this.tickNum ++
|
|
|
|
+ // 已经完成
|
|
|
|
+ if( this.media.isFinish ) return;
|
|
|
|
+
|
|
|
|
+ if( !force && !this.onPlay ) return;
|
|
console.log("tick", this.onblurTime )
|
|
console.log("tick", this.onblurTime )
|
|
if( this.onblurTime < Date.now() ){
|
|
if( this.onblurTime < Date.now() ){
|
|
this.tickWait();
|
|
this.tickWait();
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- // 已经完成
|
|
|
|
- if( this.media.isFinish ) return;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// 主动暂停
|
|
// 主动暂停
|
|
let myPlayer = this.$refs.videoPlayer.player;
|
|
let myPlayer = this.$refs.videoPlayer.player;
|
|
let curTimes = parseInt(myPlayer.currentTime());
|
|
let curTimes = parseInt(myPlayer.currentTime());
|
|
// 后退无心跳
|
|
// 后退无心跳
|
|
- if( this.media.position > curTimes && !force ) return;
|
|
|
|
|
|
+ if( this.media.position >= curTimes && !force ) return;
|
|
if( curTimes< 4) return;
|
|
if( curTimes< 4) return;
|
|
|
|
|
|
let isFinish = force?1:0
|
|
let isFinish = force?1:0
|