|
|
@@ -2,17 +2,21 @@
|
|
|
//合并热点和展览
|
|
|
g_currentHot = null
|
|
|
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+let playSyncGroup = []//需要播放同步的视频。 每次都单独定制
|
|
|
+
|
|
|
|
|
|
|
|
|
const playVideoWhenFlyOut = false
|
|
|
//同时可播放的最大个数:
|
|
|
-const playVideoMax = window.isEdit ? 3 : browser.isMobile() ? 1 : 2;
|
|
|
-const playAniMax = window.isEdit ? 6 : browser.isMobile() ? 3 : 5;
|
|
|
+let playVideoMax = window.isEdit ? 3 : browser.isMobile() ? 1 : 2;
|
|
|
+let playAniMax = window.isEdit ? 6 : browser.isMobile() ? 3 : 5;
|
|
|
|
|
|
+if(number == 'SHANGJJ'){
|
|
|
+ playSyncGroup = ['okh1UR466371', 'LGmLHP2615503' , 'VNyBI6614896'] //中,左,右
|
|
|
+ playVideoMax = 3
|
|
|
+}
|
|
|
|
|
|
|
|
|
window.initHot = function(model){
|
|
|
@@ -1021,7 +1025,14 @@ window.initHot = function(model){
|
|
|
video.play()
|
|
|
//video.currentTime = video.lastCurTime || 0
|
|
|
this.changeOpaWhenPlay(video)
|
|
|
-
|
|
|
+ //处理同步播放
|
|
|
+ let group = playSyncGroup.find(e=>e.includes(this.sid))
|
|
|
+ if(group){
|
|
|
+ let others = group.filter(e=>e != this.sid).map(e=>player.model.hots[e].texMedia)
|
|
|
+ console.log('controlVideo play', this.id, 'other currentTime', others.map(e=>e.currentTime))
|
|
|
+ video.currentTime = others[0].currentTime
|
|
|
+ }
|
|
|
+
|
|
|
if(isVideoPlayed(video))console.log({str:"played " + this.sid + video.duration ,level:1})
|
|
|
}
|
|
|
|
|
|
@@ -1722,7 +1733,23 @@ window.initHot = function(model){
|
|
|
}
|
|
|
|
|
|
setTimeout(Hot.beginShineHot, 1000)
|
|
|
-
|
|
|
+ if(!window.isEdit){
|
|
|
+ if(playSyncGroup.length){
|
|
|
+ //每过一段时间校准同步视频的时间,使与第一个视频同步
|
|
|
+ setInterval(()=>{
|
|
|
+
|
|
|
+ playSyncGroup.forEach(group=>{
|
|
|
+ group = group.map(e=>player.model.hots[e].texMedia).filter(e=>!e.paused)
|
|
|
+ if(group.length < 2)return
|
|
|
+ console.log('同步',group.map(e=>e.currentTime))
|
|
|
+ for(let i=group.length-1;i>0;i--){
|
|
|
+ group[i].currentTime = group[0].currentTime
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },4000)
|
|
|
+ }
|
|
|
+ }
|
|
|
player.emit('gotHotAndStartload')
|
|
|
}
|
|
|
window.Hot = Hot
|