xzw 4 years ago
parent
commit
344861f6d6
2 changed files with 26 additions and 10 deletions
  1. 25 9
      web/public/static/js/main_2020_show.js
  2. 1 1
      web/public/static/js/overlay.js

+ 25 - 9
web/public/static/js/main_2020_show.js

@@ -16367,8 +16367,12 @@ window.Modernizr = function(n, e, t) {
                     g_bgAudio.pauseByHot = true
                 } 
                 if(g_tourAudio)g_tourAudio.pause()
-
-
+                if(this.infoAttribute.video.length){//add
+                    var playedOverlay = player.overlayGroup.children.filter(e=>e.hasSound && e.overlayType == 'video' && !e.plane.material.map.image.paused)
+                    playedOverlay.forEach(e=>e.videoControl(false))
+                    
+                }
+                 
               
 			}
 			
@@ -22316,9 +22320,17 @@ window.Modernizr = function(n, e, t) {
 			//------end	 
 			n.prototype.closePopup = function() {//xzw  关闭热点页面
             
-                return;
+            
+            
+            
+              
 				if(!g_currentHot) return;
 				g_currentHot = null;
+                
+                
+                return;
+                
+                
 				var hotPop = document.getElementById('popup'); 
 				hotPop.style.display = "none";
 				document.querySelector(".popup-content").removeChild(document.getElementById("id1"));
@@ -22512,9 +22524,9 @@ window.Modernizr = function(n, e, t) {
 
                 //判断是否是移动端,如果是给关闭按钮添加touchstart事件
                 if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){
-                    $('#closepop').on("touchstart",this.closePopup.bind(this)); 
+                    $('.hotspotcon').on("touchstart",this.closePopup.bind(this)); 
                 }else{
-                    $('#closepop').on("click",this.closePopup.bind(this)); 
+                    $('.hotspotcon').on("click",this.closePopup.bind(this)); 
                 }
             }
             ,
@@ -22674,10 +22686,14 @@ window.Modernizr = function(n, e, t) {
                     window.Hotpoint && new Hotpoint().state(this,Hot);
                 }
                
-                this.overlayGroup.children.forEach((overlay)=>{
-                    //overlay.overlayType == "video" && overlay.visible && overlay.inSight() && overlay.videoControl(true)
-                    overlay.overlayType == "video" && overlay.plane.material.map.image.shouldPlay && overlay.videoControl(true)
-                })
+                if(!window.g_currentHot ){
+                    this.overlayGroup.children.forEach((overlay)=>{
+                        //overlay.overlayType == "video" && overlay.visible && overlay.inSight() && overlay.videoControl(true)
+                        overlay.overlayType == "video" && overlay.plane.material.map.image.shouldPlay && overlay.videoControl(true)
+                    }) 
+                }
+               
+               
                  
                 
             }

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

@@ -282,7 +282,7 @@ var initOverlay = function(THREE) {
         
         this.visible = v
         
-        if(this.overlayType == 'video'){
+        if(this.overlayType == 'video' && !g_currentHot){
             if(this.playAccordingTo){//播放随其他overlay
                 setTimeout(()=>{
                     this.playAccordingTo.visible ? this.videoControl("play") : this.videoControl('stop')