瀏覽代碼

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/guangdong_museum

tremble 4 年之前
父節點
當前提交
40be77f1d6
共有 2 個文件被更改,包括 7 次插入6 次删除
  1. 6 5
      web/public/static/js/main_2020_show.js
  2. 1 1
      web/public/static/js/overlay.js

+ 6 - 5
web/public/static/js/main_2020_show.js

@@ -16362,10 +16362,10 @@ window.Modernizr = function(n, e, t) {
             if(!g_currentHot) return;
             
             
-            if(this.overlayPausedByThis){
-                this.overlayPausedByThis.forEach(e=>e.videoControl(true))
+            if(this.pausedOverlay){
+                this.pausedOverlay.forEach(e=>e.videoControl(true))
                 
-                this.overlayPausedByThis = null
+                this.pausedOverlay = null
             }
             
             g_currentHot = null;
@@ -16412,10 +16412,11 @@ window.Modernizr = function(n, e, t) {
                     g_bgAudio.pauseByHot = true
                 } 
                 if(g_tourAudio)g_tourAudio.pause()
-                if(this.infoAttribute.video.length){//add
+                if(this.infoAttribute.video.length || this.infoAttribute.backgroundMusic){//add
                     var playedOverlay = player.overlayGroup.children.filter(e=>e.hasSound && e.overlayType == 'video' && !e.plane.material.map.image.paused)
+                    this.pausedOverlay = playedOverlay;
                     playedOverlay.forEach(e=>e.videoControl(false))
-                    this.overlayPausedByThis = playedOverlay;
+                    
                 }
                  
               

+ 1 - 1
web/public/static/js/overlay.js

@@ -321,7 +321,7 @@ var initOverlay = function(THREE) {
             
             if(!video.paused){
                 video.pause()
-                if(this.hasSound && g_bgAudio.pauseByVideo){
+                if(this.hasSound && g_bgAudio.pauseByVideo && (!g_currentHot || !g_currentHot.pausedOverlay)){
                     manage.switchBgmState(true)
                 }
             }