@viewlift/player-backup 1.0.69-backup → 1.0.71-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-26d225a0.js → autoNextVideo-0d4d8ff0.js} +1 -1
- package/cjs/bundle.css +137 -137
- package/cjs/{caption-settings-ad1b9ca1.js → caption-settings-88e61ee1.js} +1 -1
- package/cjs/{features-f88528a2.js → features-17e3388c.js} +1 -1
- package/cjs/{generic-b1a36bc8.js → generic-e42efcd8.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-59f77653.js → keyboardShortcuts-efc31ea7.js} +1 -1
- package/cjs/{multicam-31b23f75.js → multicam-b6fbcaad.js} +1 -1
- package/cjs/{multicamv2-3963a502.js → multicamv2-fcdee282.js} +1 -1
- package/cjs/{mwebPotraitTray-69c9ac7b.js → mwebPotraitTray-b1ce7492.js} +1 -1
- package/cjs/{nextEpisodeButton-e3df38b5.js → nextEpisodeButton-76cf9773.js} +1 -1
- package/cjs/{playlist-bf3a4bf8.js → playlist-3da8395c.js} +1 -1
- package/cjs/{renditions-8d0dc6ba.js → renditions-b85edb07.js} +1 -1
- package/cjs/{resolution-56ae3ef8.js → resolution-08d6bb23.js} +1 -1
- package/cjs/{series-b20e9a86.js → series-297f6f27.js} +1 -1
- package/cjs/{series-v2-71253834.js → series-v2-81205652.js} +1 -1
- package/cjs/{settings-icon-350396e8.js → settings-icon-89ca6074.js} +1 -1
- package/cjs/{skin-15ef0721.js → skin-04e830af.js} +1 -1
- package/cjs/{skin-0dcf5720.js → skin-9b48aa25.js} +1 -1
- package/cjs/{skin-66524106.js → skin-9f831f6f.js} +1 -1
- package/cjs/{skin-59b755ba.js → skin-a2d1f400.js} +1 -1
- package/cjs/{skin-ed0356d5.js → skin-f7bc6ad6.js} +1 -1
- package/cjs/{util-5336ded1.js → util-d4c56a2d.js} +1 -1
- package/cjs/{videoSelector-aa970af7.js → videoSelector-59ddf0d8.js} +1 -1
- package/esm/{autoNextVideo-943e7712.js → autoNextVideo-b16258f1.js} +1 -1
- package/esm/bundle.css +137 -137
- package/esm/{caption-settings-105791e0.js → caption-settings-7fe816d4.js} +1 -1
- package/esm/{features-88fdc0d5.js → features-0b83ed4b.js} +1 -1
- package/esm/{generic-cea369ce.js → generic-7c12a59f.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-2dd9cd02.js → keyboardShortcuts-c00504c7.js} +1 -1
- package/esm/{multicam-1dc3f57d.js → multicam-221410dd.js} +1 -1
- package/esm/{multicamv2-abf037e4.js → multicamv2-f4e361cd.js} +1 -1
- package/esm/{mwebPotraitTray-bf46b337.js → mwebPotraitTray-341b0733.js} +1 -1
- package/esm/{nextEpisodeButton-3a4f007a.js → nextEpisodeButton-47aaf95c.js} +1 -1
- package/esm/{playlist-0a392e77.js → playlist-257e6f0e.js} +1 -1
- package/esm/{renditions-d3d8a50e.js → renditions-29c48da7.js} +1 -1
- package/esm/{resolution-a3fef89c.js → resolution-8bf5df58.js} +1 -1
- package/esm/{series-0653f8dc.js → series-a623f3ab.js} +1 -1
- package/esm/{series-v2-42395d0d.js → series-v2-5312e899.js} +1 -1
- package/esm/{settings-icon-13f84d11.js → settings-icon-29d6bc04.js} +1 -1
- package/esm/{skin-16d9c13c.js → skin-027b5fcd.js} +1 -1
- package/esm/{skin-f08a3ead.js → skin-6a551937.js} +1 -1
- package/esm/{skin-d06710d4.js → skin-79f86718.js} +1 -1
- package/esm/{skin-6cf6eda9.js → skin-7e32fcd2.js} +1 -1
- package/esm/{skin-8f48c2bd.js → skin-84d9a239.js} +1 -1
- package/esm/{util-d9f4a5a9.js → util-b0bc7e61.js} +1 -1
- package/esm/{videoSelector-882d2b6e.js → videoSelector-08eb9757.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,i=require("./generic-
|
|
1
|
+
"use strict";var e,i=require("./generic-e42efcd8.js"),t=require("./util-d4c56a2d.js"),o=0,n=0,d=function e(t,o,d,c){n=t,t>d.length-1||i.load(o,d[t].id).then((function(e){i.highlightVideo(n),n++,i.setVideoIdx(n),u(e)})).catch((function(t){u(t),setTimeout((function(){i.highlightVideo(n),n++,i.setVideoIdx(n),e(n,o,d)}),5e3)}))},u=function(i){e&&e(i)};exports.autoPlayNext=function(c){clearTimeout(o);var r=null==c?void 0:c.content;e=null==c?void 0:c.cb;var h=c.playerId;t.onVideoEnded(h,(function(){var e=i.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((n=i.getVideoIdx())>r.length-1||i.load(h,r[n].id).then((function(e){i.highlightVideo(n),i.setCurrentVideo(e.response),n++,i.setVideoIdx(n),u(e)})).catch((function(e){u(e),i.highlightVideo(n),n++,i.setVideoIdx(n),o=setTimeout((function(){i.isPaused(h)&&d(n,h,r)}),5e3)})))}))},exports.switchToNext=d;
|
package/cjs/bundle.css
CHANGED
|
@@ -184,6 +184,143 @@ button.vjs-big-play-button {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
/* Chromecast */
|
|
188
|
+
.video-js .vjs-chromecast-button .vjs-icon-placeholder {
|
|
189
|
+
background: url('https://player.viewlift.com/images/ic_cast_white_24dp.png') center center no-repeat;
|
|
190
|
+
background-size: contain;
|
|
191
|
+
display: inline-block;
|
|
192
|
+
width: 16px;
|
|
193
|
+
height: 16px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.video-js .vjs-chromecast-button:hover {
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.video-js .vjs-chromecast-button:hover .vjs-icon-placeholder {
|
|
201
|
+
background-image: url('https://player.viewlift.com/images/ic_cast_white_24dp.png');
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state .vjs-icon-placeholder {
|
|
205
|
+
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state:hover .vjs-icon-placeholder {
|
|
209
|
+
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
210
|
+
}
|
|
211
|
+
.video-js .vjs-chromecast-button >.vjs-chromecast-button-label{
|
|
212
|
+
display: none !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.video-js .vjs-tech-chromecast {
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
align-items: center;
|
|
220
|
+
overflow: hidden;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
224
|
+
content: ' ';
|
|
225
|
+
display: block;
|
|
226
|
+
height: 2px;
|
|
227
|
+
width: 100px;
|
|
228
|
+
background-color: #cccccc;
|
|
229
|
+
position: absolute;
|
|
230
|
+
left: calc(50% - 50px);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
234
|
+
max-height: 180px;
|
|
235
|
+
width: auto;
|
|
236
|
+
border: 2px solid #cccccc;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
240
|
+
width: 160px;
|
|
241
|
+
height: 90px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
245
|
+
position: absolute;
|
|
246
|
+
bottom: 50%;
|
|
247
|
+
margin-bottom: 100px;
|
|
248
|
+
color: #cccccc;
|
|
249
|
+
text-align: center;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
253
|
+
font-size: 22px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
257
|
+
display: none;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
261
|
+
font-size: 18px;
|
|
262
|
+
padding-top: 0.5em;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
266
|
+
display: none;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.video-js .vjs-tech-chromecast {
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
align-items: center;
|
|
274
|
+
overflow: hidden;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
278
|
+
content: ' ';
|
|
279
|
+
display: block;
|
|
280
|
+
height: 2px;
|
|
281
|
+
width: 100px;
|
|
282
|
+
background-color: #ccc;
|
|
283
|
+
position: absolute;
|
|
284
|
+
left: calc(50% - 50px);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
288
|
+
max-height: 180px;
|
|
289
|
+
width: auto;
|
|
290
|
+
border: 2px solid #ccc;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
294
|
+
width: 160px;
|
|
295
|
+
height: 90px;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
299
|
+
position: absolute;
|
|
300
|
+
bottom: 50%;
|
|
301
|
+
margin-bottom: 100px;
|
|
302
|
+
color: #ccc;
|
|
303
|
+
text-align: center;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
307
|
+
font-size: 22px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
311
|
+
display: none;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
315
|
+
font-size: 18px;
|
|
316
|
+
padding-top: 0.5em;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
320
|
+
display: none;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* Chromecast End */
|
|
187
324
|
|
|
188
325
|
/* ADs */
|
|
189
326
|
.ima-ad-container {
|
|
@@ -500,143 +637,6 @@ button.vjs-big-play-button {
|
|
|
500
637
|
}
|
|
501
638
|
|
|
502
639
|
/* Resolution Module End */
|
|
503
|
-
/* Chromecast */
|
|
504
|
-
.video-js .vjs-chromecast-button .vjs-icon-placeholder {
|
|
505
|
-
background: url('https://player.viewlift.com/images/ic_cast_white_24dp.png') center center no-repeat;
|
|
506
|
-
background-size: contain;
|
|
507
|
-
display: inline-block;
|
|
508
|
-
width: 16px;
|
|
509
|
-
height: 16px;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.video-js .vjs-chromecast-button:hover {
|
|
513
|
-
cursor: pointer;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.video-js .vjs-chromecast-button:hover .vjs-icon-placeholder {
|
|
517
|
-
background-image: url('https://player.viewlift.com/images/ic_cast_white_24dp.png');
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state .vjs-icon-placeholder {
|
|
521
|
-
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state:hover .vjs-icon-placeholder {
|
|
525
|
-
background-image: url('https://player.viewlift.com/images/ic_cast_connected_white_24dp.png');
|
|
526
|
-
}
|
|
527
|
-
.video-js .vjs-chromecast-button >.vjs-chromecast-button-label{
|
|
528
|
-
display: none !important;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.video-js .vjs-tech-chromecast {
|
|
532
|
-
display: flex;
|
|
533
|
-
flex-direction: column;
|
|
534
|
-
justify-content: center;
|
|
535
|
-
align-items: center;
|
|
536
|
-
overflow: hidden;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
540
|
-
content: ' ';
|
|
541
|
-
display: block;
|
|
542
|
-
height: 2px;
|
|
543
|
-
width: 100px;
|
|
544
|
-
background-color: #cccccc;
|
|
545
|
-
position: absolute;
|
|
546
|
-
left: calc(50% - 50px);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
550
|
-
max-height: 180px;
|
|
551
|
-
width: auto;
|
|
552
|
-
border: 2px solid #cccccc;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
556
|
-
width: 160px;
|
|
557
|
-
height: 90px;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
561
|
-
position: absolute;
|
|
562
|
-
bottom: 50%;
|
|
563
|
-
margin-bottom: 100px;
|
|
564
|
-
color: #cccccc;
|
|
565
|
-
text-align: center;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
569
|
-
font-size: 22px;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
573
|
-
display: none;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
577
|
-
font-size: 18px;
|
|
578
|
-
padding-top: 0.5em;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
582
|
-
display: none;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
.video-js .vjs-tech-chromecast {
|
|
586
|
-
display: flex;
|
|
587
|
-
flex-direction: column;
|
|
588
|
-
justify-content: center;
|
|
589
|
-
align-items: center;
|
|
590
|
-
overflow: hidden;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
|
|
594
|
-
content: ' ';
|
|
595
|
-
display: block;
|
|
596
|
-
height: 2px;
|
|
597
|
-
width: 100px;
|
|
598
|
-
background-color: #ccc;
|
|
599
|
-
position: absolute;
|
|
600
|
-
left: calc(50% - 50px);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
|
|
604
|
-
max-height: 180px;
|
|
605
|
-
width: auto;
|
|
606
|
-
border: 2px solid #ccc;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
|
|
610
|
-
width: 160px;
|
|
611
|
-
height: 90px;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container {
|
|
615
|
-
position: absolute;
|
|
616
|
-
bottom: 50%;
|
|
617
|
-
margin-bottom: 100px;
|
|
618
|
-
color: #ccc;
|
|
619
|
-
text-align: center;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title {
|
|
623
|
-
font-size: 22px;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
|
|
627
|
-
display: none;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
|
|
631
|
-
font-size: 18px;
|
|
632
|
-
padding-top: 0.5em;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
|
|
636
|
-
display: none;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
/* Chromecast End */
|
|
640
640
|
/* Airplay */
|
|
641
641
|
|
|
642
642
|
.video-js .vjs-airplay-button .vjs-icon-placeholder {
|
|
@@ -1 +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-0f7b3404.js"),l=require("./generic-
|
|
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-0f7b3404.js"),l=require("./generic-e42efcd8.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var s=i.getComponent("Component"),d=function(){n(m,s);var d,u,p=(d=m,u=c(),function(){var e,t=o(d);if(u){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function m(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(i=p.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(m,[{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=l.getCaptions(this.playerId);null==t||t.map((function(t){return l.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 e;null!==(e=a.classList)&&void 0!==e&&e.contains("hidden")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px"):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");a.style.height="".concat(o),i.dom.appendContent(n,a),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(a),l.detectOrientationChange(this.playerId,a)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=i.dom.createEl("div",{className:"caption-selector-head"}),o=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var c=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),s=i.dom.createEl("div",{className:"caption-selector-content"}),d=i.dom.createEl("div",{className:"caption-container"}),u=this.createLanguageContanier();i.dom.appendContent(d,u),i.dom.appendContent(a,o),i.dom.appendContent(a,c),i.dom.appendContent(e,a),i.dom.appendContent(e,s),i.dom.appendContent(s,d),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{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")),l.getCaptions(e.playerId).map((function(t){return l.disableCaptions(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l.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==c||null===(a=c[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){l.enableCaptions(e.playerId,c[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<c.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 l=document.createElement("div");l.className="fontsize - ".concat(a),l.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var c=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)});c.setAttribute("type","radio"),c.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,c),i.dom.appendContent(r,l),i.dom.appendContent(e,r)}return e}}]),m}();exports.default=d;
|
|
@@ -1 +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-
|
|
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-e42efcd8.js"),s=require("./renditions-b85edb07.js"),u=require("./localisation-56e0a999.js");function c(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 d(e){var t=p();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 p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-88e61ee1.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("captionSelector",u),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===(s=l[0])||void 0===s||s.remove(),c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=a.getPlayer(e).el(),r=0,n=a.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-fcdee282.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamView=function(e,t){Promise.resolve().then((function(){return require("./multicam-b6fbcaad.js")})).then((function(r){var n=r.default,o=t.streams,l=a.getPlayer(e);i.registerComponent("multicamModule",n),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var r=document.querySelector(".vjs-control-bar");r&&"live"==(null==t?void 0:t.skin)&&(r.style.background="transparent")},exports.addMwebPotraitTrayModule=function(e,t){Promise.resolve().then((function(){return require("./mwebPotraitTray-b1ce7492.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("mwebPotraitTray",n),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-76cf9773.js")})).then((function(n){var o=n.default,l=a.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=a.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-3da8395c.js")})).then((function(r){var n=r.default,o=a.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-08d6bb23.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a.getPlayer(e),u=s.getRenditions(e);(null==u?void 0:u.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:u},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=d(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 u=a.parseSvgString(l);return o.append(u),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-297f6f27.js")})).then((function(n){var o=n.seriesModule,l=a.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),u=function(e){s[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<s.length;c++)u(c)}))},exports.addSeriesSelectorV2=function(t,r){Promise.resolve().then((function(){return require("./series-v2-81205652.js")})).then((function(n){var o=n.default,l=a.getPlayer(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({playerId:t},r),l.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-89ca6074.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("settingsSelector",u),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===(s=l[0])||void 0===s||s.remove(),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=d(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 u=a.parseSvgString(l);return o.append(u),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=d(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=u.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-59ddf0d8.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("axios");require("js-cookie");var r=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),a={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 d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?d(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var u={name:"@viewlift/player",version:"1.0.76",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:w(),params:s({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":u.version},withCredentials:!0})},v=function(){var e=t(n.mark((function e(t,o){var r,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return l={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",i({url:E(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(l),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:y(),method:"POST",headers:{Authorization:r},data:s({},t),params:s({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),m=function(e,t){var n,o,r=(null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:f(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey},timeout:15e3})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return i({method:"GET",url:I(e,v),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},p=function(e){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},g=function(){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},f=function(e){return T()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},I=function(e,t){return T()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(t,"/").concat(e)},E=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},y=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},w=function(){return T()+"".concat(null==a?void 0:a.getVideoDetails)},T=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},h=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},_=null;function b(){return{set:function(e){e&&(_=e)},get:function(){return _}}}var O=function(){var e=t(n.mark((function e(){var t,o,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=b().get(),o=T(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);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)}}(),D=null,V=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"))||!h(t)){e.next=6;break}return D||(D=O().then((function(e){var n,o,i=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&b().set(r),i||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){D=null}))),e.abrupt("return",D);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=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 o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},S=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var C=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.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"};function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function W(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?L(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=r(navigator.userAgent);var k=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},A=function(e){var t=F(e,"video.tags",[]),n=F(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},F=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},P=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},R=function(){var e,t,n,o,i,r,l,a,d,s,u,c,v,m,p,g,f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,y=(null==E?void 0:E.contentType)||"video",w=null==E||null===(e=E[y])||void 0===e?void 0:e.metadata,T=le(I);if(!f.includes("VIEWLIFT_"))return f;var h=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(h.getPropertyValue("height").slice(0,-2)),b=Math.trunc(h.getPropertyValue("width").slice(0,-2)),O="linearchannel"===y?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(o=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.id)})))||void 0===o||null===(i=o.content)||void 0===i?void 0:i.id:F(E,"video.gist.id",""),D=W(W({},N(w)),{},{VIEWLIFT_WIDTH:b,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:k(b,_),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===(r=window)||void 0===r?void 0:r.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:F(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==T||null===(l=T.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==T||null===(a=T.options_)||void 0===a?void 0:a.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:A(E),VIEWLIFT_MEDIA_ID:O,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(F(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:O,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+F(E,"video.gist.permalink","")),VIEWLIFT_COPPA:F(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.site)||void 0===u?void 0:u.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:F(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(m=v.site)||void 0===m?void 0:m.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:O,VIEWLIFT_CONTENT_TITLE:F(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:F(E,"video.series[0].gist.title",F(E,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:F(E,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:F(E,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:F(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(p=window)||void 0===p||null===(g=p.customData)||void 0===g?void 0:g.macros);for(var V in D){var x=new RegExp("\\b("+V+")\\b","g");f=f.replace(x,D[V])}return f},N=function(e){var t,n,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(P()?s?a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=W(W({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=W(W({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=P()?W(W({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):W(W({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=W(W({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=P()?W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},j=function(e,t){var n,o,i,r,l,a,d,s,u,c,v,m,p,g=(null==e?void 0:e.contentType)||"video",f=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[g])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[g])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return U(E);if(f){var T=H(I,t);return T.src=R(T.src,t,e),T}if("Safari"!==C()&&w)return B(I);if(y){var h=U(I);return h.src=R(h.src,t,e),h}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=R(_.src,t,e),_}return null},B=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},U=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},H=function(e,t){var n=e.fairPlay,i=e.widevine,r=e.playReady,l=C();if(le(t),"Safari"===l){var a=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,t,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return X(t),a}var d,s={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(X(t),s.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(s.keySystemOptions=[],s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),s};var M,z,G,q,Y,X=function(e){var t=le(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},J=function(e){z=e},K=function(e){G=e},Z=function(e){if(q){var t=q.get(e);K(t+1)}},Q=function(e){var t=le(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},$=function(e,t){var n=le(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ee=!1,te=function(e,t,n){var o=R(t,e,n),i=le(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=le(e);if(null!==r.el_){ee=!0;var l={id:e,adTagUrl:"".concat(t,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ee&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},ne=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},oe="";function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var re=function(e){return!!o.getPlayer("".concat(e))},le=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},ae=function(){var e=t(n.mark((function e(t,o,i){var r,l,a,d,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V();case 2:return d=e.sent,Z(o),s=0,u=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&m(o,d).then((function(e){var t,n,o,i,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,u=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,n){c(o,d).then((function(o){var i,r,l,a,d,c,v,m,p,g,f=null==o?void 0:o.data,I=(null==f||null===(i=f.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;J(o.data);var E=(null==f||null===(l=f.ads)||void 0===l||null===(a=l.preRoll)||void 0===a||null===(d=a.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==f||null===(v=f.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(g=p.web)||void 0===g?void 0:g.url);E&&te(t,E,f);var y=j(f,t);if(y){var w,T,h,_,b,O,D,V,C,L,W,k,A,F,P=(null==f||null===(w=f.video)||void 0===w||null===(T=w.gist)||void 0===T?void 0:T.videoImageUrl)||(null==f||null===(h=f.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=le(t);if(R.poster(P),se(t,y),R.on("loadstart",(function(){I&&e({status:!0,msg:"Video Loaded",response:f})})),R.on("loadeddata",(function(){S(),e({status:!0,msg:"Video Loaded",response:f})})),R.one("play",(function(){s&&u<95&&setTimeout((function(){R.currentTime(s)}),0)})),R.one("error",(function(){var e;n({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==f||null===(O=f.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==f||null===(C=f.video)||void 0===C||null===(L=C.closedCaptions)||void 0===L?void 0:L.length)>0)W=((null==f||null===(k=f.video)||void 0===k||null===(A=k.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null==f||null===(F=f.video)||void 0===F?void 0:F.closedCaptions)).filter((function(e){return"VTT"===e.format})),$(t,W);else Q(t)}else x(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){ue(e,t,n,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),de=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()},se=function(e,t){le(e).src(t)},ue=function(t,n,o,i){var r,l,a,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);re(n)&&x(n,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ie(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},i&&{videoId:i}))};exports.addCaptions=$,exports.clearError=S,exports.closeOpenDrawers=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},exports.createIconMarkup=function(e){return ne(e)},exports.createIdxMapping=function(e){q=new Map,e.map((function(e,t){q.set(e.id,t)}))},exports.detectBrowser=C,exports.detectOrientationChange=function(e,t){var n,o=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(oe!==n){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");t&&(t.style.height="".concat(o)),oe=n}}(e,t)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){o()}),100)}))},exports.disableCaptions=function(e,t){for(var n=le(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var o=t.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=t.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var t=le(e);if(de(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.enableCaptions=function(e,t){var n,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(o=n[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=le(e).textTracks(),l=0;l<r.length;l++){var a=r[l];"subtitles"!==a.kind&&"captions"!==a.kind||a.id!=t||(a.mode="showing")}},exports.getCaptions=function(e){var t,n=le(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},exports.getCurrentSeries=function(){return M},exports.getCurrentVideo=function(){return z},exports.getLinearChannelDetails=function(e,t){var n,o;return i({url:T()+a.getLinearChannelDetails,params:s(s(s(s(s({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===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t}})},exports.getPlayer=le,exports.getSeriesDetails=function(e,t){var n,o,r=JSON.parse(atob(t.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.seriesData})})):i({url:T()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return i({method:"GET",url:g(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:p(o),headers:{Authorization:e.token},timeout:15e3})},exports.getSeriesWatchMap=function(){return Y},exports.getSource=j,exports.getToken=V,exports.getVideoDetails=c,exports.getVideoIdx=function(){return G},exports.getVideoInfo=m,exports.handleError=x,exports.highlightVideo=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.impolicy16x9=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},exports.initialiseAdvertisement=te,exports.initiateErrorHandling=ue,exports.isNotAValidSkin=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=re,exports.isTokenExpired=h,exports.load=ae,exports.loadVideo=se,exports.loadVideoInstantly=function(e,t,n){var o=le(e);return o.src(t),new Promise((function(e,t){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=ne,exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=b,exports.rewind=function(e,t){var n=o(e),i=n.currentTime(),r=i<=t?0:i-t;n.currentTime(r)},exports.saveWatchHistory=v,exports.setCurrentSeries=function(e){M=e},exports.setCurrentVideo=J,exports.setSeriesWatchMap=function(e){Y=e},exports.setVideoIdx=K,exports.setVideoIdxById=Z,exports.skip=function(e,t){var n=o(e),i=n.currentTime()+t;n.currentTime(i)};
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("axios");require("js-cookie");var r=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),a={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 d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?d(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var u={name:"@viewlift/player",version:"1.0.75",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:w(),params:s({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":u.version},withCredentials:!0})},v=function(){var e=t(n.mark((function e(t,o){var r,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return l={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",i({url:E(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(l),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:y(),method:"POST",headers:{Authorization:r},data:s({},t),params:s({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),m=function(e,t){var n,o,r=(null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:f(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey},timeout:15e3})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return i({method:"GET",url:I(e,v),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},p=function(e){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},g=function(){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},f=function(e){return T()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},I=function(e,t){return T()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(t,"/").concat(e)},E=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},y=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},w=function(){return T()+"".concat(null==a?void 0:a.getVideoDetails)},T=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},h=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},_=null;function b(){return{set:function(e){e&&(_=e)},get:function(){return _}}}var O=function(){var e=t(n.mark((function e(){var t,o,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=b().get(),o=T(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);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)}}(),D=null,V=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"))||!h(t)){e.next=6;break}return D||(D=O().then((function(e){var n,o,i=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&b().set(r),i||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){D=null}))),e.abrupt("return",D);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=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 o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},S=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var C=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.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"};function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function W(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?L(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=r(navigator.userAgent);var k=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},A=function(e){var t=F(e,"video.tags",[]),n=F(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},F=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},P=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},R=function(){var e,t,n,o,i,r,l,a,d,s,u,c,v,m,p,g,f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,y=(null==E?void 0:E.contentType)||"video",w=null==E||null===(e=E[y])||void 0===e?void 0:e.metadata,T=le(I);if(!f.includes("VIEWLIFT_"))return f;var h=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(h.getPropertyValue("height").slice(0,-2)),b=Math.trunc(h.getPropertyValue("width").slice(0,-2)),O="linearchannel"===y?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(o=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.id)})))||void 0===o||null===(i=o.content)||void 0===i?void 0:i.id:F(E,"video.gist.id",""),D=W(W({},N(w)),{},{VIEWLIFT_WIDTH:b,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:k(b,_),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===(r=window)||void 0===r?void 0:r.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:F(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==T||null===(l=T.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==T||null===(a=T.options_)||void 0===a?void 0:a.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:A(E),VIEWLIFT_MEDIA_ID:O,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(F(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:O,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+F(E,"video.gist.permalink","")),VIEWLIFT_COPPA:F(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.site)||void 0===u?void 0:u.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:F(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(m=v.site)||void 0===m?void 0:m.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:F(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:O,VIEWLIFT_CONTENT_TITLE:F(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:F(E,"video.series[0].gist.title",F(E,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:F(E,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:F(E,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:F(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(p=window)||void 0===p||null===(g=p.customData)||void 0===g?void 0:g.macros);for(var V in D){var x=new RegExp("\\b("+V+")\\b","g");f=f.replace(x,D[V])}return f},N=function(e){var t,n,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(P()?s?a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=W(W({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=W(W({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=P()?W(W({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):W(W({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=W(W({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=P()?W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):W(W({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},j=function(e,t){var n,o,i,r,l,a,d,s,u,c,v,m,p,g=(null==e?void 0:e.contentType)||"video",f=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[g])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[g])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return U(E);if(f){var T=H(I,t);return T.src=R(T.src,t,e),T}if("Safari"!==C()&&w)return B(I);if(y){var h=U(I);return h.src=R(h.src,t,e),h}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=R(_.src,t,e),_}return null},B=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},U=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},H=function(e,t){var n=e.fairPlay,i=e.widevine,r=e.playReady,l=C();if(le(t),"Safari"===l){var a=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,t,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return X(t),a}var d,s={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(X(t),s.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(s.keySystemOptions=[],s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),s};var M,z,G,q,Y,X=function(e){var t=le(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},J=function(e){z=e},K=function(e){G=e},Z=function(e){if(q){var t=q.get(e);K(t+1)}},Q=function(e){var t=le(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},$=function(e,t){var n=le(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ee=!1,te=function(e,t,n){var o=R(t,e,n),i=le(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=le(e);if(null!==r.el_){ee=!0;var l={id:e,adTagUrl:"".concat(t,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ee&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},ne=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},oe="";function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var re=function(e){return!!o.getPlayer("".concat(e))},le=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},ae=function(){var e=t(n.mark((function e(t,o,i){var r,l,a,d,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V();case 2:return d=e.sent,Z(o),s=0,u=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&m(o,d).then((function(e){var t,n,o,i,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,u=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,n){c(o,d).then((function(o){var i,r,l,a,d,c,v,m,p,g,f=null==o?void 0:o.data,I=(null==f||null===(i=f.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;J(o.data);var E=(null==f||null===(l=f.ads)||void 0===l||null===(a=l.preRoll)||void 0===a||null===(d=a.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==f||null===(v=f.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(g=p.web)||void 0===g?void 0:g.url);E&&te(t,E,f);var y=j(f,t);if(y){var w,T,h,_,b,O,D,V,C,L,W,k,A,F,P=(null==f||null===(w=f.video)||void 0===w||null===(T=w.gist)||void 0===T?void 0:T.videoImageUrl)||(null==f||null===(h=f.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=le(t);if(R.poster(P),se(t,y),R.on("loadstart",(function(){I&&e({status:!0,msg:"Video Loaded",response:f})})),R.on("loadeddata",(function(){S(),e({status:!0,msg:"Video Loaded",response:f})})),R.one("play",(function(){s&&u<95&&setTimeout((function(){R.currentTime(s)}),0)})),R.one("error",(function(){var e;n({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==f||null===(O=f.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==f||null===(C=f.video)||void 0===C||null===(L=C.closedCaptions)||void 0===L?void 0:L.length)>0)W=((null==f||null===(k=f.video)||void 0===k||null===(A=k.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null==f||null===(F=f.video)||void 0===F?void 0:F.closedCaptions)).filter((function(e){return"VTT"===e.format})),$(t,W);else Q(t)}else x(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){ue(e,t,n,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),de=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()},se=function(e,t){le(e).src(t)},ue=function(t,n,o,i){var r,l,a,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);re(n)&&x(n,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ie(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},i&&{videoId:i}))};exports.addCaptions=$,exports.clearError=S,exports.closeOpenDrawers=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},exports.createIconMarkup=function(e){return ne(e)},exports.createIdxMapping=function(e){q=new Map,e.map((function(e,t){q.set(e.id,t)}))},exports.detectBrowser=C,exports.detectOrientationChange=function(e,t){var n,o=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(oe!==n){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");t&&(t.style.height="".concat(o)),oe=n}}(e,t)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){o()}),100)}))},exports.disableCaptions=function(e,t){for(var n=le(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var o=t.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=t.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var t=le(e);if(de(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.enableCaptions=function(e,t){var n,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(o=n[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=le(e).textTracks(),l=0;l<r.length;l++){var a=r[l];"subtitles"!==a.kind&&"captions"!==a.kind||a.id!=t||(a.mode="showing")}},exports.getCaptions=function(e){var t,n=le(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},exports.getCurrentSeries=function(){return M},exports.getCurrentVideo=function(){return z},exports.getLinearChannelDetails=function(e,t){var n,o;return i({url:T()+a.getLinearChannelDetails,params:s(s(s(s(s({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===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t}})},exports.getPlayer=le,exports.getSeriesDetails=function(e,t){var n,o,r=JSON.parse(atob(t.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.seriesData})})):i({url:T()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return i({method:"GET",url:g(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:p(o),headers:{Authorization:e.token},timeout:15e3})},exports.getSeriesWatchMap=function(){return Y},exports.getSource=j,exports.getToken=V,exports.getVideoDetails=c,exports.getVideoIdx=function(){return G},exports.getVideoInfo=m,exports.handleError=x,exports.highlightVideo=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.impolicy16x9=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},exports.initialiseAdvertisement=te,exports.initiateErrorHandling=ue,exports.isNotAValidSkin=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=re,exports.isTokenExpired=h,exports.load=ae,exports.loadVideo=se,exports.loadVideoInstantly=function(e,t,n){var o=le(e);return o.src(t),new Promise((function(e,t){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=ne,exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=b,exports.rewind=function(e,t){var n=o(e),i=n.currentTime(),r=i<=t?0:i-t;n.currentTime(r)},exports.saveWatchHistory=v,exports.setCurrentSeries=function(e){M=e},exports.setCurrentVideo=J,exports.setSeriesWatchMap=function(e){Y=e},exports.setVideoIdx=K,exports.setVideoIdxById=Z,exports.skip=function(e,t){var n=o(e),i=n.currentTime()+t;n.currentTime(i)};
|