-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
8367 lines (8358 loc) · 253 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(function(){
var script = {
"scrollBarMargin": 2,
"class": "Player",
"id": "rootPlayer",
"children": [
"this.MainViewer",
"this.Container_EF8F8BD8_E386_8E03_41E3_4CF7CC1F4D8E",
"this.Container_0DD1BF09_1744_0507_41B3_29434E440055",
"this.Container_1B9AAD00_16C4_0505_41B5_6F4AE0747E48",
"this.Container_062AB830_1140_E215_41AF_6C9D65345420",
"this.Container_23F0F7B8_0C0A_629D_418A_F171085EFBF8",
"this.Container_39DE87B1_0C06_62AF_417B_8CB0FB5C9D15",
"this.Container_221B1648_0C06_E5FD_417F_E6FCCCB4A6D7",
"this.Container_2F8BB687_0D4F_6B7F_4190_9490D02FBC41",
"this.Container_2820BA13_0D5D_5B97_4192_AABC38F6F169",
"this.Container_2A1A5C4D_0D3B_DFF0_41A9_8FC811D03C8E",
"this.Container_06C41BA5_1140_A63F_41AE_B0CBD78DEFDC"
],
"scrollBarVisible": "rollOver",
"start": "this.init(); this.visibleComponentsIfPlayerFlagEnabled([this.IconButton_EE9FBAB2_E389_8E06_41D7_903ABEDD153A], 'gyroscopeAvailable'); this.syncPlaylists([this.ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist,this.mainPlayList]); if(!this.get('fullscreenAvailable')) { [this.IconButton_EEFF957A_E389_9A06_41E1_2AD21904F8C0].forEach(function(component) { component.set('visible', false); }) }",
"layout": "absolute",
"width": "100%",
"paddingRight": 0,
"scripts": {
"historyGoBack": function(playList){ var history = this.get('data')['history'][playList.get('id')]; if(history != undefined) { history.back(); } },
"getComponentByName": function(name){ var list = this.getByClassName('UIComponent'); for(var i = 0, count = list.length; i<count; ++i){ var component = list[i]; var data = component.get('data'); if(data != undefined && data.name == name){ return component; } } return undefined; },
"setMediaBehaviour": function(playList, index, mediaDispatcher){ var self = this; var stateChangeFunction = function(event){ if(event.data.state == 'stopped'){ dispose.call(this, true); } }; var onBeginFunction = function() { item.unbind('begin', onBeginFunction, self); var media = item.get('media'); if(media.get('class') != 'Panorama' || (media.get('camera') != undefined && media.get('camera').get('initialSequence') != undefined)){ player.bind('stateChange', stateChangeFunction, self); } }; var changeFunction = function(){ var index = playListDispatcher.get('selectedIndex'); if(index != -1){ indexDispatcher = index; dispose.call(this, false); } }; var disposeCallback = function(){ dispose.call(this, false); }; var dispose = function(forceDispose){ if(!playListDispatcher) return; var media = item.get('media'); if((media.get('class') == 'Video360' || media.get('class') == 'Video') && media.get('loop') == true && !forceDispose) return; playList.set('selectedIndex', -1); if(panoramaSequence && panoramaSequenceIndex != -1){ if(panoramaSequence) { if(panoramaSequenceIndex > 0 && panoramaSequence.get('movements')[panoramaSequenceIndex-1].get('class') == 'TargetPanoramaCameraMovement'){ var initialPosition = camera.get('initialPosition'); var oldYaw = initialPosition.get('yaw'); var oldPitch = initialPosition.get('pitch'); var oldHfov = initialPosition.get('hfov'); var previousMovement = panoramaSequence.get('movements')[panoramaSequenceIndex-1]; initialPosition.set('yaw', previousMovement.get('targetYaw')); initialPosition.set('pitch', previousMovement.get('targetPitch')); initialPosition.set('hfov', previousMovement.get('targetHfov')); var restoreInitialPositionFunction = function(event){ initialPosition.set('yaw', oldYaw); initialPosition.set('pitch', oldPitch); initialPosition.set('hfov', oldHfov); itemDispatcher.unbind('end', restoreInitialPositionFunction, this); }; itemDispatcher.bind('end', restoreInitialPositionFunction, this); } panoramaSequence.set('movementIndex', panoramaSequenceIndex); } } if(player){ item.unbind('begin', onBeginFunction, this); player.unbind('stateChange', stateChangeFunction, this); for(var i = 0; i<buttons.length; ++i) { buttons[i].unbind('click', disposeCallback, this); } } if(sameViewerArea){ var currentMedia = this.getMediaFromPlayer(player); if(currentMedia == undefined || currentMedia == item.get('media')){ playListDispatcher.set('selectedIndex', indexDispatcher); } if(playList != playListDispatcher) playListDispatcher.unbind('change', changeFunction, this); } else{ viewerArea.set('visible', viewerVisibility); } playListDispatcher = undefined; }; var mediaDispatcherByParam = mediaDispatcher != undefined; if(!mediaDispatcher){ var currentIndex = playList.get('selectedIndex'); var currentPlayer = (currentIndex != -1) ? playList.get('items')[playList.get('selectedIndex')].get('player') : this.getActivePlayerWithViewer(this.MainViewer); if(currentPlayer) { mediaDispatcher = this.getMediaFromPlayer(currentPlayer); } } var playListDispatcher = mediaDispatcher ? this.getPlayListWithMedia(mediaDispatcher, true) : undefined; if(!playListDispatcher){ playList.set('selectedIndex', index); return; } var indexDispatcher = playListDispatcher.get('selectedIndex'); if(playList.get('selectedIndex') == index || indexDispatcher == -1){ return; } var item = playList.get('items')[index]; var itemDispatcher = playListDispatcher.get('items')[indexDispatcher]; var player = item.get('player'); var viewerArea = player.get('viewerArea'); var viewerVisibility = viewerArea.get('visible'); var sameViewerArea = viewerArea == itemDispatcher.get('player').get('viewerArea'); if(sameViewerArea){ if(playList != playListDispatcher){ playListDispatcher.set('selectedIndex', -1); playListDispatcher.bind('change', changeFunction, this); } } else{ viewerArea.set('visible', true); } var panoramaSequenceIndex = -1; var panoramaSequence = undefined; var camera = itemDispatcher.get('camera'); if(camera){ panoramaSequence = camera.get('initialSequence'); if(panoramaSequence) { panoramaSequenceIndex = panoramaSequence.get('movementIndex'); } } playList.set('selectedIndex', index); var buttons = []; var addButtons = function(property){ var value = player.get(property); if(value == undefined) return; if(Array.isArray(value)) buttons = buttons.concat(value); else buttons.push(value); }; addButtons('buttonStop'); for(var i = 0; i<buttons.length; ++i) { buttons[i].bind('click', disposeCallback, this); } if(player != itemDispatcher.get('player') || !mediaDispatcherByParam){ item.bind('begin', onBeginFunction, self); } this.executeFunctionWhenChange(playList, index, disposeCallback); },
"getPlayListItemByMedia": function(playList, media){ var items = playList.get('items'); for(var j = 0, countJ = items.length; j<countJ; ++j){ var item = items[j]; if(item.get('media') == media) return item; } return undefined; },
"setMainMediaByName": function(name){ var items = this.mainPlayList.get('items'); for(var i = 0; i<items.length; ++i){ var item = items[i]; if(item.get('media').get('label') == name) { this.mainPlayList.set('selectedIndex', i); return item; } } },
"getPlayListItems": function(media, player){ var itemClass = (function() { switch(media.get('class')) { case 'Panorama': case 'LivePanorama': case 'HDRPanorama': return 'PanoramaPlayListItem'; case 'Video360': return 'Video360PlayListItem'; case 'PhotoAlbum': return 'PhotoAlbumPlayListItem'; case 'Map': return 'MapPlayListItem'; case 'Video': return 'VideoPlayListItem'; } })(); if (itemClass != undefined) { var items = this.getByClassName(itemClass); for (var i = items.length-1; i>=0; --i) { var item = items[i]; if(item.get('media') != media || (player != undefined && item.get('player') != player)) { items.splice(i, 1); } } return items; } else { return []; } },
"unregisterKey": function(key){ delete window[key]; },
"setMainMediaByIndex": function(index){ var item = undefined; if(index >= 0 && index < this.mainPlayList.get('items').length){ this.mainPlayList.set('selectedIndex', index); item = this.mainPlayList.get('items')[index]; } return item; },
"registerKey": function(key, value){ window[key] = value; },
"setEndToItemIndex": function(playList, fromIndex, toIndex){ var endFunction = function(){ if(playList.get('selectedIndex') == fromIndex) playList.set('selectedIndex', toIndex); }; this.executeFunctionWhenChange(playList, fromIndex, endFunction); },
"getPanoramaOverlayByName": function(panorama, name){ var overlays = this.getOverlays(panorama); for(var i = 0, count = overlays.length; i<count; ++i){ var overlay = overlays[i]; var data = overlay.get('data'); if(data != undefined && data.label == name){ return overlay; } } return undefined; },
"visibleComponentsIfPlayerFlagEnabled": function(components, playerFlag){ var enabled = this.get(playerFlag); for(var i in components){ components[i].set('visible', enabled); } },
"setComponentVisibility": function(component, visible, applyAt, effect, propertyEffect, ignoreClearTimeout){ var keepVisibility = this.getKey('keepVisibility_' + component.get('id')); if(keepVisibility) return; this.unregisterKey('visibility_'+component.get('id')); var changeVisibility = function(){ if(effect && propertyEffect){ component.set(propertyEffect, effect); } component.set('visible', visible); if(component.get('class') == 'ViewerArea'){ try{ if(visible) component.restart(); else if(component.get('playbackState') == 'playing') component.pause(); } catch(e){}; } }; var effectTimeoutName = 'effectTimeout_'+component.get('id'); if(!ignoreClearTimeout && window.hasOwnProperty(effectTimeoutName)){ var effectTimeout = window[effectTimeoutName]; if(effectTimeout instanceof Array){ for(var i=0; i<effectTimeout.length; i++){ clearTimeout(effectTimeout[i]) } }else{ clearTimeout(effectTimeout); } delete window[effectTimeoutName]; } else if(visible == component.get('visible') && !ignoreClearTimeout) return; if(applyAt && applyAt > 0){ var effectTimeout = setTimeout(function(){ if(window[effectTimeoutName] instanceof Array) { var arrayTimeoutVal = window[effectTimeoutName]; var index = arrayTimeoutVal.indexOf(effectTimeout); arrayTimeoutVal.splice(index, 1); if(arrayTimeoutVal.length == 0){ delete window[effectTimeoutName]; } }else{ delete window[effectTimeoutName]; } changeVisibility(); }, applyAt); if(window.hasOwnProperty(effectTimeoutName)){ window[effectTimeoutName] = [window[effectTimeoutName], effectTimeout]; }else{ window[effectTimeoutName] = effectTimeout; } } else{ changeVisibility(); } },
"getOverlays": function(media){ switch(media.get('class')){ case 'Panorama': var overlays = media.get('overlays').concat() || []; var frames = media.get('frames'); for(var j = 0; j<frames.length; ++j){ overlays = overlays.concat(frames[j].get('overlays') || []); } return overlays; case 'Video360': case 'Map': return media.get('overlays') || []; default: return []; } },
"updateVideoCues": function(playList, index){ var playListItem = playList.get('items')[index]; var video = playListItem.get('media'); if(video.get('cues').length == 0) return; var player = playListItem.get('player'); var cues = []; var changeFunction = function(){ if(playList.get('selectedIndex') != index){ video.unbind('cueChange', cueChangeFunction, this); playList.unbind('change', changeFunction, this); } }; var cueChangeFunction = function(event){ var activeCues = event.data.activeCues; for(var i = 0, count = cues.length; i<count; ++i){ var cue = cues[i]; if(activeCues.indexOf(cue) == -1 && (cue.get('startTime') > player.get('currentTime') || cue.get('endTime') < player.get('currentTime')+0.5)){ cue.trigger('end'); } } cues = activeCues; }; video.bind('cueChange', cueChangeFunction, this); playList.bind('change', changeFunction, this); },
"setCameraSameSpotAsMedia": function(camera, media){ var player = this.getCurrentPlayerWithMedia(media); if(player != undefined) { var position = camera.get('initialPosition'); position.set('yaw', player.get('yaw')); position.set('pitch', player.get('pitch')); position.set('hfov', player.get('hfov')); } },
"fixTogglePlayPauseButton": function(player){ var state = player.get('state'); var buttons = player.get('buttonPlayPause'); if(typeof buttons !== 'undefined' && player.get('state') == 'playing'){ if(!Array.isArray(buttons)) buttons = [buttons]; for(var i = 0; i<buttons.length; ++i) buttons[i].set('pressed', true); } },
"getMediaHeight": function(media){ switch(media.get('class')){ case 'Video360': var res = media.get('video'); if(res instanceof Array){ var maxH=0; for(var i=0; i<res.length; i++){ var r = res[i]; if(r.get('height') > maxH) maxH = r.get('height'); } return maxH; }else{ return r.get('height') } default: return media.get('height'); } },
"updateMediaLabelFromPlayList": function(playList, htmlText, playListItemStopToDispose){ var changeFunction = function(){ var index = playList.get('selectedIndex'); if(index >= 0){ var beginFunction = function(){ playListItem.unbind('begin', beginFunction); setMediaLabel(index); }; var setMediaLabel = function(index){ var media = playListItem.get('media'); var text = media.get('data'); if(!text) text = media.get('label'); setHtml(text); }; var setHtml = function(text){ if(text !== undefined) { htmlText.set('html', '<div style=\"text-align:left\"><SPAN STYLE=\"color:#FFFFFF;font-size:12px;font-family:Verdana\"><span color=\"white\" font-family=\"Verdana\" font-size=\"12px\">' + text + '</SPAN></div>'); } else { htmlText.set('html', ''); } }; var playListItem = playList.get('items')[index]; if(htmlText.get('html')){ setHtml('Loading...'); playListItem.bind('begin', beginFunction); } else{ setMediaLabel(index); } } }; var disposeFunction = function(){ htmlText.set('html', undefined); playList.unbind('change', changeFunction, this); playListItemStopToDispose.unbind('stop', disposeFunction, this); }; if(playListItemStopToDispose){ playListItemStopToDispose.bind('stop', disposeFunction, this); } playList.bind('change', changeFunction, this); changeFunction(); },
"stopGlobalAudio": function(audio){ var audios = window.currentGlobalAudios; if(audios){ audio = audios[audio.get('id')]; if(audio){ delete audios[audio.get('id')]; if(Object.keys(audios).length == 0){ window.currentGlobalAudios = undefined; } } } if(audio) audio.stop(); },
"getMediaWidth": function(media){ switch(media.get('class')){ case 'Video360': var res = media.get('video'); if(res instanceof Array){ var maxW=0; for(var i=0; i<res.length; i++){ var r = res[i]; if(r.get('width') > maxW) maxW = r.get('width'); } return maxW; }else{ return r.get('width') } default: return media.get('width'); } },
"triggerOverlay": function(overlay, eventName){ if(overlay.get('areas') != undefined) { var areas = overlay.get('areas'); for(var i = 0; i<areas.length; ++i) { areas[i].trigger(eventName); } } else { overlay.trigger(eventName); } },
"resumeGlobalAudios": function(caller){ if (window.pauseGlobalAudiosState == undefined || !(caller in window.pauseGlobalAudiosState)) return; var audiosPaused = window.pauseGlobalAudiosState[caller]; delete window.pauseGlobalAudiosState[caller]; var values = Object.values(window.pauseGlobalAudiosState); for (var i = 0, count = values.length; i<count; ++i) { var objAudios = values[i]; for (var j = audiosPaused.length-1; j>=0; --j) { var a = audiosPaused[j]; if(objAudios.indexOf(a) != -1) audiosPaused.splice(j, 1); } } for (var i = 0, count = audiosPaused.length; i<count; ++i) { var a = audiosPaused[i]; if (a.get('state') == 'paused') a.play(); } },
"getMediaFromPlayer": function(player){ switch(player.get('class')){ case 'PanoramaPlayer': return player.get('panorama') || player.get('video'); case 'VideoPlayer': case 'Video360Player': return player.get('video'); case 'PhotoAlbumPlayer': return player.get('photoAlbum'); case 'MapPlayer': return player.get('map'); } },
"syncPlaylists": function(playLists){ var changeToMedia = function(media, playListDispatched){ for(var i = 0, count = playLists.length; i<count; ++i){ var playList = playLists[i]; if(playList != playListDispatched){ var items = playList.get('items'); for(var j = 0, countJ = items.length; j<countJ; ++j){ if(items[j].get('media') == media){ if(playList.get('selectedIndex') != j){ playList.set('selectedIndex', j); } break; } } } } }; var changeFunction = function(event){ var playListDispatched = event.source; var selectedIndex = playListDispatched.get('selectedIndex'); if(selectedIndex < 0) return; var media = playListDispatched.get('items')[selectedIndex].get('media'); changeToMedia(media, playListDispatched); }; var mapPlayerChangeFunction = function(event){ var panoramaMapLocation = event.source.get('panoramaMapLocation'); if(panoramaMapLocation){ var map = panoramaMapLocation.get('map'); changeToMedia(map); } }; for(var i = 0, count = playLists.length; i<count; ++i){ playLists[i].bind('change', changeFunction, this); } var mapPlayers = this.getByClassName('MapPlayer'); for(var i = 0, count = mapPlayers.length; i<count; ++i){ mapPlayers[i].bind('panoramaMapLocation_change', mapPlayerChangeFunction, this); } },
"resumePlayers": function(players, onlyResumeCameraIfPanorama){ for(var i = 0; i<players.length; ++i){ var player = players[i]; if(onlyResumeCameraIfPanorama && player.get('class') == 'PanoramaPlayer' && typeof player.get('video') === 'undefined'){ player.resumeCamera(); } else{ player.play(); } } },
"setMapLocation": function(panoramaPlayListItem, mapPlayer){ var resetFunction = function(){ panoramaPlayListItem.unbind('stop', resetFunction, this); player.set('mapPlayer', null); }; panoramaPlayListItem.bind('stop', resetFunction, this); var player = panoramaPlayListItem.get('player'); player.set('mapPlayer', mapPlayer); },
"playGlobalAudio": function(audio, endCallback){ var endFunction = function(){ audio.unbind('end', endFunction, this); this.stopGlobalAudio(audio); if(endCallback) endCallback(); }; audio = this.getGlobalAudio(audio); var audios = window.currentGlobalAudios; if(!audios){ audios = window.currentGlobalAudios = {}; } audios[audio.get('id')] = audio; if(audio.get('state') == 'playing'){ return audio; } if(!audio.get('loop')){ audio.bind('end', endFunction, this); } audio.play(); return audio; },
"getMediaByName": function(name){ var list = this.getByClassName('Media'); for(var i = 0, count = list.length; i<count; ++i){ var media = list[i]; if((media.get('class') == 'Audio' && media.get('data').label == name) || media.get('label') == name){ return media; } } return undefined; },
"init": function(){ if(!Object.hasOwnProperty('values')) { Object.values = function(o){ return Object.keys(o).map(function(e) { return o[e]; }); }; } var history = this.get('data')['history']; var playListChangeFunc = function(e){ var playList = e.source; var index = playList.get('selectedIndex'); if(index < 0) return; var id = playList.get('id'); if(!history.hasOwnProperty(id)) history[id] = new HistoryData(playList); history[id].add(index); }; var playLists = this.getByClassName('PlayList'); for(var i = 0, count = playLists.length; i<count; ++i) { var playList = playLists[i]; playList.bind('change', playListChangeFunc, this); } },
"playGlobalAudioWhilePlay": function(playList, index, audio, endCallback){ var changeFunction = function(event){ if(event.data.previousSelectedIndex == index){ this.stopGlobalAudio(audio); if(isPanorama) { var media = playListItem.get('media'); var audios = media.get('audios'); audios.splice(audios.indexOf(audio), 1); media.set('audios', audios); } playList.unbind('change', changeFunction, this); if(endCallback) endCallback(); } }; var audios = window.currentGlobalAudios; if(audios && audio.get('id') in audios){ audio = audios[audio.get('id')]; if(audio.get('state') != 'playing'){ audio.play(); } return audio; } playList.bind('change', changeFunction, this); var playListItem = playList.get('items')[index]; var isPanorama = playListItem.get('class') == 'PanoramaPlayListItem'; if(isPanorama) { var media = playListItem.get('media'); var audios = (media.get('audios') || []).slice(); if(audio.get('class') == 'MediaAudio') { var panoramaAudio = this.rootPlayer.createInstance('PanoramaAudio'); panoramaAudio.set('autoplay', false); panoramaAudio.set('audio', audio.get('audio')); panoramaAudio.set('loop', audio.get('loop')); panoramaAudio.set('id', audio.get('id')); var stateChangeFunctions = audio.getBindings('stateChange'); for(var i = 0; i<stateChangeFunctions.length; ++i){ var f = stateChangeFunctions[i]; if(typeof f == 'string') f = new Function('event', f); panoramaAudio.bind('stateChange', f, this); } audio = panoramaAudio; } audios.push(audio); media.set('audios', audios); } return this.playGlobalAudio(audio, endCallback); },
"getPixels": function(value){ var result = new RegExp('((\\+|\\-)?\\d+(\\.\\d*)?)(px|vw|vh|vmin|vmax)?', 'i').exec(value); if (result == undefined) { return 0; } var num = parseFloat(result[1]); var unit = result[4]; var vw = this.rootPlayer.get('actualWidth') / 100; var vh = this.rootPlayer.get('actualHeight') / 100; switch(unit) { case 'vw': return num * vw; case 'vh': return num * vh; case 'vmin': return num * Math.min(vw, vh); case 'vmax': return num * Math.max(vw, vh); default: return num; } },
"getGlobalAudio": function(audio){ var audios = window.currentGlobalAudios; if(audios != undefined && audio.get('id') in audios){ audio = audios[audio.get('id')]; } return audio; },
"showWindow": function(w, autoCloseMilliSeconds, containsAudio){ if(w.get('visible') == true){ return; } var closeFunction = function(){ clearAutoClose(); this.resumePlayers(playersPaused, !containsAudio); w.unbind('close', closeFunction, this); }; var clearAutoClose = function(){ w.unbind('click', clearAutoClose, this); if(timeoutID != undefined){ clearTimeout(timeoutID); } }; var timeoutID = undefined; if(autoCloseMilliSeconds){ var autoCloseFunction = function(){ w.hide(); }; w.bind('click', clearAutoClose, this); timeoutID = setTimeout(autoCloseFunction, autoCloseMilliSeconds); } var playersPaused = this.pauseCurrentPlayers(!containsAudio); w.bind('close', closeFunction, this); w.show(this, true); },
"playAudioList": function(audios){ if(audios.length == 0) return; var currentAudioCount = -1; var currentAudio; var playGlobalAudioFunction = this.playGlobalAudio; var playNext = function(){ if(++currentAudioCount >= audios.length) currentAudioCount = 0; currentAudio = audios[currentAudioCount]; playGlobalAudioFunction(currentAudio, playNext); }; playNext(); },
"startPanoramaWithCamera": function(media, camera){ if(window.currentPanoramasWithCameraChanged != undefined && window.currentPanoramasWithCameraChanged.indexOf(media) != -1){ return; } var playLists = this.getByClassName('PlayList'); if(playLists.length == 0) return; var restoreItems = []; for(var i = 0, count = playLists.length; i<count; ++i){ var playList = playLists[i]; var items = playList.get('items'); for(var j = 0, countJ = items.length; j<countJ; ++j){ var item = items[j]; if(item.get('media') == media && (item.get('class') == 'PanoramaPlayListItem' || item.get('class') == 'Video360PlayListItem')){ restoreItems.push({camera: item.get('camera'), item: item}); item.set('camera', camera); } } } if(restoreItems.length > 0) { if(window.currentPanoramasWithCameraChanged == undefined) { window.currentPanoramasWithCameraChanged = [media]; } else { window.currentPanoramasWithCameraChanged.push(media); } var restoreCameraOnStop = function(){ var index = window.currentPanoramasWithCameraChanged.indexOf(media); if(index != -1) { window.currentPanoramasWithCameraChanged.splice(index, 1); } for (var i = 0; i < restoreItems.length; i++) { restoreItems[i].item.set('camera', restoreItems[i].camera); restoreItems[i].item.unbind('stop', restoreCameraOnStop, this); } }; for (var i = 0; i < restoreItems.length; i++) { restoreItems[i].item.bind('stop', restoreCameraOnStop, this); } } },
"getCurrentPlayers": function(){ var players = this.getByClassName('PanoramaPlayer'); players = players.concat(this.getByClassName('VideoPlayer')); players = players.concat(this.getByClassName('Video360Player')); players = players.concat(this.getByClassName('PhotoAlbumPlayer')); return players; },
"showPopupPanoramaVideoOverlay": function(popupPanoramaOverlay, closeButtonProperties, stopAudios){ var self = this; var showEndFunction = function() { popupPanoramaOverlay.unbind('showEnd', showEndFunction); closeButton.bind('click', hideFunction, this); setCloseButtonPosition(); closeButton.set('visible', true); }; var endFunction = function() { if(!popupPanoramaOverlay.get('loop')) hideFunction(); }; var hideFunction = function() { self.MainViewer.set('toolTipEnabled', true); popupPanoramaOverlay.set('visible', false); closeButton.set('visible', false); closeButton.unbind('click', hideFunction, self); popupPanoramaOverlay.unbind('end', endFunction, self); popupPanoramaOverlay.unbind('hideEnd', hideFunction, self, true); self.resumePlayers(playersPaused, true); if(stopAudios) { self.resumeGlobalAudios(); } }; var setCloseButtonPosition = function() { var right = 10; var top = 10; closeButton.set('right', right); closeButton.set('top', top); }; this.MainViewer.set('toolTipEnabled', false); var closeButton = this.closeButtonPopupPanorama; if(closeButtonProperties){ for(var key in closeButtonProperties){ closeButton.set(key, closeButtonProperties[key]); } } var playersPaused = this.pauseCurrentPlayers(true); if(stopAudios) { this.pauseGlobalAudios(); } popupPanoramaOverlay.bind('end', endFunction, this, true); popupPanoramaOverlay.bind('showEnd', showEndFunction, this, true); popupPanoramaOverlay.bind('hideEnd', hideFunction, this, true); popupPanoramaOverlay.set('visible', true); },
"pauseGlobalAudios": function(caller, exclude){ if (window.pauseGlobalAudiosState == undefined) window.pauseGlobalAudiosState = {}; if (window.pauseGlobalAudiosList == undefined) window.pauseGlobalAudiosList = []; if (caller in window.pauseGlobalAudiosState) { return; } var audios = this.getByClassName('Audio').concat(this.getByClassName('VideoPanoramaOverlay')); if (window.currentGlobalAudios != undefined) audios = audios.concat(Object.values(window.currentGlobalAudios)); var audiosPaused = []; var values = Object.values(window.pauseGlobalAudiosState); for (var i = 0, count = values.length; i<count; ++i) { var objAudios = values[i]; for (var j = 0; j<objAudios.length; ++j) { var a = objAudios[j]; if(audiosPaused.indexOf(a) == -1) audiosPaused.push(a); } } window.pauseGlobalAudiosState[caller] = audiosPaused; for (var i = 0, count = audios.length; i < count; ++i) { var a = audios[i]; if (a.get('state') == 'playing' && (exclude == undefined || exclude.indexOf(a) == -1)) { a.pause(); audiosPaused.push(a); } } },
"getCurrentPlayerWithMedia": function(media){ var playerClass = undefined; var mediaPropertyName = undefined; switch(media.get('class')) { case 'Panorama': case 'LivePanorama': case 'HDRPanorama': playerClass = 'PanoramaPlayer'; mediaPropertyName = 'panorama'; break; case 'Video360': playerClass = 'PanoramaPlayer'; mediaPropertyName = 'video'; break; case 'PhotoAlbum': playerClass = 'PhotoAlbumPlayer'; mediaPropertyName = 'photoAlbum'; break; case 'Map': playerClass = 'MapPlayer'; mediaPropertyName = 'map'; break; case 'Video': playerClass = 'VideoPlayer'; mediaPropertyName = 'video'; break; }; if(playerClass != undefined) { var players = this.getByClassName(playerClass); for(var i = 0; i<players.length; ++i){ var player = players[i]; if(player.get(mediaPropertyName) == media) { return player; } } } else { return undefined; } },
"showPopupPanoramaOverlay": function(popupPanoramaOverlay, closeButtonProperties, imageHD, toggleImage, toggleImageHD, autoCloseMilliSeconds, audio, stopBackgroundAudio){ var self = this; this.MainViewer.set('toolTipEnabled', false); var cardboardEnabled = this.isCardboardViewMode(); if(!cardboardEnabled) { var zoomImage = this.zoomImagePopupPanorama; var showDuration = popupPanoramaOverlay.get('showDuration'); var hideDuration = popupPanoramaOverlay.get('hideDuration'); var playersPaused = this.pauseCurrentPlayers(audio == null || !stopBackgroundAudio); var popupMaxWidthBackup = popupPanoramaOverlay.get('popupMaxWidth'); var popupMaxHeightBackup = popupPanoramaOverlay.get('popupMaxHeight'); var showEndFunction = function() { var loadedFunction = function(){ if(!self.isCardboardViewMode()) popupPanoramaOverlay.set('visible', false); }; popupPanoramaOverlay.unbind('showEnd', showEndFunction, self); popupPanoramaOverlay.set('showDuration', 1); popupPanoramaOverlay.set('hideDuration', 1); self.showPopupImage(imageHD, toggleImageHD, popupPanoramaOverlay.get('popupMaxWidth'), popupPanoramaOverlay.get('popupMaxHeight'), null, null, closeButtonProperties, autoCloseMilliSeconds, audio, stopBackgroundAudio, loadedFunction, hideFunction); }; var hideFunction = function() { var restoreShowDurationFunction = function(){ popupPanoramaOverlay.unbind('showEnd', restoreShowDurationFunction, self); popupPanoramaOverlay.set('visible', false); popupPanoramaOverlay.set('showDuration', showDuration); popupPanoramaOverlay.set('popupMaxWidth', popupMaxWidthBackup); popupPanoramaOverlay.set('popupMaxHeight', popupMaxHeightBackup); }; self.resumePlayers(playersPaused, audio == null || !stopBackgroundAudio); var currentWidth = zoomImage.get('imageWidth'); var currentHeight = zoomImage.get('imageHeight'); popupPanoramaOverlay.bind('showEnd', restoreShowDurationFunction, self, true); popupPanoramaOverlay.set('showDuration', 1); popupPanoramaOverlay.set('hideDuration', hideDuration); popupPanoramaOverlay.set('popupMaxWidth', currentWidth); popupPanoramaOverlay.set('popupMaxHeight', currentHeight); if(popupPanoramaOverlay.get('visible')) restoreShowDurationFunction(); else popupPanoramaOverlay.set('visible', true); self.MainViewer.set('toolTipEnabled', true); }; if(!imageHD){ imageHD = popupPanoramaOverlay.get('image'); } if(!toggleImageHD && toggleImage){ toggleImageHD = toggleImage; } popupPanoramaOverlay.bind('showEnd', showEndFunction, this, true); } else { var hideEndFunction = function() { self.resumePlayers(playersPaused, audio == null || stopBackgroundAudio); if(audio){ if(stopBackgroundAudio){ self.resumeGlobalAudios(); } self.stopGlobalAudio(audio); } popupPanoramaOverlay.unbind('hideEnd', hideEndFunction, self); self.MainViewer.set('toolTipEnabled', true); }; var playersPaused = this.pauseCurrentPlayers(audio == null || !stopBackgroundAudio); if(audio){ if(stopBackgroundAudio){ this.pauseGlobalAudios(); } this.playGlobalAudio(audio); } popupPanoramaOverlay.bind('hideEnd', hideEndFunction, this, true); } popupPanoramaOverlay.set('visible', true); },
"pauseGlobalAudio": function(audio){ var audios = window.currentGlobalAudios; if(audios){ audio = audios[audio.get('id')]; } if(audio.get('state') == 'playing') audio.pause(); },
"getActivePlayerWithViewer": function(viewerArea){ var players = this.getByClassName('PanoramaPlayer'); players = players.concat(this.getByClassName('VideoPlayer')); players = players.concat(this.getByClassName('Video360Player')); players = players.concat(this.getByClassName('PhotoAlbumPlayer')); players = players.concat(this.getByClassName('MapPlayer')); var i = players.length; while(i-- > 0){ var player = players[i]; if(player.get('viewerArea') == viewerArea) { var playerClass = player.get('class'); if(playerClass == 'PanoramaPlayer' && (player.get('panorama') != undefined || player.get('video') != undefined)) return player; else if((playerClass == 'VideoPlayer' || playerClass == 'Video360Player') && player.get('video') != undefined) return player; else if(playerClass == 'PhotoAlbumPlayer' && player.get('photoAlbum') != undefined) return player; else if(playerClass == 'MapPlayer' && player.get('map') != undefined) return player; } } return undefined; },
"showPopupImage": function(image, toggleImage, customWidth, customHeight, showEffect, hideEffect, closeButtonProperties, autoCloseMilliSeconds, audio, stopBackgroundAudio, loadedCallback, hideCallback){ var self = this; var closed = false; var playerClickFunction = function() { zoomImage.unbind('loaded', loadedFunction, self); hideFunction(); }; var clearAutoClose = function(){ zoomImage.unbind('click', clearAutoClose, this); if(timeoutID != undefined){ clearTimeout(timeoutID); } }; var resizeFunction = function(){ setTimeout(setCloseButtonPosition, 0); }; var loadedFunction = function(){ self.unbind('click', playerClickFunction, self); veil.set('visible', true); setCloseButtonPosition(); closeButton.set('visible', true); zoomImage.unbind('loaded', loadedFunction, this); zoomImage.bind('userInteractionStart', userInteractionStartFunction, this); zoomImage.bind('userInteractionEnd', userInteractionEndFunction, this); zoomImage.bind('resize', resizeFunction, this); timeoutID = setTimeout(timeoutFunction, 200); }; var timeoutFunction = function(){ timeoutID = undefined; if(autoCloseMilliSeconds){ var autoCloseFunction = function(){ hideFunction(); }; zoomImage.bind('click', clearAutoClose, this); timeoutID = setTimeout(autoCloseFunction, autoCloseMilliSeconds); } zoomImage.bind('backgroundClick', hideFunction, this); if(toggleImage) { zoomImage.bind('click', toggleFunction, this); zoomImage.set('imageCursor', 'hand'); } closeButton.bind('click', hideFunction, this); if(loadedCallback) loadedCallback(); }; var hideFunction = function() { self.MainViewer.set('toolTipEnabled', true); closed = true; if(timeoutID) clearTimeout(timeoutID); if (timeoutUserInteractionID) clearTimeout(timeoutUserInteractionID); if(autoCloseMilliSeconds) clearAutoClose(); if(hideCallback) hideCallback(); zoomImage.set('visible', false); if(hideEffect && hideEffect.get('duration') > 0){ hideEffect.bind('end', endEffectFunction, this); } else{ zoomImage.set('image', null); } closeButton.set('visible', false); veil.set('visible', false); self.unbind('click', playerClickFunction, self); zoomImage.unbind('backgroundClick', hideFunction, this); zoomImage.unbind('userInteractionStart', userInteractionStartFunction, this); zoomImage.unbind('userInteractionEnd', userInteractionEndFunction, this, true); zoomImage.unbind('resize', resizeFunction, this); if(toggleImage) { zoomImage.unbind('click', toggleFunction, this); zoomImage.set('cursor', 'default'); } closeButton.unbind('click', hideFunction, this); self.resumePlayers(playersPaused, audio == null || stopBackgroundAudio); if(audio){ if(stopBackgroundAudio){ self.resumeGlobalAudios(); } self.stopGlobalAudio(audio); } }; var endEffectFunction = function() { zoomImage.set('image', null); hideEffect.unbind('end', endEffectFunction, this); }; var toggleFunction = function() { zoomImage.set('image', isToggleVisible() ? image : toggleImage); }; var isToggleVisible = function() { return zoomImage.get('image') == toggleImage; }; var setCloseButtonPosition = function() { var right = zoomImage.get('actualWidth') - zoomImage.get('imageLeft') - zoomImage.get('imageWidth') + 10; var top = zoomImage.get('imageTop') + 10; if(right < 10) right = 10; if(top < 10) top = 10; closeButton.set('right', right); closeButton.set('top', top); }; var userInteractionStartFunction = function() { if(timeoutUserInteractionID){ clearTimeout(timeoutUserInteractionID); timeoutUserInteractionID = undefined; } else{ closeButton.set('visible', false); } }; var userInteractionEndFunction = function() { if(!closed){ timeoutUserInteractionID = setTimeout(userInteractionTimeoutFunction, 300); } }; var userInteractionTimeoutFunction = function() { timeoutUserInteractionID = undefined; closeButton.set('visible', true); setCloseButtonPosition(); }; this.MainViewer.set('toolTipEnabled', false); var veil = this.veilPopupPanorama; var zoomImage = this.zoomImagePopupPanorama; var closeButton = this.closeButtonPopupPanorama; if(closeButtonProperties){ for(var key in closeButtonProperties){ closeButton.set(key, closeButtonProperties[key]); } } var playersPaused = this.pauseCurrentPlayers(audio == null || !stopBackgroundAudio); if(audio){ if(stopBackgroundAudio){ this.pauseGlobalAudios(); } this.playGlobalAudio(audio); } var timeoutID = undefined; var timeoutUserInteractionID = undefined; zoomImage.bind('loaded', loadedFunction, this); setTimeout(function(){ self.bind('click', playerClickFunction, self, false); }, 0); zoomImage.set('image', image); zoomImage.set('customWidth', customWidth); zoomImage.set('customHeight', customHeight); zoomImage.set('showEffect', showEffect); zoomImage.set('hideEffect', hideEffect); zoomImage.set('visible', true); return zoomImage; },
"getPlayListWithMedia": function(media, onlySelected){ var playLists = this.getByClassName('PlayList'); for(var i = 0, count = playLists.length; i<count; ++i){ var playList = playLists[i]; if(onlySelected && playList.get('selectedIndex') == -1) continue; if(this.getPlayListItemByMedia(playList, media) != undefined) return playList; } return undefined; },
"pauseGlobalAudiosWhilePlayItem": function(playList, index, exclude){ var self = this; var item = playList.get('items')[index]; var media = item.get('media'); var player = item.get('player'); var caller = media.get('id'); var endFunc = function(){ if(playList.get('selectedIndex') != index) { if(hasState){ player.unbind('stateChange', stateChangeFunc, self); } self.resumeGlobalAudios(caller); } }; var stateChangeFunc = function(event){ var state = event.data.state; if(state == 'stopped'){ this.resumeGlobalAudios(caller); } else if(state == 'playing'){ this.pauseGlobalAudios(caller, exclude); } }; var mediaClass = media.get('class'); var hasState = mediaClass == 'Video360' || mediaClass == 'Video'; if(hasState){ player.bind('stateChange', stateChangeFunc, this); } this.pauseGlobalAudios(caller, exclude); this.executeFunctionWhenChange(playList, index, endFunc, endFunc); },
"showPopupMedia": function(w, media, playList, popupMaxWidth, popupMaxHeight, autoCloseWhenFinished, stopAudios){ var self = this; var closeFunction = function(){ playList.set('selectedIndex', -1); self.MainViewer.set('toolTipEnabled', true); if(stopAudios) { self.resumeGlobalAudios(); } this.resumePlayers(playersPaused, !stopAudios); if(isVideo) { this.unbind('resize', resizeFunction, this); } w.unbind('close', closeFunction, this); }; var endFunction = function(){ w.hide(); }; var resizeFunction = function(){ var getWinValue = function(property){ return w.get(property) || 0; }; var parentWidth = self.get('actualWidth'); var parentHeight = self.get('actualHeight'); var mediaWidth = self.getMediaWidth(media); var mediaHeight = self.getMediaHeight(media); var popupMaxWidthNumber = parseFloat(popupMaxWidth) / 100; var popupMaxHeightNumber = parseFloat(popupMaxHeight) / 100; var windowWidth = popupMaxWidthNumber * parentWidth; var windowHeight = popupMaxHeightNumber * parentHeight; var footerHeight = getWinValue('footerHeight'); var headerHeight = getWinValue('headerHeight'); if(!headerHeight) { var closeButtonHeight = getWinValue('closeButtonIconHeight') + getWinValue('closeButtonPaddingTop') + getWinValue('closeButtonPaddingBottom'); var titleHeight = self.getPixels(getWinValue('titleFontSize')) + getWinValue('titlePaddingTop') + getWinValue('titlePaddingBottom'); headerHeight = closeButtonHeight > titleHeight ? closeButtonHeight : titleHeight; headerHeight += getWinValue('headerPaddingTop') + getWinValue('headerPaddingBottom'); } var contentWindowWidth = windowWidth - getWinValue('bodyPaddingLeft') - getWinValue('bodyPaddingRight') - getWinValue('paddingLeft') - getWinValue('paddingRight'); var contentWindowHeight = windowHeight - headerHeight - footerHeight - getWinValue('bodyPaddingTop') - getWinValue('bodyPaddingBottom') - getWinValue('paddingTop') - getWinValue('paddingBottom'); var parentAspectRatio = contentWindowWidth / contentWindowHeight; var mediaAspectRatio = mediaWidth / mediaHeight; if(parentAspectRatio > mediaAspectRatio) { windowWidth = contentWindowHeight * mediaAspectRatio + getWinValue('bodyPaddingLeft') + getWinValue('bodyPaddingRight') + getWinValue('paddingLeft') + getWinValue('paddingRight'); } else { windowHeight = contentWindowWidth / mediaAspectRatio + headerHeight + footerHeight + getWinValue('bodyPaddingTop') + getWinValue('bodyPaddingBottom') + getWinValue('paddingTop') + getWinValue('paddingBottom'); } if(windowWidth > parentWidth * popupMaxWidthNumber) { windowWidth = parentWidth * popupMaxWidthNumber; } if(windowHeight > parentHeight * popupMaxHeightNumber) { windowHeight = parentHeight * popupMaxHeightNumber; } w.set('width', windowWidth); w.set('height', windowHeight); w.set('x', (parentWidth - getWinValue('actualWidth')) * 0.5); w.set('y', (parentHeight - getWinValue('actualHeight')) * 0.5); }; if(autoCloseWhenFinished){ this.executeFunctionWhenChange(playList, 0, endFunction); } var mediaClass = media.get('class'); var isVideo = mediaClass == 'Video' || mediaClass == 'Video360'; playList.set('selectedIndex', 0); if(isVideo){ this.bind('resize', resizeFunction, this); resizeFunction(); playList.get('items')[0].get('player').play(); } else { w.set('width', popupMaxWidth); w.set('height', popupMaxHeight); } this.MainViewer.set('toolTipEnabled', false); if(stopAudios) { this.pauseGlobalAudios(); } var playersPaused = this.pauseCurrentPlayers(!stopAudios); w.bind('close', closeFunction, this); w.show(this, true); },
"pauseCurrentPlayers": function(onlyPauseCameraIfPanorama){ var players = this.getCurrentPlayers(); var i = players.length; while(i-- > 0){ var player = players[i]; if(player.get('state') == 'playing') { if(onlyPauseCameraIfPanorama && player.get('class') == 'PanoramaPlayer' && typeof player.get('video') === 'undefined'){ player.pauseCamera(); } else { player.pause(); } } else { players.splice(i, 1); } } return players; },
"showComponentsWhileMouseOver": function(parentComponent, components, durationVisibleWhileOut){ var setVisibility = function(visible){ for(var i = 0, length = components.length; i<length; i++){ var component = components[i]; if(component.get('class') == 'HTMLText' && (component.get('html') == '' || component.get('html') == undefined)) { continue; } component.set('visible', visible); } }; if (this.rootPlayer.get('touchDevice') == true){ setVisibility(true); } else { var timeoutID = -1; var rollOverFunction = function(){ setVisibility(true); if(timeoutID >= 0) clearTimeout(timeoutID); parentComponent.unbind('rollOver', rollOverFunction, this); parentComponent.bind('rollOut', rollOutFunction, this); }; var rollOutFunction = function(){ var timeoutFunction = function(){ setVisibility(false); parentComponent.unbind('rollOver', rollOverFunction, this); }; parentComponent.unbind('rollOut', rollOutFunction, this); parentComponent.bind('rollOver', rollOverFunction, this); timeoutID = setTimeout(timeoutFunction, durationVisibleWhileOut); }; parentComponent.bind('rollOver', rollOverFunction, this); } },
"stopAndGoCamera": function(camera, ms){ var sequence = camera.get('initialSequence'); sequence.pause(); var timeoutFunction = function(){ sequence.play(); }; setTimeout(timeoutFunction, ms); },
"executeFunctionWhenChange": function(playList, index, endFunction, changeFunction){ var endObject = undefined; var changePlayListFunction = function(event){ if(event.data.previousSelectedIndex == index){ if(changeFunction) changeFunction.call(this); if(endFunction && endObject) endObject.unbind('end', endFunction, this); playList.unbind('change', changePlayListFunction, this); } }; if(endFunction){ var playListItem = playList.get('items')[index]; if(playListItem.get('class') == 'PanoramaPlayListItem'){ var camera = playListItem.get('camera'); if(camera != undefined) endObject = camera.get('initialSequence'); if(endObject == undefined) endObject = camera.get('idleSequence'); } else{ endObject = playListItem.get('media'); } if(endObject){ endObject.bind('end', endFunction, this); } } playList.bind('change', changePlayListFunction, this); },
"shareTwitter": function(url){ window.open('https://twitter.com/intent/tweet?source=webclient&url=' + url, '_blank'); },
"loadFromCurrentMediaPlayList": function(playList, delta){ var currentIndex = playList.get('selectedIndex'); var totalItems = playList.get('items').length; var newIndex = (currentIndex + delta) % totalItems; while(newIndex < 0){ newIndex = totalItems + newIndex; }; if(currentIndex != newIndex){ playList.set('selectedIndex', newIndex); } },
"cloneCamera": function(camera){ var newCamera = this.rootPlayer.createInstance(camera.get('class')); newCamera.set('id', camera.get('id') + '_copy'); newCamera.set('idleSequence', camera.get('initialSequence')); return newCamera; },
"shareWhatsapp": function(url){ window.open('https://api.whatsapp.com/send/?text=' + encodeURIComponent(url), '_blank'); },
"loopAlbum": function(playList, index){ var playListItem = playList.get('items')[index]; var player = playListItem.get('player'); var loopFunction = function(){ player.play(); }; this.executeFunctionWhenChange(playList, index, loopFunction); },
"changePlayListWithSameSpot": function(playList, newIndex){ var currentIndex = playList.get('selectedIndex'); if (currentIndex >= 0 && newIndex >= 0 && currentIndex != newIndex) { var currentItem = playList.get('items')[currentIndex]; var newItem = playList.get('items')[newIndex]; var currentPlayer = currentItem.get('player'); var newPlayer = newItem.get('player'); if ((currentPlayer.get('class') == 'PanoramaPlayer' || currentPlayer.get('class') == 'Video360Player') && (newPlayer.get('class') == 'PanoramaPlayer' || newPlayer.get('class') == 'Video360Player')) { var newCamera = this.cloneCamera(newItem.get('camera')); this.setCameraSameSpotAsMedia(newCamera, currentItem.get('media')); this.startPanoramaWithCamera(newItem.get('media'), newCamera); } } },
"shareFacebook": function(url){ window.open('https://www.facebook.com/sharer/sharer.php?u=' + url, '_blank'); },
"keepComponentVisibility": function(component, keep){ var key = 'keepVisibility_' + component.get('id'); var value = this.getKey(key); if(value == undefined && keep) { this.registerKey(key, keep); } else if(value != undefined && !keep) { this.unregisterKey(key); } },
"changeBackgroundWhilePlay": function(playList, index, color){ var stopFunction = function(event){ playListItem.unbind('stop', stopFunction, this); if((color == viewerArea.get('backgroundColor')) && (colorRatios == viewerArea.get('backgroundColorRatios'))){ viewerArea.set('backgroundColor', backgroundColorBackup); viewerArea.set('backgroundColorRatios', backgroundColorRatiosBackup); } }; var playListItem = playList.get('items')[index]; var player = playListItem.get('player'); var viewerArea = player.get('viewerArea'); var backgroundColorBackup = viewerArea.get('backgroundColor'); var backgroundColorRatiosBackup = viewerArea.get('backgroundColorRatios'); var colorRatios = [0]; if((color != backgroundColorBackup) || (colorRatios != backgroundColorRatiosBackup)){ viewerArea.set('backgroundColor', color); viewerArea.set('backgroundColorRatios', colorRatios); playListItem.bind('stop', stopFunction, this); } },
"setStartTimeVideoSync": function(video, player){ this.setStartTimeVideo(video, player.get('currentTime')); },
"isCardboardViewMode": function(){ var players = this.getByClassName('PanoramaPlayer'); return players.length > 0 && players[0].get('viewMode') == 'cardboard'; },
"autotriggerAtStart": function(playList, callback, once){ var onChange = function(event){ callback(); if(once == true) playList.unbind('change', onChange, this); }; playList.bind('change', onChange, this); },
"setStartTimeVideo": function(video, time){ var items = this.getPlayListItems(video); var startTimeBackup = []; var restoreStartTimeFunc = function() { for(var i = 0; i<items.length; ++i){ var item = items[i]; item.set('startTime', startTimeBackup[i]); item.unbind('stop', restoreStartTimeFunc, this); } }; for(var i = 0; i<items.length; ++i) { var item = items[i]; var player = item.get('player'); if(player.get('video') == video && player.get('state') == 'playing') { player.seek(time); } else { startTimeBackup.push(item.get('startTime')); item.set('startTime', time); item.bind('stop', restoreStartTimeFunc, this); } } },
"initGA": function(){ var sendFunc = function(category, event, label) { ga('send', 'event', category, event, label); }; var media = this.getByClassName('Panorama'); media = media.concat(this.getByClassName('Video360')); media = media.concat(this.getByClassName('Map')); for(var i = 0, countI = media.length; i<countI; ++i){ var m = media[i]; var mediaLabel = m.get('label'); var overlays = this.getOverlays(m); for(var j = 0, countJ = overlays.length; j<countJ; ++j){ var overlay = overlays[j]; var overlayLabel = overlay.get('data') != undefined ? mediaLabel + ' - ' + overlay.get('data')['label'] : mediaLabel; switch(overlay.get('class')) { case 'HotspotPanoramaOverlay': case 'HotspotMapOverlay': var areas = overlay.get('areas'); for (var z = 0; z<areas.length; ++z) { areas[z].bind('click', sendFunc.bind(this, 'Hotspot', 'click', overlayLabel), this); } break; case 'CeilingCapPanoramaOverlay': case 'TripodCapPanoramaOverlay': overlay.bind('click', sendFunc.bind(this, 'Cap', 'click', overlayLabel), this); break; } } } var components = this.getByClassName('Button'); components = components.concat(this.getByClassName('IconButton')); for(var i = 0, countI = components.length; i<countI; ++i){ var c = components[i]; var componentLabel = c.get('data')['name']; c.bind('click', sendFunc.bind(this, 'Skin', 'click', componentLabel), this); } var items = this.getByClassName('PlayListItem'); var media2Item = {}; for(var i = 0, countI = items.length; i<countI; ++i) { var item = items[i]; var media = item.get('media'); if(!(media.get('id') in media2Item)) { item.bind('begin', sendFunc.bind(this, 'Media', 'play', media.get('label')), this); media2Item[media.get('id')] = item; } } },
"getKey": function(key){ return window[key]; },
"setPanoramaCameraWithSpot": function(playListItem, yaw, pitch){ var panorama = playListItem.get('media'); var newCamera = this.cloneCamera(playListItem.get('camera')); var initialPosition = newCamera.get('initialPosition'); initialPosition.set('yaw', yaw); initialPosition.set('pitch', pitch); this.startPanoramaWithCamera(panorama, newCamera); },
"existsKey": function(key){ return key in window; },
"setPanoramaCameraWithCurrentSpot": function(playListItem){ var currentPlayer = this.getActivePlayerWithViewer(this.MainViewer); if(currentPlayer == undefined){ return; } var playerClass = currentPlayer.get('class'); if(playerClass != 'PanoramaPlayer' && playerClass != 'Video360Player'){ return; } var fromMedia = currentPlayer.get('panorama'); if(fromMedia == undefined) { fromMedia = currentPlayer.get('video'); } var panorama = playListItem.get('media'); var newCamera = this.cloneCamera(playListItem.get('camera')); this.setCameraSameSpotAsMedia(newCamera, fromMedia); this.startPanoramaWithCamera(panorama, newCamera); },
"historyGoForward": function(playList){ var history = this.get('data')['history'][playList.get('id')]; if(history != undefined) { history.forward(); } },
"openLink": function(url, name){ if(url == location.href) { return; } var isElectron = (window && window.process && window.process.versions && window.process.versions['electron']) || (navigator && navigator.userAgent && navigator.userAgent.indexOf('Electron') >= 0); if (name == '_blank' && isElectron) { if (url.startsWith('/')) { var r = window.location.href.split('/'); r.pop(); url = r.join('/') + url; } var extension = url.split('.').pop().toLowerCase(); if(extension != 'pdf' || url.startsWith('file://')) { var shell = window.require('electron').shell; shell.openExternal(url); } else { window.open(url, name); } } else if(isElectron && (name == '_top' || name == '_self')) { window.location = url; } else { var newWindow = window.open(url, name); newWindow.focus(); } },
"setOverlayBehaviour": function(overlay, media, action){ var executeFunc = function() { switch(action){ case 'triggerClick': this.triggerOverlay(overlay, 'click'); break; case 'stop': case 'play': case 'pause': overlay[action](); break; case 'togglePlayPause': case 'togglePlayStop': if(overlay.get('state') == 'playing') overlay[action == 'togglePlayPause' ? 'pause' : 'stop'](); else overlay.play(); break; } if(window.overlaysDispatched == undefined) window.overlaysDispatched = {}; var id = overlay.get('id'); window.overlaysDispatched[id] = true; setTimeout(function(){ delete window.overlaysDispatched[id]; }, 2000); }; if(window.overlaysDispatched != undefined && overlay.get('id') in window.overlaysDispatched) return; var playList = this.getPlayListWithMedia(media, true); if(playList != undefined){ var item = this.getPlayListItemByMedia(playList, media); if(playList.get('items').indexOf(item) != playList.get('selectedIndex')){ var beginFunc = function(e){ item.unbind('begin', beginFunc, this); executeFunc.call(this); }; item.bind('begin', beginFunc, this); return; } } executeFunc.call(this); }
},
"scrollBarWidth": 10,
"minHeight": 20,
"horizontalAlign": "left",
"buttonToggleFullscreen": "this.IconButton_EEFF957A_E389_9A06_41E1_2AD21904F8C0",
"downloadEnabled": false,
"defaultVRPointer": "laser",
"verticalAlign": "top",
"paddingLeft": 0,
"minWidth": 20,
"height": "100%",
"contentOpaque": false,
"buttonToggleMute": "this.IconButton_EED073D3_E38A_9E06_41E1_6CCC9722545D",
"borderRadius": 0,
"borderSize": 0,
"definitions": [{
"hfovMin": "150%",
"class": "Panorama",
"adjacentPanoramas": [
{
"yaw": 163.63,
"class": "AdjacentPanorama",
"distance": 1,
"backwardYaw": -17.26,
"panorama": "this.panorama_A061BAC1_AB47_7D7A_41DC_2514CC91EBE2"
},
{
"class": "AdjacentPanorama",
"panorama": "this.panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E"
}
],
"label": "4",
"id": "panorama_A060534A_AB47_530E_41DC_BA65238B3835",
"hfovMax": 130,
"overlays": [
"this.overlay_BF53D822_AB43_DD3E_41E2_8EC65E7D151E",
"this.overlay_B8FC3823_AB42_BD3E_41E1_AFD15D279412"
],
"vfov": 180,
"pitch": 0,
"partial": false,
"thumbnailUrl": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_t.jpg",
"frames": [
{
"front": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/f/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/f/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/f/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"class": "CubicPanoramaFrame",
"top": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/u/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/u/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/u/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"thumbnailUrl": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_t.jpg",
"back": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/b/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/b/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/b/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"bottom": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/d/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/d/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/d/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"left": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/l/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/l/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/l/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"right": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/r/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/r/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A060534A_AB47_530E_41DC_BA65238B3835_0/r/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
}
}
],
"hfov": 360
},
{
"initialPosition": {
"yaw": 0,
"class": "PanoramaCameraPosition",
"pitch": 0
},
"initialSequence": {
"class": "PanoramaCameraSequence",
"movements": [
{
"yawSpeed": 7.96,
"yawDelta": 18.5,
"class": "DistancePanoramaCameraMovement",
"easing": "cubic_in"
},
{
"yawSpeed": 7.96,
"yawDelta": 323,
"class": "DistancePanoramaCameraMovement",
"easing": "linear"
},
{
"yawSpeed": 7.96,
"yawDelta": 18.5,
"class": "DistancePanoramaCameraMovement",
"easing": "cubic_out"
}
],
"restartMovementOnUserInteraction": false
},
"class": "PanoramaCamera",
"id": "panorama_A061AADD_AB47_5D0A_41D5_4D2CA2B24AB2_camera",
"automaticZoomSpeed": 10
},
{
"items": [
{
"media": "this.panorama_A7FEB5DB_AB47_570E_41DA_5C8ECE51F1E5",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist, 0, 1)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A7FEB5DB_AB47_570E_41DA_5C8ECE51F1E5_camera"
},
{
"media": "this.panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist, 1, 2)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_camera"
},
{
"media": "this.panorama_A061BAC1_AB47_7D7A_41DC_2514CC91EBE2",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist, 2, 3)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A061BAC1_AB47_7D7A_41DC_2514CC91EBE2_camera"
},
{
"media": "this.panorama_A060534A_AB47_530E_41DC_BA65238B3835",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist, 3, 4)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A060534A_AB47_530E_41DC_BA65238B3835_camera"
},
{
"media": "this.panorama_A061AADD_AB47_5D0A_41D5_4D2CA2B24AB2",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist, 4, 5)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A061AADD_AB47_5D0A_41D5_4D2CA2B24AB2_camera"
},
{
"media": "this.panorama_A062B3A7_AB47_B306_41DE_BCEDC633FA61",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist, 5, 0)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A062B3A7_AB47_B306_41DE_BCEDC633FA61_camera"
}
],
"id": "ThumbnailList_034EDD7A_0D3B_3991_41A5_D706671923C0_playlist",
"class": "PlayList"
},
{
"id": "window_B8FD50EA_AB47_CD0E_41C6_6D887EBFDB2B",
"width": 400,
"bodyBackgroundColorDirection": "vertical",
"headerBackgroundColorRatios": [
0,
0.1,
1
],
"shadowVerticalLength": 0,
"closeButtonBackgroundColorRatios": [],
"headerPaddingRight": 10,
"closeButtonPressedIconColor": "#FFFFFF",
"horizontalAlign": "center",
"closeButtonRollOverBackgroundColorRatios": [
0
],
"veilOpacity": 0.4,
"headerVerticalAlign": "middle",
"titlePaddingLeft": 5,
"closeButtonBorderRadius": 11,
"shadowSpread": 1,
"minHeight": 20,
"paddingLeft": 0,
"titleFontSize": "1.29vmin",
"veilColor": [
"#000000",
"#000000"
],
"verticalAlign": "middle",
"veilColorRatios": [
0,
1
],
"modal": true,
"bodyPaddingTop": 5,
"backgroundColor": [],
"backgroundOpacity": 1,
"titleFontColor": "#000000",
"minWidth": 20,
"height": 400,
"closeButtonRollOverBackgroundColor": [
"#C13535"
],
"footerHeight": 5,
"titleFontWeight": "normal",
"title": "",
"headerBackgroundColorDirection": "vertical",
"borderSize": 0,
"closeButtonIconHeight": 12,
"veilColorDirection": "horizontal",
"propagateClick": false,
"overflow": "scroll",
"headerBorderSize": 0,
"veilHideEffect": {
"class": "FadeOutEffect",
"easing": "cubic_in_out",
"duration": 500
},
"shadowHorizontalLength": 3,
"headerBackgroundOpacity": 1,
"titlePaddingTop": 5,
"shadow": true,
"bodyPaddingBottom": 5,
"backgroundColorDirection": "vertical",
"footerBackgroundColor": [
"#FFFFFF",
"#EEEEEE",
"#DDDDDD"
],
"scrollBarMargin": 2,
"class": "Window",
"veilShowEffect": {
"class": "FadeInEffect",
"easing": "cubic_in_out",
"duration": 500
},
"footerBackgroundColorDirection": "vertical",
"closeButtonPressedBackgroundColorRatios": [
0
],
"children": [
"this.image_uid5C7445BA_478A_72E4_41C1_BCFC8AAF00B8_0",
"this.htmlText_B8FF50EA_AB47_CD0E_41AF_AB690FECE63B",
{
"class": "WebFrame",
"insetBorder": false,
"width": "100%",
"scrollEnabled": true,
"paddingRight": 0,
"url": "https://www.instagram.com/reel/CrtPzKhO6WL/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA==",
"minHeight": 0,
"paddingLeft": 0,
"backgroundColor": [],
"minWidth": 0,
"height": "33%",
"backgroundOpacity": 1,
"borderRadius": 0,
"borderSize": 0,
"paddingTop": 0,
"propagateClick": false,
"backgroundColorRatios": [],
"data": {
"name": "WebFrame21774"
},
"paddingBottom": 0,
"shadow": false,
"backgroundColorDirection": "vertical"
}
],
"titlePaddingRight": 5,
"shadowColor": "#000000",
"layout": "vertical",
"showEffect": {
"class": "FadeInEffect",
"easing": "cubic_in_out",
"duration": 500
},
"bodyPaddingLeft": 5,
"paddingRight": 0,
"titleFontStyle": "normal",
"contentOpaque": false,
"closeButtonIconLineWidth": 2,
"bodyBorderSize": 0,
"closeButtonBackgroundColor": [],
"shadowBlurRadius": 6,
"titleFontFamily": "Arial",
"scrollBarWidth": 10,
"closeButtonIconWidth": 12,
"closeButtonPressedBackgroundColor": [
"#3A1D1F"
],
"footerBackgroundColorRatios": [
0,
0.9,
1
],
"bodyBackgroundOpacity": 1,
"shadowOpacity": 0.5,
"borderRadius": 5,
"headerPaddingLeft": 10,
"bodyPaddingRight": 5,
"bodyBackgroundColor": [
"#FFFFFF",
"#DDDDDD",
"#FFFFFF"
],
"scrollBarColor": "#000000",
"headerPaddingTop": 10,
"headerBackgroundColor": [
"#DDDDDD",
"#EEEEEE",
"#FFFFFF"
],
"paddingTop": 0,
"titleTextDecoration": "none",
"headerBorderColor": "#000000",
"bodyBackgroundColorRatios": [
0,
0.5,
1
],
"backgroundColorRatios": [],
"gap": 10,
"closeButtonRollOverIconColor": "#FFFFFF",
"scrollBarOpacity": 0.5,
"bodyBorderColor": "#000000",
"headerPaddingBottom": 10,
"data": {
"name": "Window21049"
},
"scrollBarVisible": "rollOver",
"closeButtonIconColor": "#000000",
"titlePaddingBottom": 5,
"hideEffect": {
"class": "FadeOutEffect",
"easing": "cubic_in_out",
"duration": 500
},
"paddingBottom": 0
},
{
"items": [
{
"media": "this.panorama_A7FEB5DB_AB47_570E_41DA_5C8ECE51F1E5",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.mainPlayList, 0, 1)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A7FEB5DB_AB47_570E_41DA_5C8ECE51F1E5_camera"
},
{
"media": "this.panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.mainPlayList, 1, 2)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_camera"
},
{
"media": "this.panorama_A061BAC1_AB47_7D7A_41DC_2514CC91EBE2",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.mainPlayList, 2, 3)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A061BAC1_AB47_7D7A_41DC_2514CC91EBE2_camera"
},
{
"media": "this.panorama_A060534A_AB47_530E_41DC_BA65238B3835",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.mainPlayList, 3, 4)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A060534A_AB47_530E_41DC_BA65238B3835_camera"
},
{
"media": "this.panorama_A061AADD_AB47_5D0A_41D5_4D2CA2B24AB2",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.mainPlayList, 4, 5)",
"player": "this.MainViewerPanoramaPlayer",
"camera": "this.panorama_A061AADD_AB47_5D0A_41D5_4D2CA2B24AB2_camera"
},
{
"media": "this.panorama_A062B3A7_AB47_B306_41DE_BCEDC633FA61",
"class": "PanoramaPlayListItem",
"begin": "this.setEndToItemIndex(this.mainPlayList, 5, 0)",
"player": "this.MainViewerPanoramaPlayer",
"end": "this.trigger('tourEnded')",
"camera": "this.panorama_A062B3A7_AB47_B306_41DE_BCEDC633FA61_camera"
}
],
"id": "mainPlayList",
"class": "PlayList"
},
{
"hfovMin": "207%",
"class": "Panorama",
"adjacentPanoramas": [
{
"yaw": -3.89,
"class": "AdjacentPanorama",
"distance": 1,
"backwardYaw": 29.69,
"panorama": "this.panorama_A061BAC1_AB47_7D7A_41DC_2514CC91EBE2"
},
{
"yaw": 97.17,
"class": "AdjacentPanorama",
"distance": 1,
"backwardYaw": -48.29,
"panorama": "this.panorama_A061AADD_AB47_5D0A_41D5_4D2CA2B24AB2"
},
{
"yaw": -81.64,
"class": "AdjacentPanorama",
"distance": 1,
"backwardYaw": -1.06,
"panorama": "this.panorama_A7FEB5DB_AB47_570E_41DA_5C8ECE51F1E5"
}
],
"label": "2",
"id": "panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E",
"hfovMax": 130,
"overlays": [
"this.overlay_BB5B9FB8_AB5F_530A_41DF_3056CDDBC49B",
"this.overlay_A4616790_AB5E_D31A_41DE_E97994B329E1",
"this.overlay_A44D4A0E_AB42_DD06_41E3_63E895288841",
"this.overlay_A4D5D28A_AB43_4D0E_41E2_9CE45970F78A"
],
"vfov": 180,
"pitch": 0,
"partial": false,
"thumbnailUrl": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_t.jpg",
"frames": [
{
"front": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/f/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/f/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/f/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"class": "CubicPanoramaFrame",
"top": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/u/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/u/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/u/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"thumbnailUrl": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_t.jpg",
"back": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/b/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/b/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/b/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"bottom": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/d/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/d/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/d/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"left": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/l/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/l/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/l/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
},
"right": {
"class": "ImageResource",
"levels": [
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/r/0/{row}_{column}.jpg",
"rowCount": 3,
"class": "TiledImageResourceLevel",
"colCount": 3,
"width": 1536,
"tags": "ondemand",
"height": 1536
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/r/1/{row}_{column}.jpg",
"rowCount": 2,
"class": "TiledImageResourceLevel",
"colCount": 2,
"width": 1024,
"tags": "ondemand",
"height": 1024
},
{
"url": "media/panorama_A06661C4_AB47_4F7A_41DF_692304E40A8E_0/r/2/{row}_{column}.jpg",
"rowCount": 1,
"class": "TiledImageResourceLevel",
"colCount": 1,
"width": 512,
"tags": [
"ondemand",
"preload"
],
"height": 512
}
]
}
}
],
"hfov": 360
},
{
"initialPosition": {
"yaw": -42.64,
"class": "PanoramaCameraPosition",
"pitch": 0
},
"initialSequence": {
"class": "PanoramaCameraSequence",
"movements": [
{
"yawSpeed": 7.96,
"yawDelta": 18.5,
"class": "DistancePanoramaCameraMovement",
"easing": "cubic_in"
},
{
"yawSpeed": 7.96,
"yawDelta": 323,
"class": "DistancePanoramaCameraMovement",
"easing": "linear"
},
{
"yawSpeed": 7.96,
"yawDelta": 18.5,
"class": "DistancePanoramaCameraMovement",
"easing": "cubic_out"
}
],
"restartMovementOnUserInteraction": false
},
"class": "PanoramaCamera",
"id": "camera_5CE8B633_478A_71E4_41BD_90B8C3AC84F0",
"automaticZoomSpeed": 10
},
{
"initialPosition": {
"yaw": -82.83,
"class": "PanoramaCameraPosition",
"hfov": 114,
"pitch": 0
},
"initialSequence": {
"class": "PanoramaCameraSequence",
"movements": [
{
"yawSpeed": 7.96,
"yawDelta": 18.5,
"class": "DistancePanoramaCameraMovement",
"easing": "cubic_in"
},
{
"yawSpeed": 7.96,
"yawDelta": 323,
"class": "DistancePanoramaCameraMovement",
"easing": "linear"
},
{
"yawSpeed": 7.96,
"yawDelta": 18.5,
"class": "DistancePanoramaCameraMovement",
"easing": "cubic_out"
}
],
"restartMovementOnUserInteraction": false
},
"class": "PanoramaCamera",
"id": "camera_524DB672_478A_7E64_41C7_4818E83459B9",
"automaticZoomSpeed": 10
},
{
"class": "Photo",
"height": 377,
"thumbnailUrl": "media/photo_BACE580C_AB7D_5D0A_41DD_3B31A6C427B5_t.png",
"label": "lightworkz_media-removebg-preview (1)",