@viewlift/player-backup 1.0.132-backup → 1.0.133-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-3efc246d.js +1 -0
- package/cjs/browser-77c57718.js +1 -0
- package/cjs/bundle.css +210 -213
- package/cjs/caption-settings-6605430f.js +1 -0
- package/cjs/captions-f50846c6.js +1 -0
- package/cjs/features-8d590358.js +1 -0
- package/cjs/generic-4eba4a31.js +1 -0
- package/cjs/index-40d42025.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-313ba2ab.js +1 -0
- package/cjs/multicamv2-936b1194.js +1 -0
- package/cjs/nextEpisodeButton-325b1640.js +1 -0
- package/cjs/playlist-04b3ad33.js +1 -0
- package/cjs/renditions-27f5d906.js +1 -0
- package/cjs/resolution-1e41ad17.js +1 -0
- package/cjs/series-43f79675.js +1 -0
- package/cjs/series-v2-3d777f0f.js +1 -0
- package/cjs/series-v2-4c74cdd0.js +1 -0
- package/cjs/series-v2-7acf8915.js +1 -0
- package/cjs/series-v2-e037e14e.js +1 -0
- package/cjs/settings-icon-2bf31785.js +1 -0
- package/cjs/skin-065c75e4.js +1 -0
- package/cjs/skin-6bca9898.js +1 -0
- package/cjs/skin-8bb9891a.js +1 -0
- package/cjs/skin-b09d6a81.js +1 -0
- package/cjs/skin-ba38afdb.js +1 -0
- package/cjs/skin-be253f81.js +1 -0
- package/cjs/skin-c3281e90.js +1 -0
- package/cjs/skin-dd6eb15a.js +1 -0
- package/cjs/skin-e7838975.js +1 -0
- package/cjs/util-084cac02.js +1 -0
- package/cjs/videoSelector-87226e1a.js +1 -0
- package/cjs/videoSelector-d7a17527.js +1 -0
- package/esm/autoNextVideo-d7c46772.js +1 -0
- package/esm/browser-d4613b36.js +1 -0
- package/esm/bundle.css +210 -213
- package/esm/caption-settings-5ebd5cbd.js +1 -0
- package/esm/captions-982fd43a.js +1 -0
- package/esm/features-6d5f0fec.js +1 -0
- package/esm/generic-049d56fa.js +1 -0
- package/esm/index-43870f79.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-bac89661.js +1 -0
- package/esm/multicamv2-cf808998.js +1 -0
- package/esm/nextEpisodeButton-7c7831c5.js +1 -0
- package/esm/playlist-14cf070b.js +1 -0
- package/esm/renditions-cb2afda4.js +1 -0
- package/esm/resolution-6fec5ed5.js +1 -0
- package/esm/series-f098d6cd.js +1 -0
- package/esm/series-v2-30c8b544.js +1 -0
- package/esm/series-v2-656ffb9f.js +1 -0
- package/esm/series-v2-87343239.js +1 -0
- package/esm/series-v2-b518cb7d.js +1 -0
- package/esm/settings-icon-100e86a0.js +1 -0
- package/esm/skin-01c05d03.js +1 -0
- package/esm/skin-08f036ab.js +1 -0
- package/esm/skin-0ae3e88e.js +1 -0
- package/esm/skin-5d592633.js +1 -0
- package/esm/skin-6f48e01e.js +1 -0
- package/esm/skin-71be210e.js +1 -0
- package/esm/skin-9d926508.js +1 -0
- package/esm/skin-d06a64ec.js +1 -0
- package/esm/skin-ec935b20.js +1 -0
- package/esm/util-28f2c034.js +1 -0
- package/esm/videoSelector-5107870d.js +1 -0
- package/esm/videoSelector-bf7baf9e.js +1 -0
- package/package.json +1 -1
- package/cjs/autoNextVideo-f75fb111.js +0 -1
- package/cjs/beacon-3472d9ab.js +0 -1
- package/cjs/caption-settings-2b80dac2.js +0 -1
- package/cjs/features-76f751d7.js +0 -1
- package/cjs/index-61264ed0.js +0 -1
- package/cjs/multicamv2-5ab27b09.js +0 -1
- package/cjs/multicamv2-9304a5b3.js +0 -1
- package/cjs/nextEpisodeButton-fdf9263d.js +0 -1
- package/cjs/playlist-19950019.js +0 -1
- package/cjs/renditions-8e58b1fd.js +0 -1
- package/cjs/resolution-747ff7c8.js +0 -1
- package/cjs/series-0d5fa945.js +0 -1
- package/cjs/series-v2-2416d6cc.js +0 -1
- package/cjs/series-v2-67d3f7ce.js +0 -1
- package/cjs/series-v2-d6a2e270.js +0 -1
- package/cjs/series-v2-fd7485a5.js +0 -1
- package/cjs/settings-icon-23d9d227.js +0 -1
- package/cjs/skin-386b6ca2.js +0 -1
- package/cjs/skin-396027ea.js +0 -1
- package/cjs/skin-55d72243.js +0 -1
- package/cjs/skin-65b1f1b0.js +0 -1
- package/cjs/skin-72a1ccea.js +0 -1
- package/cjs/skin-983a2ea7.js +0 -1
- package/cjs/skin-a3188aa9.js +0 -1
- package/cjs/skin-dd7cb2ee.js +0 -1
- package/cjs/util-c6824425.js +0 -1
- package/cjs/videoSelector-d1fc09ec.js +0 -1
- package/cjs/videoSelector-f2b1fbef.js +0 -1
- package/esm/autoNextVideo-743a7782.js +0 -1
- package/esm/beacon-9d84d686.js +0 -1
- package/esm/caption-settings-e83b6814.js +0 -1
- package/esm/features-5f7a39e0.js +0 -1
- package/esm/index-d9dda287.js +0 -1
- package/esm/multicamv2-3d6e8051.js +0 -1
- package/esm/multicamv2-b844a4f6.js +0 -1
- package/esm/nextEpisodeButton-89ebffbb.js +0 -1
- package/esm/playlist-06f7f6a3.js +0 -1
- package/esm/renditions-f77c7c46.js +0 -1
- package/esm/resolution-d7ed7790.js +0 -1
- package/esm/series-12881a0f.js +0 -1
- package/esm/series-v2-2d6660c6.js +0 -1
- package/esm/series-v2-4cdbf9b1.js +0 -1
- package/esm/series-v2-a2a3c240.js +0 -1
- package/esm/series-v2-e01126da.js +0 -1
- package/esm/settings-icon-bb726185.js +0 -1
- package/esm/skin-0a0c271b.js +0 -1
- package/esm/skin-7f6a85cb.js +0 -1
- package/esm/skin-82885153.js +0 -1
- package/esm/skin-b06174f6.js +0 -1
- package/esm/skin-b95b5c90.js +0 -1
- package/esm/skin-c966c9cd.js +0 -1
- package/esm/skin-cd537931.js +0 -1
- package/esm/skin-e84d46c6.js +0 -1
- package/esm/util-e0a6cf62.js +0 -1
- package/esm/videoSelector-a666f272.js +0 -1
- package/esm/videoSelector-e4bd4ee1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,i=require("./generic-4eba4a31.js"),t=require("./util-084cac02.js"),n=require("./skin-065c75e4.js"),o=0,u=0,d=function e(t,o,d,c){u=t,t>d.length-1||(i.setVideoIdx(u+1),i.load(o,d[t].id).then((function(e){n.highlightVideo(u),u++,r(e)})).catch((function(i){r(i),setTimeout((function(){n.highlightVideo(u),u++,e(u,o,d)}),5e3)})))},r=function(i){e&&e(i)};exports.autoPlayNext=function(c){clearTimeout(o);var h=null==c?void 0:c.content;e=null==c?void 0:c.cb;var l=c.playerId;t.onVideoEnded(l,(function(){var e=n.getPlayer(l);0!==(null==e?void 0:e.currentTime())&&((u=i.getVideoIdx())>h.length-1||(i.setVideoIdx(u+1),i.load(l,h[u].id).then((function(e){n.highlightVideo(u),i.setCurrentVideo(e.response),u++,r(e)})).catch((function(e){r(e),n.highlightVideo(u),u++,o=setTimeout((function(){i.isPaused(l)&&d(u,l,h)}),5e3)}))))}))},exports.switchToNext=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.detectBrowser=function(){var e,r;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(r=e.userAgentData)||void 0===r?void 0:r.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},exports.isMobile=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};
|
package/cjs/bundle.css
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
8
|
height: 0.7em;
|
|
8
9
|
position: absolute;
|
|
@@ -143,80 +144,6 @@
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.video-js.vjs-quality-menu {
|
|
149
|
-
display: block;
|
|
150
|
-
}
|
|
151
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button {
|
|
152
|
-
position: relative;
|
|
153
|
-
}
|
|
154
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button li {
|
|
155
|
-
text-transform: none;
|
|
156
|
-
}
|
|
157
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
|
158
|
-
max-height: 25em;
|
|
159
|
-
width: 10em;
|
|
160
|
-
left: 0;
|
|
161
|
-
}
|
|
162
|
-
.video-js.vjs-quality-menu .vjs-menu-item .vjs-control-text {
|
|
163
|
-
position: absolute;
|
|
164
|
-
}
|
|
165
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-wrapper {
|
|
166
|
-
position: relative;
|
|
167
|
-
}
|
|
168
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-wrapper li {
|
|
169
|
-
text-transform: none;
|
|
170
|
-
}
|
|
171
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-wrapper.vjs-menu-wrapper-popup .vjs-menu .vjs-menu-content {
|
|
172
|
-
max-height: 25em;
|
|
173
|
-
width: 10em;
|
|
174
|
-
left: 0;
|
|
175
|
-
}
|
|
176
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-item-sub-label {
|
|
177
|
-
font-size: 75%;
|
|
178
|
-
font-weight: bold;
|
|
179
|
-
position: absolute;
|
|
180
|
-
right: 0;
|
|
181
|
-
text-align: center;
|
|
182
|
-
width: 4em;
|
|
183
|
-
}
|
|
184
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button-use-resolution .vjs-quality-menu-item-sub-label {
|
|
185
|
-
position: absolute;
|
|
186
|
-
right: 0;
|
|
187
|
-
text-align: center;
|
|
188
|
-
width: 4em;
|
|
189
|
-
}
|
|
190
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button-4K-flag:after, .video-js.vjs-quality-menu .vjs-quality-menu-button-HD-flag:after {
|
|
191
|
-
background-color: #2b333f;
|
|
192
|
-
color: inherit;
|
|
193
|
-
content: "";
|
|
194
|
-
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
195
|
-
font-size: 0.7em;
|
|
196
|
-
font-weight: 300;
|
|
197
|
-
height: 2.2em;
|
|
198
|
-
line-height: 2.2em;
|
|
199
|
-
padding: 0;
|
|
200
|
-
position: absolute;
|
|
201
|
-
right: 0;
|
|
202
|
-
text-align: center;
|
|
203
|
-
top: 0.5em;
|
|
204
|
-
width: 2.2em;
|
|
205
|
-
border-radius: 2em;
|
|
206
|
-
letter-spacing: 0.1em;
|
|
207
|
-
}
|
|
208
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button-HD-flag:after {
|
|
209
|
-
content: "HD";
|
|
210
|
-
}
|
|
211
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button-4K-flag:after {
|
|
212
|
-
content: "4K";
|
|
213
|
-
}
|
|
214
|
-
.video-js.vjs-quality-menu .vjs-quality-menu-button-waiting:before {
|
|
215
|
-
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
216
|
-
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
147
|
.video-js .tvProviderImage {
|
|
221
148
|
position: absolute;
|
|
222
149
|
right: 1rem;
|
|
@@ -245,8 +172,6 @@
|
|
|
245
172
|
|
|
246
173
|
|
|
247
174
|
|
|
248
|
-
|
|
249
|
-
|
|
250
175
|
.video-js .multicamera-parent.default{
|
|
251
176
|
height: 345px;
|
|
252
177
|
position: absolute;
|
|
@@ -327,6 +252,8 @@
|
|
|
327
252
|
|
|
328
253
|
|
|
329
254
|
|
|
255
|
+
|
|
256
|
+
|
|
330
257
|
/* nextep */
|
|
331
258
|
.next-ep-preview{
|
|
332
259
|
position: absolute;
|
|
@@ -419,6 +346,76 @@
|
|
|
419
346
|
opacity: 0;
|
|
420
347
|
}
|
|
421
348
|
|
|
349
|
+
.video-js.vjs-quality-menu {
|
|
350
|
+
display: block;
|
|
351
|
+
}
|
|
352
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button {
|
|
353
|
+
position: relative;
|
|
354
|
+
}
|
|
355
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button li {
|
|
356
|
+
text-transform: none;
|
|
357
|
+
}
|
|
358
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
|
359
|
+
max-height: 25em;
|
|
360
|
+
width: 10em;
|
|
361
|
+
left: 0;
|
|
362
|
+
}
|
|
363
|
+
.video-js.vjs-quality-menu .vjs-menu-item .vjs-control-text {
|
|
364
|
+
position: absolute;
|
|
365
|
+
}
|
|
366
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-wrapper {
|
|
367
|
+
position: relative;
|
|
368
|
+
}
|
|
369
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-wrapper li {
|
|
370
|
+
text-transform: none;
|
|
371
|
+
}
|
|
372
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-wrapper.vjs-menu-wrapper-popup .vjs-menu .vjs-menu-content {
|
|
373
|
+
max-height: 25em;
|
|
374
|
+
width: 10em;
|
|
375
|
+
left: 0;
|
|
376
|
+
}
|
|
377
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-item-sub-label {
|
|
378
|
+
font-size: 75%;
|
|
379
|
+
font-weight: bold;
|
|
380
|
+
position: absolute;
|
|
381
|
+
right: 0;
|
|
382
|
+
text-align: center;
|
|
383
|
+
width: 4em;
|
|
384
|
+
}
|
|
385
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button-use-resolution .vjs-quality-menu-item-sub-label {
|
|
386
|
+
position: absolute;
|
|
387
|
+
right: 0;
|
|
388
|
+
text-align: center;
|
|
389
|
+
width: 4em;
|
|
390
|
+
}
|
|
391
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button-4K-flag:after, .video-js.vjs-quality-menu .vjs-quality-menu-button-HD-flag:after {
|
|
392
|
+
background-color: #2b333f;
|
|
393
|
+
color: inherit;
|
|
394
|
+
content: "";
|
|
395
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
396
|
+
font-size: 0.7em;
|
|
397
|
+
font-weight: 300;
|
|
398
|
+
height: 2.2em;
|
|
399
|
+
line-height: 2.2em;
|
|
400
|
+
padding: 0;
|
|
401
|
+
position: absolute;
|
|
402
|
+
right: 0;
|
|
403
|
+
text-align: center;
|
|
404
|
+
top: 0.5em;
|
|
405
|
+
width: 2.2em;
|
|
406
|
+
border-radius: 2em;
|
|
407
|
+
letter-spacing: 0.1em;
|
|
408
|
+
}
|
|
409
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button-HD-flag:after {
|
|
410
|
+
content: "HD";
|
|
411
|
+
}
|
|
412
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button-4K-flag:after {
|
|
413
|
+
content: "4K";
|
|
414
|
+
}
|
|
415
|
+
.video-js.vjs-quality-menu .vjs-quality-menu-button-waiting:before {
|
|
416
|
+
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
417
|
+
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
418
|
+
}
|
|
422
419
|
.vjs-poster {
|
|
423
420
|
display: inline-block;
|
|
424
421
|
vertical-align: middle;
|
|
@@ -446,6 +443,143 @@
|
|
|
446
443
|
margin: 0 !important;
|
|
447
444
|
}
|
|
448
445
|
|
|
446
|
+
/* Chromecast */
|
|
447
|
+
.video-js .vjs-chromecast-button .vjs-icon-placeholder {
|
|
448
|
+
background: url('https://player.viewlift.com/images/ic_cast_white_24dp.png') center center no-repeat;
|
|
449
|
+
background-size: contain;
|
|
450
|
+
display: inline-block;
|
|
451
|
+
width: 16px;
|
|
452
|
+
height: 16px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.video-js .vjs-chromecast-button:hover {
|
|
456
|
+
cursor: pointer;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.video-js .vjs-chromecast-button:hover .vjs-icon-placeholder {
|
|
460
|
+
background-image: url('https://player.viewlift.com/images/ic_cast_white_24dp.png');
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state .vjs-icon-placeholder {
|
|
464
|
+
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state:hover .vjs-icon-placeholder {
|
|
468
|
+
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
469
|
+
}
|
|
470
|
+
.video-js .vjs-chromecast-button >.vjs-chromecast-button-label{
|
|
471
|
+
display: none !important;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.video-js .vjs-tech-chromecast {
|
|
475
|
+
display: flex;
|
|
476
|
+
flex-direction: column;
|
|
477
|
+
justify-content: center;
|
|
478
|
+
align-items: center;
|
|
479
|
+
overflow: hidden;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
483
|
+
content: ' ';
|
|
484
|
+
display: block;
|
|
485
|
+
height: 2px;
|
|
486
|
+
width: 100px;
|
|
487
|
+
background-color: #cccccc;
|
|
488
|
+
position: absolute;
|
|
489
|
+
left: calc(50% - 50px);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
493
|
+
max-height: 180px;
|
|
494
|
+
width: auto;
|
|
495
|
+
border: 2px solid #cccccc;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
499
|
+
width: 160px;
|
|
500
|
+
height: 90px;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
504
|
+
position: absolute;
|
|
505
|
+
bottom: 50%;
|
|
506
|
+
margin-bottom: 100px;
|
|
507
|
+
color: #cccccc;
|
|
508
|
+
text-align: center;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
512
|
+
font-size: 22px;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
516
|
+
display: none;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
520
|
+
font-size: 18px;
|
|
521
|
+
padding-top: 0.5em;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
525
|
+
display: none;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.video-js .vjs-tech-chromecast {
|
|
529
|
+
display: flex;
|
|
530
|
+
flex-direction: column;
|
|
531
|
+
justify-content: center;
|
|
532
|
+
align-items: center;
|
|
533
|
+
overflow: hidden;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
537
|
+
content: ' ';
|
|
538
|
+
display: block;
|
|
539
|
+
height: 2px;
|
|
540
|
+
width: 100px;
|
|
541
|
+
background-color: #ccc;
|
|
542
|
+
position: absolute;
|
|
543
|
+
left: calc(50% - 50px);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
547
|
+
max-height: 180px;
|
|
548
|
+
width: auto;
|
|
549
|
+
border: 2px solid #ccc;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
553
|
+
width: 160px;
|
|
554
|
+
height: 90px;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
558
|
+
position: absolute;
|
|
559
|
+
bottom: 50%;
|
|
560
|
+
margin-bottom: 100px;
|
|
561
|
+
color: #ccc;
|
|
562
|
+
text-align: center;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
566
|
+
font-size: 22px;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
570
|
+
display: none;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
574
|
+
font-size: 18px;
|
|
575
|
+
padding-top: 0.5em;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
579
|
+
display: none;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/* Chromecast End */
|
|
449
583
|
|
|
450
584
|
/* ADs */
|
|
451
585
|
.ima-ad-container {
|
|
@@ -601,143 +735,6 @@
|
|
|
601
735
|
.video-js.vjs-playing .bumpable-ima-ad-container {
|
|
602
736
|
margin-top: -4em;
|
|
603
737
|
}
|
|
604
|
-
/* Chromecast */
|
|
605
|
-
.video-js .vjs-chromecast-button .vjs-icon-placeholder {
|
|
606
|
-
background: url('https://player.viewlift.com/images/ic_cast_white_24dp.png') center center no-repeat;
|
|
607
|
-
background-size: contain;
|
|
608
|
-
display: inline-block;
|
|
609
|
-
width: 16px;
|
|
610
|
-
height: 16px;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.video-js .vjs-chromecast-button:hover {
|
|
614
|
-
cursor: pointer;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
.video-js .vjs-chromecast-button:hover .vjs-icon-placeholder {
|
|
618
|
-
background-image: url('https://player.viewlift.com/images/ic_cast_white_24dp.png');
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state .vjs-icon-placeholder {
|
|
622
|
-
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state:hover .vjs-icon-placeholder {
|
|
626
|
-
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
627
|
-
}
|
|
628
|
-
.video-js .vjs-chromecast-button >.vjs-chromecast-button-label{
|
|
629
|
-
display: none !important;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
.video-js .vjs-tech-chromecast {
|
|
633
|
-
display: flex;
|
|
634
|
-
flex-direction: column;
|
|
635
|
-
justify-content: center;
|
|
636
|
-
align-items: center;
|
|
637
|
-
overflow: hidden;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
641
|
-
content: ' ';
|
|
642
|
-
display: block;
|
|
643
|
-
height: 2px;
|
|
644
|
-
width: 100px;
|
|
645
|
-
background-color: #cccccc;
|
|
646
|
-
position: absolute;
|
|
647
|
-
left: calc(50% - 50px);
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
651
|
-
max-height: 180px;
|
|
652
|
-
width: auto;
|
|
653
|
-
border: 2px solid #cccccc;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
657
|
-
width: 160px;
|
|
658
|
-
height: 90px;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
662
|
-
position: absolute;
|
|
663
|
-
bottom: 50%;
|
|
664
|
-
margin-bottom: 100px;
|
|
665
|
-
color: #cccccc;
|
|
666
|
-
text-align: center;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
670
|
-
font-size: 22px;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
674
|
-
display: none;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
678
|
-
font-size: 18px;
|
|
679
|
-
padding-top: 0.5em;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
683
|
-
display: none;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
.video-js .vjs-tech-chromecast {
|
|
687
|
-
display: flex;
|
|
688
|
-
flex-direction: column;
|
|
689
|
-
justify-content: center;
|
|
690
|
-
align-items: center;
|
|
691
|
-
overflow: hidden;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
695
|
-
content: ' ';
|
|
696
|
-
display: block;
|
|
697
|
-
height: 2px;
|
|
698
|
-
width: 100px;
|
|
699
|
-
background-color: #ccc;
|
|
700
|
-
position: absolute;
|
|
701
|
-
left: calc(50% - 50px);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
705
|
-
max-height: 180px;
|
|
706
|
-
width: auto;
|
|
707
|
-
border: 2px solid #ccc;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
711
|
-
width: 160px;
|
|
712
|
-
height: 90px;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
716
|
-
position: absolute;
|
|
717
|
-
bottom: 50%;
|
|
718
|
-
margin-bottom: 100px;
|
|
719
|
-
color: #ccc;
|
|
720
|
-
text-align: center;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
724
|
-
font-size: 22px;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
728
|
-
display: none;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
732
|
-
font-size: 18px;
|
|
733
|
-
padding-top: 0.5em;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
737
|
-
display: none;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
/* Chromecast End */
|
|
741
738
|
/* Resolution Module */
|
|
742
739
|
|
|
743
740
|
.video-js .container {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-0ea2e662.js"),c=require("./captions-f50846c6.js"),l=require("./skin-065c75e4.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var d=i.getComponent("Component"),p=function(){n(v,d);var p,u,m=(p=v,u=s(),function(){var e,t=o(p);if(u){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(i=m.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(v,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./caption-settings-34ca0188.js")})).then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=c.getCaptions(this.playerId);null==t||t.map((function(t){return c.disableCaptions(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",l.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),l.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,c),i.dom.appendContent(c,s),l.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),c.getCaptions(e.playerId).map((function(t){return c.disableCaptions(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),v}();exports.default=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("./skin-065c75e4.js");exports.addCaptions=function(e,n){var a=t.getPlayer(e);a.remoteTextTracks().tracks_.map((function(t){a.removeRemoteTextTrack(t)})),n.map((function(t){a.addRemoteTextTrack({src:t.url,srcLang:t.language,label:t.language})}))},exports.disableCaptions=function(e,n){for(var a=t.getPlayer(e).textTracks(),r=0;r<a.length;r++){var s=a[r];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!==n||(s.mode="hidden")}},exports.enableCaptions=function(e,n){var a,r,s;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(s=r.style)||void 0===s||s.setProperty("display","flex"));for(var i=t.getPlayer(e).textTracks(),l=0;l<i.length;l++){var o=i[l];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},exports.getCaptions=function(e){var n,a=t.getPlayer(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter((function(t){return"subtitles"==t.kind||"captions"===t.kind})))||[]},exports.removeCaptions=function(e){var n=t.getPlayer(e);n.remoteTextTracks().tracks_.map((function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-4eba4a31.js"),s=require("./renditions-27f5d906.js"),d=require("./skin-065c75e4.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-6605430f.js")})).then((function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-313ba2ab.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-936b1194.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-325b1640.js")})).then((function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-04b3ad33.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-1e41ad17.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-43f79675.js")})).then((function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<a.length;c++)s(c)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-3d777f0f.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-7acf8915.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-2bf31785.js")})).then((function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-87226e1a.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-d7a17527.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-065c75e4.js"),a=require("./browser-77c57718.js"),l=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-f50846c6.js"),s={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function c(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function v(e,t){c("event",e,t)}var m=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},f=null;function p(){return{set:function(e){e&&(f=e)},get:function(){return f}}}var w,g,I,E,h,T,y=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p().get(),i=getBaseUrl(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),b=null,_=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!m(t)){e.next=6;break}return b||(b=y().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&p().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){b=null}))),e.abrupt("return",b);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},O=function(e){g=e},F=function(){return g},P=function(){return w},S=function(e){I=e},L=function(e){if(E){var t=E.get(e);S(t+1)}},V=(T=0,{set:function(e){e>=0&&(T=e)},get:function(){return T}});function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function W(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?R(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var A=function(){var e,t,n,i,o,r,a,l=F();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function C(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function x(){var e=window.sessionStorage.getItem("uid");return e||(e=C(),window.sessionStorage.setItem("uid",e),e)}function N(){return B.apply(this,arguments)}function B(){return(B=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=C(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());v(r?"FAILED_TO_START":"DROPPED_STREAM",W({pfm:window.platform,uid:x(),vid:A(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),v("PLAY",W({pfm:window.platform,uid:x(),vid:A(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))v("BUFFERING",W({pfm:window.platform,uid:x(),vid:A(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,v("FIRST_FRAME",W({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:x(),vid:A()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;v("AD_REQUEST",W({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:x(),vid:A(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),v("AD_IMPRESSION",W({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:x(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:A()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(j(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var j=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f,p,w,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:return m=e.sent,f=D(m),p=null==f?void 0:f.site,w=null==f?void 0:f.siteId,e.t0=W,e.t1=W,e.t2=W({aid:p,cid:w,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=x(),e.t5=A(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,N();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),g=[e.t31],o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:m},contentType:"application/x-www-form-urlencoded",dataType:"text",data:g}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function U(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?M(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):M(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var k={name:"@viewlift/player8",version:"1.0.110",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"^8.21.1","videojs-contrib-ads":"^7.5.2","videojs-contrib-eme":"^5.5.1","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=k.version;var H,G=function(e,t){var n,i,r,a,l,d,u,c;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.overrideEntitlementBaseUrl)+"/video/status":X.get()+"".concat(null==s?void 0:s.getVideoDetails),params:U({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":k.version},withCredentials:!0})},z=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:X.get()+s.getLinearChannelDetails,params:U(U(U(U(U({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},q=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,getToken();case 2:return i=e.sent,e.abrupt("return",o({url:X.get()+"".concat(null==s?void 0:s.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:U({},t),params:U({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:X.get()+"".concat(null==s?void 0:s.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},X=(H=null==s?void 0:s.apiBaseUrl,{set:function(e){e&&(H=e)},get:function(){return H}}),J=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},K=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Z(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=d(navigator.userAgent);var $=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ee=function(e){var t=te(e,"video.tags",[]),n=te(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},te=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},ne=function(){var e,t,n,i,o,a,d,u,s,c,v,m,f,p,w,g,I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,h=arguments.length>2?arguments[2]:void 0,T=(null==h?void 0:h.contentType)||"video",y=null==h||null===(e=h[T])||void 0===e?void 0:e.metadata,b=r.getPlayer(E);if(!I.includes("VIEWLIFT_"))return I;var _=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(_.getPropertyValue("height").slice(0,-2)),O=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===T?null==h||null===(t=h.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==h?void 0:h.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:te(h,"video.gist.id",""),P=Z(Z({},re(y)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:$(O,D),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:te(h,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:te(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:te(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(u=b.options_)||void 0===u?void 0:u.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:ee(h),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(te(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+te(h,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:te(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:te(null===(m=window)||void 0===m||null===(f=m.app_data)||void 0===f||null===(p=f.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*te(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:te(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:te(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:te(h,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:te(h,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:oe(),VIEWLIFT_SEASON_NUMBER:ie(),VIEWLIFT_CONTENT_TAGS:ee(h)},null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g?void 0:g.macros);for(var S in P){var L=new RegExp(S,"g");I=I.replace(L,P[S])}return I},ie=function(){var e=V.get();return e>=0?e+1:1},oe=function(){var e,t,n,i=P(),o=F(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=V.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},re=function(e){var t,n,i,o,r,l,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||c?(a.isMobile()?s?d=Z(Z({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=Z(Z({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=Z(Z({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=Z(Z({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=Z(Z({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=Z(Z({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=a.isMobile()?Z(Z({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):Z(Z({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=Z(Z({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=a.isMobile()?Z(Z({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):Z(Z({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},ae=function(e,t){var n,i,o,r,l,d,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,h=(null==e||null===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var T=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return de(E);if(g){var y=ue(I,t);return y.src=ne(y.src,t,e),y}if("Safari"!==a.detectBrowser()&&T)return le(I);if(h){var b=de(I);return b.src=ne(b.src,t,e),b}if(null!=I&&I.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return _.src=ne(_.src,t,e),_}return null},le=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},de=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ue=function(e,t){var n=e.fairPlay,o=e.widevine,l=e.playReady,d=a.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};console.log("🔐 Requesting FairPlay Certificate...",o),i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return se(t),u}var s={src:o.url,type:"application/dash+xml"};return se(t),s.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},s};var se=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ce=!1,ve=function(e,t,n){var i=ne(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r.getPlayer(e);if(null!==a.el_){ce=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),ce&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var fe=function(e){return!!i.getPlayer("".concat(e))},pe=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,_();case 3:return a=e.sent,l=r.getPlayer(t),e.abrupt("return",new Promise((function(e,n){z(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=C(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=ae(r,t);O(r),a&&o?(Ie(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),we=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,s,c,v;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:return s=e.sent,(P()||null)&&L(i),c=0,v=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&Y(i,s).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){G(i,s).then((function(i){var o,a,l,d,s,m,f,p,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;O(i.data);var h=(null==I||null===(l=I.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(f=I.ads)||void 0===f||null===(p=f.preRoll)||void 0===p||null===(w=p.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);h&&ve(t,h,I);var T=ae(I,t);if(T){var y,b,_,D,F,P,S,L,V,R,W,A,C,x,N=(null==I||null===(y=I.video)||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||(null==I||null===(_=I.video)||void 0===_||null===(D=_.gist)||void 0===D||null===(F=D.imageGist)||void 0===F?void 0:F.r16x9),B=r.getPlayer(t);if(B.poster(N),Ie(t,T),B.on("loadstart",(function(){E&&e({status:!0,msg:"Video Loaded",response:I})})),B.on("loadeddata",(function(){K(),e({status:!0,msg:"Video Loaded",response:I})})),B.one("play",(function(){c&&v<95&&setTimeout((function(){B.currentTime(c)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(P=I.video)||void 0===P||null===(S=P.contentDetails)||void 0===S||null===(L=S.closedCaptions)||void 0===L?void 0:L.length)>0||(null==I||null===(V=I.video)||void 0===V||null===(R=V.closedCaptions)||void 0===R?void 0:R.length)>0)W=((null==I||null===(A=I.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(x=I.video)||void 0===x?void 0:x.closedCaptions)).filter((function(e){return"VTT"===e.format})),u.addCaptions(t,W);else u.removeCaptions(t)}else J(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Ee(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),ge=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Ie=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},Ee=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);fe(n)&&J(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?me(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=pe,exports.baseUrlManager=X,exports.clearError=K,exports.createIdxMapping=function(e){E=new Map,e.map((function(e,t){E.set(e.id,t)}))},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(ge(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=P,exports.getCurrentVideo=F,exports.getEntitlementData=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getLinearChannelDetails=z,exports.getSeriesDetails=function(e,t){var n,i,r=D(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:X.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t=e.videoId;return o({method:"GET",url:X.get()+"".concat(null==s?void 0:s.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},exports.getSeriesWatchMap=function(){return h},exports.getSource=ae,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getVideoDetails=G,exports.getVideoIdx=function(){return I},exports.getVideoInfo=Y,exports.handleError=J,exports.initialiseAdvertisement=ve,exports.initiateErrorHandling=Ee,exports.inititateBeacon=function(e){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r.getPlayer(e);window.initialise(t),window.firstFrame(t),t.on("loadedmetadata",(function(){window.endFirstFrame(t)}))}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=fe,exports.isTokenExpired=m,exports.load=we,exports.loadVideo=Ie,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=p,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],c("js",new Date),c("config",e)},exports.saveWatchHistory=q,exports.seasonIdxManager=V,exports.setCurrentSeries=function(e){w=e},exports.setCurrentVideo=O,exports.setSeriesWatchMap=function(e){h=e},exports.setVideoIdx=S,exports.setVideoIdxById=L,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-065c75e4.js"),a=require("./generic-4eba4a31.js"),o=require("./autoNextVideo-3efc246d.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/slicedToArray"),v=[],m=function(e,t){var n=l.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();o.switchToNext(i,e,v)}};function f(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function h(e){return g.apply(this,arguments)}function g(){return(g=c(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),l=p(i,2),a=l[0],o=l[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var l=i.width/o,u=i.height/a,s=0;s<a;s++)for(var c=0;c<o;c++){var d=document.createElement("canvas");d.width=l,d.height=u,d.getContext("2d").drawImage(i,c*l,s*u,l,u,0,0,l,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return x.apply(this,arguments)}function x(){return(x=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",f(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function b(e){return w.apply(this,arguments)}function w(){return(w=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return h(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n=e.duration;r[n*t]={src:e.uri,style:{left:"-60px",height:"85px",width:"130px"}}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e={0:{src:"example-thumbnail.png"}},t=function e(){var t,n,r,i,l;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[r])i.hasOwnProperty(l)&&("object"===u(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",(function(i){var l,a,o,u,s,c,d,p;a=t({},e,i),u=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),l.appendChild(o),o.src=a[0].src,o.className="vjs-thumbnail",t(o.style,a[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",(function(e){c=u.duration()})),u.on("loadedmetadata",(function(e){c=u.duration()})),(s=u.controlBar.progressControl).el().appendChild(l),d=function(e){var i,u,d,p,v,m,f,h,g,y;for(u in d=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=r(s.el()).getBoundingClientRect()).width||y.right)+g,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+g,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),a)i>u&&(d=Math.max(d,u));(v=a[d]).src&&o.src!=v.src&&(o.src=v.src),v.style&&o.style!=v.style&&t(o.style,v.style),p+(h=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(o,v.width||a[0].width)/2)>f?p-=p+h-f:p<h&&(p=h),l.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),p=function(e){l.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)}));var E=function(){var e=c(d.mark((function e(t,n){var r,i,l,a;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,l=i.split("\n"),a=[],l.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&l[n-1].includes("#EXT-X-TILES")&&(l[n-1]=l[n-1].split(","),r.uri=t+e,l[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=p(t,2),i=n[0],l=n[1];i=i.toLowerCase(),r[i]=l}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function C(e){return N.apply(this,arguments)}function N(){return(N=c(d.mark((function e(t){var n,r,i,l,o,u,s,c,p,v,m,f,h,g,y,x,b,w,E,C,N,k;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return l=e.sent,e.next=7,l.text();case 7:o=e.sent,u=new DOMParser,s=u.parseFromString(o,"application/xml"),c=null===(r=a.getCurrentVideo())||void 0===r||null===(i=r.video)||void 0===i?void 0:i.runtime,p=s.getElementsByTagName("AdaptationSet"),v=0;case 13:if(!(v<p.length)){e.next=34;break}if("image"!==(m=p[v]).getAttribute("contentType")||"image/png"!==m.getAttribute("mimeType")){e.next=31;break}if(f=m.getElementsByTagName("SegmentTemplate")[0],h=m.getElementsByTagName("Representation")[0],g=h.getElementsByTagName("EssentialProperty")[0],y=g.getAttribute("value"),!f){e.next=31;break}for(f.getAttribute("media"),x=f.getAttribute("duration"),b=f.getAttribute("timescale"),w=x/b,E=Math.round(c/w),C=Math.ceil(E/9),N=f.getAttribute("media"),k=[],v=0;v<C;v++)k.push({duration:w,layout:y,uri:n+"/"+N.replace("$Number$",v)});return e.abrupt("return",k);case 31:v++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function k(){return(k=c(d.mark((function e(t){var n,r,i,a,o,u,s,c,p,v,m,f,h,g,x,w,N,k,T,I,P;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.getPlayer(t),r=n.currentSource(),null==(i=r.src)||!i.includes("m3u8")){e.next=18;break}return e.next=5,y(i);case 5:if(!((null==(a=e.sent)?void 0:a.length)>0)){e.next=16;break}return x=(null==a?void 0:a[0])||null,w=x.uri,N=(null==n||null===(o=n.tech())||void 0===o||null===(u=o.vhs)||void 0===u||null===(s=u.playlists)||void 0===s||null===(c=s.master)||void 0===c||null===(p=c.uri)||void 0===p?void 0:p.substring(0,null==n||null===(v=n.tech())||void 0===v||null===(m=v.vhs)||void 0===m||null===(f=m.playlists)||void 0===f||null===(h=f.master)||void 0===h||null===(g=h.uri)||void 0===g?void 0:g.lastIndexOf("/")))+"/",e.next=11,E(N,w);case 11:return k=e.sent,e.next=14,b(k);case 14:T=e.sent,n.thumbnails(T);case 16:e.next=27;break;case 18:if(null==i||!i.includes("mpd")){e.next=27;break}return e.next=21,C(i);case 21:if(!((null==(I=e.sent)?void 0:I.length)>0)){e.next=27;break}return e.next=25,b(I);case 25:P=e.sent,n.thumbnails(P);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;v=[];var o=a.getCurrentSeries();null==o||o.map((function(e){var t;return(t=v).push.apply(t,i(e.episodes))})),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;v=null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content,null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=l.getPlayer(e);c.on("timeupdate",(function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=v)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var d,p=v.filter((function(e,t){return t==a.getVideoIdx()}));if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var f,h,g,y,x,b,w,E,C,N,k,T;(null===(f=document.getElementsByClassName("next-ep-preview"))||void 0===f?void 0:f[0]).style.visibility="hidden";var I=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],P=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],A=null===(y=document.getElementsByClassName("next-ep-content"))||void 0===y?void 0:y[0],B=null===(x=p[0])||void 0===x?void 0:x.title;(null===(b=B)||void 0===b?void 0:b.length)>60&&(B=B.substr(0,60)+"..."),I.textContent="".concat(B),P.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(C=E.imageGist)||void 0===C?void 0:C.r16x9)||(null==p||null===(N=p[0])||void 0===N?void 0:N.img)||(null===(k=window)||void 0===k||null===(T=k.customData)||void 0===T?void 0:T.fallbackImage),A.onclick=function(){return m(e)}}else{var L,M,O,S,j,q,X,V,R=document.createElement("div");R.className="next-ep-preview",R.style.visibility="hidden",document.getElementById(e).append(R);var F=document.createElement("div");F.className="next-ep-header",F.textContent="Next up";var D=null===(L=p[0])||void 0===L?void 0:L.title,U=document.createElement("img");U.className="next-ep-img",U.src=(null===(M=p[0])||void 0===M||null===(O=M.gist)||void 0===O||null===(S=O.imageGist)||void 0===S?void 0:S.r16x9)||(null==p||null===(j=p[0])||void 0===j?void 0:j.img)||(null===(q=window)||void 0===q||null===(X=q.customData)||void 0===X?void 0:X.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(V=D)||void 0===V?void 0:V.length)>60&&(D=D.substr(0,60)+"..."),G.textContent="".concat(D);var W=document.createElement("div");W.className="next-ep-content",W.append(U),W.append(G),W.onclick=function(){return m(e)},R.append(F),R.append(W)}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(r),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}},exports.initiateTrickplay=function(e){return k.apply(this,arguments)};
|