Quellcode durchsuchen

微信自动播放

赵启卫 vor 2 Jahren
Ursprung
Commit
46d45af351
1 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 4 3
      application/wap/view/first/special/task_info.html

+ 4 - 3
application/wap/view/first/special/task_info.html

xqd xqd
@@ -271,9 +271,7 @@
                     vm.player.on('canplaythrough', vm.onPlayerCanplaythrough);
                     vm.player.on('ended', vm.handleEnded);
                     vm.player.on('timeupdate', vm.handleTimeupdate);
-                    document.addEventListener('WeixinJSBridgeReady',() => { 
-                        if (vm.player.tag) vm.player.tag.play();
-                    })
+                    
 
                     // 进度条拖拽开始,不可以前进,可以后退
                     let start = true;
@@ -311,6 +309,9 @@
                     if (!this.isPay && !this.isSourcePay) {
                         this.player.setPreviewTime(this.taskInfo.try_time * 60);
                     }
+                    document.addEventListener('WeixinJSBridgeReady',() => { 
+                        if (this.player) this.player.play();
+                    })
                 },
                 // 初始播放位置
                 onPlayerCanplaythrough: function () {