Browse Source

修改bug

shaogen1995 3 năm trước cách đây
mục cha
commit
78161ba465
3 tập tin đã thay đổi với 48496 bổ sung48497 xóa
  1. 48489 48492
      SuperTwo762/js/main_2020_show.js
  2. 6 4
      SuperTwo762/js/manage.js
  3. 1 1
      SuperTwo762/js/overlay.js

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 48489 - 48492
SuperTwo762/js/main_2020_show.js


+ 6 - 4
SuperTwo762/js/manage.js

@@ -115,9 +115,10 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
     g_bgAudio.load();	// iOS 9   还需要额外的 load 一下, 否则直接 play 无效
     var play = function(){
         //if(window.tourAudioSta) return;
+        if(this.bgmShouldPlay){
+            this.switchBgmState(true)
+        }            
          
-        this.switchBgmState(true)
-        
         document.removeEventListener("touchstart",play);
         document.removeEventListener("click",play);
         $('#player')[0].removeEventListener("touchstart", play);
@@ -156,8 +157,9 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
 }   
 Manage.prototype.switchBgmState = function(state,fun){
     if(!g_bgAudio || !g_bgAudio.src) return;
+    this.bgmShouldPlay = state
     
-    var played = function(){
+    var played = function(){ 
         console.log('begin play bgm '+ g_bgAudio.src);
         g_play = 1; 
         g_playAudio = g_bgAudio;
@@ -173,7 +175,7 @@ Manage.prototype.switchBgmState = function(state,fun){
         $("#volume").attr("title", "打开声音");
     }
     
-    if(state ){
+    if(state ){ 
         g_bgAudio.play(); 
         if(g_bgAudio.paused){
             paused()

+ 1 - 1
SuperTwo762/js/overlay.js

@@ -98,7 +98,7 @@ var initOverlay = function(THREE) {
                 var offsetX = 0.11, offsetY = 0.11; //到右下角的距离,单位m 
                 this.soundBtn.position.set(settings.overlay.width*(0.5-1/info.width*offsetX), -settings.overlay.height*(0.5-1/info.height*offsetY),0.01)
                 
-                
+                plane.material.opacity = 1;
                 
             } else if (info.media.includes('photo')) {
                 /* var img = new Image();