|
@@ -71,7 +71,7 @@ var initOverlay = function(THREE){
|
|
|
this.sid = info.sid;
|
|
|
|
|
|
if(info.sid == '1624590736940'){
|
|
|
- this.visiblePanos = [player.model.panos.index["db8c40d5b3be459695c25d0de45f7b69"]]
|
|
|
+ this.playPanos = [player.model.panos.index["db8c40d5b3be459695c25d0de45f7b69"]]
|
|
|
info.loop = false;
|
|
|
this.hideWhenPlayDone = true
|
|
|
}
|
|
@@ -327,10 +327,10 @@ var initOverlay = function(THREE){
|
|
|
Overlay.prototype.updateVisibles = function(panos){
|
|
|
this.visible = !!panos.find(pano=>this.visiblePanos.includes(pano))
|
|
|
//if(this.loop)
|
|
|
- if(!this.visible && this.overlayType == 'video'){
|
|
|
+ if((!this.visible || (this.playPanos && !this.playPanos.find(pano=>player.currentPano == pano) )) && this.overlayType == 'video'){
|
|
|
this.videoControl('stop')
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
Overlay.updateVisibles = function(panos){
|
|
|
if(panos === true){
|
|
@@ -350,11 +350,12 @@ var initOverlay = function(THREE){
|
|
|
this.plane.material.map.image.currentTime = 0;
|
|
|
this.playCount = 0
|
|
|
}
|
|
|
- console.log("pause")
|
|
|
- }else if(state && (this.loop !== false || this.playCount == 0 || this.plane.material.map.image.currentTime<this.plane.material.map.image.duration)){
|
|
|
+ //console.log("pause")
|
|
|
+ }else if(state && (this.loop !== false || this.playCount == 0 || this.plane.material.map.image.currentTime<this.plane.material.map.image.duration)
|
|
|
+ && (!this.playPanos || this.playPanos.find(pano=>player.currentPano == pano) )){
|
|
|
this.plane.material.map.image.play()
|
|
|
this.playCount = this.playCount ? (this.playCount+1) : 1
|
|
|
- console.log("play")
|
|
|
+ //console.log("play")
|
|
|
}
|
|
|
|
|
|
}
|