|
@@ -529,7 +529,7 @@ var addSoundBtn = function(video){
|
|
|
|
|
|
}
|
|
|
var SoundOnVideo;
|
|
|
-var switchSoundBtn = function(video){
|
|
|
+var switchSoundBtn = function(video, belong){
|
|
|
if(video.btn.material == soundOffMat){ //开启
|
|
|
if(SoundOnVideo){
|
|
|
SoundOnVideo.btn.material = soundOffMat,
|
|
@@ -549,6 +549,16 @@ var switchSoundBtn = function(video){
|
|
|
if(g_tourAudio)g_tourAudio.pause()
|
|
|
SoundOnVideo = video
|
|
|
video.pauseByHot = video.pauseByTour = false
|
|
|
+
|
|
|
+ if(belong instanceof Overlay){
|
|
|
+ belong.switchPlay(true)
|
|
|
+ }else{
|
|
|
+ video.play()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}else{//关闭
|
|
|
video.btn.material = soundOffMat
|
|
|
video.volume = 0
|
|
@@ -557,6 +567,9 @@ var switchSoundBtn = function(video){
|
|
|
if(g_bgAudio && g_bgAudio.pauseByVideo && !video.pauseByHot && !video.pauseByTour){
|
|
|
manage.switchBgmState(true)
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -565,7 +578,7 @@ var switchSoundBtn = function(video){
|
|
|
|
|
|
var checkSoundBtnClick = function(intersect){
|
|
|
if(intersect && intersect.object.name == "soundBtn"){
|
|
|
- switchSoundBtn(intersect.object.video);
|
|
|
+ switchSoundBtn(intersect.object.video, intersect.object.parent);
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
@@ -23433,8 +23446,10 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
|
|
|
if(overlay.overlayType == "video"){
|
|
|
- if(plane.material.map.image.paused) plane.material.map.image.play()
|
|
|
- else plane.material.map.image.pause()
|
|
|
+ /* if(plane.material.map.image.paused) plane.material.map.image.play()
|
|
|
+ else plane.material.map.image.pause() */
|
|
|
+
|
|
|
+ overlay.switchPlay(!!overlay.pausedByUser)
|
|
|
}
|
|
|
|
|
|
/* if(window.EditOverlay &&EditOverlay.editing){
|