@viewlift/player-backup 2.0.137-backup → 2.0.138-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-f2d8baa2.js +1 -0
- package/cjs/bundle.css +23 -73
- package/cjs/caption-settings-4ca6c759.js +1 -0
- package/cjs/captions-dbc83a75.js +1 -0
- package/cjs/currentVideoInfo-b52ab371.js +1 -0
- package/cjs/features-dea68fda.js +1 -0
- package/cjs/generic-c0065ab4.js +1 -0
- package/cjs/helper-c012151a.js +1 -0
- package/cjs/index-25ebdb57.js +1 -0
- package/cjs/index-2c531497.js +1 -0
- package/cjs/index-3f0e537b.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-b35397df.js +1 -0
- package/cjs/multicamv2-ec8c724f.js +1 -0
- package/cjs/nextEpisodeButton-0dc30f83.js +1 -0
- package/cjs/playlist-737b0c7f.js +1 -0
- package/cjs/resolution-f9dcc1b4.js +1 -0
- package/cjs/resolution-v2-e42e0101.js +1 -0
- package/cjs/series-228fd012.js +1 -0
- package/cjs/series-v2-26e3b2a9.js +1 -0
- package/cjs/series-v2-3df981cb.js +1 -0
- package/cjs/settings-icon-a8ec6794.js +1 -0
- package/cjs/skin-2d87911f.js +1 -0
- package/cjs/skin-32f14cc5.js +1 -0
- package/cjs/skin-39e8259d.js +1 -0
- package/cjs/skin-516012d7.js +1 -0
- package/cjs/skin-5d4a732f.js +1 -0
- package/cjs/skin-6f41639e.js +1 -0
- package/cjs/skin-806b17ae.js +1 -0
- package/cjs/skin-d9f02bbe.js +1 -0
- package/cjs/start-begin-btn-01fbab1f.js +1 -0
- package/cjs/util-88690406.js +1 -0
- package/cjs/videoSelector-5d51be25.js +1 -0
- package/cjs/videoSelector-f35a369b.js +1 -0
- package/cjs/videojs-dash5.es-3854764f.js +1 -0
- package/cjs/watch-live-btn-bcfe109f.js +1 -0
- package/esm/autoNextVideo-0db8dd88.js +1 -0
- package/esm/bundle.css +23 -73
- package/esm/caption-settings-34414f59.js +1 -0
- package/esm/{captions-b619441b.js → captions-f507e8ee.js} +1 -1
- package/esm/components/dvr-startover/helper.d.ts +16 -0
- package/esm/components/dvr-startover/index.d.ts +1 -2
- package/esm/components/dvr-startover/marker.d.ts +2 -0
- package/esm/currentVideoInfo-d9beb914.js +1 -0
- package/esm/features-514d5b16.js +1 -0
- package/esm/generic-a55d7135.js +1 -0
- package/esm/helper-10ebf768.js +1 -0
- package/esm/helpers/currentVideoInfo.d.ts +2 -0
- package/esm/index-728e5270.js +1 -0
- package/esm/index-8e3eab6d.js +1 -0
- package/esm/index-a0b6e39c.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-4cf6126c.js +1 -0
- package/esm/multicamv2-8ba6cb5c.js +1 -0
- package/esm/nextEpisodeButton-b1a752cd.js +1 -0
- package/esm/playlist-3b6581e0.js +1 -0
- package/esm/resolution-1c59b0f3.js +1 -0
- package/esm/resolution-v2-9ed4268f.js +1 -0
- package/esm/series-30be507a.js +1 -0
- package/esm/series-v2-18da57cf.js +1 -0
- package/esm/series-v2-b6849ca2.js +1 -0
- package/esm/settings-icon-4708c41d.js +1 -0
- package/esm/skin-18445dd3.js +1 -0
- package/esm/skin-637a78ec.js +1 -0
- package/esm/skin-9eaf1c80.js +1 -0
- package/esm/skin-a4ddcb65.js +1 -0
- package/esm/skin-a6d73985.js +1 -0
- package/esm/skin-d5091b86.js +1 -0
- package/esm/skin-ec431521.js +1 -0
- package/esm/skin-fa3873c5.js +1 -0
- package/esm/start-begin-btn-ae6cc7f1.js +1 -0
- package/esm/util-5a8e886e.js +1 -0
- package/esm/videoSelector-910251cf.js +1 -0
- package/esm/videoSelector-cd7499aa.js +1 -0
- package/esm/videojs-dash5.es-08c7635e.js +1 -0
- package/esm/watch-live-btn-67f7208b.js +1 -0
- package/package.json +1 -1
- package/cjs/autoNextVideo-772aa1e4.js +0 -1
- package/cjs/caption-settings-2d0d80c2.js +0 -1
- package/cjs/captions-bf891620.js +0 -1
- package/cjs/features-fff92547.js +0 -1
- package/cjs/generic-16dcb8e7.js +0 -1
- package/cjs/index-3825262b.js +0 -1
- package/cjs/index-84cce26a.js +0 -1
- package/cjs/index-b3479822.js +0 -1
- package/cjs/multicamv2-783da52d.js +0 -1
- package/cjs/multicamv2-fa881b68.js +0 -1
- package/cjs/nextEpisodeButton-38890c08.js +0 -1
- package/cjs/playlist-b5587b2f.js +0 -1
- package/cjs/resolution-9c4872ec.js +0 -1
- package/cjs/resolution-v2-50cbd77b.js +0 -1
- package/cjs/series-cd8f762b.js +0 -1
- package/cjs/series-v2-670b8f73.js +0 -1
- package/cjs/series-v2-80092887.js +0 -1
- package/cjs/settings-icon-f35e989f.js +0 -1
- package/cjs/skin-0db26a7d.js +0 -1
- package/cjs/skin-17aa0e5d.js +0 -1
- package/cjs/skin-20f0f6c5.js +0 -1
- package/cjs/skin-21c3313e.js +0 -1
- package/cjs/skin-406293b2.js +0 -1
- package/cjs/skin-71b7d779.js +0 -1
- package/cjs/skin-cb63c905.js +0 -1
- package/cjs/skin-f8559cff.js +0 -1
- package/cjs/start-begin-btn-bcb78add.js +0 -1
- package/cjs/util-a3ed1133.js +0 -1
- package/cjs/videoSelector-ee40c7e3.js +0 -1
- package/cjs/videoSelector-fb8c423f.js +0 -1
- package/cjs/videojs-dash5.es-ced4b564.js +0 -1
- package/cjs/watch-live-btn-3e7b1708.js +0 -1
- package/esm/autoNextVideo-3119b978.js +0 -1
- package/esm/caption-settings-850c76a6.js +0 -1
- package/esm/components/markers/index.d.ts +0 -1
- package/esm/components/markers/marker.d.ts +0 -1
- package/esm/features-b7f426dd.js +0 -1
- package/esm/generic-98fe3bd4.js +0 -1
- package/esm/index-5d92eaa3.js +0 -1
- package/esm/index-96a53c44.js +0 -1
- package/esm/index-f26fa7e0.js +0 -1
- package/esm/multicamv2-54ebe614.js +0 -1
- package/esm/multicamv2-62592145.js +0 -1
- package/esm/nextEpisodeButton-97eeb5ee.js +0 -1
- package/esm/playlist-b8fdb344.js +0 -1
- package/esm/resolution-62be852a.js +0 -1
- package/esm/resolution-v2-6446fe47.js +0 -1
- package/esm/series-05b92686.js +0 -1
- package/esm/series-v2-17645dff.js +0 -1
- package/esm/series-v2-f1805d30.js +0 -1
- package/esm/settings-icon-6869ef37.js +0 -1
- package/esm/skin-1d47c799.js +0 -1
- package/esm/skin-5cc720f0.js +0 -1
- package/esm/skin-96ebd5c5.js +0 -1
- package/esm/skin-96feaf2c.js +0 -1
- package/esm/skin-ada59cda.js +0 -1
- package/esm/skin-dfcd9af1.js +0 -1
- package/esm/skin-e56481e1.js +0 -1
- package/esm/skin-eaf97827.js +0 -1
- package/esm/start-begin-btn-0afa2def.js +0 -1
- package/esm/util-28923483.js +0 -1
- package/esm/videoSelector-1ac97464.js +0 -1
- package/esm/videoSelector-7d35bbe5.js +0 -1
- package/esm/videojs-dash5.es-2dcf13b7.js +0 -1
- package/esm/watch-live-btn-85cd433b.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),o=require("./icons-2609dbe4.js"),l=require("./helper-c012151a.js");function c(e){var r=a();return function(){var t,u=i(e);if(r){var o=i(this).constructor;t=Reflect.construct(u,arguments,o)}else t=u.apply(this,arguments);return n(this,t)}}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}require("./currentVideoInfo-b52ab371.js");var s=u.getComponent("Component"),v=function(n){t(a,s);var i=c(a);function a(r,t){var n;return e(this,a),n=i.call(this,r,t),t.userId,t.siteOwner,n.el().innerHTML=o.watchLiveIcon(),n.on("click",(function(){l.playLiveHandler(r)})),n}return r(a,[{key:"createEl",value:function(){return u.dom.createEl("button",{className:"vjs-control vjs-button dvr-watch-live-btn",role:"button",tabIndex:0,title:"Watch Live"})}}]),a}();exports.default=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as n,j as t,k as o}from"./currentVideoInfo-d9beb914.js";import{C as i,P as e}from"./generic-a55d7135.js";import{a as r}from"./util-5a8e886e.js";import{h as s}from"./skin-d5091b86.js";import{g as a}from"./player_instance-34118a5b.js";var c,u=0,f=0,m=function(m){clearTimeout(u);var d=null==m?void 0:m.content;c=null==m?void 0:m.cb;var h=m.playerId;r(h,(function(){var r=a(h);0!==(null==r?void 0:r.currentTime())&&((f=t())>d.length-1||(o(f+1),i(h,d[f].id).then((function(t){s(f,h),n(t.response),f++,p(t)})).catch((function(n){p(n),s(f,h),f++,u=setTimeout((function(){e(h)&&l(f,h,d)}),5e3)}))))}))},l=function n(t,e,r,a){f=t,t>r.length-1||(o(f+1),i(e,r[t].id).then((function(n){s(f,e),f++,p(n)})).catch((function(t){p(t),setTimeout((function(){s(f,e),f++,n(f,e,r)}),5e3)})))},p=function(n){c&&c(n)};export{m as a,l as s};
|
package/esm/bundle.css
CHANGED
|
@@ -555,38 +555,6 @@
|
|
|
555
555
|
margin-left: 8px;
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
/* a wrapper element that tracks the mouse vertically */
|
|
559
|
-
.vjs-thumbnail-holder {
|
|
560
|
-
position: absolute;
|
|
561
|
-
left: -1000px;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
/* the thumbnail image itself */
|
|
565
|
-
.vjs-thumbnail {
|
|
566
|
-
position: absolute;
|
|
567
|
-
left: 0;
|
|
568
|
-
bottom: 1.3em;
|
|
569
|
-
opacity: 0;
|
|
570
|
-
transition: opacity .2s ease;
|
|
571
|
-
-webkit-transition: opacity .2s ease;
|
|
572
|
-
-moz-transition: opacity .2s ease;
|
|
573
|
-
-mz-transition: opacity .2s ease;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
/* fade in the thumbnail when hovering over the progress bar */
|
|
577
|
-
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
578
|
-
.vjs-progress-control:hover .vjs-thumbnail,
|
|
579
|
-
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
580
|
-
.vjs-progress-control:active .vjs-thumbnail {
|
|
581
|
-
opacity: 1;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/* ... but hide the thumbnail when hovering directly over it */
|
|
585
|
-
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
586
|
-
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
587
|
-
opacity: 0;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
558
|
.video-js.vjs-quality-menu {
|
|
591
559
|
display: block;
|
|
592
560
|
}
|
|
@@ -657,54 +625,36 @@
|
|
|
657
625
|
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
658
626
|
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
659
627
|
}
|
|
660
|
-
|
|
628
|
+
/* a wrapper element that tracks the mouse vertically */
|
|
629
|
+
.vjs-thumbnail-holder {
|
|
630
|
+
position: absolute;
|
|
631
|
+
left: -1000px;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* the thumbnail image itself */
|
|
635
|
+
.vjs-thumbnail {
|
|
661
636
|
position: absolute;
|
|
662
637
|
left: 0;
|
|
663
|
-
bottom:
|
|
664
|
-
opacity:
|
|
665
|
-
height: 100%;
|
|
638
|
+
bottom: 1.3em;
|
|
639
|
+
opacity: 0;
|
|
666
640
|
transition: opacity .2s ease;
|
|
667
641
|
-webkit-transition: opacity .2s ease;
|
|
668
642
|
-moz-transition: opacity .2s ease;
|
|
669
|
-
|
|
643
|
+
-mz-transition: opacity .2s ease;
|
|
670
644
|
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
.vjs-tip {
|
|
680
|
-
visibility: hidden;
|
|
681
|
-
display: block;
|
|
682
|
-
opacity: 0.8;
|
|
683
|
-
padding: 5px;
|
|
684
|
-
font-size: 10px;
|
|
685
|
-
position: absolute;
|
|
686
|
-
bottom: 14px;
|
|
687
|
-
z-index: 100000;
|
|
645
|
+
|
|
646
|
+
/* fade in the thumbnail when hovering over the progress bar */
|
|
647
|
+
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
648
|
+
.vjs-progress-control:hover .vjs-thumbnail,
|
|
649
|
+
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
650
|
+
.vjs-progress-control:active .vjs-thumbnail {
|
|
651
|
+
opacity: 1;
|
|
688
652
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
background-position: bottom left;
|
|
695
|
-
position: absolute;
|
|
696
|
-
width: 9px;
|
|
697
|
-
height: 5px;
|
|
698
|
-
}
|
|
699
|
-
.vjs-tip .vjs-tip-inner {
|
|
700
|
-
border-radius: 3px;
|
|
701
|
-
-moz-border-radius: 3px;
|
|
702
|
-
-webkit-border-radius: 3px;
|
|
703
|
-
padding: 5px 8px 4px 8px;
|
|
704
|
-
background-color: black;
|
|
705
|
-
color: white;
|
|
706
|
-
max-width: 200px;
|
|
707
|
-
text-align: center;
|
|
653
|
+
|
|
654
|
+
/* ... but hide the thumbnail when hovering directly over it */
|
|
655
|
+
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
656
|
+
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
657
|
+
opacity: 0;
|
|
708
658
|
}
|
|
709
659
|
|
|
710
660
|
.vjs-poster {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-37daa6b3.js";import{g as l,d as s,e as d}from"./captions-f507e8ee.js";import{g as p,s as m,j as u,k as v}from"./skin-d5091b86.js";import"./player_instance-34118a5b.js";import"@babel/runtime/helpers/toConsumableArray";function f(e){var t=h();return function(){var n,i=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return a(this,n)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var y=i.getComponent("Component"),g=function(a){n(h,y);var o=f(h);function h(t){var n,a,i,r,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=o.call(this,t,c)).playerId=c.playerId,r.seriesData=c.sres,r.currentVideoData=c.res,r.initialiseStructure(),r.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(i=a.style)||void 0===i||i.setProperty("display","none","important"),r}return t(h,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-cb47408f.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=l(this.playerId);null==t||t.map((function(t){return s(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(p(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",m(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),u(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(c())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),r=i.dom.createEl("div",{className:"caption-selector-content"}),l=i.dom.createEl("div",{className:"caption-container"}),s=this.createLanguageContanier();i.dom.appendContent(l,s),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,r),i.dom.appendContent(r,l),v(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),l(e.playerId).map((function(t){return s(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),p=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){d(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},m=0;m<c.length;m++)p(m);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),h}();export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./player_instance-34118a5b.js";var e=function(e,n){var a,r,s;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(s=r.style)||void 0===s||s.setProperty("display","flex"));for(var
|
|
1
|
+
import{g as t}from"./player_instance-34118a5b.js";var e=function(e,n){var a,r,s;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(s=r.style)||void 0===s||s.setProperty("display","flex"));for(var l=t(e).textTracks(),i=0;i<l.length;i++){var o=l[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},n=function(e,n){for(var a=t(e).textTracks(),r=0;r<a.length;r++){var s=a[r];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!==n||(s.mode="hidden")}},a=function(e){var n,a=t(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter((function(t){return"subtitles"==t.kind||"captions"===t.kind})))||[]},r=function(e){var n=t(e);n.remoteTextTracks().tracks_.map((function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)}))},s=function(e,n){var a=t(e);a.remoteTextTracks().tracks_.map((function(t){a.removeRemoteTextTrack(t)})),n.map((function(t){a.addRemoteTextTrack({src:t.url,srclang:t.srclang,label:t.label||(null==t?void 0:t.language)})}))};export{s as a,n as d,e,a as g,r};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function checkDvrStartOverEnabled(config: any): boolean;
|
|
2
|
+
export function playFromBeginningHandler(player: any, config: any): void;
|
|
3
|
+
export function playLiveHandler(player: any): void;
|
|
4
|
+
export function playResumeHandler(player: any, resumeTime: any): void;
|
|
5
|
+
export function playLiveOrResumeHandler(player: any, videoId: any): void;
|
|
6
|
+
export function showControl(player: any, overlay: any): void;
|
|
7
|
+
export function pauseAndHideControl(player: any): void;
|
|
8
|
+
export function saveWatchedTime(videoId: any, time: any): void;
|
|
9
|
+
export function getWatchedTime(videoId: any): number;
|
|
10
|
+
export function getProgramStartTime(player: any, config: any): number;
|
|
11
|
+
export function getCurrentProgramThumbnail(config: any): string;
|
|
12
|
+
export function handleLiveStartOverBtn({ player, showWatchLive, showStartOver }: {
|
|
13
|
+
player: any;
|
|
14
|
+
showWatchLive?: boolean;
|
|
15
|
+
showStartOver?: boolean;
|
|
16
|
+
}): void;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export function getProgramStartTime(programs: any, seekable: any): any;
|
|
1
|
+
export function addDvrStartOverOverlay(playerId: any, config: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n,t,u,a,i,f,c=[],o=function(n){t=n},s=function(){return t},r=function(t){n=t},e=function(){return n},g=function(){return u},p=function(n){u=n},d=function(n){i=n},v=function(){return i},b=function(n){a=new Map,n.map((function(n,t){a.set(n.id,t)}))},h=function(n){if(a){var t=a.get(n);p(t+1)}},j=(f=0,{set:function(n){n>=0&&(f=n)},get:function(){return f}}),k=function(n){c=n},l=function(){return c};export{s as a,v as b,l as c,k as d,j as e,r as f,e as g,d as h,h as i,g as j,p as k,b as l,o as s};
|
|
@@ -0,0 +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{A as a,x as s}from"./generic-a55d7135.js";import{g as c}from"./resolution-1c59b0f3.js";import{p as d}from"./skin-d5091b86.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-9ed4268f.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-b1a752cd.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-30be507a.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-cd7499aa.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-34414f59.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-4708c41d.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-3b6581e0.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-b6849ca2.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-4cf6126c.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},x=function(e,t){import("./videoSelector-910251cf.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)}))},L=function(e,t){import("./series-v2-18da57cf.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)}))},_=function(e,t){import("./multicamv2-8ba6cb5c.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-ae6cc7f1.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-67f7208b.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,x as j,_ as k,I as l,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 o from"video.js";import r from"axios";import{g as i}from"./player_instance-34118a5b.js";import a from"js-cookie";import{a as l,e as u,g as s,h as d,d as c,s as v,i as m}from"./currentVideoInfo-d9beb914.js";import{a as p,r as f}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import E from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";function y(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],y("js",new Date),y("config",e)}function w(e,n){y("event",e,n)}var b={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 _(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 S(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var O={name:"@viewlift/player",version:"2.0.61",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","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=O.version;var L,P=function(e,n){var t,o,i,a,l,u,s,d;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:null!==(l=window)&&void 0!==l&&null!==(u=l.customData)&&void 0!==u&&u.overrideEntitlementBaseUrl?(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d?void 0:d.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==b?void 0:b.getVideoDetails),params:S({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":O.version,"x-player-name":"videojs"},withCredentials:!0})},A=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:F.get()+b.getLinearChannelDetails,params:S(S(S(S(S({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},D=function(e,n){var t,o,i=H(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},R=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return o=e.sent,e.abrupt("return",r({url:F.get()+"".concat(null==b?void 0:b.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:S({},n),params:S({},(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)}}(),C=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},k=function(e){var n=e.videoId;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(L=null==b?void 0:b.apiBaseUrl,{set:function(e){e&&(L=e)},get:function(){return L}}),V=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},W=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},j=null;function N(){return{set:function(e){e&&(j=e)},get:function(){return j}}}var U=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=N().get(),o=F.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);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)}}(),M=null,B=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"))||!W(n)){e.next=6;break}return M||(M=U().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&N().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){M=null}))),e.abrupt("return",M);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},H=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function G(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 Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?G(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):G(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Q=100,z=function(){var e,n,t,o,r,i,a,u=l();return"linearchannel"===((null==u?void 0:u.contentType)||"video")?null==u||null===(e=u.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==u?void 0:u.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==u||null===(r=u.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==u||null===(a=u.video)||void 0===a?void 0:a.id)||(null==u?void 0:u.id)};function q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function X(){var e=window.sessionStorage.getItem("uid");return e||(e=q(),window.sessionStorage.setItem("uid",e),e)}function J(){return K.apply(this,arguments)}function K(){return(K=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(e){return e?String(e):""}var Z=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ee(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=q(),u="production",s="WEBSITE",d=null,c=0,v=null,m=0,p=0,f=!1,g=[],I=i(e);if(I){var E=function(){var e,n,t,o;return Math.round((null==I||null===(e=I.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},h=Z((function(){for(var e=I.currentTime(),n=I.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),y=function(){var e=n(t.mark((function e(n){var o,i,d,c,v,m,p,f,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return g=e.sent,I=H(g),e.t0=Y,e.t1=Y,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=X(),e.t6=z(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=u,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?$(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(d=n.bitrate)&&void 0!==d?d:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(p=a.beacon)||void 0===p?void 0:p.params,e.t32=(0,e.t0)(e.t30,e.t31),E=[e.t32],r({url:(null==a||null===(f=a.beacon)||void 0===f?void 0:f.url)||F.get()+b.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:E}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(d),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&p<4&&f?(p++,w("BUFFERING",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),y({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},_=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(d);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";w(o,Y({pfm:s,uid:X(),vid:z(),videoPosition:t},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),y({eventName:o,videoPosition:t,isAdEvent:!1})}))},S=function(){var e=Z((function(){var e;c=0,v=setInterval((function(){c=T(c)}),Q),w("PLAY",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),y({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":z(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},O=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(d),m=c||0,w("FIRST_FRAME",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:h()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),y({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:h()}),f=!0,c=0}))},L=function(){var e=!1;I.on("waiting",Z((function(){f&&(e=!0,clearInterval(d),d=setInterval((function(){e&&!I.paused()?m=T(m):clearInterval(d)}),Q))}))),I.on("playing",Z((function(){e=!1,clearInterval(d)})))},P=function(){var e=function(e){var n,t,o,r=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:h(),pfm:s,uid:X(),vid:z(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);w(e,Y({},r)),y(Y({eventName:e,adPosition:1},r))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},A=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(console.log(e,g),e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];p=0,g.push(e),y({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:h(),bitrate:E()})}}))};_(),L(),P(),A(),S(),I.on("loadeddata",O)}else console.error("Videojs: Player instance not found.")}function ne(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ee(e,n,t)}var te=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"},oe=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;k({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),d(t)})).catch((function(e){return console.log(e)}))},ie=function(){var e=u.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),r=l(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=u.get(),d=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===i}));return d>=0?d+1:1};function le(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 ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?le(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var se=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},de=function(e){var n=ce(e,"video.tags",[]),t=ce(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ce=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},ve=function(){var n,t,o,r,l,u,s,d,c,v,m,p,f,g,I,E,h,y,T,w,b,_,S,O,L=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return L;var D=(null==A?void 0:A.siteName)||"",R=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(o=A[R])||void 0===o?void 0:o.metadata)||(null==A||null===(r=A[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),k=i(P);if(!L.includes("VIEWLIFT_"))return L;var F,V=window.getComputedStyle(document.getElementById(P),null),W=Math.trunc(V.getPropertyValue("height").slice(0,-2)),j=Math.trunc(V.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==A||null===(u=A.linearchannel)||void 0===u||null===(s=u.channels)||void 0===s||null===(d=s.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===d||null===(c=d.content)||void 0===c?void 0:c.id:ce(A,"video.gist.id",""),U="linearchannel"===R?null==A||null===(v=A.linearchannel)||void 0===v||null===(m=v.channels)||void 0===m||null===(p=m.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===p?void 0:p.title:ce(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,B=null;"function"==typeof window.__gpp&&(null===(F=window)||void 0===F||F.__gpp("ping",(function(e){M=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=ue(ue({},me(C)),{},(_={VIEWLIFT_WIDTH:j,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:se(j,W),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===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ce(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:de(A),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ce(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ce(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ce(null===(E=window)||void 0===E||null===(h=E.app_data)||void 0===h||null===(y=h.site)||void 0===y?void 0:y.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":ce(null===(T=window)||void 0===T||null===(w=T.app_data)||void 0===w||null===(b=w.site)||void 0===b?void 0:b.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:ce(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ce(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:ie(),VIEWLIFT_CONTENT_TAGS:de(A),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(_,"VIEWLIFT_LAT",""),e(_,"VIEWLIFT_APP_BUNDLE",""),e(_,"VIEWLIFT_ATT_CONSENT",""),_),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in x){var G=new RegExp(H,"g");L=L.replace(G,x[H])}return L},me=function(e){var n,t,o,r,i,a,l={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,d=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return s||d?(oe()?s?l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),l=oe()?ue(ue({},l),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},l),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),l=oe()?ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),l=ue(ue({},l),{},{VIEWLIFT_AFID:u.get("afid")})},pe=function(e,n){var t,o,r,i,a,l,u,s,d,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,E=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(d=e[f])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var y=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ge(E);if(g){var T=Ie(I,n);return T.src=ve(T.src,n,e),T}if("Safari"!==te()&&y)return fe(I);if(h){var w=ge(I);return w.src=ve(w.src,n,e),w}if(null!=I&&I.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return b.src=ve(b.src,n,e),b}return null},fe=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ge=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Ie=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,u=te();if(i(n),"Safari"===u){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return Ee(n),s}var d,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Ee(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 Ee=function(e){var n=i(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==te()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},he=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},ye=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 o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},Te=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var we=!1,be=function(e,n,t){var o=ve(n,e,t),r=i(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i(e);if(null!==a.el_){we=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),we&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()}),1e3));var u=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&u.hasAttribute("controls")&&u.removeAttribute("controls");var s="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,s="touchend"),a.one(s,(function(){d&&a.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function _e(e,n){var t,o,r,a=i(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,s,d,c,v,m,p;if(Oe.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==u||u.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||nn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(s=i.appcmsMain)||void 0===s||null===(d=s.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||en(e,10)}}}),!0)}var Se,Oe=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Le="ssai-breakStart",Pe="ssai-adImpression",Ae="ssai-firstQuartile",De="ssai-midpoint",Re="ssai-thirdQuartile",Ce="ssai-complete",ke="ssai-breakEnd",Fe={breakStart:Le,impression:Pe,firstQuartile:Ae,midpoint:De,thirdQuartile:Re,complete:Ce,breakEnd:ke};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Fe[o];r&&t.trigger(r,n)}function We(e){var n=i(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(Le,e)},adImpression:function(e){return t(Pe,e)},adFirstQuartile:function(e){return t(Ae,e)},adMidpoint:function(e){return t(De,e)},adThirdQuartile:function(e){return t(Re,e)},adComplete:function(e){return t(Ce,e)},adBreakEnd:function(e){return t(ke,e)}}}function je(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 Ne(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?je(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):je(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Ue(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 Me(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)?Me(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,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Me(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 Be,xe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),He=(Be=null,{set:function(e){Be=e},get position(){return Be}});function Ge(e,n){return Ye.apply(this,arguments)}function Ye(){return(Ye=n(t.mark((function e(n,o){var r,a,l,u,s,d,c,v,m,p,f,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(n),r=pe(o,n),a=r.src,l=a.replace("/dash/","/session/").replace("/master/","/session/"),l=ve(l,n,o),u=Qe(l),s=h(u,2),d=s[0],c=s[1],l=new URL(l.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach((function(e){var n=h(e,2),t=n[0],o=n[1];l.searchParams.set(t,o)})),e.prev=8,e.next=11,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Ne({},d)})});case 11:return v=e.sent,e.next=14,v.json();case 14:return m=e.sent,p="https://"+new URL(l).hostname,f=m.trackingUrl,g=m.manifestUrl,I=p+f,E=p+g,xe.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),r.src=E,e.abrupt("return",r);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",r);case 29:case"end":return e.stop()}}),e,null,[[8,26]])})))).apply(this,arguments)}function Qe(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ue((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=h(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},s={},d=0,c=Object.entries(n);d<c.length;d++){var v=h(c[d],2),m=v[0],p=v[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=p;else s[m]=p}return[u,s]}var ze,qe=(ze=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),ze=Array.isArray(e)?E(e):ze},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",ze),E(ze)}});function Xe(e,n){return Je.apply(this,arguments)}function Je(){return Je=n(t.mark((function e(o,r){var a,l,u,s,d,c,v,m,p,f,I,h,y,T,w,b,_,S,O,L,P,A,D;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D=function(e,n,t,r,a,l){var u=i(o);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,d=Ue(t);try{var c=function(){var t,i,d,c=s.value,v=c.eventType,m=c.beaconUrls,p=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=p||0,E=m,h=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,y="".concat(I,"_").concat(v),T=P.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",P),e>=I&&!T.includes(y)){T.push(y),P.set("pod-".concat(a),T);try{A(v,n,E,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var w=He.position;He.set(null),setTimeout((function(){null!=w&&(u.currentTime(w),l())}),500)}if("function"==typeof h)try{var b,_={eventType:v,startTimeInSeconds:p,startTime:f,durationInSeconds:g,ad:null==n||null===(b=n.ads)||void 0===b?void 0:b[r],adIndex:r};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(s=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},A=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)}))}))},L=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},He.set(r),p=xe.get(),(f=i(o)).one("loadeddata",(function(){p&&O(p)})),I=new Map,h=new Map,y=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,w=(null==f||null===(u=f.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,b=(null==f||null===(s=f.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==f||null===(d=f.el())||void 0===d||null===(c=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark((function e(n){var a,l,u,s,d,c,v,m,p,f,O,P,A,R,C,k,F,V,W,j;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",k),0===e.button&&A()},C=function(e){},R=function(){var e,n=f.currentTime(),t=null,o=Ue(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,I.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(){f.currentTime(t+2.2)}),100))},A=function(){var e,n=f.currentTime(),t=null,o=Ue(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,u=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>u||n>i)&&!I.has(i)||n>=i&&n<=u)&&(t=i,I.set(i,!0),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){f.currentTime(t+.4)}),100))},d=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),m=v.avails,p=[],f=i(o),O=f.controlBar.progressControl,P=O.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.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&&(d=!0),p.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])||[]})})),!d&&r&&(f.currentTime(r),R()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.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",P.appendChild(i)}})),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=g((function(){var e=f.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&I.set(r,!0),Oe.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,d=0,c=0;c<a.length;c++){var v,m=null==a||null===(v=a[c])||void 0===v?void 0:v.durationInSeconds;if(u<s+m){d=c;break}s+=m}a[d];var f=Math.max(0,i-u),g=Math.round(f);F.style.display="block",j.textContent="".concat(d+1," of ").concat(a.length," • ").concat(L(g));var y=[];return null==a||a.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));y.push.apply(y,E(n))})),Array.isArray(a)&&0==(null==a?void 0:a.length)&&y.push(null==t?void 0:t.podSlotImpressionBeacon),D(e,t,y,d,o,R),"break"}h.delete(r)},o=0;o<p.length;o++){if("break"===t())break}n||(F.style.display="none",O.el().classList.remove("hide-progress-bar"),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Oe.enable())}}),1e3),f.on("timeupdate",f._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",(function(e){Oe.enabled&&"ArrowRight"==e.key&&(A(),en(o,10),e.stopPropagation())})),O.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",C),document.addEventListener("pointerup",k))})),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(F=document.createElement("div")).className="ssai-ad-container",(V=document.createElement("div")).className="sponsored-adbox",(W=document.createElement("div")).className="sponsored-text",W.textContent="Sponsored Ad",V.append(W),(j=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",F.append(V),F.append(j),f.el().appendChild(F);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map;case 18:case"end":return e.stop()}}),e)}))),Je.apply(this,arguments)}function Ke(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}var $e=function(e){o(e).play()},Ze=function(e){o(e).pause()},en=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},nn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},tn=function(e){return!!o.getPlayer("".concat(e))},on=function(e){return o(e).paused()},rn=function(){var e=n(t.mark((function e(n,o){var r,a,l,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],e.next=3,B();case 3:return a=e.sent,l=i(n),e.abrupt("return",new Promise((function(e,t){var i=(null==o?void 0:o.epg)||o;A(i,a).then((function(t){var i=null==t?void 0:t.data;window.sid=q(),i.contentType="linearchannel",i.channelId=null==o?void 0:o.channelId;var a=pe(i,n);v(i),c((null==o?void 0:o.programs)||[]),a&&r?(dn(n,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:i})}))):e({status:!0,msg:"Feed authenticated",response:i})})).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)}}(),an=function(){var e=n(t.mark((function e(o,r,a){var l,u,d,c,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return c=e.sent,(s()||null)&&m(r),g=0,I=0,E=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(d=u.watchHistory)&&void 0!==d&&d.enable&&C(r,c).then((function(e){var n,t,o,r,i,a,l;(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(null==e?void 0:e.data)),g=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(I=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(E=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)})).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))})),e.abrupt("return",new Promise((function(e,a){P(r,c).then(function(){var r=n(t.mark((function n(r){var l,u,s,d,c,m,h,y,T,w,b,_,S,O,L,P,A,D,R,C,k,F,V,W,j,N,U,M,B,x,H,G,Y,Q,z,q,X,J;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,A=(null==P?void 0:P.contentType)||"video",D=(null==P||null===(l=P[A])||void 0===l?void 0:l.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(d=s.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)||!1,R=(null==P||null===(m=P.video)||void 0===m||null===(h=m.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,v(r.data),(C=(null==P||null===(y=P.ads)||void 0===y||null===(T=y.preRoll)||void 0===T||null===(w=T.adTags)||void 0===w||null===(b=w.web)||void 0===b?void 0:b.active)&&(null==P||null===(_=P.ads)||void 0===_||null===(S=_.preRoll)||void 0===S||null===(O=S.adTags)||void 0===O||null===(L=O.web)||void 0===L?void 0:L.url))&&be(o,C,P),k=pe(P,o),!D){n.next=12;break}return n.next=11,Ge(o,P);case 11:k=n.sent;case 12:k?(G=(null==P||null===(F=P.video)||void 0===F||null===(V=F.gist)||void 0===V?void 0:V.videoImageUrl)||(null==P||null===(W=P.video)||void 0===W||null===(j=W.gist)||void 0===j||null===(N=j.imageGist)||void 0===N?void 0:N.r16x9),(Y=i(o)).poster(G),dn(o,k),D&&Xe(o,E),Y.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:P})})),Y.on("loadeddata",(function(){Te(),e({status:!0,msg:"Video Loaded",response:P})})),Y.one("play",(function(){g&&!D&&I<95&&setTimeout((function(){Y.currentTime(g)}),0)})),Y.one("error",(function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==P||null===(U=P.video)||void 0===U||null===(M=U.contentDetails)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0||(null==P||null===(x=P.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(J=(null==P||null===(z=P.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==P||null===(X=P.video)||void 0===X?void 0:X.closedCaptions),Q=J.filter((function(e){return"VTT"===e.format})),p(o,Q)):f(o)):(ye(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){cn(e,o,a,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),ln=function(e,n,t){var o=i(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},un=function(e){var n=i(e);if(sn(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},sn=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()},dn=function(e,n){var t=i(e);t&&t.src(n)},cn=function(n,t,o,r){var i,a,l,u,s,d,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(u=l.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);tn(t)&&ye(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ke(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},vn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{nn as A,tn as B,an as C,rn as D,un as E,V as F,qe as G,We as H,F as I,x as J,N as K,W as L,T as M,_e as N,oe as O,on as P,Xe as Q,k as R,ae as a,ie as b,pe as c,te as d,Te as e,vn as f,X as g,ye as h,ne as i,be as j,he as k,dn as l,Ge as m,H as n,P as o,C as p,cn as q,B as r,R as s,A as t,D as u,re as v,ln as w,en as x,$e as y,Ze as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"./currentVideoInfo-d9beb914.js";function t(e){var t=e||{},n=t.dvrConfig,a=t.epg;return!(!t.isDvrEnabled||null==n||!n.enable)&&(null==a||!a.enable||v(a))}function n(e,t){var n=e.seekable();if(n&&n.length>0){var a=u(e,t);e.currentTime(a),e.play(),d({player:e,showWatchLive:!0,showStartOver:!1})}}function a(e){e&&e.seekable()&&(e.currentTime(e.seekable().end(0)),e.play(),d({player:e,showWatchLive:!1,showStartOver:!0}))}function l(e,t){var n=s(t);n?function(e,t){if(e&&e.seekable()){var n=Math.min(t,e.seekable().end(0));e.currentTime(n),e.play(),d({player:e,showWatchLive:!0,showStartOver:!0})}}(e,n):a(e)}function r(e,t){e.bigPlayButton.show(),e.controlBar.show(),t&&(t.style.display="none")}function i(e){e.pause(),e.bigPlayButton.hide(),e.controlBar.hide()}function o(e,t){sessionStorage.setItem("lastWatchedPosition-".concat(e),t.toFixed(2))}function s(e){return parseFloat(sessionStorage.getItem("lastWatchedPosition-".concat(e))||"0")}function u(t,n){var a=n||{},l=a.dvrConfig,r=a.epg,i=e()||[],o=null==l?void 0:l.startOverTime,s=0;if(o&&(s=o),null!=r&&r.enable&&v(r)&&null!=i&&i.length){var u=new Date,d=i.find((function(e){var t=new Date(e.formatted_startdate),n=new Date(e.formatted_enddate);return u>=t&&u<n})),c=t.seekable();if(c&&c.length>0){var f=c.start(0);if(s=f,null!=d&&d.formatted_startdate){var h=c.end(c.length-1)-f;s=f+(new Date(d.formatted_startdate).getTime()-new Date(u-1e3*h).getTime())/1e3}}}return s}var d=function(e){var t=e.player,n=e.showWatchLive,a=void 0===n||n,l=e.showStartOver,r=void 0===l||l;if(t.liveTracker){var i,o,s,u,d=t.liveTracker.atLiveEdge(),v=t.controlBar.getChild("SeekToLive");if(d?null==v||v.show():null==v||v.hide(),a)null==t||null===(i=t.watchLiveButton)||void 0===i||i.show();else null==t||null===(o=t.watchLiveButton)||void 0===o||o.hide();if(r)null==t||null===(s=t.startFromBeginningButton)||void 0===s||s.show();else null==t||null===(u=t.startFromBeginningButton)||void 0===u||u.hide()}},v=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null==n||null===(e=n.contentType)||void 0===e?void 0:e.includes("game"))&&"LIVE"===(null==n||null===(t=n.programSubType)||void 0===t?void 0:t.toUpperCase())};function c(t){var n=(t||{}).epg,a=e()||[],l="";if(null!=n&&n.enable&&v(n)&&null!=a&&a.length){var r=new Date,i=a.find((function(e){var t=new Date(e.formatted_startdate),n=new Date(e.formatted_enddate);return r>=t&&r<n}));l=null!=i&&i.thumbnail?null==i?void 0:i.thumbnail:""}return l}export{l as a,c as b,i as c,u as d,r as e,t as f,s as g,d as h,a as i,n as p,o as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{j as n,g as r,a as i}from"./currentVideoInfo-d9beb914.js";import{s as o}from"./autoNextVideo-0db8dd88.js";import{e as a}from"./icons-37daa6b3.js";import{p as l,d as u,t as s}from"./skin-d5091b86.js";import c from"@babel/runtime/helpers/typeof";import d from"video.js";import p from"@babel/runtime/helpers/asyncToGenerator";import m from"@babel/runtime/regenerator";import v from"@babel/runtime/helpers/defineProperty";import f from"@babel/runtime/helpers/slicedToArray";var g,h,b,y,x=[],w=!1,E=function(i,o){var s;if(w=!1,null!=o&&null!==(s=o.series)&&void 0!==s&&s.enable){var c;x=[];var d=r();null==d||d.map((function(t){var n;return(n=x).push.apply(n,e(t.episodes))})),null==o||null===(c=o.series)||void 0===c||c.cb}else{var p,m;x=(null==o||null===(p=o.relatedVideos)||void 0===p?void 0:p.content)||[],null==o||null===(m=o.relatedVideos)||void 0===m||m.cb}var v=t(i);v.on("timeupdate",(function(){var e,t;if(!w){var r=Math.floor(v.currentTime()),i=v.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=x)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}}));var f,g=x.filter((function(e,t){return t==n()}));if((null==g?void 0:g.length)>0)if(null!==(f=document.getElementsByClassName("next-ep-preview"))&&void 0!==f&&f[0]){var h,b,y,E,N,j,k,C,O,T,I,B;(null===(h=document.getElementsByClassName("next-ep-preview"))||void 0===h?void 0:h[0]).style.visibility="hidden";var L=null===(b=document.getElementsByClassName("next-ep-title"))||void 0===b?void 0:b[0],S=null===(y=document.getElementsByClassName("next-ep-img"))||void 0===y?void 0:y[0],M=null===(E=document.getElementsByClassName("next-ep-content"))||void 0===E?void 0:E[0],P=null===(N=g[0])||void 0===N?void 0:N.title;(null===(j=P)||void 0===j?void 0:j.length)>60&&(P=P.substr(0,60)+"..."),L.textContent="".concat(P),S.src=(null===(k=g[0])||void 0===k||null===(C=k.gist)||void 0===C||null===(O=C.imageGist)||void 0===O?void 0:O.r16x9)||(null==g||null===(T=g[0])||void 0===T?void 0:T.img)||(null===(I=window)||void 0===I||null===(B=I.customData)||void 0===B?void 0:B.fallbackImage),M.onclick=function(){return A(i)}}else{var R,D,$,X,F,U,_,G,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var V=document.createElement("div");V.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var z=document.createElement("div");z.className="next-ep-close",z.onclick=function(){q.style.visibility="hidden",w=!0},z.appendChild(l(a())),V.append(W),V.append(z);var H=null===(R=g[0])||void 0===R?void 0:R.title,Q=document.createElement("img");Q.className="next-ep-img",Q.src=(null===(D=g[0])||void 0===D||null===($=D.gist)||void 0===$||null===(X=$.imageGist)||void 0===X?void 0:X.r16x9)||(null==g||null===(F=g[0])||void 0===F?void 0:F.img)||(null===(U=window)||void 0===U||null===(_=U.customData)||void 0===_?void 0:_.fallbackImage);var Y=document.createElement("div");Y.className="next-ep-title",(null===(G=H)||void 0===G?void 0:G.length)>60&&(H=H.substr(0,60)+"..."),Y.textContent="".concat(H);var J=document.createElement("div");J.className="next-ep-content",J.append(Q),J.append(Y),J.onclick=u((function(){null==q||q.remove(),w=!0,A(i)}),400),q.append(V),q.append(J)}},A=function(e,r){var i=t(e),a=Math.floor(i.currentTime());if(Math.floor(i.duration())!=a){i.pause(e);var l=n();o(l,e,x)}};function N(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 j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}g={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},h=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===c(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},b=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},y=function e(t){return"HTML"!==t.nodeName&&"static"===b(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",(function(e){var t,n,r,i,o,a,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=h({},g,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",h(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",(function(e){a=i.duration()})),i.on("loadedmetadata",(function(e){a=i.duration()})),(o=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=y(o.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-=y(o.el()).getBoundingClientRect().left+v,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),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&&h(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=b(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"},o.on("mousemove",l),o.on("touchmove",l),o.on("pointerdown",(function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)})),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)}));var k="my-player";function C(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 O(){return(O=p(m.mark((function e(t){var n,r,i,o,a,l,u,s,c,d,p,v,g,h,b,y,x,w,E,A,N,j,k,C;return m.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,o=t.layout.split("x").map(Number),a=f(o,2),l=a[0],u=a[1],s=i.width/u,c=i.height/l,d=[],p=0;p<l;p++)for(v=0;v<u;v++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,v*s,p*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=f(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===(j=N.app_data)||void 0===j||null===(k=j.appcmsMain)||void 0===k||null===(C=k.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 T(e,t){return I.apply(this,arguments)}function I(){return(I=p(m.mark((function e(t,n){var r,i;return m.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",C(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 B(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),o=t(k);if(i&&o){var a=i.getBoundingClientRect(),l=(e.clientX-a.left)/a.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,o=t.length-1;for(;i<=o;){var a=Math.floor((i+o)/2),l=t[a];if(l===e)return l;l<e?i=a+1:o=a-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[o])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*o.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return O.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 L(e){return S.apply(this,arguments)}function S(){return(S=p(m.mark((function e(t){var n,r,i,o;return m.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=f(r,2),o=i[0]*i[1],a=e.duration,l=0;l<o;l++){var u,s=Math.round((t*o+l)*a);n[s]=j(j({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},v(u,"left","-60px"),v(u,"border","1px solid transparent"),v(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",s((function(e){return B(e,n,r)}),500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",(function(e){document.addEventListener("pointermove",s((function(e){return B(e,n,r)}),500))})),e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var M=function(){var e=p(m.mark((function e(t,n){var r,i,o,a,l,u,s,c;return m.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,o=i.split("\n").map((function(e){return e.trim()})),a=[],l=null,u=0;case 10:if(!(u<(null==o?void 0:o.length))){e.next=27;break}if(!(s=o[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=f(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,a.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function P(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function R(e,t){return D.apply(this,arguments)}function D(){return(D=p(m.mark((function e(n,r){var o,a,l,u,s,c,d,p,v,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,M,R,D,F,U,_,G,q,V,W,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,de,pe,me,ve;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,o=t(r),a=n.split("/"),l=a.findIndex((function(e){return"dash"===e.toLowerCase()})),u=P(-1!==l?a.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return p=e.sent,e.next=11,p.text();case 11:v=e.sent,g=new DOMParser,h=g.parseFromString(v,"application/xml"),b=(null==o?void 0:o.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],M=S.getAttribute("value"),R=null==M?void 0:M.split("x"),D=f(R,2),F=D[0],U=D[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),G=(_?B/_:B)/(F*U),q=L.getAttribute("id"),V=Math.round(b/G),W=Math.ceil(V/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(W))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<W;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:G,layout:M,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",q)});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=f(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),oe=N.getAttribute("timescale"),ae=(oe?ie/oe:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/ae),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=$(ce),w=0;w<se;w++)ve=me?X(me,w+de):ce,pe.push({duration:ae,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 $(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function X(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 F(e){return U.apply(this,arguments)}function U(){return(U=p(m.mark((function e(n){var r,i,o,a,l,u,s,c,d,p,v,f,g,h,b,y;return m.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===(o=i.player)||void 0===o?void 0:o.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,T(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return p=(null==d?void 0:d[0])||null,v=p.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,M(f,v);case 12:return g=e.sent,e.next=15,L(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,R(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,L(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",(function(){o.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||o.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}export{E as a,_ as b,F as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/get";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";function l(e){var t=s();return function(){var r,o=n(e);if(t){var i=n(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return a(this,r)}}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}var u={startTime:0,timeLive:3600},p=0,c=u.timeLive,h=i.getComponent("Button"),d=i.getComponent("Component"),m=i.getComponent("ProgressControl"),v=m.getComponent("SeekBar"),f=m.getComponent("PlayProgressBar"),_=m.getComponent("LoadProgressBar"),y=i.getComponent("MouseTimeDisplay");_.prototype.update=function(e){var t=this.player_.buffered(),r=this.player_.duration(),o=this.player_.bufferedEnd(),a=this.partEls_,n=function(e,t){var r=e/t||0;return 100*(r>=1?1:r)+"%"};0!==n(o,r)&&(this.el_.style.width=n(o,r));for(var i=0;i<t.length;i++){var l=t.start(i),s=t.end(i),u=a[i];u||(u=this.el_.appendChild(document.createElement("div")),a[i]=u),0!==n(l,o)&&(u.style.left=n(l,o)),0!==n(s-l,o)&&(u.style.width=n(s-l,o))}for(var p=a.length;p>t.length;p--)this.el_.removeChild(a[p-1]);a.length=t.length},v.prototype.update_=function(e,t){var r=this.player_.duration(),o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(i.formatTime(r-o,r))),this.bar.update(i.dom.getBoundingClientRect(this.el_),t)},v.prototype.handleMouseMove=function(e){var t=1-this.calculateDistance(e),r=this.player_.seekable().end(0)-t*c;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},f.prototype.update=function(e,t){var r=this,o=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var a=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),n=i.formatTime(o-a,o);0!==t&&o!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(n))}))},y.prototype.update=function(e,t){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var o=i.formatTime(c-t*c,c);r.el_.style.left="".concat(e.width*t,"px"),0!==t&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(o))}))};var C=function(e){var t=this;e||(e=u),this.on("timeupdate",(function(e){var r,o;(o=(r=t).seekable())&&o.length&&(o.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),p||(p=c=r.seekable().end(0)))})),this.on("pause",(function(e){t.controlBar.liveButton.removeClass("onair")})),this.ready((function(){var r;r=t,i.mergeOptions(u,e),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var e;e="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/c;var t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0),e>1&&(e=1);var r=(100*e).toFixed(2)+"%",o=t.el().style;return 0!==e&&(this.vertical()?o.height=r:o.width=r),e}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())}))},b=function(a){o(s,h);var i=l(s);function s(t,r){var o;return e(this,s),(o=i.call(this,t,r)).el().innerHTML='<span class="liveCircle"></span><span class="liveText">LIVE</span>',t.paused()||o.addClass("onair"),o}return t(s,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(r(n(s.prototype),"buildCSSClass",this).call(this))}},{key:"handleClick",value:function(e){var t=this.player_.seekable().end(0);this.player_.currentTime(t),this.player_.play()}}]),s}();d.registerComponent("LiveButton",b),(i.registerPlugin||i.plugin)("dvrSeekbar",C);export{C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import"axios";import{d as o,g as i,a as r,b as l,s as a,c as s,l as u,e as c,h as d,f as v,i as f,j as p,k as m,m as g,n as y,o as b,p as h,q as w,r as k,t as O,u as j,v as I,w as S,x as T,y as P,z as E,A as D,B as C,C as x,D as R,E as A,F as L,G as N,H as _,I as M,J as V,K as B,L as U,M as H}from"./generic-a55d7135.js";import{g as F}from"./player_instance-34118a5b.js";import q from"video.js";import{o as K,g as W,a as z,s as G,b as J,p as X}from"./util-5a8e886e.js";import{g as Y,d as Q,a as $,e as Z}from"./captions-f507e8ee.js";import{g as ee,p as ne}from"./resolution-1c59b0f3.js";import{i as te,a as oe}from"./skin-d5091b86.js";import{s as ie}from"./localisation-0bf399a1.js";import{g as re,a as le,s as ae,b as se,c as ue,d as ce,e as de,f as ve}from"./currentVideoInfo-d9beb914.js";import fe from"@babel/runtime/helpers/typeof";import{s as pe,w as me}from"./icons-37daa6b3.js";import{p as ge,a as ye,g as be,b as he,c as we,d as ke,h as Oe,s as je,e as Ie,f as Se}from"./helper-10ebf768.js";import Te from"@babel/runtime/helpers/toConsumableArray";var Pe=function(e){return new Promise((function(n,t){if(Ee(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)}}))},Ee=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},De=function(e,n,t){var o=F(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),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,"'")})},Ce=function(e){var n=F(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},xe=function(){var e=n(t.mark((function e(n){var i,r,l,a,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=F(null==n?void 0:n.playerId),null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,Pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(q),e.finish(13);case 16:(s=q.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==o()?null==r||r.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(n){return e.apply(this,arguments)}}(),Re=function(e,n){var t=F(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,r,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===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.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 Ae=function(){var e=n(t.mark((function e(){return t.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)}}(),Le=function(){var e=n(t.mark((function e(){return t.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)}}(),Ne=function(){var e=n(t.mark((function e(){var n;return t.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)}}(),_e=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-8e3eab6d.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)}}(),Me=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-08c7635e.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)}}(),Ve=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:Ae,loadEMELibrary:Le,loadMuxPlugin:Ne,loadDvrSeekbar:_e,loadContribDash:Me});function Be(e){return Ue.apply(this,arguments)}function Ue(){return(Ue=n(t.mark((function e(n){var i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(null==n?void 0:n.airplay)||!1,e.next=3,Ae();case 3:i&&"Safari"==o()&&Promise.resolve().then((function(){return Ve})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(e,n){return Fe.apply(this,arguments)}function Fe(){return(Fe=n(t.mark((function e(n,i){var r,l,a,s,u,c,d,v,f,p;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==i?void 0:i.contentType)||"video",v=null==i||null===(r=i[d])||void 0===r?void 0:r.drmEnabled,null==i||null===(l=i[d])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==i||null===(s=i[d])||void 0===s||null===(u=s.streamingInfo)||void 0===u||null===(c=u.videoAssets)||void 0===c?void 0:c.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==o()?Le():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?Me():Le():"Safari"!=o()&&f?Me():null,xe(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}}),e,null,[[5,10]])})))).apply(this,arguments)}function qe(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 Ke(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):qe(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var We=new Set,ze=null,Ge=function(e,n,t){var o,r,l,a,s,u,c,d={},v=(null==e?void 0:e.contentType)||"video";d["c3.cm.id"]=(null===(o=e[v])||void 0===o?void 0:o.id)||"Null",d["c3.cm.contentType"]=en(e),d[null==t||null===(r=t.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==e||!e.linearchannel),d[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc(),d[null==t||null===(a=t.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===i()?"NULL":i(),d["c3.cm.categoryType"]=Qe(e),d["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"}}(),d.DRMEnabled=(null===(s=e[v])||void 0===s?void 0:s.drmEnabled)||"None",d.DAIStream=null!==(u=e[v])&&void 0!==u&&null!==(c=u.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[t.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=$e(e),d["c3.cm.genreList"]=Xe(e),d["c3.cm.genre"]=Je(e),d["c3.cm.channel"]=Ye(e);var f=on(re(),e);return d=Ke(Ke({},d),f)},Je=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Xe=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"},Ye=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"},Qe=function(e){return(null==e?void 0:e.contentType)||"null"},$e=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},Ze=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var r=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[r])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},en=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var nn,tn,on=function(e,n){var t,o,i,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=l(),d=r();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(o=t.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(i=e[c-1])||void 0===i||null===(a=i.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},rn=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"}},ln=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},an=function(){var e=n(t.mark((function e(n,o){var i,r,l,a,s,u,c,d,v,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},r=i.trackConvivaPlayerEvent,l=i.paymentHandler,a=i.tveProvider,s=i.enable,u=i.appName,c=(o||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=F(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=rn(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})})),n||v("contentInfo",{DRMEnabled:"None"})})),d.on("loadstart",(function(){var e,n;ze&&ze!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),We.clear(),ze=d.currentSrc();var t=ln(d.currentType()),i=le(),r=Ge(i,d,f);r[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",r[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ze(i,o),r.authToken=c||"NULL",r.streamType=t,r.D2CType=l||"NONE",r.subscriberType=a||(l?"D2C":"FREE"),r["c3.cm.affiliate"]=a||"NULL",sn.setData(r),v("contentInfo",r)})),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(){We.has(d.currentSrc())||(We.add(d.currentSrc()),v("playbackStarted",null))})),d.on("ended",(function(){We.has(d.currentSrc())&&We.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==We||We.clear(),v("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),sn=(nn={},{setData:function(e){nn=Ke(Ke({},nn),e)},getData:function(){return nn}}),un=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-a4ddcb65.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-9eaf1c80.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-fa3873c5.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-a6d73985.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-18445dd3.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?import("./skin-637a78ec.js").then((function(t){t.initialiseSkin(e,n)})):"news"==t&&import("./skin-ec431521.js").then((function(t){t.initialiseSkin(e,n)}))};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(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):cn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var vn=[],fn=0,pn=null;function mn(e,n,t){var o,i,r,l,s,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var c=null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.profileId,d=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(r=n.watchHistory)||void 0===r||r.xapiKey;var f=(null==n||null===(l=n.video)||void 0===l?void 0:l.originalObjectId)||null,p=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,m=Math.floor(e.currentTime()),g=u?100:Math.floor(d/v*100),y={};p?yn(y={completed:u,watchedTime:m,watchedPercentage:g},c,n.siteOwner):(y=dn(dn({videoId:tn,watchedTime:m,watchedPercentage:g,doneWatching:u,profileId:c},pn&&{seriesId:pn}),f&&{originalObjectId:f}),a(y).then((function(e){})).catch((function(e){}))),fn=d+t}function gn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function yn(n,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),r=gn(i),l=(new Date).getTime(),a=le(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(n,t){return dn(dn({},n),{},e({},t,s[t]))}),{}),c=r.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===tn}));c<0?r.push(dn(dn({content:u},n),{},{addedDate:l,updateDate:l})):r[c]=dn(dn(dn({},r[c]),n),{},{updateDate:l}),localStorage.setItem("".concat(i),JSON.stringify(r))}function bn(e,n,t){var o=gn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),i}var hn=!1,wn=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!hn){var r=kn(e,"videoAssets","secondaryVideoAssets"),l=s(r,n);return l&&u(n,l),hn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function kn(e,n,t){if(Array.isArray(e))return e.map((function(e){return kn(e,n,t)}));if(null!==e&&"object"===fe(e)){var o={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=kn(e[i],n,t)})),o}return e}function On(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 jn(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)?jn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 r,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,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function jn(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 In(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 Sn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?In(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):In(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Tn=function(e,n,t,i){var r,l,a,s,u,v=i.res,f=i.sres,p=F(e),m=(null==v?void 0:v.contentType)||"video",g=(null==v||null===(r=v[m])||void 0===r?void 0:r.drmEnabled)||!1,y=(null==v||null===(l=v[m])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,b=(null==v||null===(s=v[m])||void 0===s||null===(u=s.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;ae(v),p&&(p.on("loadstart",(function(){y?t.resolve({status:!0,msg:"Video Loaded",response:v}):t.resolve(Sn({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:v}:{response:v}))})),p.on("loadeddata",(function(){var t,i,r,l=Y(e);if(null==l||l.map((function(n){return Q(e,n.id)})),b&&"Safari"===o())try{var a;null==p||null===(a=p.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&De(e,sessionStorage.getItem("volume")||"100");var s=le();if(c(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.saveOffline)){var u,d,f=Sn(Sn({},n),v);!function(e,n,t){var o,i,r;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(pn=null==n||null===(i=n.series)||void 0===i?void 0:i.id),vn=[],fn=0,tn=t;var l=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.interval)||30,a=F(e);a&&(a.on("timeupdate",(function(){if(!a.seeking()){var e=Math.floor(a.currentTime());vn.includes(fn)||(e==fn?(vn.push(e),mn(a,n,l)):e>fn&&(fn=e+l))}})),a.one("ended",(function(){mn(a,n,l,!0)})))}(e,f,null==s||null===(u=s.video)||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(r=n.analytics)&&void 0!==r&&r.muxKey&&null!=p&&p.mux){var m,g,y,h,w,k,O=(null===(m=le())||void 0===m?void 0:m.video)||(null==v?void 0:v.video),j=null==O?void 0:O.gist,I={env_key:null==n||null===(g=n.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(y=window)||void 0===y?void 0:y.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==O||null===(h=O.series)||void 0===h?void 0:h.title,video_stream_type:null!=O&&null!==(w=O.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};p.mux({debug:!1,data:I})}})),p.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];p.trigger("subtitlechanged",n)})),p.on("subtitlechanged",(function(e,n){var t,o,i,r,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===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.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,g=p.getMediaSession(),y=g.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}})),p.tech_.on("retryplaylist",(function(){y&&wn(v,e)})),p.on("error",(function(){var n,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&y)?wn(v,e):(d(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:v}))})),p.one("play",(function(){var e,t,o,i,r;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable){var l,a,s,u=null===(l=le())||void 0===l||null===(a=l.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.id,c=se(),d=(null==c?void 0:c.get(u))||{t:0,p:0},v=d.t,f=d.p;v&&f<95&&setTimeout((function(){p.currentTime(v)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){p.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0);if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),p.on("volumechange",(function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),p.on("chromecastDisconnected",(function(){if(y){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}})),p.one("loadeddata",(function(){var e,n=(null==p||null===(e=p.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.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"==fe(p.dash)){var t,i,r,l=null==p||null===(t=p.dash)||void 0===t||null===(i=t.mediaPlayer)||void 0===i?void 0:i.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=On(n);try{for(s.s();!(r=s.n()).done;){var u=r.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=On(n);try{for(d.s();!(c=d.n()).done;){var v,f,m,y=c.value;if(("Chrome"==o()||"Edge"==o()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!g))&&null!=y&&null!==(m=y.label)&&void 0!==m&&m.includes("5.1"))p.audioTracks().removeTrack(y);else{if("main"==y.kind){y.enabled=!0;break}y.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}})))};function Pn(e){var n=F(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),r=t.end(t.length-1)-i,l=Dn(r);document.querySelectorAll(".vjs-seekbar-program-marker").forEach((function(e){e.remove()})),l.forEach((function(e){var n=e.id,t=e.title,i=e.time,l=En(n,t,Math.min(i/r*100,99.5));o.appendChild(l)}))}}function En(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function Dn(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(ue()||[]).filter((function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n})).map((function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}}))}function Cn(e,n){var t=F(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,r=n.videoId,l=n.epg,a=i.playLive,s=i.playFromBegining,u=i.programs;ce(u),t.on("loadeddata",(function(){if(s)ge(t,n);else if(a)ye(t,r);else{if(l&&null!=l&&l.enable){var e=JSON.parse(sessionStorage.getItem("epgConfig"));n.programId=(null==e?void 0:e.programId)||""}!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,i=n.videoId,r=n.programId,l=o.buttonConfig,a=void 0===l?{}:l,s=a.watchLive;a.resume;var u=a.startFromBegining,c=r||i,d=!!be(c),v=document.querySelector(".vjs-dvr-btn-overlay");v||((v=document.createElement("div")).className="vjs-dvr-btn-overlay");var f=he(n);f&&(v.style.backgroundImage="url(".concat(f,")"),v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",v.style.backgroundSize="cover");v.innerHTML=Rn(o,d),v.style.display="flex",e.el().appendChild(v),we(e),xn("watch-live-resume-btn",s,(function(){Ie(e,v),ye(e,c)})),xn("watch-begining-btn",u,(function(){Ie(e,v),ge(e,n)}))}(t,n)}!function(e,n){var t=n.videoId,o=n.programId,i=e.currentTime(),r=!1,l=o||t,a=e.seekable(),s=a.start(0),u=a.end(a.length-1)-s;e.on("seeking",(function(){r=!0})),e.on("seeked",(function(){r=!1,i=e.currentTime(),e.liveTracker&&(showWatchLive=!e.liveTracker.atLiveEdge());var t=ke(e,n);Oe({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:Math.abs(t-e.currentTime())>5})})),e.on("timeupdate",(function(){if(!r){var n=e.currentTime();Math.abs(n-i)>=20&&(je(l,n),i=n,function(e,n){Dn(n).forEach((function(t){var o=t.id,i=t.title,r=t.time,l=document.getElementById(o);if(l){var a=Math.min(r/n*100,99.5);l.style.left="".concat(a,"%")}else{var s=e.controlBar.progressControl.seekBar.el(),u=En(o,i,Math.min(r/n*100,99.5));s.appendChild(u)}}))}(e,u))}}))}(t,n)}))}else console.warn("Player instance is required to initialize start over.")}function xn(e,n,t){var o,i,r=document.getElementById(e);r&&(i=n,(o=r)&&(o.style.color="".concat((null==i?void 0:i.textColor)||"#000"),o.style.backgroundColor="".concat((null==i?void 0:i.backGroundColor)||"#DCF95B")),r.addEventListener("click",t))}function Rn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,i=t.resume,r=t.startFromBegining,l=n?(null==i?void 0:i.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(me()," ").concat(l,"</button>"),s='<button id="watch-begining-btn">'.concat(pe()," ").concat((null==r?void 0:r.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(s,"</div>")}function An(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 Ln(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?An(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):An(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Nn=function(i,r,l,a){var c,y,b,h,w,k,O,j,I,S,T,P,E,D,C,x,R,A,L,N,_,M,V,B,U,H,K,W,z,G,J,X,Y,Q,Z,ee,ne,oe,ie,re,le=r.res,ae=void 0===le?null:le,se=r.sres,ue=void 0===se?null:se,ce=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],de=(null===(c=ae)||void 0===c?void 0:c.contentType)||"video",ve=te(null===(y=ae)||void 0===y||null===(b=y[de])||void 0===b||null===(h=b.gist)||void 0===h?void 0:h.videoImageUrl)||te(null===(w=ae)||void 0===w||null===(k=w[de])||void 0===k||null===(O=k.gist)||void 0===O||null===(j=O.imageGist)||void 0===j?void 0:j.r16x9),fe=(null===(I=ae)||void 0===I||null===(S=I[de])||void 0===S||null===(T=S.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,pe=(null===(P=ae)||void 0===P||null===(E=P[de])||void 0===E||null===(D=E.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,me=Se(Ln(Ln({},l),{},{isDvrEnabled:fe})),ge=(null===(C=ae)||void 0===C||null===(x=C.ads)||void 0===x||null===(R=x.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(L=A.web)||void 0===L?void 0:L.active)&&(null===(N=ae)||void 0===N||null===(_=N.ads)||void 0===_||null===(M=_.preRoll)||void 0===M||null===(V=M.adTags)||void 0===V||null===(B=V.web)||void 0===B?void 0:B.url),ye=(null===(U=ae=Ln(Ln({},ae),{},{audioAssetSource:null==l?void 0:l.audioAssetSource}))||void 0===U||null===(H=U[de])||void 0===H?void 0:H.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(K=window)||void 0===K||null===(W=K.app_data)||void 0===W||null===(z=W.appcmsMain)||void 0===z||null===(G=z.adsConfig)||void 0===G?void 0:G.vodAdSticherProvider)||!1,be=(null==l?void 0:l.latency)||6,he=(null==l?void 0:l.skin_settings)||{},we=(null==l?void 0:l.dvrConfig)||{enable:!1},ke=(ie={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==he?void 0:he.pictureInPictureToggle)||!1},playbackRates:null!=he&&he.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:fe},e(ie,"autoplay",null==l?void 0:l.autoplay),e(ie,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!ge),e(ie,"loop",(null==l?void 0:l.loop)||!1),e(ie,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(ie,"html5",Ln(Ln({dash:Ln(Ln(Ln({},!q.browser.IS_SAFARI&&{useTTML:!0}),(null==l?void 0:l.debugConfig)&&(null==l||null===(J=l.debugConfig)||void 0===J?void 0:J.enable)&&{debug:!0,logLevel:null!=l&&null!==(X=l.debugConfig)&&void 0!==X&&X.logLevel?null==l||null===(Y=l.debugConfig)||void 0===Y?void 0:Y.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:be},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Ln(Ln({liveRangeSafeTimeDelta:be,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==l||null===(Q=l.customData)||void 0===Q?void 0:Q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(Z=null==l?void 0:l.enableLowInitialPlaylist)||void 0===Z||Z}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(ee=l.debugConfig)||void 0===ee?void 0:ee.enable)||!1,nativeTextTracks:"Safari"==o()},0==(null==l||null===(ne=l.customData)||void 0===ne?void 0:ne.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(oe=l.customData)||void 0===oe?void 0:oe.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ie,"poster",ve),e(ie,"techOrder",ce),e(ie,"chromecast",{requestCustomDataFn:function(e){var n,t,o=F(i),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,t){var o,i,r,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,g,y,b,h,w,k,O;p.isDrmEnabled=!0;var j=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==j?void 0:j.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(b=y.options)||void 0===b?void 0:b.serverURL);p.licenseUrl=I;var S=(null==j?void 0:j.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(h=n.keySystemOptions)||void 0===h||null===(w=h[0])||void 0===w||null===(k=w.options)||void 0===k||null===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);p.licenseToken=S}var T=(null==e||null===(o=e[f])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=T;var P=null==e||null===(r=e[f])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;p.duration=P;var E=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=E;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}(ae,e,r);return Ln(Ln({},a),{},{convivaMetaData:Ln({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},sn.getData())})},modifyLoadRequestFn:function(e){var n,t,o,r,l,a=F(i),s=(null==a?void 0:a.currentSource())||{};!(null===(n=ae)||void 0===n||null===(t=n[de])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(r=o.videoAssets)||void 0===r?void 0:r.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}}),ie);if(!q.getPlayers()[i]){null!=l&&l.debugConfig&&null!=l&&null!==(re=l.debugConfig)&&void 0!==re&&re.enable&&q.log.level("debug");var Oe=q(i,ke,function(){var e=n(t.mark((function e(){var n,o,r,c,y,b,h,w,k,O,j,I,S,T,P,E,D,C,x,R,A;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(Oe),console.log(q.VERSION),console.log(q.getPlugins()),e.next=5,He(l,ae);case 5:if(I=null===(n=ae)||void 0===n||null===(o=n[de])||void 0===o||null===(r=o.liveDetails)||void 0===r?void 0:r.startOverTime,pe&&a.resolve(Ln({status:!0,msg:"Player Initialised"},ue?{seriesResponse:ue,response:ae}:{response:ae})),S={},me&&(S.playFromBegining=we.playFromBegining,S.playLive=we.playLive,Cn(i,Ln(Ln({},l),{},{isDvrStartOverEnabled:me}))),f(i,null==l?void 0:l.analyticsCb,S),an(i,l),/Android/i.test(navigator.userAgent)&&(q.options.vhs.overrideNative=!0),fe&&Re(i,I),!ge||null!=l&&null!==(c=l.customData)&&void 0!==c&&c.disableAds||p(i,ge,ae),T=s(ae,i),console.log(T),null!=l&&l.nearestClusterUrl&&(T=m(T,l.nearestClusterUrl)),!ye){e.next=21;break}return e.next=20,g(i,ae);case 20:T=e.sent;case 21:T?u(i,T):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:ae}),d(i,"Incompatible / Missing Source")),((null===(y=ae)||void 0===y||null===(b=y[de])||void 0===b||null===(h=b.contentDetails)||void 0===h||null===(w=h.closedCaptions)||void 0===w?void 0:w.length)>0||(null===(k=ae)||void 0===k||null===(O=k[de])||void 0===O||null===(j=O.closedCaptions)||void 0===j?void 0:j.length)>0)&&(A=(null===(E=ae)||void 0===E||null===(D=E[de])||void 0===D||null===(C=D.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null===(x=ae)||void 0===x||null===(R=x[de])||void 0===R?void 0:R.closedCaptions),P=A.filter((function(e){return"VTT"===e.format||"WEBVTT"===e.format})),$(i,P)),null!=l&&l.disableControls?v(i):un(i,Ln(Ln(Ln({},l),ke),{},{liveVideo:pe,isDvrEnabled:fe,res:ae,sres:ue})),Tn(i,Ln(Ln(Ln({},l),ke),{},{liveVideo:pe}),a,{res:ae,sres:ue});case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}},_n={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Mn(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 Vn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Mn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Mn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Bn,Un=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,r=Hn(e);Nn(i,{res:r},e,{resolve:t,reject:o})},Hn=function(e){var n,t,o,i,r,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===(i=o.ads)||void 0===i?void 0:i.url)||null,f=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.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,g=null==e?void 0:e.token,b=y(g),h=null==b?void 0:b.site;return Vn(Vn({id:null==_n?void 0:_n[h]},!d&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:d,streamingInfo:{videoAssets:Vn(Vn({},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:Vn({},f&&{videoImageUrl:f}),contentDetails:Vn({},(null==p?void 0:p.length)>0&&{closedCaptions:Te(p)})},ads:{preRoll:{adTags:{web:Vn(Vn({},v&&{active:!0}),v&&{url:v})}}}})};function Fn(e,n){return qn.apply(this,arguments)}function qn(){return(qn=n(t.mark((function e(n,o){var i,r,l,a,s,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,r=o.reject,l=null==n?void 0:n.videoId,a=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,k();case 6:u=e.sent,b(l,u).then((function(e){var t,o,c,d;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,ae(null==e?void 0:e.data);var v,f=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(d=n.watchHistory)&&void 0!==d&&d.enable&&!s)if((null===(v=n.watchHistory)||void 0===v?void 0:v.saveOffline)||!1){var p,m,g,y=bn((null===(p=n.watchHistory)||void 0===p?void 0:p.profileId)||"",l,null==n?void 0:n.siteOwner);if(y&&y.length)n.watchHistoryResumeTime=(null===(m=y[0])||void 0===m?void 0:m.watchedTime)||null,n.watchedPercentage=(null===(g=y[0])||void 0===g?void 0:g.watchedPercentage)||null;f.contentType="video",Nn(a,{res:f},n,{resolve:i,reject:r})}else h(l,u).then((function(e){var t,o,i,r,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.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,f.contentType="video"})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})).finally((function(){Nn(a,{res:f},n,{resolve:i,reject:r})}));else Nn(a,{res:f},n,{resolve:i,reject:r})})).catch((function(e){w(e,a,r,l)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kn(e,n){return Wn.apply(this,arguments)}function Wn(){return(Wn=n(t.mark((function e(n,o){var i,r,l,a,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,r=o.reject,e.next=3,k();case 3:l=e.sent,a=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,O(s,l).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,Nn(a,{res:t},n,{resolve:i,reject:r})})).catch((function(e){w(e,a,r,videoId)}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(e,n){return Gn.apply(this,arguments)}function Gn(){return(Gn=n(t.mark((function e(n,o){var i,r,l,a,s,u,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.resolve,l=o.reject,e.next=3,k();case 3:a=e.sent,s=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,de.set(parseInt(u)),c=null==n||null===(i=n.series)||void 0===i?void 0:i.id,j(c,a).then((function(e){var t,o,i,u=e.data,d=e.data.seasons;ve(d);var v=videoId||(null==d||null===(t=d[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);I(c,a),b(v,a).then((function(e){var t,o,i;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,ae(e.data),Nn(s,{res:null==e?void 0:e.data,sres:u},n,{resolve:r,reject:l})})).catch((function(e){w(e,s,l,videoId)}))})).catch((function(e){w(e,s,l)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jn(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 Xn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Jn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Yn(){return{loadVideoInstantly:S,onTimeUpdate:K,getVideoDuration:W,onVideoEnded:z,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=n(t.mark((function n(o,i){var r,l,a,s,u,c,d,v,f,p,m,g,y,h,k,O,j,I,S,T,P,E,D,x,R;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!C(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(y=(null==e?void 0:e.videoSourceUrl)||!1,h=null==e?void 0:e.asat,k=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,O=null==e?void 0:e.videoId,j=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,I=(null==e?void 0:e.streamingInfo)||!1,window.videoId=O,S=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",S),B().set(null==e?void 0:e.refreshToken),S&&!U(S)){n.next=16;break}return i({status:!1,msg:"".concat(S?"Token is expired !":"Missing Authorization Token"),response:{token:S}}),n.abrupt("return");case 16:Bn=JSON.parse(atob(S.split(".")[1]));case 17:return window.siteName=null===(a=Bn)||void 0===a?void 0:a.site,window.siteId=null===(s=Bn)||void 0===s?void 0:s.siteId,e.isAnonymousUser=!(null===(u=Bn)||void 0===u||!u.anonymousId),e.siteOwner=(null===(c=Bn)||void 0===c?void 0:c.site)||null,e.userId=(null===(d=Bn)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(v=Bn)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,T=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable?null:null==e?void 0:e.chromecastReceiverId,P=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,(E=null==e?void 0:e.errors)&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,ie(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),M.set(e.apiBaseUrl),null!=e&&e.skin&&!oe(e.skin)||(e.skin="VL_ONE"),n.next=35,Be(e);case 35:P&&Pe("https://www.googletagmanager.com/gtag/js?id=".concat(P)).then((function(){return H(P)})).catch((function(e){})),(D=null===(g=document)||void 0===g?void 0:g.getElementById("".concat(T)))&&D.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y?(R={directPlaybackUrl:y,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},h?b(x,S).then((function(n){var t=(null==n?void 0:n.data)||{};Nn(T,{res:Xn(Xn({},t),R)},e,{resolve:o,reject:i})})).catch((function(e){w(e,T,i,x)})):Nn(T,{res:R},e,{resolve:o,reject:i})):I?Un(e,{resolve:o,reject:i}):j?zn(e,{resolve:o,reject:i}):k?Kn(e,{resolve:o,reject:i}):Fn(e,{resolve:o,reject:i});case 39:case"end":return n.stop()}}),n)})));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:ee,skip:T,getPlayer:F,play:P,pause:E,detectBrowser:o,rewind:D,loadVideo:u,seekToTimeStamp:G,isPlayerInitialised:C,load:x,authenticateLC:R,dispose:A,enableCaptions:Z,disableCaptions:Q,getCaptions:Y,playSelectedResolution:ne,getSource:s,setVolume:De,getVolume:Ce,disableControls:v,setPlaybackSpeed:J,getEntitlementData:L,adsQueuePointManager:N,getSsaiEvents:_,playerEvents:X}}export{Yn as V,Pn as i};
|