xzw 1 年之前
父節點
當前提交
977eff1b91
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      js/Hot.js

+ 6 - 4
js/Hot.js

@@ -345,7 +345,8 @@ window.initHot = function(model){
                 
 
                 this.texMedia = video;
-                  
+                this.updateMute() 
+                
                 video.oncanplaythrough = ()=> {
                     if(this.texMedia == video){
                         this.material_.map.needsUpdate = !0 
@@ -354,7 +355,7 @@ window.initHot = function(model){
                 }
                 
                 
-                video.volume = 0
+                
                 video.muted = !!manage.bgmShouldPlay//true
                 video.currentTime = 0
                 
@@ -990,8 +991,9 @@ window.initHot = function(model){
         
         
         updateMute(){
-            if(this.texType == 'video'){
-                this.texMedia && (this.texMedia.muted = !!manage.bgmShouldPlay)//true
+            if(this.texType == 'video' && this.texMedia){
+                 this.texMedia.muted = !!manage.bgmShouldPlay
+                 this.texMedia.volume = manage.bgmShouldPlay ? 0 : 1
             }
         }