Ver Fonte

重复弹窗

y595705120 há 3 meses atrás
pai
commit
675bedc606
1 ficheiros alterados com 6 adições e 7 exclusões
  1. 6 7
      src/containers/center/play/components/media.vue

+ 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