@viewlift/player-backup 2.0.114-backup → 2.0.116-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-a860d3e8.js → autoNextVideo-d2ba145d.js} +1 -1
- package/cjs/bundle.css +79 -29
- package/cjs/{features-2bb2dd4e.js → features-b9518c47.js} +1 -1
- package/cjs/generic-377c0573.js +1 -0
- package/cjs/{index-c5039d58.js → index-62222a39.js} +1 -1
- package/cjs/index-88dc9e09.js +1 -0
- package/cjs/index-94a30fd0.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-4afd8915.js → multicamv2-833efcf1.js} +1 -1
- package/cjs/{multicamv2-aaaa65d6.js → multicamv2-8d52871f.js} +1 -1
- package/cjs/{nextEpisodeButton-d160dcfd.js → nextEpisodeButton-b98fc202.js} +1 -1
- package/cjs/{playlist-72ba84d5.js → playlist-ce7f9db5.js} +1 -1
- package/cjs/{series-6049ffcc.js → series-1ba5aa80.js} +1 -1
- package/cjs/{series-v2-8a4359ea.js → series-v2-66cc35c6.js} +1 -1
- package/cjs/{series-v2-ea10318d.js → series-v2-b1911450.js} +1 -1
- package/cjs/{settings-icon-27b60de6.js → settings-icon-7384b65d.js} +1 -1
- package/cjs/{skin-7a98d3fd.js → skin-207038f1.js} +1 -1
- package/cjs/skin-710efb6a.js +1 -0
- package/cjs/{skin-84eed465.js → skin-8fd50d98.js} +1 -1
- package/cjs/skin-ac9b0b26.js +1 -0
- package/cjs/{skin-021caaea.js → skin-b1e9a1d6.js} +1 -1
- package/cjs/{skin-43e130dc.js → skin-cd625772.js} +1 -1
- package/cjs/start-begin-btn-95c6cc92.js +1 -0
- package/cjs/{videoSelector-187f3529.js → videoSelector-481263de.js} +1 -1
- package/cjs/{videoSelector-9c3339e2.js → videoSelector-4cd10521.js} +1 -1
- package/cjs/{watch-live-btn-04bf383d.js → watch-live-btn-8a160941.js} +1 -1
- package/esm/{autoNextVideo-51072eff.js → autoNextVideo-0cba47e8.js} +1 -1
- package/esm/bundle.css +79 -29
- package/esm/{features-2d66d073.js → features-b17a311f.js} +1 -1
- package/esm/generic-e4833832.js +1 -0
- package/esm/{index-5863b4b8.js → index-20d3b872.js} +1 -1
- package/esm/index-7dec4239.js +1 -0
- package/esm/index-e1f939b0.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-beef2152.js → multicamv2-716b15d0.js} +1 -1
- package/esm/{multicamv2-20406485.js → multicamv2-ea35068b.js} +1 -1
- package/esm/{nextEpisodeButton-ce9c073f.js → nextEpisodeButton-a918f043.js} +1 -1
- package/esm/{playlist-3fc8d123.js → playlist-ad9491f0.js} +1 -1
- package/esm/{series-59e62fbe.js → series-efca8869.js} +1 -1
- package/esm/{series-v2-ecbcd52a.js → series-v2-0f338773.js} +1 -1
- package/esm/{series-v2-0de0cb77.js → series-v2-38415907.js} +1 -1
- package/esm/{skin-59cd094a.js → skin-1d3bf1bb.js} +1 -1
- package/esm/{skin-757c1e70.js → skin-3fa3b400.js} +1 -1
- package/esm/{skin-93e0aec2.js → skin-6520acf0.js} +1 -1
- package/esm/{skin-7b1fe120.js → skin-c51a3958.js} +1 -1
- package/esm/skin-e55951c5.js +1 -0
- package/esm/skin-f2cb9f9e.js +1 -0
- package/esm/start-begin-btn-8120ecdd.js +1 -0
- package/esm/{videoSelector-6d99a9f5.js → videoSelector-64c721c9.js} +1 -1
- package/esm/{videoSelector-69c96a51.js → videoSelector-7c82db41.js} +1 -1
- package/esm/{watch-live-btn-2d5cd4d3.js → watch-live-btn-d4d27011.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-26d3fd75.js +0 -1
- package/cjs/index-1a9cf743.js +0 -1
- package/cjs/skin-32396be4.js +0 -1
- package/cjs/skin-a86f763d.js +0 -1
- package/cjs/start-begin-btn-35c37795.js +0 -1
- package/esm/apis/index.d.ts +0 -11
- package/esm/assets/icons.d.ts +0 -24
- package/esm/components/advertisement/advertisement.d.ts +0 -1
- package/esm/components/auto-next-video/autoNextVideo.d.ts +0 -2
- package/esm/components/broadcaster_image/index.d.ts +0 -1
- package/esm/components/caption-settings/caption-settings.d.ts +0 -14
- package/esm/components/dvr-overlay/index.d.ts +0 -1
- package/esm/components/dvr-overlay/start-begin-btn.d.ts +0 -6
- package/esm/components/dvr-overlay/watch-live-btn.d.ts +0 -6
- package/esm/components/dvr-seekbar/index.d.ts +0 -14
- package/esm/components/multicam/multicam.d.ts +0 -18
- package/esm/components/multicam-v2/multicamv2.d.ts +0 -13
- package/esm/components/multicam-v2_TEMP/multicamv2.d.ts +0 -13
- package/esm/components/next-ep-preview/next-ep-preview.d.ts +0 -1
- package/esm/components/next-episode/nextEpisodeButton.d.ts +0 -13
- package/esm/components/playlist-tray/playlist.d.ts +0 -15
- package/esm/components/quality-selector/index.d.ts +0 -1
- package/esm/components/resolution/resolution-v2.d.ts +0 -18
- package/esm/components/resolution/resolution.d.ts +0 -20
- package/esm/components/series/series.d.ts +0 -10
- package/esm/components/series-v2/helper.d.ts +0 -3
- package/esm/components/series-v2/series-v2.d.ts +0 -25
- package/esm/components/series-v2_TEMP/helper.d.ts +0 -1
- package/esm/components/series-v2_TEMP/series-v2.d.ts +0 -21
- package/esm/components/settings-icon/settings-icon.d.ts +0 -17
- package/esm/components/trickplay/helper.d.ts +0 -13
- package/esm/components/trickplay/index.d.ts +0 -1
- package/esm/components/trickplay/videojs.thumbnails.d.ts +0 -1
- package/esm/components/video-selector/videoSelector.d.ts +0 -18
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +0 -16
- package/esm/components/watch-history/handleWatchHistory.d.ts +0 -2
- package/esm/contentHandler/content_types/epg.d.ts +0 -4
- package/esm/contentHandler/content_types/external.d.ts +0 -4
- package/esm/contentHandler/content_types/index.d.ts +0 -5
- package/esm/contentHandler/content_types/series.d.ts +0 -4
- package/esm/contentHandler/content_types/vod.d.ts +0 -4
- package/esm/contentHandler/firePlayer.d.ts +0 -4
- package/esm/core/captions.d.ts +0 -10
- package/esm/core/generic.d.ts +0 -48
- package/esm/core/player_instance.d.ts +0 -6
- package/esm/core/renditions.d.ts +0 -6
- package/esm/core/util.d.ts +0 -16
- package/esm/core/volume.d.ts +0 -2
- package/esm/dash/dashHandler.d.ts +0 -1
- package/esm/dash/sgai.d.ts +0 -9
- package/esm/features.d.ts +0 -32
- package/esm/generic-7fb8e9c5.js +0 -1
- package/esm/globalPlayerEvents.d.ts +0 -8
- package/esm/helpers/browser.d.ts +0 -2
- package/esm/helpers/currentVideoInfo.d.ts +0 -14
- package/esm/helpers/errorHandling.d.ts +0 -2
- package/esm/helpers/loader.d.ts +0 -2
- package/esm/helpers/localisation.d.ts +0 -2
- package/esm/helpers/scriptLoader.d.ts +0 -2
- package/esm/helpers/secondary-switching.d.ts +0 -1
- package/esm/helpers/skin.d.ts +0 -14
- package/esm/helpers/sourceRetriever.d.ts +0 -11
- package/esm/helpers/ssaiEventHandler.d.ts +0 -27
- package/esm/helpers/token.d.ts +0 -9
- package/esm/index-3b50e289.js +0 -1
- package/esm/index.d.ts +0 -42
- package/esm/plugins/chromecast.d.ts +0 -18
- package/esm/plugins/index.d.ts +0 -2
- package/esm/plugins/library.d.ts +0 -7
- package/esm/plugins/videojs-dash5.es.d.ts +0 -51
- package/esm/plugins/videojs_contrib_dash.d.ts +0 -51
- package/esm/skin/carousel/skin.d.ts +0 -1
- package/esm/skin/default/events.d.ts +0 -1
- package/esm/skin/default/skin.d.ts +0 -1
- package/esm/skin/defaultV2/events.d.ts +0 -1
- package/esm/skin/defaultV2/skin.d.ts +0 -1
- package/esm/skin/index.d.ts +0 -1
- package/esm/skin/minimalist/skin.d.ts +0 -1
- package/esm/skin/multiplayer/events.d.ts +0 -1
- package/esm/skin/multiplayer/skin.d.ts +0 -1
- package/esm/skin/vl_one/events.d.ts +0 -1
- package/esm/skin/vl_one/skin.d.ts +0 -1
- package/esm/skin-0c5f06e9.js +0 -1
- package/esm/skin-6185e3d0.js +0 -1
- package/esm/start-begin-btn-63a71f73.js +0 -1
- package/esm/utilities/analytics.d.ts +0 -3
- package/esm/utilities/beacon.d.ts +0 -3
- package/esm/utilities/controlsColor.d.ts +0 -1
- package/esm/utilities/conviva.d.ts +0 -5
- package/esm/utilities/keyboardShortcuts.d.ts +0 -5
- package/esm/utilities/replaceMacros.d.ts +0 -1
package/esm/bundle.css
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
4
8
|
height: 0.7em;
|
|
5
9
|
position: absolute;
|
|
@@ -213,10 +217,6 @@
|
|
|
213
217
|
font-weight: bold
|
|
214
218
|
}
|
|
215
219
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
220
|
/* CSS for videojs-dvr-seekbar */
|
|
221
221
|
|
|
222
222
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -390,6 +390,7 @@
|
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
|
|
393
|
+
|
|
393
394
|
.video-js .multicamera-parent.default{
|
|
394
395
|
height: 345px;
|
|
395
396
|
position: absolute;
|
|
@@ -472,7 +473,6 @@
|
|
|
472
473
|
|
|
473
474
|
|
|
474
475
|
|
|
475
|
-
|
|
476
476
|
/* nextep */
|
|
477
477
|
.next-ep-preview{
|
|
478
478
|
position: absolute;
|
|
@@ -548,6 +548,38 @@
|
|
|
548
548
|
margin-left: 8px;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
+
/* a wrapper element that tracks the mouse vertically */
|
|
552
|
+
.vjs-thumbnail-holder {
|
|
553
|
+
position: absolute;
|
|
554
|
+
left: -1000px;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/* the thumbnail image itself */
|
|
558
|
+
.vjs-thumbnail {
|
|
559
|
+
position: absolute;
|
|
560
|
+
left: 0;
|
|
561
|
+
bottom: 1.3em;
|
|
562
|
+
opacity: 0;
|
|
563
|
+
transition: opacity .2s ease;
|
|
564
|
+
-webkit-transition: opacity .2s ease;
|
|
565
|
+
-moz-transition: opacity .2s ease;
|
|
566
|
+
-mz-transition: opacity .2s ease;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/* fade in the thumbnail when hovering over the progress bar */
|
|
570
|
+
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
571
|
+
.vjs-progress-control:hover .vjs-thumbnail,
|
|
572
|
+
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
573
|
+
.vjs-progress-control:active .vjs-thumbnail {
|
|
574
|
+
opacity: 1;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/* ... but hide the thumbnail when hovering directly over it */
|
|
578
|
+
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
579
|
+
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
580
|
+
opacity: 0;
|
|
581
|
+
}
|
|
582
|
+
|
|
551
583
|
.video-js.vjs-quality-menu {
|
|
552
584
|
display: block;
|
|
553
585
|
}
|
|
@@ -618,36 +650,54 @@
|
|
|
618
650
|
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
619
651
|
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
620
652
|
}
|
|
621
|
-
|
|
622
|
-
.vjs-thumbnail-holder {
|
|
623
|
-
position: absolute;
|
|
624
|
-
left: -1000px;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/* the thumbnail image itself */
|
|
628
|
-
.vjs-thumbnail {
|
|
653
|
+
.vjs-marker {
|
|
629
654
|
position: absolute;
|
|
630
655
|
left: 0;
|
|
631
|
-
bottom:
|
|
632
|
-
opacity:
|
|
656
|
+
bottom: 0em;
|
|
657
|
+
opacity: 1;
|
|
658
|
+
height: 100%;
|
|
633
659
|
transition: opacity .2s ease;
|
|
634
660
|
-webkit-transition: opacity .2s ease;
|
|
635
661
|
-moz-transition: opacity .2s ease;
|
|
636
|
-
-
|
|
662
|
+
z-index: 100;
|
|
637
663
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
664
|
+
.vjs-marker:hover {
|
|
665
|
+
cursor: pointer;
|
|
666
|
+
-webkit-transform: scale(1.3, 1.3);
|
|
667
|
+
-moz-transform: scale(1.3, 1.3);
|
|
668
|
+
-o-transform: scale(1.3, 1.3);
|
|
669
|
+
-ms-transform: scale(1.3, 1.3);
|
|
670
|
+
transform: scale(1.3, 1.3);
|
|
671
|
+
}
|
|
672
|
+
.vjs-tip {
|
|
673
|
+
visibility: hidden;
|
|
674
|
+
display: block;
|
|
675
|
+
opacity: 0.8;
|
|
676
|
+
padding: 5px;
|
|
677
|
+
font-size: 10px;
|
|
678
|
+
position: absolute;
|
|
679
|
+
bottom: 14px;
|
|
680
|
+
z-index: 100000;
|
|
645
681
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
682
|
+
.vjs-tip .vjs-tip-arrow {
|
|
683
|
+
background: url(data:image/gif;base64,R0lGODlhCQAJAIABAAAAAAAAACH5BAEAAAEALAAAAAAJAAkAAAIRjAOnwIrcDJxvwkplPtchVQAAOw==) no-repeat top left;
|
|
684
|
+
bottom: 0;
|
|
685
|
+
left: 50%;
|
|
686
|
+
margin-left: -4px;
|
|
687
|
+
background-position: bottom left;
|
|
688
|
+
position: absolute;
|
|
689
|
+
width: 9px;
|
|
690
|
+
height: 5px;
|
|
691
|
+
}
|
|
692
|
+
.vjs-tip .vjs-tip-inner {
|
|
693
|
+
border-radius: 3px;
|
|
694
|
+
-moz-border-radius: 3px;
|
|
695
|
+
-webkit-border-radius: 3px;
|
|
696
|
+
padding: 5px 8px 4px 8px;
|
|
697
|
+
background-color: black;
|
|
698
|
+
color: white;
|
|
699
|
+
max-width: 200px;
|
|
700
|
+
text-align: center;
|
|
651
701
|
}
|
|
652
702
|
|
|
653
703
|
.vjs-poster {
|
|
@@ -1245,6 +1295,6 @@
|
|
|
1245
1295
|
padding: 10px 20px;
|
|
1246
1296
|
cursor: pointer;
|
|
1247
1297
|
}
|
|
1248
|
-
.watch-live-btn svg, .watch-begin-btn svg {
|
|
1298
|
+
.dvr-watch-live-btn svg, .watch-begin-btn svg {
|
|
1249
1299
|
cursor: pointer;
|
|
1250
1300
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,m as s}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,m as s}from"./generic-e4833832.js";import{g as c}from"./resolution-62be852a.js";import{p as d}from"./skin-16f83185.js";import{g as u}from"./localisation-0bf399a1.js";import{g as m}from"./player_instance-34118a5b.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u("slowMoText")||"Slow Mo",r}return n(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)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=d(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=d(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-v2-6446fe47.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=m(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-a918f043.js").then(function(r){var o=r.default,l=m(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-efca8869.js").then(function(r){var o=r.seriesModule,l=m(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]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-64c721c9.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},S=function(e,t){import("./caption-settings-c9b18ef8.js").then(function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.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)})},w=function(e,t){import("./settings-icon-e8ed293a.js").then(function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.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)})},I=function(e,t){import("./playlist-ad9491f0.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},E=function(e,t){import("./series-v2-0f338773.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},O=function(e,t){import("./multicamv2-716b15d0.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=m(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=m(e).el(),n=0,r=m(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},L=function(e,t){import("./videoSelector-7c82db41.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},_=function(e,t){import("./series-v2-38415907.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},x=function(e,t){import("./multicamv2-ea35068b.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},N=function(e,t){import("./start-begin-btn-8120ecdd.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("startFromBeginingButton",r);var l=o.getChild("controlBar").addChild("startFromBeginingButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},T=function(e,t){import("./watch-live-btn-d4d27011.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("watchLiveButton",r);var l=o.getChild("controlBar").addChild("watchLiveButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};export{B as a,j as b,b as c,y as d,C as e,w as f,S as g,M as h,g as i,L as j,x as k,I as l,_ as m,P as n,k as o,E as p,O as q,N as r,T as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r}from"./player_instance-34118a5b.js";import a from"js-cookie";import{UAParser as l}from"ua-parser-js";import{a as d,r as u}from"./captions-b619441b.js";import{c as s}from"./skin-16f83185.js";function c(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function v(e){window.dataLayer=window.dataLayer||[],c("js",new Date),c("config",e)}function m(e,n){c("event",e,n)}var f={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",getBeaconUrl:"/analytics/player-beacon"};function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function w(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?p(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var I={name:"@viewlift/player-backup",version:"2.0.116-backup",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",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","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=I.version;var E,g=function(e,n){var t,i,r,a,l,d,u,s;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.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===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":O.get()+"".concat(null==f?void 0:f.getVideoDetails),params:w({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:n,"Sdk-Version":I.version},withCredentials:!0})},T=function(e,n){var t,i,r,a;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:O.get()+f.getLinearChannelDetails,params:w(w(w(w(w({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:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},h=function(e,n){var t,i,r=M(n),a=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):o({url:O.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},y=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return i=e.sent,e.abrupt("return",o({url:O.get()+"".concat(null==f?void 0:f.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:w({},n),params:w({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),_=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:O.get()+"".concat(null==f?void 0:f.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},b=function(e){var n=e.videoId;return o({method:"GET",url:O.get()+"".concat(null==f?void 0:f.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},O=(E=null==f?void 0:f.apiBaseUrl,{set:function(e){e&&(E=e)},get:function(){return E}}),F=function(e,n,t,i){return o({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},D=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},R=null;function S(){return{set:function(e){e&&(R=e)},get:function(){return R}}}var P,L,A,W,V,C,N=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=S().get(),i=O.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});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)}}(),B=null,U=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!D(n)){e.next=6;break}return B||(B=N().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&S().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){B=null})),e.abrupt("return",B);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),j=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},M=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},k=function(e){L=e},x=function(){return L},H=function(e){P=e},G=function(){return P},Y=function(){return A},z=function(e){A=e},q=function(){return V},X=function(e){W=new Map,e.map(function(e,n){W.set(e.id,n)})},J=function(e){if(W){var n=W.get(e);z(n+1)}},K=(C=0,{set:function(e){e>=0&&(C=e)},get:function(){return C}});function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Z(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var $=0,ee=function(){var e,n,t,i,o,r,a,l=x();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===t||null===(i=t.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)||(null==l?void 0:l.id)};function ne(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function te(){var e=window.sessionStorage.getItem("uid");return e||(e=ne(),window.sessionStorage.setItem("uid",e),e)}function ie(){return oe.apply(this,arguments)}function oe(){return(oe=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.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)}function re(e){return e?String(e):""}window.initialise=function(e){window.sid=ne(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,m(r?"FAILED_TO_START":"DROPPED_STREAM",Z({pfm:window.platform,uid:te(),vid:ee(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),m("PLAY",Z({pfm:window.platform,uid:te(),vid:ee(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":ee(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&$<4)$++,m("BUFFERING",Z({pfm:window.platform,uid:te(),vid:ee(),videoPosition:n.el_&&Math.floor(n.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:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,m("FIRST_FRAME",Z({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:te(),vid:ee()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.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 n,t,i,o,r,a;m("AD_REQUEST",Z({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:te(),vid:ee(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.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}),m("AD_IMPRESSION",Z({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ee()},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 n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&($=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,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 n=e.currentTime(),t=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(ae(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var ae=function(e,n,t){return e>=n&&e<=t};function le(e,n,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var i=r(e);window.initialise(i,n),window.firstFrame(i,n),null!=t&&t.playFromBegining&&function(e){fireEvent({eventName:"START_FROM_BEGINNING",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0})}(i),null!=t&&t.playLive&&function(e){fireEvent({eventName:"WATCH_LIVE",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0})}(i),i.on("loadedmetadata",function(){window.endFirstFrame(i)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,a,l,d,u,s,c,v,m,p,w,I,E,g,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return T=e.sent,h=M(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=Z,e.t1=Z,e.t2=Z({aid:y,cid:_,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=te(),e.t5=ee(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?re(n.adPosition):"",e.next=26,ie();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,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:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(w=p.beacon)||void 0===w?void 0:w.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(E=I.customData)||void 0===E||null===(g=E.beacon)||void 0===g?void 0:g.url)||O.get()+f.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var de=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.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"},ue=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},se=function(e,n){var t=new Map;b({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),V=t}).catch(function(e){return console.log(e)})},ce=function(){var e=K.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=G(),o=x(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=K.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return l>=0?l+1:1};function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function fe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}window._deviceInfo=l(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},Ee=function(){var n,t,i,o,l,d,u,s,c,v,m,f,p,w,I,E,g,T,h,y,_,b,O=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",F=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,R=(null==D?void 0:D.siteName)||"",S=(null==D?void 0:D.contentType)||"video",P=(null==D||null===(n=D[S])||void 0===n?void 0:n.metadata)||(null==D||null===(t=D[S])||void 0===t||null===(i=t.gist)||void 0===i?void 0:i.metadata),L=r(F);if(!O.includes("VIEWLIFT_"))return O;var A,W=window.getComputedStyle(document.getElementById(F),null),V=Math.trunc(W.getPropertyValue("height").slice(0,-2)),C=Math.trunc(W.getPropertyValue("width").slice(0,-2)),N="linearchannel"===S?null==D||null===(o=D.linearchannel)||void 0===o||null===(l=o.channels)||void 0===l||null===(d=l.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:Ie(D,"video.gist.id",""),B="linearchannel"===S?null==D||null===(s=D.linearchannel)||void 0===s||null===(c=s.channels)||void 0===c||null===(v=c.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===v?void 0:v.title:Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,j=null;"function"==typeof window.__gpp&&(null===(A=window)||void 0===A||A.__gpp("ping",function(e){U=null==e?void 0:e.gppString,j=null==e?void 0:e.sectionList[0]}));var M=fe(fe({},ge(P)),{},(y={VIEWLIFT_WIDTH:C,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:pe(C,V),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===(m=window)||void 0===m?void 0:m.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==L||null===(f=L.options_)||void 0===f?void 0:f.autoplay)||1,VIEWLIFT_MUTE:(null==L||null===(p=L.options_)||void 0===p?void 0:p.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==R||"usanetwork"==R?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(D),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(w=window)||void 0===w||null===(I=w.app_data)||void 0===I||null===(E=I.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==R||"usanetwork"==R?"":Ie(null===(g=window)||void 0===g||null===(T=g.app_data)||void 0===T||null===(h=T.site)||void 0===h?void 0:h.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:B,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(D),VIEWLIFT_GPP_SID:j||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(y,"VIEWLIFT_LAT",""),e(y,"VIEWLIFT_APP_BUNDLE",""),e(y,"VIEWLIFT_ATT_CONSENT",""),y),null===(_=window)||void 0===_||null===(b=_.customData)||void 0===b?void 0:b.macros);for(var k in M){var x=new RegExp(k,"g");O=O.replace(x,M[k])}return O},ge=function(e){var n,t,i,o,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(ue()?u?l=fe(fe({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=fe(fe({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=fe(fe({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=fe(fe({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=fe(fe({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):s&&(l=fe(fe({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),l=ue()?fe(fe({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):fe(fe({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=fe(fe({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),l=ue()?fe(fe({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):fe(fe({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l=fe(fe({},l),{},{VIEWLIFT_AFID:d.get("afid")})},Te=function(e,n){var t,i,o,r,a,l,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(i=e[p])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,g=(null==e||null===(l=e[p])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.videoAssets)||void 0===f?void 0:f.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 ye(E);if(w){var h=_e(I,n);return h.src=Ee(h.src,n,e),h}if("Safari"!==de()&&T)return he(I);if(g){var y=ye(I);return y.src=Ee(y.src,n,e),y}if(null!=I&&I.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return _.src=Ee(_.src,n,e),_}return null},he=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},_e=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,o=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,d=de();if(r(n),"Safari"===d){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,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,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(o);return be(n),u}var s,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(be(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var be=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==de()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Oe=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Fe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}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(n),o.appendChild(r),i.append(o)}}},De=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Re=!1,Se=function(e,n,t){var i=Ee(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,a=r(e);if(null!==a.el_){Re=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Re&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!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===(t=window)||void 0===t||null===(i=t.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 Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var Le=function(e){i(e).play()},Ae=function(e){i(e).pause()},We=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ve=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Ce=function(e){return!!i.getPlayer("".concat(e))},Ne=function(e){return i(e).paused()},Be=function(){var e=n(t.mark(function e(n,i){var o,a,l,d=arguments;return t.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,U();case 3:return a=e.sent,l=r(n),e.abrupt("return",new Promise(function(e,t){T(i,a).then(function(t){var r=null==t?void 0:t.data;window.sid=ne(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,n);k(r),a&&o?(xe(n,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){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Ue=function(){var e=n(t.mark(function e(n,i,o){var a,l,s,c,v,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return c=e.sent,(G()||null)&&J(i),v=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(s=l.watchHistory)&&void 0!==s&&s.enable&&_(i,c).then(function(e){var n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),v=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){g(i,c).then(function(i){var o,a,l,s,c,f,p,w,I,E,g=null==i?void 0:i.data,T=(null==g||null===(o=g.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;k(i.data);var h=(null==g||null===(l=g.ads)||void 0===l||null===(s=l.preRoll)||void 0===s||null===(c=s.adTags)||void 0===c||null===(f=c.web)||void 0===f?void 0:f.active)&&(null==g||null===(p=g.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(E=I.web)||void 0===E?void 0:E.url);h&&Se(n,h,g);var y=Te(g,n);if(y){var _,b,O,F,D,R,S,P,L,A,W,V,C,N,B=(null==g||null===(_=g.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==g||null===(O=g.video)||void 0===O||null===(F=O.gist)||void 0===F||null===(D=F.imageGist)||void 0===D?void 0:D.r16x9),U=r(n);if(U.poster(B),xe(n,y),U.on("loadstart",function(){T&&e({status:!0,msg:"Video Loaded",response:g})}),U.on("loadeddata",function(){De(),e({status:!0,msg:"Video Loaded",response:g})}),U.one("play",function(){v&&m<95&&setTimeout(function(){U.currentTime(v)},0)}),U.one("error",function(){var e;t({status:!1,msg:(null==U||null===(e=U.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==g||null===(R=g.video)||void 0===R||null===(S=R.contentDetails)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0||(null==g||null===(L=g.video)||void 0===L||null===(A=L.closedCaptions)||void 0===A?void 0:A.length)>0)W=((null==g||null===(V=g.video)||void 0===V||null===(C=V.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==g||null===(N=g.video)||void 0===N?void 0:N.closedCaptions)).filter(function(e){return"VTT"===e.format}),d(n,W);else u(n)}else Fe(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){He(e,n,t,i)})}));case 9:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),je=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Me=function(e){var n=r(e);if(ke(),s(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ke=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()},xe=function(e,n){var t=r(e);t&&t.src(n)},He=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ce(t)&&Fe(t,(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(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ge=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{h as A,se as B,K as C,H as D,je as E,Le as F,Ae as G,Ce as H,Ue as I,Be as J,Me as K,F as L,O as M,j as N,S as O,D as P,v as Q,ue as R,Y as S,Ne as T,z as U,b as V,X as W,J as X,ve as a,G as b,ce as c,de as d,x as e,Te as f,te as g,k as h,De as i,Fe as j,q as k,xe as l,We as m,Ee as n,Ge as o,le as p,Se as q,Ve as r,y as s,Oe as t,M as u,g as v,_ as w,He as x,U as y,T as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{S as n,b as r,e as i}from"./generic-7fb8e9c5.js";import{s as a}from"./autoNextVideo-51072eff.js";import{e as o}from"./icons-c139587c.js";import{p as l,t as u}from"./skin-16f83185.js";import s from"@babel/runtime/helpers/typeof";import c from"video.js";import d from"@babel/runtime/helpers/asyncToGenerator";import p from"@babel/runtime/regenerator";import m from"@babel/runtime/helpers/defineProperty";import v from"@babel/runtime/helpers/slicedToArray";var f,g,h,b,y=[],x=!1,w=function(i,a){var u;if(x=!1,null!=a&&null!==(u=a.series)&&void 0!==u&&u.enable){var s;y=[];var c=r();null==c||c.map(function(t){var n;return(n=y).push.apply(n,e(t.episodes))}),null==a||null===(s=a.series)||void 0===s||s.cb}else{var d,p;y=(null==a||null===(d=a.relatedVideos)||void 0===d?void 0:d.content)||[],null==a||null===(p=a.relatedVideos)||void 0===p||p.cb}var m=t(i);m.on("timeupdate",function(){var e,t;if(!x){var r=Math.floor(m.currentTime()),i=m.duration(),a=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=y)||void 0===t?void 0:t.length)-1?a&&(a.style.visibility="visible"):a&&(a.style.visibility="hidden")}});var v,f=y.filter(function(e,t){return t==n()});if((null==f?void 0:f.length)>0)if(null!==(v=document.getElementsByClassName("next-ep-preview"))&&void 0!==v&&v[0]){var g,h,b,w,A,N,k,j,C,O,T,I;(null===(g=document.getElementsByClassName("next-ep-preview"))||void 0===g?void 0:g[0]).style.visibility="hidden";var B=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],L=null===(b=document.getElementsByClassName("next-ep-img"))||void 0===b?void 0:b[0],S=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],M=null===(A=f[0])||void 0===A?void 0:A.title;(null===(N=M)||void 0===N?void 0:N.length)>60&&(M=M.substr(0,60)+"..."),B.textContent="".concat(M),L.src=(null===(k=f[0])||void 0===k||null===(j=k.gist)||void 0===j||null===(C=j.imageGist)||void 0===C?void 0:C.r16x9)||(null==f||null===(O=f[0])||void 0===O?void 0:O.img)||(null===(T=window)||void 0===T||null===(I=T.customData)||void 0===I?void 0:I.fallbackImage),S.onclick=function(){return E(i)}}else{var P,R,D,$,X,F,U,_,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var G=document.createElement("div");G.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var V=document.createElement("div");V.className="next-ep-close",V.onclick=function(){q.style.visibility="hidden",x=!0},V.appendChild(l(o())),G.append(W),G.append(V);var z=null===(P=f[0])||void 0===P?void 0:P.title,H=document.createElement("img");H.className="next-ep-img",H.src=(null===(R=f[0])||void 0===R||null===(D=R.gist)||void 0===D||null===($=D.imageGist)||void 0===$?void 0:$.r16x9)||(null==f||null===(X=f[0])||void 0===X?void 0:X.img)||(null===(F=window)||void 0===F||null===(U=F.customData)||void 0===U?void 0:U.fallbackImage);var Q=document.createElement("div");Q.className="next-ep-title",(null===(_=z)||void 0===_?void 0:_.length)>60&&(z=z.substr(0,60)+"..."),Q.textContent="".concat(z);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(H),Y.append(Q),Y.onclick=function(){return E(i)},q.append(G),q.append(Y)}},E=function(e,r){var i=t(e),o=Math.floor(i.currentTime());if(Math.floor(i.duration())!=o){i.pause(e);var l=n();a(l,e,y)}};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}f={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},g=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===s(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},h=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},b=function e(t){return"HTML"!==t.nodeName&&"static"===h(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(e){var t,n,r,i,a,o,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=g({},f,e),i=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=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",g(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",function(e){o=i.duration()}),i.on("loadedmetadata",function(e){o=i.duration()}),(a=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,v,f;for(l in u=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=b(a.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=b(a.el()).getBoundingClientRect().left+v,i=Math.floor((s-a.el().offsetLeft)/a.width()*o),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&g(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=h(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),t.style.left=s+"px"},a.on("mousemove",l),a.on("touchmove",l),a.on("pointerdown",function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)}),u=function(e){t.style.left="-1000px"},a.on("mouseout",u),a.on("touchcancel",u),a.on("touchend",u),i.on("userinactive",u)});var k="my-player";function j(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 C(){return(C=d(p.mark(function e(t){var n,r,i,a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=v(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,d=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function O(e,t){return T.apply(this,arguments)}function T(){return(T=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",j(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function I(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=t(k);if(i&&a){var o=i.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*a.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return C.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function B(e){return L.apply(this,arguments)}function L(){return(L=d(p.mark(function e(t){var n,r,i,a;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=N(N({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},m(u,"left","-60px"),m(u,"border","1px solid transparent"),m(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",u(function(e){return I(e,n,r)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",u(function(e){return I(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var S=function(){var e=d(p.mark(function e(t,n){var r,i,a,o,l,u,s,c;return p.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:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function M(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return R.apply(this,arguments)}function R(){return(R=d(p.mark(function e(n,r){var a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,P,R,X,F,U,_,q,G,W,V,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,me,ve;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,a=t(r),o=n.split("/"),l=o.findIndex(function(e){return"dash"===e.toLowerCase()}),u=M(-1!==l?o.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==a?void 0:a.duration())||(null===(s=i())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(T=j.getElementsByTagName("S"),I=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],S=L.getElementsByTagName("EssentialProperty")[0],P=S.getAttribute("value"),R=null==P?void 0:P.split("x"),X=v(R,2),F=X[0],U=X[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),q=(_?B/_:B)/(F*U),G=L.getAttribute("id"),W=Math.round(b/q),V=Math.ceil(W/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(V))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<V;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:q,layout:P,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",G)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),ae=N.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/oe),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=D(ce),w=0;w<se;w++)ve=me?$(me,w+de):ce,pe.push({duration:oe,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function D(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function $(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function X(e){return F.apply(this,arguments)}function F(){return(F=d(p.mark(function e(n){var r,i,a,o,l,u,s,c,d,m,v,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(a=i.player)||void 0===a?void 0:a.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,O(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return m=(null==d?void 0:d[0])||null,v=m.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,S(f,v);case 12:return g=e.sent,e.next=15,B(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,P(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,B(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function U(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",a.append(o),r.el().appendChild(a),r.on("useractive",function(){a.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||a.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}}export{w as a,U as b,X as i};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{S as n,b as r,e as i}from"./generic-e4833832.js";import{s as a}from"./autoNextVideo-0cba47e8.js";import{e as o}from"./icons-c139587c.js";import{p as l,t as u}from"./skin-16f83185.js";import s from"@babel/runtime/helpers/typeof";import c from"video.js";import d from"@babel/runtime/helpers/asyncToGenerator";import p from"@babel/runtime/regenerator";import m from"@babel/runtime/helpers/defineProperty";import v from"@babel/runtime/helpers/slicedToArray";var f,g,h,b,y=[],x=!1,w=function(i,a){var u;if(x=!1,null!=a&&null!==(u=a.series)&&void 0!==u&&u.enable){var s;y=[];var c=r();null==c||c.map(function(t){var n;return(n=y).push.apply(n,e(t.episodes))}),null==a||null===(s=a.series)||void 0===s||s.cb}else{var d,p;y=(null==a||null===(d=a.relatedVideos)||void 0===d?void 0:d.content)||[],null==a||null===(p=a.relatedVideos)||void 0===p||p.cb}var m=t(i);m.on("timeupdate",function(){var e,t;if(!x){var r=Math.floor(m.currentTime()),i=m.duration(),a=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=y)||void 0===t?void 0:t.length)-1?a&&(a.style.visibility="visible"):a&&(a.style.visibility="hidden")}});var v,f=y.filter(function(e,t){return t==n()});if((null==f?void 0:f.length)>0)if(null!==(v=document.getElementsByClassName("next-ep-preview"))&&void 0!==v&&v[0]){var g,h,b,w,A,N,k,j,C,O,T,I;(null===(g=document.getElementsByClassName("next-ep-preview"))||void 0===g?void 0:g[0]).style.visibility="hidden";var B=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],L=null===(b=document.getElementsByClassName("next-ep-img"))||void 0===b?void 0:b[0],S=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],M=null===(A=f[0])||void 0===A?void 0:A.title;(null===(N=M)||void 0===N?void 0:N.length)>60&&(M=M.substr(0,60)+"..."),B.textContent="".concat(M),L.src=(null===(k=f[0])||void 0===k||null===(j=k.gist)||void 0===j||null===(C=j.imageGist)||void 0===C?void 0:C.r16x9)||(null==f||null===(O=f[0])||void 0===O?void 0:O.img)||(null===(T=window)||void 0===T||null===(I=T.customData)||void 0===I?void 0:I.fallbackImage),S.onclick=function(){return E(i)}}else{var P,R,D,$,X,F,U,_,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var G=document.createElement("div");G.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var V=document.createElement("div");V.className="next-ep-close",V.onclick=function(){q.style.visibility="hidden",x=!0},V.appendChild(l(o())),G.append(W),G.append(V);var z=null===(P=f[0])||void 0===P?void 0:P.title,H=document.createElement("img");H.className="next-ep-img",H.src=(null===(R=f[0])||void 0===R||null===(D=R.gist)||void 0===D||null===($=D.imageGist)||void 0===$?void 0:$.r16x9)||(null==f||null===(X=f[0])||void 0===X?void 0:X.img)||(null===(F=window)||void 0===F||null===(U=F.customData)||void 0===U?void 0:U.fallbackImage);var Q=document.createElement("div");Q.className="next-ep-title",(null===(_=z)||void 0===_?void 0:_.length)>60&&(z=z.substr(0,60)+"..."),Q.textContent="".concat(z);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(H),Y.append(Q),Y.onclick=function(){return E(i)},q.append(G),q.append(Y)}},E=function(e,r){var i=t(e),o=Math.floor(i.currentTime());if(Math.floor(i.duration())!=o){i.pause(e);var l=n();a(l,e,y)}};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}f={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},g=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===s(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},h=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},b=function e(t){return"HTML"!==t.nodeName&&"static"===h(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(e){var t,n,r,i,a,o,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=g({},f,e),i=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=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",g(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",function(e){o=i.duration()}),i.on("loadedmetadata",function(e){o=i.duration()}),(a=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,v,f;for(l in u=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=b(a.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=b(a.el()).getBoundingClientRect().left+v,i=Math.floor((s-a.el().offsetLeft)/a.width()*o),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&g(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=h(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),t.style.left=s+"px"},a.on("mousemove",l),a.on("touchmove",l),a.on("pointerdown",function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)}),u=function(e){t.style.left="-1000px"},a.on("mouseout",u),a.on("touchcancel",u),a.on("touchend",u),i.on("userinactive",u)});var k="my-player";function j(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 C(){return(C=d(p.mark(function e(t){var n,r,i,a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=v(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,d=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function O(e,t){return T.apply(this,arguments)}function T(){return(T=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",j(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function I(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=t(k);if(i&&a){var o=i.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*a.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return C.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function B(e){return L.apply(this,arguments)}function L(){return(L=d(p.mark(function e(t){var n,r,i,a;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=N(N({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},m(u,"left","-60px"),m(u,"border","1px solid transparent"),m(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",u(function(e){return I(e,n,r)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",u(function(e){return I(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var S=function(){var e=d(p.mark(function e(t,n){var r,i,a,o,l,u,s,c;return p.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:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function M(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return R.apply(this,arguments)}function R(){return(R=d(p.mark(function e(n,r){var a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,P,R,X,F,U,_,q,G,W,V,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,me,ve;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,a=t(r),o=n.split("/"),l=o.findIndex(function(e){return"dash"===e.toLowerCase()}),u=M(-1!==l?o.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==a?void 0:a.duration())||(null===(s=i())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(T=j.getElementsByTagName("S"),I=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],S=L.getElementsByTagName("EssentialProperty")[0],P=S.getAttribute("value"),R=null==P?void 0:P.split("x"),X=v(R,2),F=X[0],U=X[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),q=(_?B/_:B)/(F*U),G=L.getAttribute("id"),W=Math.round(b/q),V=Math.ceil(W/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(V))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<V;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:q,layout:P,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",G)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),ae=N.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/oe),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=D(ce),w=0;w<se;w++)ve=me?$(me,w+de):ce,pe.push({duration:oe,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function D(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function $(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function X(e){return F.apply(this,arguments)}function F(){return(F=d(p.mark(function e(n){var r,i,a,o,l,u,s,c,d,m,v,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(a=i.player)||void 0===a?void 0:a.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,O(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return m=(null==d?void 0:d[0])||null,v=m.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,S(f,v);case 12:return g=e.sent,e.next=15,B(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,P(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,B(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function U(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",a.append(o),r.el().appendChild(a),r.on("useractive",function(){a.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||a.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}}export{w as a,U as b,X as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./player_instance-34118a5b.js";import{w as n,s as t}from"./icons-c139587c.js";function o(o,l){var u=l.dvrConfig,s=l.videoId,d=(l.userId,(null==u?void 0:u.buttonConfig)||{}),v=d.watchLive,b=d.resume,f=d.startFromBegining,m=(null==u?void 0:u.programs)||[],g=e(o),h=(null==u?void 0:u.playLive)||!1,k=(null==u?void 0:u.playFromBegining)||!1,p=document.createElement("div");p.className="vjs-dvr-btn-overlay",h||k||g.el().appendChild(p),g.on("loadeddata",function(){if(k)!function(e){e.one("canplay",function(){e.seekable()&&(e.currentTime(e.seekable().start(0)),e.play())})}(g);else if(h)!function(e){e.one("canplay",function(){e.seekable()&&(e.currentTime(e.seekable().end(0)),e.play())})}(g);else{g.bigPlayButton.hide(),g.controlBar.hide();var e=!!i(s);p.innerHTML=function(e,o){var a=(null==e?void 0:e.buttonConfig)||{},i=a.watchLive,r=a.resume,c=a.startFromBegining,l='<button id="watch-live-btn">'.concat(n()," ").concat((null==i?void 0:i.text)||"Watch Live","</button>"),u='<button id="resume-btn">'.concat(n()," ").concat((null==r?void 0:r.text)||"Resume","</button>"),s='<button id="watch-begining-btn">\n '.concat(t()," ").concat((null==c?void 0:c.text)||"Start From Begining","\n </button>"),d=o?u:l;return'<div class="dvr-button">'.concat(d," ").concat(s,"</div>")}(u,e),a("watch-live-btn",v,function(){g&&g.seekable()&&g.currentTime(g.seekable().end(0)),r(g,p),null==v||v.cb()}),a("resume-btn",b,function(){if(g&&g.seekable()){var e=i(s),n=Math.min(e,g.seekable().end(0));g.currentTime(n)}r(g,p),null==b||b.cb()}),a("watch-begining-btn",f,function(){var e=g.seekable();if(e&&e.length>0){var n=c(m,e);g.currentTime(n)}r(g,p),null==f||f.cb()})}}),function(e,n){var t=e.currentTime(),o=!1;e.on("seeking",function(){o=!0}),e.on("seeked",function(){o=!1,t=e.currentTime()}),e.on("timeupdate",function(){if(!o){var a=e.currentTime();if(a-t>=30&&(!function(e,n,t){sessionStorage.setItem("lastWatchedPosition-".concat(e),t.toFixed(2))}(n,0,a),t=a),e.liveTracker){var i=e.liveTracker.atLiveEdge(),r=e.controlBar.getChild("SeekToLive");i?null==r||r.show():null==r||r.hide()}}})}(g,s)}function a(e,n,t){var o,a,i=document.getElementById(e);i&&(a=n,(o=i)&&(o.style.color="".concat((null==a?void 0:a.textColor)||"#000"),o.style.backgroundColor="".concat((null==a?void 0:a.backGroundColor)||"#DCF95B")),i.addEventListener("click",t))}function i(e,n){return sessionStorage.getItem("lastWatchedPosition-".concat(e))||0}function r(e,n){e.play(),e.bigPlayButton.show(),e.controlBar.show(),n.style.display="none"}function c(e,n){var t=new Date,o=e.find(function(e){var n=new Date(e.startDate),o=new Date(e.endDate);return t>=n&&t<o}),a=n.start(0),i=a;if(null!=o&&o.startDate){var r=n.end(n.length-1)-a;i=a+(new Date(o.startDate).getTime()-new Date(t-1e3*r).getTime())/1e3}return i}export{o as a,c as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{d as e,g as n,a as t,b as o,c as r,e as i,s as l,f as a,l as s,h as u,i as c,j as d,k as v,m as f,r as p,n as m,o as y,p as g,q as h,t as b,u as w,v as k,w as S,x as O,y as I,z as j,A as T,B as E,C as P,D,E as A,F as x,G as C,H as L,I as R,J as N,K as M,L as _,M as U,N as V,O as B,P as H,Q as F}from"./generic-e4833832.js";import Q from"@babel/runtime/helpers/defineProperty";import G from"@babel/runtime/helpers/asyncToGenerator";import K from"@babel/runtime/regenerator";import q from"video.js";import{o as z,g as J,a as W,s as X,b as Y,p as $}from"./util-9649ae40.js";import{g as Z,d as ee,a as ne,e as te}from"./captions-b619441b.js";import{g as oe,p as re}from"./resolution-62be852a.js";import{t as ie,i as le,a as ae}from"./skin-16f83185.js";import{g as se}from"./player_instance-34118a5b.js";import{s as ue}from"./localisation-0bf399a1.js";import ce from"@babel/runtime/helpers/typeof";import de from"@babel/runtime/helpers/toConsumableArray";import ve from"@babel/runtime/helpers/slicedToArray";import{a as fe}from"./index-7dec4239.js";var pe=function(e){return new Promise(function(n,t){if(me(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},me=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ye=function(e,n,t){var o=se(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ge=function(e){var n=se(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},he=function(){var n=G(K.mark(function n(t){var o,r,i,l,a;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(r=se(null==t?void 0:t.playerId),null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||null==t||!t.chromecastReceiverId){n.next=22;break}return n.next=4,import("@silvermine/videojs-chromecast");case 4:return l=n.sent,n.prev=5,n.next=8,pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:n.next=13;break;case 10:n.prev=10,n.t0=n.catch(5),console.log("Error",n.t0);case 13:return n.prev=13,l.default(q),n.finish(13);case 16:(a=q.getTech("chromecast"))&&!a.prototype.seeking&&(a.prototype.seeking=function(){}),null!==(i=window)&&void 0!==i&&i.cast?null==r||r.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=t&&t.airplay&&"Safari"==e()?null==r||r.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return n.stop()}},n,null,[[5,10,13,16]])}));return function(e){return n.apply(this,arguments)}}(),be=function(e,n){var t=se(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=q.dom.getPointerPosition(a,n).x;q.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var we=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ke=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){q.getPlugin("eme")||q.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=G(K.mark(function e(){var n;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(q),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Ie=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-6c1ba1fe.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),je=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(q)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(q)})},loadAdsLibrary:we,loadEMELibrary:ke,loadMuxPlugin:Se,loadDvrSeekbar:Oe,loadContribDash:Ie});function Te(e){return Ee.apply(this,arguments)}function Ee(){return(Ee=G(K.mark(function n(t){var o;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=(null==t?void 0:t.airplay)||!1,n.next=3,we();case 3:o&&"Safari"==e()&&Promise.resolve().then(function(){return je}).then(function(e){e.importAirplay()});case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Pe(e,n){return De.apply(this,arguments)}function De(){return(De=G(K.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return c=(null==o?void 0:o.contentType)||"video",d=null==o||null===(r=o[c])||void 0===r?void 0:r.drmEnabled,null==o||null===(i=o[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==t||t.showPositiveSeekbar,v=(null==o||null===(a=o[c])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,n.prev=5,n.next=8,Promise.allSettled([d?"Safari"==e()?ke():"caliente"!=(null===(f=window)||void 0===f?void 0:f.siteName)?Ie():ke():"Safari"!=e()&&v?Ie():null,he(t)]);case 8:n.next=13;break;case 10:n.prev=10,n.t0=n.catch(5),console.log("Error",n.t0);case 13:case"end":return n.stop()}},n,null,[[5,10]])}))).apply(this,arguments)}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ae(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ce=new Set,Le=null,Re=function(e,t,r){var i,l,a,s,u,c,d,v={},f=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(i=e[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=He(e),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==e||!e.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===n()?"NULL":n(),v["c3.cm.categoryType"]=Ue(e),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=e[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=e[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ve(e),v["c3.cm.genreList"]=Me(e),v["c3.cm.genre"]=Ne(e),v["c3.cm.channel"]=_e(e);var p=Ge(o(),e);return v=xe(xe({},v),p)},Ne=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Me=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},_e=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Ue=function(e){return(null==e?void 0:e.contentType)||"null"},Ve=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Be=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},He=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Fe,Qe,Ge=function(e,n){var o,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var c=r(),d=t();return u["c3.cm.seriesName"]=(null==n||null===(o=n.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ke=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},qe=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ze=function(){var e=G(K.mark(function e(n,t){var o,r,l,a,s,u,c,d,v,f;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},r=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=se(n),"function"==typeof(v=r)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ke(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Le&&Le!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Ce.clear(),Le=d.currentSrc();var o=qe(d.currentType()),r=i(),s=Re(r,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Be(r,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",Je.setData(s),v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){Ce.has(d.currentSrc())||(Ce.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Ce.has(d.currentSrc())&&Ce.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==Ce||Ce.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Je=(Fe={},{setData:function(e){Fe=xe(xe({},Fe),e)},getData:function(){return Fe}}),We=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-f2cb9f9e.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-6520acf0.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-c51a3958.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-3fa3b400.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-1d3bf1bb.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-e55951c5.js").then(function(t){t.initialiseSkin(e,n)})};function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Xe(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var $e=[],Ze=0,en=null;function nn(e,n,t){var o,r,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),r=tn(o),l=(new Date).getTime(),a=i(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return Ye(Ye({},e),{},Q({},n,s[n]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Qe});c<0?r.push(Ye(Ye({content:u},e),{},{addedDate:l,updateDate:l})):r[c]=Ye(Ye(Ye({},r[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(r))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=Ye(Ye({videoId:Qe,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},en&&{seriesId:en}),p&&{originalObjectId:p}),l(h).then(function(e){}).catch(function(e){})),Ze=v+t}function tn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function on(e,n,t){var o=tn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var rn=!1,ln=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!rn){var i=an(e,"videoAssets","secondaryVideoAssets"),l=a(i,n);return l&&s(n,l),rn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function an(e,n,t){if(Array.isArray(e))return e.map(function(e){return an(e,n,t)});if(null!==e&&"object"===ce(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=an(e[r],n,t)}),o}return e}function sn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return un(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?un(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function un(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function dn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cn(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var vn=function(n,t,o,r){var l,a,s,f,p=r.res,m=r.sres,y=se(n),g=(null==p?void 0:p.contentType)||"video",h=(null==p?void 0:p[g].drmEnabled)||!1,b=(null==p||null===(l=p[g])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,w=(null==p||null===(s=p[g])||void 0===s||null===(f=s.liveDetails)||void 0===f?void 0:f.isDvrEnabled)||!1;u(p),y&&(y.on("loadstart",function(){b?o.resolve({status:!0,msg:"Video Loaded",response:p}):o.resolve(dn({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:p}:{response:p}))}),y.on("loadeddata",function(){var o,r,l,a=Z(n);if(null==a||a.map(function(e){return ee(n,e.id)}),w&&"Safari"===e())try{var s;null==y||null===(s=y.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&ye(n,sessionStorage.getItem("volume")||"100");var u=i();if(c(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var d,v,f=dn(dn({},t),p);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(en=null==n||null===(r=n.series)||void 0===r?void 0:r.id),$e=[],Ze=0,Qe=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=se(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());$e.includes(Ze)||(e==Ze?($e.push(e),nn(a,n,l)):e>Ze&&(Ze=e+l))}}),a.one("ended",function(){nn(a,n,l,!0)}))}(n,f,null==u||null===(d=u.video)||void 0===d||null===(v=d.gist)||void 0===v?void 0:v.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=y&&y.mux){var m,g,h,b,k,S,O=(null===(m=i())||void 0===m?void 0:m.video)||(null==p?void 0:p.video),I=null==O?void 0:O.gist,j={env_key:null==t||null===(g=t.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==O||null===(b=O.series)||void 0===b?void 0:b.title,video_stream_type:null!=O&&null!==(k=O.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==t||null===(S=t.analytics)||void 0===S?void 0:S.userId};y.mux({debug:!1,data:j})}}),y.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];y.trigger("subtitlechanged",n)}),y.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){b&&ln(p,n)}),y.on("error",function(){var e,t;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&b)?ln(p,n):(d(n,(null==y||null===(e=y.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==y||null===(t=y.error())||void 0===t?void 0:t.message)||"Some error occured",response:p}))}),y.one("play",function(){var e,n,o,r,l;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=i())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,d=v(),f=(null==d?void 0:d.get(c))||{t:0,p:0},p=f.t,m=f.p;p&&m<95&&setTimeout(function(){y.currentTime(p)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){y.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(b){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var n,t=(null==y||null===(n=y.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ce(y.dash)){var o,r,i,l=null==y||null===(o=y.dash)||void 0===o||null===(r=o.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),s=sn(t);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){s.e(e)}finally{s.f()}}else{var c,d=sn(t);try{for(d.s();!(c=d.n()).done;){var v,f,p,m=c.value;if(("Chrome"==e()||"Edge"==e()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!h))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1"))y.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function fn(e,n){var t,o,r,i=se(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,v,m,y;if(mn.enabled&&"input"!=t.target.localName){var g=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==a||a.focus()),g){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||p(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(v=d.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||f(e,10)}}},!0)}var pn,mn=(pn=!0,{enable:function(){pn=!0},disable:function(){pn=!1},get enabled(){return pn}}),yn="ssai-breakStart",gn="ssai-adImpression",hn="ssai-firstQuartile",bn="ssai-midpoint",wn="ssai-thirdQuartile",kn="ssai-complete",Sn="ssai-breakEnd",On={breakStart:yn,impression:gn,firstQuartile:hn,midpoint:bn,thirdQuartile:wn,complete:kn,breakEnd:Sn};function In(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=se(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=On[o];r&&t.trigger(r,n)}function jn(e){var n=se(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(yn,e)},adImpression:function(e){return t(gn,e)},adFirstQuartile:function(e){return t(hn,e)},adMidpoint:function(e){return t(bn,e)},adThirdQuartile:function(e){return t(wn,e)},adComplete:function(e){return t(kn,e)},adBreakEnd:function(e){return t(Sn,e)}}}function Tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function En(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tn(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Pn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Dn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Dn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var An,xn,Cn=(An="",{set:function(e){e&&(An=e)},get:function(){return An}}),Ln=(xn=null,{set:function(e){xn=e},get position(){return xn}});function Rn(e,n){return Nn.apply(this,arguments)}function Nn(){return Nn=G(K.mark(function e(n,t){var o,r,i,l,s,u,c,d,v,f,p,y,g,h;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return se(n),o=a(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=m(i,n,t),l=Mn(i),s=ve(l,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=ve(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:En({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,p=v.trackingUrl,y=v.manifestUrl,g=f+p,h=f+y,Cn.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),o.src=h,e.abrupt("return",o);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",o);case 29:case"end":return e.stop()}},e,null,[[8,26]])})),Nn.apply(this,arguments)}function Mn(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=Pn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ve(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ve(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}var _n,Un=(_n=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),_n=Array.isArray(e)?de(e):_n},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",_n),de(_n)}});function Vn(e,n){return Bn.apply(this,arguments)}function Bn(){return Bn=G(K.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v,p,m,y,g,h,b,w;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=se(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=Pn(o);try{var c=function(){var o,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,w=f,k=(null===(o=window)||void 0===o||null===(u=o.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),O=h.get("pod-".concat(i))||[];if(console.warn(e,g,"map:",v,"condition1:",e>=g,"map:",h),e>=g&&!O.includes(S)){O.push(S),h.set("pod-".concat(i),O);try{b(v,t,w,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,t)}if("breakEnd"==v){var I=Ln.position;Ln.set(null),setTimeout(function(){null!=I&&(a.currentTime(I),l())},500)}if("function"==typeof k)try{var j,T={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==t||null===(j=t.ads)||void 0===j?void 0:j[r],adIndex:r};k({adsData:T}),In(n,T)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},b=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},g=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ln.set(t),a=Cn.get(),(s=se(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,v=(null===(o=document)||void 0===o||null===(r=o.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])||null,p=(null==s||null===(i=s.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,m=(null==s||null===(l=s.controlBar)||void 0===l?void 0:l.getChild("seriesV2"))||null,y=function(){var e=G(K.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,O,I,j,T,E,P,D;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return j=function(e){document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",j),0===e.button&&S()},I=function(e){},O=function(){var e,n=h.currentTime(),t=null,o=Pn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,u.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},S=function(){var e,n=h.currentTime(),t=null,o=Pn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!u.has(i)||n>=i&&n<=s)&&(t=i,u.set(i,!0),c.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},i=!1,e.next=7,fetch(o);case 7:return l=e.sent,e.next=10,l.json();case 10:a=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",a),s=a.avails,y=[],h=se(n),b=h.controlBar.progressControl,k=b.seekBar.el(),s.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(i=!0),y.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!i&&t&&(h.currentTime(t),O()),null!=y&&y.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",y),window.adsQueueList=y),console.log(y,"data"),y.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=h.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",k.appendChild(i)}}),h.on("timeupdate",ie(function(){var e=h.currentTime();if(e!==d){d=e;for(var n=!1,t=function(){var t=y[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),mn.disable(),v&&v.classList.add("vjs-hidden"),p&&(p.el().style.pointerEvents="none",p.el().classList.add("vjs-hidden")),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),b.el().style.visibility="hidden";for(var s=e-r,d=0,f=0,h=0;h<l.length;h++){var k,S=null==l||null===(k=l[h])||void 0===k?void 0:k.durationInSeconds;if(s<d+S){f=h;break}d+=S}l[f];var I=Math.max(0,i-s),j=Math.round(I);T.style.display="block",D.textContent="".concat(f+1," of ").concat(l.length," • ").concat(g(j));var E=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});E.push.apply(E,de(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,E,f,o,O),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(T.style.display="none",b.el().style.visibility="visible",p&&(p.el().style.pointerEvents="auto",p.el().classList.remove("vjs-hidden")),m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),v&&v.classList.remove("vjs-hidden"),mn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){mn.enabled&&"ArrowRight"==e.key&&(S(),f(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",j))}),(T=document.createElement("div")).className="ssai-ad-container",(E=document.createElement("div")).className="sponsored-adbox",(P=document.createElement("div")).className="sponsored-text",P.textContent="Sponsored Ad",E.append(P),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",T.append(E),T.append(D),h.el().appendChild(T);case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),h=new Map;case 16:case"end":return e.stop()}},e)})),Bn.apply(this,arguments)}function Hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Fn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Hn(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Qn=function(n,t,o,r){var i,l,u,c,v,f,p,m,w,k,S,O,I,j,T,E,P,D,A,x,C,L,R,N,M,_,U,V,B,H,F,z,J,W,X,Y,$,Z,ee=t.res,te=void 0===ee?null:ee,oe=t.sres,re=void 0===oe?null:oe,ie=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(i=te)||void 0===i?void 0:i.contentType)||"video",ue=le(null===(l=te)||void 0===l||null===(u=l[ae])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl)||le(null===(v=te)||void 0===v||null===(f=v[ae])||void 0===f||null===(p=f.gist)||void 0===p||null===(m=p.imageGist)||void 0===m?void 0:m.r16x9),ce=(null===(w=te)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=(null===(O=te)||void 0===O||null===(I=O[ae])||void 0===I||null===(j=I.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ve=(null===(T=te)||void 0===T||null===(E=T.ads)||void 0===E||null===(P=E.preRoll)||void 0===P||null===(D=P.adTags)||void 0===D||null===(A=D.web)||void 0===A?void 0:A.active)&&(null===(x=te)||void 0===x||null===(C=x.ads)||void 0===C||null===(L=C.preRoll)||void 0===L||null===(R=L.adTags)||void 0===R||null===(N=R.web)||void 0===N?void 0:N.url),pe=(null===(M=te=Fn(Fn({},te),{},{audioAssetSource:null==o?void 0:o.audioAssetSource}))||void 0===M||null===(_=M[ae])||void 0===_?void 0:_.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(U=window)||void 0===U||null===(V=U.app_data)||void 0===V||null===(B=V.appcmsMain)||void 0===B||null===(H=B.adsConfig)||void 0===H?void 0:H.vodAdSticherProvider)||!1,me=(null==o?void 0:o.latency)||6,ye=(null==o?void 0:o.skin_settings)||{},ge=(null==o?void 0:o.dvrConfig)||{enable:!1},he=(Z={enableSmoothSeeking:!0,controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ye?void 0:ye.pictureInPictureToggle)||!1},playbackRates:null!=ye&&ye.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==o.skin,liveui:ce},Q(Z,"autoplay",null==o?void 0:o.autoplay),Q(Z,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!ve),Q(Z,"loop",(null==o?void 0:o.loop)||!1),Q(Z,"audioPosterMode",null==o?void 0:o.audioPosterMode),Q(Z,"html5",Fn(Fn({dash:Fn(Fn(Fn({},!q.browser.IS_SAFARI&&{useTTML:!0}),(null==o?void 0:o.debugConfig)&&(null==o||null===(F=o.debugConfig)||void 0===F?void 0:F.enable)&&{debug:!0,logLevel:null!=o&&null!==(z=o.debugConfig)&&void 0!==z&&z.logLevel?null==o||null===(J=o.debugConfig)||void 0===J?void 0:J.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Fn(Fn({liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==o||null===(W=o.customData)||void 0===W?void 0:W.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(X=null==o?void 0:o.enableLowInitialPlaylist)||void 0===X||X}),debug:!0,nativeTextTracks:"Safari"==e()},0==(null==o||null===(Y=o.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===($=o.customData)||void 0===$?void 0:$.nativeVideoTracks)&&{nativeVideoTracks:!1})),Q(Z,"poster",ue),Q(Z,"techOrder",ie),Q(Z,"chromecast",{requestCustomDataFn:function(e){var t,r,i=se(n),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=I;var j=(null==O?void 0:O.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=j}var T=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=T;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(te,e,l);return Fn(Fn({},a),{},{convivaMetaData:Fn({customerKey:(null==o||null===(t=o.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==o||null===(r=o.convivaConfig)||void 0===r?void 0:r.debug)||!1},Je.getData())})},modifyLoadRequestFn:function(e){var t,o,r,i,l,a=se(n),s=(null==a?void 0:a.currentSource())||{};!(null===(t=te)||void 0===t||null===(o=t[ae])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),Z);if(!q.getPlayers()[n]){q.log.level("debug");var we=q(n,he,function(){var e=G(K.mark(function e(){var t,i,l,u,c,v,f,p,m,w,k,S,O,I,j,T,E,P,D,A,x,C,L;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(we),console.log(q.VERSION),console.log(q.getPlugins()),e.next=5,Pe(o,te);case 5:if(S=null===(t=te)||void 0===t||null===(i=t[ae])||void 0===i||null===(l=i.liveDetails)||void 0===l?void 0:l.startOverTime,de&&r.resolve(Fn({status:!0,msg:"Player Initialised"},re?{seriesResponse:re,response:te}:{response:te})),O={},null!=ge&&ge.enable&&ce&&(O.playFromBegining=ge.playFromBegining,O.playLive=ge.playLive,j=null==o||null===(I=o.epg)||void 0===I?void 0:I.programSubType,"linearchannel"===ae?"LIVE"===(null==j?void 0:j.toUpperCase())&&fe(n,o):fe(n,o)),g(n,null==o?void 0:o.analyticsCb,O),ze(n,o),/Android/i.test(navigator.userAgent)&&(q.options.vhs.overrideNative=!0),ce&&be(n,S),!ve||null!=o&&null!==(u=o.customData)&&void 0!==u&&u.disableAds||h(n,ve,te),T=a(te,n),console.log(T),null!=o&&o.nearestClusterUrl&&(T=b(T,o.nearestClusterUrl)),!pe){e.next=21;break}return e.next=20,Rn(n,te);case 20:T=e.sent;case 21:T?s(n,T):(r.reject({status:!1,msg:"Incompatible / Missing Source",response:te}),d(n,"Incompatible / Missing Source")),((null===(c=te)||void 0===c||null===(v=c[ae])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(m=te)||void 0===m||null===(w=m[ae])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(L=(null===(P=te)||void 0===P||null===(D=P[ae])||void 0===D||null===(A=D.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(x=te)||void 0===x||null===(C=x[ae])||void 0===C?void 0:C.closedCaptions),E=L.filter(function(e){return"VTT"===e.format}),ne(n,E)),null!=o&&o.disableControls?y(n):We(n,Fn(Fn(Fn({},o),he),{},{liveVideo:de,isDvrEnabled:ce,res:te,sres:re})),vn(n,Fn(Fn(Fn({},o),he),{},{liveVideo:de}),r,{res:te,sres:re});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}},Gn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Kn(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var zn,Jn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Wn(e);Qn(r,{res:i},e,{resolve:t,reject:o})},Wn=function(e){var n,t,o,r,i,l,a,s,u=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,d=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,v=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.url)||null,f=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,p=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,y=null==e?void 0:e.token,g=w(y),h=null==g?void 0:g.site;return qn(qn({id:null==Gn?void 0:Gn[h]},!d&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:d,streamingInfo:{videoAssets:qn(qn({},m&&{drmProvider:m}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==u?void 0:u.isDvrEnabled},gist:qn({},f&&{videoImageUrl:f}),contentDetails:qn({},(null==p?void 0:p.length)>0&&{closedCaptions:de(p)})},ads:{preRoll:{adTags:{web:qn(qn({},v&&{active:!0}),v&&{url:v})}}}})};function Xn(e,n){return Yn.apply(this,arguments)}function Yn(){return(Yn=G(K.mark(function e(n,t){var o,r,i,l,a,s;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,I();case 6:s=e.sent,k(i,s).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,u(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=on((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Qn(l,{res:p},n,{resolve:o,reject:r})}else S(i,s).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Qn(l,{res:p},n,{resolve:o,reject:r})});else Qn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $n(e,n){return Zn.apply(this,arguments)}function Zn(){return(Zn=G(K.mark(function e(n,t){var o,r,i,l,a;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,I();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,j(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,Qn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function et(e,n){return nt.apply(this,arguments)}function nt(){return(nt=G(K.mark(function e(n,t){var o,r,i,l,a,s,c;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,I();case 3:l=e.sent,a=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,P.set(parseInt(s)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,s,d=e.data,v=e.data.seasons;D(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.id);E(c,l),k(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,u(e.data),Qn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function tt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ot(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tt(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rt(){return{loadVideoInstantly:A,onTimeUpdate:z,getVideoDuration:J,onVideoEnded:W,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=G(K.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,S,I,j,T,E,P;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!L(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,g=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=g,w=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",w),B().set(null==e?void 0:e.refreshToken),w&&!H(w)){n.next=16;break}return o({status:!1,msg:"".concat(w?"Token is expired !":"Missing Authorization Token"),response:{token:w}}),n.abrupt("return");case 16:zn=JSON.parse(atob(w.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=zn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=zn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=zn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=zn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,I=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(j=null==e?void 0:e.errors)&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,ue(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),U.set(e.apiBaseUrl),null!=e&&e.skin&&!ae(e.skin)||(e.skin="VL_ONE"),n.next=33,Te(e);case 33:I&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then(function(){return F(I)}).catch(function(e){}),(T=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(S)))&&T.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?k(E,w).then(function(n){var r=(null==n?void 0:n.data)||{};Qn(S,{res:ot(ot({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){O(e,S,o,E)}):Qn(S,{res:P},e,{resolve:t,reject:o})):b?Jn(e,{resolve:t,reject:o}):h?et(e,{resolve:t,reject:o}):y?$n(e,{resolve:t,reject:o}):Xn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:oe,skip:f,getPlayer:se,play:x,pause:C,detectBrowser:e,rewind:p,loadVideo:s,seekToTimeStamp:X,isPlayerInitialised:L,load:R,authenticateLC:N,dispose:M,enableCaptions:te,disableCaptions:ee,getCaptions:Z,playSelectedResolution:re,getSource:a,setVolume:ye,getVolume:ge,disableControls:y,setPlaybackSpeed:Y,getEntitlementData:_,adsQueuePointManager:Un,getSsaiEvents:jn,playerEvents:$}}export{rt as V,fn as i,Vn as s};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import"./generic-
|
|
1
|
+
import"video.js/dist/video-js.min.css";import"./generic-e4833832.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-e1f939b0.js";import"./util-9649ae40.js";import"./captions-b619441b.js";import"./resolution-62be852a.js";import"./skin-16f83185.js";import"./localisation-0bf399a1.js";import"./player_instance-34118a5b.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./index-7dec4239.js";import"./icons-c139587c.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{h as n,e as i,i as l}from"./icons-c139587c.js";import{I as c,F as m}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{h as n,e as i,i as l}from"./icons-c139587c.js";import{I as c,F as m}from"./generic-e4833832.js";import{e as d,s as p,g as u}from"./skin-16f83185.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"ua-parser-js";import"./captions-b619441b.js";import"@babel/runtime/helpers/toConsumableArray";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var h=s.getComponent("Component"),f=function(){a(g,h);var f,y,b=(f=g,y=v(),function(){var e,t=o(f);if(y){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return r(this,e)});function g(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(a=b.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.streams=r.streams,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a}return t(g,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(n())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.js").then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=a.classList)&&void 0!==r&&r.contains("hidden")?(d(),a.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"))};var r=document.getElementById(this.playerId);if(r){var o=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);a.style.height="".concat(o,"px"),r.style.overflow="hidden",s.dom.appendContent(t,a),this.addFunctionality(a)}}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),r=s.dom.createEl("div",{className:"stream-selector-head"}),o=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open")};for(var n=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),p=s.dom.createEl("div",{className:"stream-tray"}),v=parseInt(sessionStorage.getItem("selectedStreamIndex")||0),h=function(e){var a,r,o,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});v==e&&(n.classList.add("selected"),n.style.border="2px solid #D2393B"),n.onclick=function(){for(var a=s.dom.$$(".stream"),r=0;r<a.length;r++)a[r].style.border="none",a[r].classList.remove("selected");n.classList.add("selected"),n.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img)||(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o?void 0:o.fallbackImage)),n.append(i),s.dom.appendContent(p,n),s.dom.appendContent(d,p)},f=0;f<this.streams.length;f++)h(f);s.dom.appendContent(r,o),s.dom.appendContent(r,n),s.dom.appendContent(e,r),s.dom.appendContent(e,d),u(this.playerId,e)}}]),g}();export{f as default};
|