y595705120 3 mesiacov pred
rodič
commit
675bedc606

+ 6 - 7
src/containers/center/play/components/media.vue

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