-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.htm
320 lines (276 loc) · 13.1 KB
/
index.htm
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Project_15</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" id="metaViewport" content="user-scalable=no, initial-scale=1, width=device-width, viewport-fit=cover" data-tdv-general-scale="0.5"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="preload" href="locale/en.txt?v=1730030205926" as="fetch" crossorigin="anonymous"/>
<link rel="preload" href="script.js?v=1730030205926" as="script"/>
<link rel="preload" href="media/panorama_8E38353A_81D5_D211_41CA_BB47619ED261_0/r/2/0_0.jpg?v=1730030205926" as="image"/>
<link rel="preload" href="media/panorama_8E38353A_81D5_D211_41CA_BB47619ED261_0/l/2/0_0.jpg?v=1730030205926" as="image"/>
<link rel="preload" href="media/panorama_8E38353A_81D5_D211_41CA_BB47619ED261_0/u/2/0_0.jpg?v=1730030205926" as="image"/>
<link rel="preload" href="media/panorama_8E38353A_81D5_D211_41CA_BB47619ED261_0/d/2/0_0.jpg?v=1730030205926" as="image"/>
<link rel="preload" href="media/panorama_8E38353A_81D5_D211_41CA_BB47619ED261_0/f/2/0_0.jpg?v=1730030205926" as="image"/>
<link rel="preload" href="media/panorama_8E38353A_81D5_D211_41CA_BB47619ED261_0/b/2/0_0.jpg?v=1730030205926" as="image"/>
<meta name="description" content="Virtual Tour"/>
<meta name="theme-color" content="#FFFFFF"/>
<script src="lib/tdvplayer.js?v=1730030205926"></script>
<script src="script.js?v=1730030205926"></script>
<script type="text/javascript">
var tour;
var devicesUrl = {"general":"script_general.js?v=1730030205926","mobile":"script_mobile.js?v=1730030205926"};
(function()
{
var deviceType = ['general'];
if(TDV.PlayerAPI.mobile)
deviceType.unshift('mobile');
if(TDV.PlayerAPI.device == TDV.PlayerAPI.DEVICE_IPAD)
deviceType.unshift('ipad');
var url;
for(var i=0; i<deviceType.length; ++i) {
var d = deviceType[i];
if(d in devicesUrl) {
url = devicesUrl[d];
break;
}
}
if(typeof url == "object") {
var orient = TDV.PlayerAPI.getOrientation();
if(orient in url) {
url = url[orient];
}
}
var link = document.createElement('link');
link.rel = 'preload';
link.href = url;
link.as = 'script';
var el = document.getElementsByTagName('script')[0];
el.parentNode.insertBefore(link, el);
})();
function loadTour()
{
if(tour) return;
if (/AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent)) {
var preloadContainer = document.getElementById('preloadContainer');
if(preloadContainer)
document.body.style.backgroundColor = window.getComputedStyle(preloadContainer).backgroundColor;
}
var settings = new TDV.PlayerSettings();
settings.set(TDV.PlayerSettings.CONTAINER, document.getElementById('viewer'));
settings.set(TDV.PlayerSettings.WEBVR_POLYFILL_URL, 'lib/WebVRPolyfill.js?v=1730030205926');
settings.set(TDV.PlayerSettings.HLS_URL, 'lib/Hls.js?v=1730030205926');
settings.set(TDV.PlayerSettings.QUERY_STRING_PARAMETERS, 'v=1730030205926');
tour = new TDV.Tour(settings, devicesUrl);
tour.bind(TDV.Tour.EVENT_TOUR_INITIALIZED, onVirtualTourInit);
tour.bind(TDV.Tour.EVENT_TOUR_LOADED, onVirtualTourLoaded);
tour.bind(TDV.Tour.EVENT_TOUR_ENDED, onVirtualTourEnded);
tour.load();
}
function pauseTour()
{
if(!tour)
return;
tour.pause();
}
function resumeTour()
{
if(!tour)
return;
tour.resume();
}
function onVirtualTourInit()
{
var updateTexts = function() {
document.title = this.trans("tour.name")
};
tour.locManager.bind(TDV.Tour.LocaleManager.EVENT_LOCALE_CHANGED, updateTexts.bind(tour.locManager));
if (tour.player.cookiesEnabled)
enableCookies();
else
tour.player.bind('enableCookies', enableCookies);
}
function onVirtualTourLoaded()
{
disposePreloader();
}
function onVirtualTourEnded()
{
}
function enableCookies()
{
}
function setMediaByIndex(index) {
if(!tour)
return;
tour.setMediaByIndex(index);
}
function setMediaByName(name)
{
if(!tour)
return;
tour.setMediaByName(name);
}
function showPreloader()
{
var preloadContainer = document.getElementById('preloadContainer');
if(preloadContainer != undefined)
preloadContainer.style.opacity = 1;
}
function disposePreloader()
{
var preloadContainer = document.getElementById('preloadContainer');
if(preloadContainer == undefined)
return;
var transitionEndName = transitionEndEventName();
if(transitionEndName)
{
preloadContainer.addEventListener(transitionEndName, hide, false);
preloadContainer.style.opacity = 0;
setTimeout(hide, 500); //Force hide. Some cases the transitionend event isn't dispatched with an iFrame.
}
else
{
hide();
}
function hide()
{
document.body.style.backgroundColor = window.getComputedStyle(preloadContainer).backgroundColor;
preloadContainer.style.visibility = 'hidden';
preloadContainer.style.display = 'none';
var videoList = preloadContainer.getElementsByTagName("video");
for(var i=0; i<videoList.length; ++i)
{
var video = videoList[i];
video.pause();
while (video.children.length)
video.removeChild(video.children[0]);
}
}
function transitionEndEventName () {
var el = document.createElement('div');
var transitions = {
'transition':'transitionend',
'OTransition':'otransitionend',
'MozTransition':'transitionend',
'WebkitTransition':'webkitTransitionEnd'
};
var t;
for (t in transitions) {
if (el.style[t] !== undefined) {
return transitions[t];
}
}
return undefined;
}
}
function onBodyClick(){
document.body.removeEventListener("click", onBodyClick);
document.body.removeEventListener("touchend", onBodyClick);
}
function onLoad() {
if (/AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent))
{
var onOrientationChange = function()
{
document.documentElement.style.height = 'initial';
Array.from(document.querySelectorAll('.fill-viewport')).forEach(function(element)
{
element.classList.toggle('landscape-right', window.orientation == -90);
element.classList.toggle('landscape-left', window.orientation == 90);
});
setTimeout(function()
{
document.documentElement.style.height = '100%';
}, 500);
};
window.addEventListener('orientationchange', onOrientationChange);
onOrientationChange();
}
var params = getParams(location.search.substr(1));
if(params.hasOwnProperty("skip-loading"))
{
loadTour();
disposePreloader();
return;
}
if (isOVRWeb()){
showPreloader();
loadTour();
return;
}
showPreloader();
loadTour();
}
function playVideo(video) {
function isSafariDesktopV11orGreater() {
return /^((?!chrome|android|crios|ipad|iphone).)*safari/i.test(navigator.userAgent) && parseFloat(/Version\/([0-9]+\.[0-9]+)/i.exec(navigator.userAgent)[1]) >= 11;
}
function hasAudio (video) {
return video.mozHasAudio ||
Boolean(video.webkitAudioDecodedByteCount) ||
Boolean(video.audioTracks && video.audioTracks.length);
}
function detectUserAction() {
var onVideoClick = function(e) {
if(video.paused) {
video.play();
}
video.muted = false;
if(hasAudio(video))
{
e.stopPropagation();
e.stopImmediatePropagation();
e.preventDefault();
}
video.removeEventListener('click', onVideoClick);
video.removeEventListener('touchend', onVideoClick);
};
video.addEventListener("click", onVideoClick);
video.addEventListener("touchend", onVideoClick);
}
if (isSafariDesktopV11orGreater()) {
video.muted = true;
video.play();
} else {
var canPlay = true;
var promise = video.play();
if (promise) {
promise.catch(function() {
video.muted = true;
video.play();
detectUserAction();
});
} else {
canPlay = false;
}
if (!canPlay || video.muted) {
detectUserAction();
}
}
}
function isOVRWeb(){
return window.location.hash.substring(1).split('&').indexOf('ovrweb') > -1;
}
function getParams(params) {
var queryDict = {}; params.split("&").forEach(function(item) {var k = item.split("=")[0], v = decodeURIComponent(item.split("=")[1]);queryDict[k.toLowerCase()] = v});
return queryDict;
}
document.addEventListener('DOMContentLoaded', onLoad);
</script>
<style type="text/css">
html, body { height:100%; width:100%; height:100vh; width:100vw; margin:0; padding:0; overflow:hidden; }
.fill-viewport { position:fixed; top:0; left:0; right:0; bottom:0; padding:0; margin:0; overflow: hidden; }
.fill-viewport.landscape-left { left: env(safe-area-inset-left); }
.fill-viewport.landscape-right { right: env(safe-area-inset-right); }
#viewer { z-index:1; }
#preloadContainer { z-index:2; opacity:0; background-color:rgba(255,255,255,1); transition: opacity 0.5s; -webkit-transition: opacity 0.5s; -moz-transition: opacity 0.5s; -o-transition: opacity 0.5s;}
</style>
<link rel="stylesheet" href="fonts.css?v=1730030205926">
</head>
<body>
<div id="preloadContainer" class="fill-viewport"><div style="z-index: 4; position: absolute; background-image: url('loading/HTMLImage_58963802_4149_67AD_41C6_CF4479C1BD51.jpg'); background-size: cover; background-repeat: no-repeat; background-position: center center; overflow: hidden; right: 0.06%; bottom: 0%; width: 99.94%; height: 100.00%"></div><div style="z-index: 5; position: absolute; background-image: url('loading/HTMLImage_58282945_4178_F9B7_41A6_DFE94651F7FD.png'); background-size: contain; background-repeat: no-repeat; background-position: center center; overflow: hidden; right: 6.96%; bottom: 4.17%; width: 89.13%; height: 45.10%"></div><div style="z-index: 6; position: absolute; left: 16.79%; top: 30.27%; width: 63.49%; height: 10.03%"><div style="text-align:left; color:#000; "><DIV STYLE="text-align:center;font-size:2.0299999999999994vmin;"><SPAN STYLE="display:inline-block; letter-spacing:0vmin; white-space:pre-wrap;color:#777777;font-family:Arial, Helvetica, sans-serif;"><SPAN STYLE="color:#ffffff;font-size:2.03vmin;">...جاري تشغيل الجولة</SPAN></SPAN></DIV><p STYLE="margin:0; line-height:2.03vmin;"><BR STYLE="display:inline-block; letter-spacing:0vmin; white-space:pre-wrap;color:#000000;font-size:0.79vmin;font-family:Arial, Helvetica, sans-serif;"/></p></div></div></div>
<div id="viewer" class="fill-viewport"></div>
</body>
</html>