@viewlift/player-backup 1.0.119-backup → 1.0.121-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-e1767094.js +1 -0
- package/cjs/bundle.css +60 -0
- package/cjs/caption-settings-95ee84ba.js +1 -0
- package/cjs/{features-658c8a46.js → features-f75cd4d7.js} +1 -1
- package/cjs/generic-cc7d7e07.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-664f0a09.js → keyboardShortcuts-32e2f8f8.js} +1 -1
- package/cjs/multicam-5c3b676c.js +1 -0
- package/cjs/multicamv2-b35484f8.js +1 -0
- package/cjs/mwebPotraitTray-36cdb29f.js +1 -0
- package/cjs/nextEpisodeButton-28fcd961.js +1 -0
- package/cjs/playlist-9da30b66.js +1 -0
- package/cjs/{renditions-e00ec925.js → renditions-679b535a.js} +1 -1
- package/cjs/resolution-eceef15a.js +1 -0
- package/cjs/series-e724b1cc.js +1 -0
- package/cjs/series-v2-f1e98e62.js +1 -0
- package/cjs/{series-v2-70137d8c.js → series-v2-fd7485a5.js} +1 -1
- package/cjs/settings-icon-6dad65b6.js +1 -0
- package/cjs/{skin-f46e9286.js → skin-0f6301d7.js} +1 -1
- package/cjs/{skin-f027a4a1.js → skin-47d8300b.js} +1 -1
- package/cjs/{skin-142a2c5d.js → skin-4f2bca89.js} +1 -1
- package/cjs/skin-88550a4e.js +1 -0
- package/cjs/{skin-ce922912.js → skin-d13755a0.js} +1 -1
- package/cjs/{skin-ba9b4442.js → skin-edb064e8.js} +1 -1
- package/cjs/{util-abb0e4bb.js → util-b1efcc6f.js} +1 -1
- package/cjs/videoSelector-26c84724.js +1 -0
- package/esm/autoNextVideo-db6283b1.js +1 -0
- package/esm/bundle.css +60 -0
- package/esm/caption-settings-7336f73a.js +1 -0
- package/esm/{features-26a449bf.js → features-250dfa7a.js} +1 -1
- package/esm/generic-ff184c2f.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-9bad5b1e.js → keyboardShortcuts-4b3b8afa.js} +1 -1
- package/esm/multicam-e5b32469.js +1 -0
- package/esm/multicamv2-5e33b343.js +1 -0
- package/esm/mwebPotraitTray-4a697d2a.js +1 -0
- package/esm/nextEpisodeButton-b2820628.js +1 -0
- package/esm/playlist-688d8355.js +1 -0
- package/esm/{renditions-a3821a38.js → renditions-090502aa.js} +1 -1
- package/esm/resolution-ba31e85b.js +1 -0
- package/esm/series-e68a0fbd.js +1 -0
- package/esm/series-v2-2243c975.js +1 -0
- package/esm/{series-v2-0727ee8c.js → series-v2-4cdbf9b1.js} +1 -1
- package/esm/settings-icon-c4fd8e69.js +1 -0
- package/esm/{skin-76d61ddb.js → skin-26b3c430.js} +1 -1
- package/esm/{skin-25101c84.js → skin-5f9fe2f6.js} +1 -1
- package/esm/{skin-002752e0.js → skin-6ab207d5.js} +1 -1
- package/esm/{skin-0707520b.js → skin-87568757.js} +1 -1
- package/esm/skin-d3ab50f7.js +1 -0
- package/esm/{skin-ff917e75.js → skin-fd6c2622.js} +1 -1
- package/esm/{util-a8fb05bb.js → util-ad1895db.js} +1 -1
- package/esm/videoSelector-d7110cde.js +1 -0
- package/package.json +1 -1
- package/cjs/autoNextVideo-483e9153.js +0 -1
- package/cjs/caption-settings-b41710bf.js +0 -1
- package/cjs/generic-a2a5ad78.js +0 -1
- package/cjs/multicam-28ad2186.js +0 -1
- package/cjs/multicamv2-aa481861.js +0 -1
- package/cjs/mwebPotraitTray-65dfc2de.js +0 -1
- package/cjs/nextEpisodeButton-c4f3d621.js +0 -1
- package/cjs/playlist-91a68d26.js +0 -1
- package/cjs/resolution-65c490cf.js +0 -1
- package/cjs/series-232bf4fd.js +0 -1
- package/cjs/series-v2-09adb1a4.js +0 -1
- package/cjs/settings-icon-93d87559.js +0 -1
- package/cjs/skin-0c1c1fc7.js +0 -1
- package/cjs/videoSelector-80449ebf.js +0 -1
- package/esm/autoNextVideo-72386267.js +0 -1
- package/esm/caption-settings-10a68378.js +0 -1
- package/esm/generic-d42b8a76.js +0 -1
- package/esm/multicam-a3a95813.js +0 -1
- package/esm/multicamv2-9e651919.js +0 -1
- package/esm/mwebPotraitTray-a0a61627.js +0 -1
- package/esm/nextEpisodeButton-ba2c9e06.js +0 -1
- package/esm/playlist-2531b9e6.js +0 -1
- package/esm/resolution-b1c446fc.js +0 -1
- package/esm/series-07624a74.js +0 -1
- package/esm/series-v2-624e4fd2.js +0 -1
- package/esm/settings-icon-bcc0a21c.js +0 -1
- package/esm/skin-41dbf549.js +0 -1
- package/esm/videoSelector-accf5414.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-515b2da0.js"),d=require("./generic-cc7d7e07.js"),s=require("./renditions-679b535a.js"),c=require("./resolution-eceef15a.js"),u=require("./localisation-56e0a999.js");function p(e){var t=v();return function(){var n,a=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return i(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/assertThisInitialized");var h=o.getComponent("Component"),m=function(i){a(v,h);var r=p(v);function v(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,v),(n=r.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n.resolutionBitrateMap,n}return n(v,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(n){var a=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(n,a||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),a=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!n||!a)&&n>a}},{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l.SettingsSvgV2())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./settings-icon-8d364c01.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=this.el(),n=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".settings-selector-icon",this.el()).onclick=function(){var a;null!==(a=n.classList)&&void 0!==a&&a.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var a=document.getElementById(this.playerId);if(a){var i=window.getComputedStyle(a,null).getPropertyValue("height");n.style.height="".concat(i),o.dom.appendContent(t,n),a.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=o.dom.createEl("div",{className:"settings-selector-head"}),a=o.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=o.dom.createEl("div",{className:"settings-selector-title",innerHTML:u.getLocalisation("settingsTitle")||"Settings"}),r=o.dom.createEl("div",{className:"settings-selector-content"}),s=o.dom.createEl("div",{className:"settings-container"}),c=this.createVideoQualityContainer();o.dom.appendContent(s,c);var p=this.createAudioQualityContainer();o.dom.appendContent(s,p),o.dom.appendContent(n,a),o.dom.appendContent(n,i),o.dom.appendContent(e,n),o.dom.appendContent(e,r),o.dom.appendContent(r,s),d.handleDrawerResizing(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=d.getPlayer(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=o.dom.createEl("div",{className:"audio-language-container"}),a=o.dom.createEl("div",{className:"audio-language-container-title",innerHTML:u.getLocalisation("audioLanguageText")||"Audio Language"});o.dom.appendContent(n,a);for(var i=function(e){var a,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var r=document.createElement("div");r.className="audio - ".concat(e),r.textContent=null==t||null===(a=t[e])||void 0===a?void 0:a.label;var l=o.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},o.dom.appendContent(i,l),o.dom.appendContent(i,r),o.dom.appendContent(n,i)},r=0;r<t.length;r++)i(r);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=o.dom.createEl("div",{className:"video-quality-container"}),a=o.dom.createEl("div",{className:"video-quality-container-title",innerHTML:u.getLocalisation("videoQualityText")||"Video Quality"});o.dom.appendContent(n,a);var i=[].concat(e(s.getRenditions(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),c.playSelectedResolution(this.playerId,"raw",!0);for(var r=function(e){var a,r,s,p=document.createElement("label"),v=document.createElement("div"),h=document.createElement("div");h.className="video-quality-bitrate-label",v.className="video-quality-holder",p.className="video-quality-label-container",p.setAttribute("for","quality".concat(e));var m=document.createElement("div");m.className="video-quality - ".concat(e);var g=(null==i||null===(a=i[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==i||null===(r=i[e])||void 0===r?void 0:r.height)?"":"p"),y=document.createTextNode(g),f="".concat(t.isEnhancedBitrate(i[e])?u.getLocalisation("enhancedBitrateLabel")||"Enhanced Bitrate":""),b=document.createTextNode(f);if(h.appendChild(b),m.appendChild(y),(null==i||null===(s=i[e])||void 0===s?void 0:s.height)>=720)for(var C=d.parseHtmlString("<span class='hd-rendition'> HD </span>");null!=C&&C.firstChild;)m.appendChild(C.firstChild);var q=o.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});q.setAttribute("type","radio"),q.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?c.playSelectedResolution(t.playerId,a,!0):c.playSelectedResolution(t.playerId,a)};var E=document.createElement("span");E.className=f?"check-mark center":"check-mark";var N=d.parseSvgString(l.TickMarkIcon());E.appendChild(N),v.appendChild(q),v.appendChild(E),v.appendChild(m),o.dom.appendContent(p,v),p.appendChild(h),o.dom.appendContent(n,p)},p=0;p<i.length;p++)r(p);return n}}]),v}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=require("./features-
|
|
1
|
+
"use strict";var e,t=require("./features-f75cd4d7.js"),n=require("./icons-515b2da0.js"),r=require("./generic-cc7d7e07.js"),s=require("@babel/runtime/helpers/defineProperty"),o=require("./keyboardShortcuts-32e2f8f8.js");function l(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 i(e,o){var i=r.getPlayer(e);i.one("play",(function(){var u,c,d,m;null!=o&&o.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)),null!=o&&o.airplay&&"Safari"==r.detectBrowser()&&i.addChild("airPlayButton"),null!=o&&o.chromecastReceiverId&&i.addChild("chromecastButton"),i.addChild("FullscreenToggle"),null===(u=i.getChild("FullscreenToggle"))||void 0===u||null===(c=u.el())||void 0===c||c.appendChild(r.createIconMarkup(n.MinimizeSvg(window.controlsColor))),null===(d=i.getChild("FullscreenToggle"))||void 0===d||null===(m=d.el())||void 0===m||m.appendChild(r.createIconMarkup(n.MaximizeSvg(window.controlsColor))),a(e)})),i.on("loadedmetadata",(function(){window.endFirstFrame(i),"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",n.SettingsSvg())})),i.one("loadedmetadata",(function(){var n;null!=o&&o.streams&&(null==o||null===(n=o.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,o)}))}function a(t){var n=r.getPlayer(t);c(),n.on("pause",(function(){clearTimeout(e),u()})),n.on("play",(function(){c()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){u(),n.paused()||c()})),s.addEventListener("touchstart",(function(){u(),c()})),s.addEventListener("mousemove",(function(){u(),n.paused()||c()}))}function u(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function c(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-679b535a.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.hideControls=a,exports.initialiseSkin=function(e,s){var l;o.initialiseKeyboardEvents(e,s),(null==(l=s)||!l.liveui)&&(null==l||!l.liveVideo)||null!=l&&l.liveui&&null!=l&&l.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.js")})).then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,n){t.addSlowMotion(e)}(e),function(e,t){var s=r.getPlayer(e),o=s.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(r.createIconMarkup(n.NewCaptionsSvg()));var l=document.createElement("div");l.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(l,o.querySelector(".vjs-menu-item"));var i=document.createElement("div");if(i.innerText="Captions",i.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(i),"Safari"==r.detectBrowser()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,s),i(e,s)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-cc7d7e07.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var r=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(t){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-cc7d7e07.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var r=function(r){var i=e.getPlayer(r),t=document.getElementById("".concat(r));t&&t.addEventListener("touchstart",(function(){i.paused()?e.play(r):e.pause(r)}))},i=function(r){var i=e.getPlayer(r);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){i(e),r(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-f75cd4d7.js"),t=require("./icons-515b2da0.js"),n=require("./generic-cc7d7e07.js"),r=require("./renditions-679b535a.js"),i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./autoNextVideo-e1767094.js"),o=require("@babel/runtime/helpers/typeof"),a=require("video.js"),u=require("@babel/runtime/helpers/asyncToGenerator"),s=require("@babel/runtime/regenerator"),d=require("@babel/runtime/helpers/slicedToArray");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-b1efcc6f.js");var c,v,p,m,f=[],h=function(e,t){var r=n.getPlayer(e),i=Math.floor(r.currentTime());if(Math.floor(r.duration())!=i){r.pause(e);var o=n.getVideoIdx();l.switchToNext(o,e,f)}};function g(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 y(e){return x.apply(this,arguments)}function x(){return(x=u(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),l=d(i,2),o=l[0],a=l[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var l=i.width/a,u=i.height/o,s=0;s<o;s++)for(var d=0;d<a;d++){var c=document.createElement("canvas");c.width=l,c.height=u,c.getContext("2d").drawImage(i,d*l,s*u,l,u,0,0,l,u);var v=c.toDataURL("image/png");r.push({uri:v,duration:t.duration})}e(r)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return w.apply(this,arguments)}function w(){return(w=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",g(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function C(e){return E.apply(this,arguments)}function E(){return(E=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return y(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n=e.duration;r[n*t]={src:e.uri,style:{left:"-60px",height:"85px",width:"130px"}}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}c={0:{src:"example-thumbnail.png"}},v=function e(){var t,n,r,i,l;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[r])i.hasOwnProperty(l)&&("object"===o(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},p=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},m=function e(t){return"HTML"!==t.nodeName&&"static"===p(t)("position")?e(t.offsetParent):t},a.registerPlugin("thumbnails",(function(e){var t,n,r,i,l,o,a,u;n=v({},c,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",v(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",(function(e){o=i.duration()})),i.on("loadedmetadata",(function(e){o=i.duration()})),(l=i.controlBar.progressControl).el().appendChild(t),a=function(e){var i,a,u,s,d,c,f,h,g,y;for(a in u=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=m(l.el()).getBoundingClientRect()).width||y.right)+g,c=e.pageX,e.changedTouches&&(c=e.changedTouches[0].pageX),s=c||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=m(l.el()).getBoundingClientRect().left+g,i=Math.floor((s-l.el().offsetLeft)/l.width()*o),n)i>a&&(u=Math.max(u,a));(d=n[u]).src&&r.src!=d.src&&(r.src=d.src),d.style&&r.style!=d.style&&v(r.style,d.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=p(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,d.width||n[0].width)/2)>f?s-=s+h-f:s<h&&(s=h),t.style.left=s+"px"},l.on("mousemove",a),l.on("touchmove",a),u=function(e){t.style.left="-1000px"},l.on("mouseout",u),l.on("touchcancel",u),l.on("touchend",u),i.on("userinactive",u)}));var k=function(){var e=u(s.mark((function e(t,n){var r,i,l,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,l=i.split("\n"),o=[],l.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&l[n-1].includes("#EXT-X-TILES")&&(l[n-1]=l[n-1].split(","),r.uri=t+e,l[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=d(t,2),i=n[0],l=n[1];i=i.toLowerCase(),r[i]=l}))})),o.push(r))})),e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function N(e){return B.apply(this,arguments)}function B(){return(B=u(s.mark((function e(t){var r,i,l,o,a,u,d,c,v,p,m,f,h,g,y,x,b,w,C,E,k,N;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return o=e.sent,e.next=7,o.text();case 7:a=e.sent,u=new DOMParser,d=u.parseFromString(a,"application/xml"),c=null===(i=n.getCurrentVideo())||void 0===i||null===(l=i.video)||void 0===l?void 0:l.runtime,v=d.getElementsByTagName("AdaptationSet"),p=0;case 13:if(!(p<v.length)){e.next=34;break}if("image"!==(m=v[p]).getAttribute("contentType")||"image/png"!==m.getAttribute("mimeType")){e.next=31;break}if(f=m.getElementsByTagName("SegmentTemplate")[0],h=m.getElementsByTagName("Representation")[0],g=h.getElementsByTagName("EssentialProperty")[0],y=g.getAttribute("value"),!f){e.next=31;break}for(f.getAttribute("media"),x=f.getAttribute("duration"),b=f.getAttribute("timescale"),w=x/b,C=Math.round(c/w),E=Math.ceil(C/9),k=f.getAttribute("media"),N=[],p=0;p<E;p++)N.push({duration:w,layout:y,uri:r+"/"+k.replace("$Number$",p)});return e.abrupt("return",N);case 31:p++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function j(){return(j=u(s.mark((function e(t){var r,i,l,o,a,u,d,c,v,p,m,f,h,g,y,x,w,E,B,j,S;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.getPlayer(t),i=r.currentSource(),null==(l=i.src)||!l.includes("m3u8")){e.next=18;break}return e.next=5,b(l);case 5:if(!((null==(o=e.sent)?void 0:o.length)>0)){e.next=16;break}return y=(null==o?void 0:o[0])||null,x=y.uri,w=(null==r||null===(a=r.tech())||void 0===a||null===(u=a.vhs)||void 0===u||null===(d=u.playlists)||void 0===d||null===(c=d.master)||void 0===c||null===(v=c.uri)||void 0===v?void 0:v.substring(0,null==r||null===(p=r.tech())||void 0===p||null===(m=p.vhs)||void 0===m||null===(f=m.playlists)||void 0===f||null===(h=f.master)||void 0===h||null===(g=h.uri)||void 0===g?void 0:g.lastIndexOf("/")))+"/",e.next=11,k(w,x);case 11:return E=e.sent,e.next=14,C(E);case 14:B=e.sent,r.thumbnails(B);case 16:e.next=27;break;case 18:if(null==l||!l.includes("mpd")){e.next=27;break}return e.next=21,N(l);case 21:if(!((null==(j=e.sent)?void 0:j.length)>0)){e.next=27;break}return e.next=25,C(j);case 25:S=e.sent,r.thumbnails(S);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(t,l){var o=n.getPlayer(t);o&&(o.on("loadeddata",(function(){var a,u,s,d,c,v,p;(null===(a=r.getRenditions(t))||void 0===a?void 0:a.length)>0&&e.addSettingsButtonV2(t,l),(null===(u=n.getCaptions(t))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(t,l),!(null!=l&&null!==(s=l.series)&&void 0!==s&&s.enable||null!==(d=window)&&void 0!==d&&null!==(c=d.app_data)&&void 0!==c&&null!==(v=c.appcmsMain)&&void 0!==v&&null!==(p=v.features)&&void 0!==p&&p.auto_play)||null!=l&&l.liveVideo||function(e,t){var r;if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var l;f=[];var o=n.getCurrentSeries();null==o||o.map((function(e){var t;return(t=f).push.apply(t,i(e.episodes))})),null==t||null===(l=t.series)||void 0===l||l.cb}else{var a,u;f=null==t||null===(a=t.relatedVideos)||void 0===a?void 0:a.content,null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var s=n.getPlayer(e);s.on("timeupdate",(function(){var e,t,r=Math.floor(s.currentTime()),i=s.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n.getVideoIdx()<=(null===(t=f)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}));var d,c=f.filter((function(e,t){return t==n.getVideoIdx()}));if((null==c?void 0:c.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,p,m,g,y,x,b,w,C,E,k,N;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var B=null===(p=document.getElementsByClassName("next-ep-title"))||void 0===p?void 0:p[0],j=null===(m=document.getElementsByClassName("next-ep-img"))||void 0===m?void 0:m[0],S=null===(g=document.getElementsByClassName("next-ep-content"))||void 0===g?void 0:g[0],q=null===(y=c[0])||void 0===y?void 0:y.title;(null===(x=q)||void 0===x?void 0:x.length)>60&&(q=q.substr(0,60)+"..."),B.textContent="".concat(q),j.src=(null===(b=c[0])||void 0===b||null===(w=b.gist)||void 0===w||null===(C=w.imageGist)||void 0===C?void 0:C.r16x9)||(null==c||null===(E=c[0])||void 0===E?void 0:E.img)||(null===(k=window)||void 0===k||null===(N=k.customData)||void 0===N?void 0:N.fallbackImage),S.onclick=function(){return h(e)}}else{var T,V,M,P,I,O,A,L,R=document.createElement("div");R.className="next-ep-preview",R.style.visibility="hidden",document.getElementById(e).append(R);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var F=null===(T=c[0])||void 0===T?void 0:T.title,D=document.createElement("img");D.className="next-ep-img",D.src=(null===(V=c[0])||void 0===V||null===(M=V.gist)||void 0===M||null===(P=M.imageGist)||void 0===P?void 0:P.r16x9)||(null==c||null===(I=c[0])||void 0===I?void 0:I.img)||(null===(O=window)||void 0===O||null===(A=O.customData)||void 0===A?void 0:A.fallbackImage);var U=document.createElement("div");U.className="next-ep-title",(null===(L=F)||void 0===L?void 0:L.length)>60&&(F=F.substr(0,60)+"..."),U.textContent="".concat(F);var G=document.createElement("div");G.className="next-ep-content",G.append(D),G.append(U),G.onclick=function(){return h(e)},R.append(X),R.append(G)}}(t,l),function(e,t){var n,r=Math.floor(e/60),i=null===(n=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===n?void 0:n[0];i&&(i.style.marginRight=r>60?"56px":"41px");var l=document.getElementsByClassName("vjs-live-control")[0],o=document.getElementsByClassName("vjs-time-control");t&&l.classList.value.includes("vjs-hidden")&&(o[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==l?void 0:l.liveVideo)||!1),null!=l&&l.liveVideo||n.isMobile()||function(e){j.apply(this,arguments)}(t)})),o.one("play",(function(){var n,r,i,l;null!==(n=window)&&void 0!==n&&null!==(r=n.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.iframeOverlayUrl)})))}exports.initialiseSkin=function(r,i){!function(){"Chrome"==n.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));Promise.resolve().then((function(){return require("./skin-c66e9b42.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),S(r,i),function(e,r){var i,l,o,a,u,s,d=n.getPlayer(e);null==d||null===(i=d.controlBar)||void 0===i||null===(l=i.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),null==d||null===(a=d.controlBar)||void 0===a||null===(u=a.getChild("FullscreenToggle"))||void 0===u||null===(s=u.el())||void 0===s||s.appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var c=document.getElementsByClassName("vjs-time-control");r.liveVideo&&c[0]&&(c[0].style.display="none")}(r,i),function(n,r){var i,l,o,a,u,s;0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(n,"defaultV2",t.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(n,"defaultV2",t.RewindSvgV2());r.liveVideo||e.addSlowMotion(n);(null==r||null===(i=r.relatedVideos)||void 0===i||null===(l=i.content)||void 0===l?void 0:l.length)>0&&e.addVideoSelector(n,null==r?void 0:r.relatedVideos);(null==r||null===(o=r.streams)||void 0===o?void 0:o.length)>1&&e.addMulticamSelector(n,null==r?void 0:r.streams);(null==r||null===(a=r.playlist)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(n,null==r?void 0:r.playlist);null!=r&&null!==(s=r.series)&&void 0!==s&&s.enable&&e.addSeriesSelectorV2(n,r)}(r,i),function(e,t){var r=n.getPlayer(e),i=null==t?void 0:t.tvProviderLogoUrl;if(!i)return;var l=document.createElement("div");l.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",l.append(o),r.el().appendChild(l),r.on("useractive",(function(){l.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||l.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"}))}(r,i)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-f75cd4d7.js"),r=require("./keyboardShortcuts-32e2f8f8.js"),i=require("./icons-515b2da0.js"),n=require("./generic-cc7d7e07.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-679b535a.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(t,s){r.initialiseKeyboardEvents(t,s),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(t,s),function(r,t){var s=n.getPlayer(r),l=(null==t?void 0:t.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",i.SettingsSvg()),l&&Promise.resolve().then((function(){return require("./nextEpisodeButton-28fcd961.js")})).then((function(e){e.initaliseFunctionality(t.sres.seasons,n.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var i;l&&(e.addSeriesModule(r,null==t||null===(i=t.sres)||void 0===i?void 0:i.seasons,t),e.addNextEpisodeButton(t.sres,t.res,r))}))}(t,s),function(e,r){var t,s,l,o,a=n.getPlayer(e),u=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(u&&(u.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(t=a.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(s=t.el())||void 0===s||s.appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(l=a.controlBar.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var m=a.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(i.NewCaptionsSvg()));var v=document.createElement("div");v.classList.add("caption-header"),m.querySelector(".vjs-menu-content").insertBefore(v,m.querySelector(".vjs-menu-item"))}(t,s)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-cc7d7e07.js"),r=require("./features-f75cd4d7.js"),i=require("./renditions-679b535a.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./localisation-56e0a999.js"),exports.initialiseSkin=function(t,n){Promise.resolve().then((function(){return require("./skin-fc1e7e52.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e.getPlayer(t).on("loadeddata",(function(){var u;(null===(u=i.getRenditions(t))||void 0===u?void 0:u.length)>0&&r.addSettingsButtonV2(t,n),null!=n&&n.disableCaptions&&e.removeCaptions(t)}))}(t,n),function(i,t){var n=e.getPlayer(i);n.controls(!1),r.addDBClickFullScreen(i)}(t)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./generic-
|
|
1
|
+
"use strict";var t=require("./generic-cc7d7e07.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-515b2da0.js"),l=require("./generic-cc7d7e07.js"),d=require("./autoNextVideo-e1767094.js"),s=require("./localisation-56e0a999.js");function c(e){var t=u();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-b1efcc6f.js");var v=r.getComponent("Component"),m=function(o){n(u,v);var i=c(u);function u(t){var n,o,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&(l.setVideoIdx(0),d.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb})),r}return t(u,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(l.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",l.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),r.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),l.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var d=r.dom.createEl("div",{className:"video-selector-title",innerHTML:s.getLocalisation("relatedVideoTitle")||"Recommended"}),c=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),v=function(e){var n,o,i,a,d,s=r.dom.createEl("div",{className:"video -".concat(e)}),v=r.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";l.highlightVideo(e),l.load(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var m=document.createElement("img");m.className="related-thumbnail-image",m.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),m.alt="No Thumbnail Available",v.append(m);var p=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});r.dom.appendContent(s,v),r.dom.appendContent(s,p),r.dom.appendContent(u,s),r.dom.appendContent(c,u)},m=0;m<this.videos.length;m++)v(m);r.dom.appendContent(o,i),r.dom.appendContent(o,d),r.dom.appendContent(e,o),r.dom.appendContent(e,c),l.handleDrawerResizing(this.playerId,e)}}]),u}();exports.default=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as n,q as t,V as i,c as o,W as e,S as a,X as c}from"./generic-ff184c2f.js";import{a as u}from"./util-ad1895db.js";var s,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;s=null==l?void 0:l.cb;var h=l.playerId;u(h,(function(){var u=n(h);0!==(null==u?void 0:u.currentTime())&&((f=a())>d.length-1||(c(f+1),t(h,d[f].id).then((function(n){i(f),o(n.response),f++,v(n)})).catch((function(n){v(n),i(f),f++,r=setTimeout((function(){e(h)&&m(f,h,d)}),5e3)}))))}))},m=function n(o,e,a,u){f=o,o>a.length-1||(c(f+1),t(e,a[o].id).then((function(n){i(f),f++,v(n)})).catch((function(t){v(t),setTimeout((function(){i(f),f++,n(f,e,a)}),5e3)})))},v=function(n){s&&s(n)};export{l as a,m as s};
|
package/esm/bundle.css
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
|
|
18
19
|
.widget-selection{
|
|
19
20
|
display: flex;
|
|
20
21
|
align-items: center;
|
|
@@ -135,7 +136,66 @@
|
|
|
135
136
|
.widget-selector-content #sr-widget{
|
|
136
137
|
padding: 0 18px;
|
|
137
138
|
}
|
|
139
|
+
/* nextep */
|
|
140
|
+
.next-ep-preview{
|
|
141
|
+
position: absolute;
|
|
142
|
+
height: min-content;
|
|
143
|
+
width: 300px;
|
|
144
|
+
bottom: 16%;
|
|
145
|
+
right: 1.5%;
|
|
146
|
+
padding: 13px;
|
|
147
|
+
border-radius: 4px;
|
|
148
|
+
background: rgba(0, 0, 0, 0.75);
|
|
149
|
+
}
|
|
150
|
+
.next-ep-img{
|
|
151
|
+
width: 185px;
|
|
152
|
+
height: 95px;
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
.next-ep-img-container{
|
|
156
|
+
width: 100%;
|
|
157
|
+
height: 100%;
|
|
158
|
+
}
|
|
159
|
+
.next-ep-header{
|
|
160
|
+
text-align: left;
|
|
161
|
+
font-weight: bold;
|
|
162
|
+
font-size: 18px;
|
|
163
|
+
margin-bottom: 8px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.next-ep-title{
|
|
167
|
+
font-size: 15px;
|
|
168
|
+
margin-left: 8px;
|
|
169
|
+
|
|
170
|
+
}
|
|
138
171
|
|
|
172
|
+
.next-ep-content{
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
}
|
|
176
|
+
.next-ep-content:hover{
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@media (max-width:600px){
|
|
181
|
+
.next-ep-preview{
|
|
182
|
+
width: 170px;
|
|
183
|
+
right: 2.5%;
|
|
184
|
+
padding: 6px;
|
|
185
|
+
bottom: 56px;
|
|
186
|
+
}
|
|
187
|
+
.next-ep-header{
|
|
188
|
+
font-size: 12px;
|
|
189
|
+
}
|
|
190
|
+
.next-ep-img {
|
|
191
|
+
width: 100px;
|
|
192
|
+
height: 60px;
|
|
193
|
+
}
|
|
194
|
+
.next-ep-title {
|
|
195
|
+
font-size: 9px;
|
|
196
|
+
margin-left: 8px;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
139
199
|
/* a wrapper element that tracks the mouse vertically */
|
|
140
200
|
.vjs-thumbnail-holder {
|
|
141
201
|
position: absolute;
|
|
@@ -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-3e9a1686.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import{x as l,w as s,_ as d,$ as p,a0 as m,a1 as u,v}from"./generic-ff184c2f.js";import"axios";import"js-cookie";import"ua-parser-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")?(d(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",p(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),m(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),u(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),d=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){v(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},p=0;p<c.length;p++)d(p);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 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{g as a,Q as s,r as c,m as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{g as a,Q as s,r as c,m as d}from"./generic-ff184c2f.js";import{g as u}from"./renditions-090502aa.js";import{g as m}from"./localisation-0bf399a1.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 f(e){var t=h();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 h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=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=m("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)},g=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-rewind-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){c(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),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 c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){d(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},C=function(e,t){import("./multicam-e5b32469.js").then((function(n){var r=n.default,o=t.streams,l=a(e);i.registerComponent("multicamModule",r),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var n=document.querySelector(".vjs-control-bar");n&&"live"==(null==t?void 0:t.skin)&&(n.style.background="transparent")},B=function(e,t,n){import("./resolution-ba31e85b.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a(e),s=u(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:s},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-b2820628.js").then((function(r){var o=r.default,l=a(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){import("./mwebPotraitTray-4a697d2a.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("mwebPotraitTray",r),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},k=function(e,t,n){import("./series-e68a0fbd.js").then((function(r){var o=r.seriesModule,l=a(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(e){s[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},d=0;d<s.length;d++)c(d)}))},E=function(e,t){import("./videoSelector-d7110cde.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},O=function(e,t){import("./caption-settings-7336f73a.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("captionSelector",c),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===(s=l[0])||void 0===s||s.remove(),d&&d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},w=function(e,t){import("./settings-icon-c4fd8e69.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("settingsSelector",c),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===(s=l[0])||void 0===s||s.remove(),d&&d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},S=function(e,t){import("./playlist-688d8355.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},I=function(t,n){import("./series-v2-2243c975.js").then((function(r){var o=r.default,l=a(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(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}({playerId:t},n),l.controlBar.children().length-3)}))},M=function(e,t){import("./multicamv2-5e33b343.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},P=function(e,t){var n=a(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},T=function(e){var t=a(e).el(),n=0,r=a(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};export{C as a,B as b,j as c,v as d,k as e,b as f,y as g,g as h,w as i,O as j,P as k,E as l,M as m,S as n,I as o,T as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import r from"js-cookie";import a from"ua-parser-js";import l from"@babel/runtime/helpers/toConsumableArray";var d={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)}function c(e,t){u("event",e,t)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?v(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"1.0.118",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}};window.vl_player_version=f.version;var p=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:F(),params:m({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},w=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:S()+d.getLinearChannelDetails,params:m(m(m(m(m({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},g=function(e,t){var n,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:S()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},I=function(){var e=t(n.mark((function e(t,i){var r,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(r=e.sent,"v1"!=i){e.next=8;break}return a={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",o({url:O(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=i){e.next=10;break}return e.abrupt("return",o({url:D(),method:"POST",headers:{Authorization:r},data:m({},t),params:m({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),E=function(e,t){var n,i,r=(null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),u=(null==d?void 0:d.site)||null;return o({method:"GET",url:b(e),params:{site:u},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return o({method:"GET",url:_(e,v),headers:{Authorization:t,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},h=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return o({method:"GET",url:y(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var i=e.videoId;return o({method:"GET",url:T(i),headers:{Authorization:e.token},timeout:15e3})},T=function(e){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},y=function(){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},b=function(e){return S()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},_=function(e,t){return S()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(t,"/").concat(e)},O=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},D=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},F=function(){var e,t,n,i,o=S()+"".concat(null==d?void 0:d.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":o},S=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},P=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var R,V,C,W,N,k,B=function(){var e=t(n.mark((function e(){var t,i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L().get(),i=S(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),x=null,j=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!P(t)){e.next=6;break}return x||(x=B().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){x=null}))),e.abrupt("return",x);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},U=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},H=function(e){V=e},z=function(){return V},G=function(e){R=e},Y=function(){return R},q=function(){return C},J=function(e){C=e},X=function(e){N=e},K=function(){return N},Q=function(e){W=new Map,e.map((function(e,t){W.set(e.id,t)}))},Z=function(e){if(W){var t=W.get(e);J(t+1)}},$=(k=0,{set:function(e){e>=0&&(k=e)},get:function(){return k}});function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function te(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ne=function(){var e,t,n,i,o,r,a,l=z();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());c(r?"FAILED_TO_START":"DROPPED_STREAM",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),c("PLAY",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))c("BUFFERING",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",te({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;c("AD_REQUEST",te({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",te({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ne()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(le(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var le=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=te,e.t1=te,e.t2=te({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=ne(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=20,re();case 20:return e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,j();case 37:f=e.sent,o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:f},contentType:"application/x-www-form-urlencoded",dataType:"text",data:m}).catch((function(e){console.error(e)}));case 39:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var de=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ue=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ce=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function me(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=a(navigator.userAgent);var fe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},pe=function(e){var t=we(e,"video.tags",[]),n=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},we=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},ge=function(){var e,t,n,i,o,a,l,d,u,s,c,v,m,f,p,w,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,h=(null==E?void 0:E.contentType)||"video",T=null==E||null===(e=E[h])||void 0===e?void 0:e.metadata,y=$e(I);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===h?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:we(E,"video.gist.id",""),F=me(me({},he(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:fe(O,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:we(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:pe(E),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+we(E,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:we(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(f=m.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:we(E,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Ee(),VIEWLIFT_SEASON_NUMBER:Ie(),VIEWLIFT_CONTENT_TAGS:pe(E)},null===(p=window)||void 0===p||null===(w=p.customData)||void 0===w?void 0:w.macros);for(var S in F){var P=new RegExp(S,"g");g=g.replace(P,F[S])}return g},Ie=function(){var e=$.get();return e>=0?e+1:1},Ee=function(){var e,t,n,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=$.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},he=function(e){var t,n,i,o,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var u=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(ce()?u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=ce()?me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=ce()?me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},Te=function(e,t){var n,i,o,r,a,l,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[p])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[p])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,I=null==e||null===(r=e[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,E=(null==e||null===(l=e[p])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=I&&I.hls)return be(I);if(w){var T=_e(g,t);return T.src=ge(T.src,t,e),T}if("Safari"!==se()&&h)return ye(g);if(E){var y=be(g);return y.src=ge(y.src,t,e),y}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,t,e),b}return null},ye=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},be=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},_e=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=se();if($e(t),"Safari"===a){var l=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return Oe(t),l}var d,u={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Oe(t),u.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var Oe=function(e){var t=$e(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},De=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Fe=function(e,t){var n,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=$e(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},Se=function(e,t){for(var n=$e(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},Pe=function(e){var t,n=$e(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},Ae=function(e){var t=$e(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},Le=function(e,t){var n=$e(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},Re=!1,Ve=function(e,t,n){var i=ge(t,e,n),o=$e(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,r=$e(e);if(null!==r.el_){Re=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Re&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},Ce=["live","carousel","V2","defaultV2","multiplayer","minimalist"],We=function(e){return!Ce.includes(e)},Ne=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},ke=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},Be=function(e){return ke(e)},xe=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},je=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},Me=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Ue="",He=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&Ue!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),Ue=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},ze=function(e,t){var n,i=$e(e),o=$e(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){Ge(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){Ge(e,t)}),50)}))},Ge=function(e,t){var n;if(t){var i=document.getElementById(e),o=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==o&&(t.style.height="".concat(o))}};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var qe=function(e){i(e).play()},Je=function(e){i(e).pause()},Xe=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ke=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Qe=function(e){return!!i.getPlayer("".concat(e))},Ze=function(e){return i(e).paused()},$e=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},et=function(){var e=t(n.mark((function e(t,i){var o,r,a,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,j();case 3:return r=e.sent,a=$e(t),e.abrupt("return",new Promise((function(e,n){w(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=Te(r,t);H(r),l&&o?(rt(t,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),tt=function(){var e=t(n.mark((function e(t,i,o){var r,a,l,d,u,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return d=e.sent,(Y()||null)&&Z(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&E(i,d).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,f,p,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;H(i.data);var I=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(f=m.adTags)||void 0===f||null===(p=f.web)||void 0===p?void 0:p.url);I&&Ve(t,I,w);var E=Te(w,t);if(E){var h,T,y,b,_,O,D,F,S,P,A,L,R,V,C=(null==w||null===(h=w.video)||void 0===h||null===(T=h.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),W=$e(t);if(W.poster(C),rt(t,E),W.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),W.on("loadeddata",(function(){ue(),e({status:!0,msg:"Video Loaded",response:w})})),W.one("play",(function(){u&&s<95&&setTimeout((function(){W.currentTime(u)}),0)})),W.one("error",(function(){var e;n({status:!1,msg:(null==W||null===(e=W.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(F=D.closedCaptions)||void 0===F?void 0:F.length)>0||(null==w||null===(S=w.video)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0)A=((null==w||null===(L=w.video)||void 0===L||null===(R=L.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==w||null===(V=w.video)||void 0===V?void 0:V.closedCaptions)).filter((function(e){return"VTT"===e.format})),Le(t,A);else Ae(t)}else de(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){at(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),nt=function(e,t,n){var i=$e(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},it=function(e){var t=$e(e);if(ot(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ot=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()},rt=function(e,t){var n=$e(e);n&&n.src(t)},at=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Qe(n)&&de(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ye(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ye(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},lt=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{Ge as $,M as A,L as B,P as C,We as D,s as E,p as F,at as G,g as H,w as I,E as J,Me as K,Ve as L,De as M,Le as N,$ as O,G as P,ke as Q,Be as R,q as S,Y as T,ce as U,xe as V,Ze as W,J as X,Ae as Y,Ne as Z,je as _,z as a,He as a0,ze as a1,Q as a2,Z as a3,Te as b,H as c,se as d,ue as e,K as f,$e as g,de as h,h as i,X as j,nt as k,rt as l,Xe as m,Je as n,Qe as o,qe as p,tt as q,Ke as r,I as s,et as t,it as u,Fe as v,Se as w,Pe as x,lt as y,U as z};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{d as e,g as n,s as t,a as o,b as i,l,c as r,e as a,h as s,f as u,i as d,j as c,k as v,m,p,n as f,r as w,o as h,q as y,t as g,u as b,v as k,w as j,x as I,y as O,z as T,A as P,B as S,C,D as x,E as D,F as R,G as A,H as E,I as B,J as V,K as H,L,M as _,N as M,O as N,P as U}from"./generic-d42b8a76.js";import F from"@babel/runtime/helpers/asyncToGenerator";import q from"@babel/runtime/helpers/defineProperty";import z from"@babel/runtime/regenerator";import J from"video.js";import G from"@babel/runtime/helpers/typeof";import{o as K,g as X,a as W,s as Y,b as Q}from"./util-a8fb05bb.js";import{g as Z}from"./renditions-a3821a38.js";import{playSelectedResolution as $}from"./resolution-b1c446fc.js";import{s as ee}from"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";var ne,te,oe=function(e){return new Promise((function(n,t){if(ie(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)}}))},ie=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},le=function(){var t=F(z.mark((function t(o){var i,l,r,a;return z.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n(null==o?void 0:o.playerId),null!=o&&null!==(i=o.series)&&void 0!==i&&i.enable||null==o||!o.chromecastReceiverId){t.next=20;break}return t.next=4,import("@silvermine/videojs-chromecast");case 4:return a=t.sent,t.prev=5,t.next=8,oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),console.log("Error",t.t0);case 13:return t.prev=13,a.default(J),t.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=o&&o.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return t.stop()}}),t,null,[[5,10,13,16]])})));return function(e){return t.apply(this,arguments)}}(),re=function(e,t){var o=n(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,r,a=this.el(),s=J.dom.getPointerPosition(a,n).x;J.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(u),u&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}}))};function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ue=[],de=0,ce=null;function ve(e,n,i){var l,r,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];te=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.apiVersion)||"v1";var c=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(e.currentTime()),m=Math.floor(e.duration()),p=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,f=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,w=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,h=Math.floor(e.currentTime()),y=d?100:Math.floor(v/m*100),g={};w?function(e,n,t){var i=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),l=me(i),r=(new Date).getTime(),a=o(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return se(se({},e),{},q({},n,s[n]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ne}));d<0?l.push(se(se({content:u},e),{},{addedDate:r,updateDate:r})):l[d]=se(se(se({},l[d]),e),{},{updateDate:r});localStorage.setItem("".concat(i),JSON.stringify(l))}(g={completed:d,watchedTime:h,watchedPercentage:y},c,n.siteOwner):("v1"==te?g={videoId:ne,watchedTime:h,watchedPercentage:y,siteOwner:n.siteOwner,userId:n.userId,xApiKey:p}:"v2"==te&&(g=se(se({videoId:ne,watchedTime:h,watchedPercentage:y,doneWatching:d,profileId:c},ce&&{seriesId:ce}),f&&{originalObjectId:f})),t(g,te).then((function(e){})).catch((function(e){}))),de=v+i}function me(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}var pe=function(e,t,o){var i=n(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var l=parseFloat(t)/100;i.volume(l),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},fe=function(e){var t=n(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},we=!1,he=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!we){var a=ye(e,"videoAssets","secondaryVideoAssets"),s=i(a,n);return s&&l(n,s),we=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ye(e,n,t){if(Array.isArray(e))return e.map((function(e){return ye(e,n,t)}));if(null!==e&&"object"===G(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]=ye(e[i],n,t)})),o}return e}function ge(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 be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ge(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke=function(e,t,i,l){var d,c,v=l.res,m=l.sres,p=n(e),f=(null==v?void 0:v.contentType)||"video",w=(null==v||null===(d=v[f])||void 0===d||null===(c=d.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;r(v),p&&(p.on("loadstart",(function(){w&&i.resolve({status:!0,msg:"Video Loaded",response:v})})),p.on("loadeddata",(function(){var l,r;(null==p||!p.muted())&&pe(e,sessionStorage.getItem("volume")||"100");var s=o();if(a(),i.resolve(be({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:v}:{response:v})),null!=t&&t.watchHistory&&null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var u,d,c=be(be({},t),v);!function(e,t,o){var i,l,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ce=null==t||null===(l=t.series)||void 0===l?void 0:l.id),ue=[],de=0,ne=o;var a=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=n(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());ue.includes(de)||(e==de?(ue.push(e),ve(s,t,a)):e>de&&(de=e+a))})),s.one("ended",(function(){ve(s,t,a,!0)})))}(e,c,null==s||null===(u=s.video)||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.id)}})),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,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,w=p.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(f)}})),p.on("loadedmetadata",(function(){window.endFirstFrame(p)})),p.tech_.on("retryplaylist",(function(){w&&he(v,e)})),p.on("error",(function(){var n,t;4===p.error().code&&w?he(v,e):(s(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured"}))})),p.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,l,r=null===(n=o())||void 0===n||null===(i=n.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.id,a=u().get(r)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){p.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),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(w){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}})))},je=function(e,n){var t=null==n?void 0:n.skin;"live"==t?import("./skin-76d61ddb.js").then((function(t){t.initialiseSkin(e,n)})):"default"==t?import("./skin-002752e0.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-ff917e75.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-41dbf549.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-25101c84.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t&&import("./skin-0707520b.js").then((function(t){t.initaliseSkin(e,n)}))},Ie=function(e,n){n.controlBar.el_.style.color=e,n.controlBar.el_.querySelector(".vjs-play-progress")&&(n.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),n.controlBar.el_.querySelector(".vjs-volume-level")&&(n.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var Oe,Te=function(){var e=F(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=F(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){J.getPlugin("eme")||J.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(J)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(J)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),oe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Te,loadEMELibrary:Pe});function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var De=function(t,o,r,a){var u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A,E,B,V,N,U,G,K,X,W,Y,Q=o.res,Z=void 0===Q?null:Q,$=o.sres,ee=void 0===$?null:$;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(m=v.getInstance())||void 0===m||m.S;var ne=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(p=Z)||void 0===p?void 0:p.contentType)||"video",oe=H(null===(f=Z)||void 0===f||null===(w=f[te])||void 0===w||null===(h=w.gist)||void 0===h?void 0:h.videoImageUrl)||H(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),ie=(null===(j=Z)||void 0===j||null===(I=j[te])||void 0===I||null===(T=I.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,ae=(null===(P=Z)||void 0===P||null===(S=P[te])||void 0===S||null===(C=S.streamingInfo)||void 0===C?void 0:C.isLiveStream)||!1,se=(null==r?void 0:r.drmLibrary)||!1,ue=(null===(x=Z)||void 0===x||null===(D=x.ads)||void 0===D||null===(R=D.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(E=A.web)||void 0===E?void 0:E.active)&&(null===(B=Z)||void 0===B||null===(V=B.ads)||void 0===V||null===(N=V.preRoll)||void 0===N||null===(U=N.adTags)||void 0===U||null===(G=U.web)||void 0===G?void 0:G.url);Z=xe(xe({},Z),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var de=(Y={controls:0!=(null==r?void 0:r.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==r?void 0:r.muted)||!1,autoplay:(null==r?void 0:r.autoplay)||!1,controlBar:{volumePanel:("default"==r.skin||"defaultV2"==r.skin||"live"==(null==r?void 0:r.skin))&&{inline:!1},fullscreenToggle:"default"==r.skin||"defaultV2"==r.skin,audioTrackButton:!1,pictureInPictureToggle:(r.skin,!1)},muteToggle:"multiplayer"==r.skin,liveui:ie},q(Y,"autoplay",null==r?void 0:r.autoplay),q(Y,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!ue),q(Y,"loop",(null==r?void 0:r.loop)||!1),q(Y,"audioPosterMode",null==r?void 0:r.audioPosterMode),q(Y,"html5",xe(xe({dash:xe(xe({},!J.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}},null==r?void 0:r.dash),vhs:xe(xe({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(K=r.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(X=r.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(W=r.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),q(Y,"poster",oe),q(Y,"techOrder",ne),q(Y,"chromecast",{requestCustomDataFn:function(e){var o=n(t),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,l,r,a,s,u,d,c,v,m=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){p.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;p.licenseUrl=f;var w=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];p.licenseToken=w}var h=(null==e||null===(o=e[m])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=h;var y=null==e||null===(l=e[m])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=y;var g=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=g;var b=null==e||null===(u=e[m])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,e,i)}}),Y);if(!J.getPlayers()[t])var ce=J(t,de,function(){var n=F(z.mark((function n(){var o,u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A;return z.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,le(r);case 2:if(ae&&a.resolve(xe({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Z}:{response:Z})),window.initialise(ce),window.firstFrame(ce),"white"!==window.controlsColor&&Ie(window.controlsColor,ce),/Android/i.test(navigator.userAgent)&&(J.options.vhs.overrideNative=!0),k=null===(o=Z)||void 0===o||null===(u=o[te])||void 0===u?void 0:u.drmEnabled,j=null===(d=Z)||void 0===d||null===(c=d[te])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!k&&!se){n.next=22;break}if("Safari"!==e()){n.next=15;break}return n.next=13,Pe();case 13:n.next=22;break;case 15:if("caliente"!=(null===(I=window)||void 0===I?void 0:I.siteName)){n.next=20;break}return n.next=18,Pe();case 18:n.next=22;break;case 20:return n.next=22,Te();case 22:if(null==r||!r.videoSourceUrl){n.next=25;break}return n.next=25,Te();case 25:ie&&re(t,j),!ue||null!=r&&null!==(m=r.customData)&&void 0!==m&&m.disableAds||L(t,ue,Z),T=i(Z,t),null!=r&&r.nearestClusterUrl&&(T=_(T,r.nearestClusterUrl)),T?l(t,T):(a.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Z}),s(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Z)||void 0===p||null===(f=p[te])||void 0===f||null===(w=f.contentDetails)||void 0===w||null===(h=w.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.closedCaptions)||void 0===b?void 0:b.length)>0)&&(A=(null===(S=Z)||void 0===S||null===(C=S[te])||void 0===C||null===(x=C.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(D=Z)||void 0===D||null===(R=D[te])||void 0===R?void 0:R.closedCaptions),P=A.filter((function(e){return"VTT"===e.format})),M(t,P)),null!=r&&r.disableControls?O(t):je(t,xe(xe(xe({},r),de),{},{liveVideo:ae,isDvrEnabled:ie,res:Z,sres:ee})),ke(t,xe(xe(xe({},r),de),{},{liveVideo:ae}),a,{res:Z,sres:ee});case 33:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Re(){return{loadVideoInstantly:v,onTimeUpdate:K,getVideoDuration:X,onVideoEnded:W,init:function(n){return new Promise((function(t,o){var i,l,a,s,u,v,m,p,f,w,y;if(!h(null==n?void 0:n.playerId)){var g=(null==n?void 0:n.videoSourceUrl)||!1,b=null==n?void 0:n.asat,k=(null==n||null===(i=n.epg)||void 0===i?void 0:i.enable)||!1,j=null==n?void 0:n.videoId,I=(null==n||null===(l=n.series)||void 0===l?void 0:l.enable)||!1;window.videoId=j;var O=null==n?void 0:n.token;if(P(n)){if(S().set(null==n?void 0:n.refreshToken),!O||C(O))return void o({status:!1,msg:"".concat(O?"Token is expired !":"Missing Authorization Token"),response:{token:O}});Oe=JSON.parse(atob(O.split(".")[1]))}window.siteId=null===(a=Oe)||void 0===a?void 0:a.siteId,window.siteName=null===(s=Oe)||void 0===s?void 0:s.site,n.isAnonymousUser=!(null===(u=Oe)||void 0===u||!u.anonymousId),n.siteOwner=(null===(v=Oe)||void 0===v?void 0:v.site)||null,n.userId=(null===(m=Oe)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(p=Oe)||void 0===p?void 0:p.userId),window.watchHistory=n.watchHistory||null,sessionStorage.setItem("vlp_token",O);var T=null==n?void 0:n.playerId;n.chromecastReceiverId=null!=n&&n.series?null:null==n?void 0:n.chromecastReceiverId;var H=null==n?void 0:n.airplay,L=null==n?void 0:n.apiBaseUrl,_=(null==n||null===(f=n.analytics)||void 0===f?void 0:f.gaId)||null,M=null==n?void 0:n.errors;M&&(window.customErrors=M),window.customData=null==n?void 0:n.customData,ee(null==n||null===(w=n.customData)||void 0===w?void 0:w.localisation),L&&(window.playerEntitlementUrl=L),window.controlsColor=(null==n?void 0:n.controlsColor)||"white",null!=n&&n.skin&&!x(n.skin)||(n.skin="defaultV2"),Promise.resolve().then((function(){return Se})).then((function(e){e.importIMA()})),H&&"Safari"==e()&&Promise.resolve().then((function(){return Se})).then((function(e){e.importAirplay()})),_&&oe("https://www.googletagmanager.com/gtag/js?id=".concat(_)).then((function(){return D(_)})).catch((function(e){}));var F=null===(y=document)||void 0===y?void 0:y.getElementById("".concat(T));if(F&&F.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var q="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",z={directPlaybackUrl:g,id:q};b?R(q,O).then((function(e){De(T,{res:xe(xe({},e),z)},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,q)})):De(T,{res:z},n,{resolve:t,reject:o})}else if(I){var J,G=sessionStorage.getItem("season-idx")||0;N.set(parseInt(G));var K=null==n||null===(J=n.series)||void 0===J?void 0:J.id;E(K,O).then((function(e){var i,l,a,s=e.data,u=e.data.seasons;U(u);var v=j||(null==u||null===(i=u[0])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(e,n){var t=new Map;d({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),c(t)})).catch((function(e){return console.log(e)}))}(K,O),R(v,O).then((function(e){var i,l,a;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(e.data),De(T,{res:null==e?void 0:e.data,sres:s},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))})).catch((function(e){A(e,T,o)}))}else if(k){var X=null==n?void 0:n.epg;B(X,O).then((function(e){var i=null==e?void 0:e.data;i.contentType="linearchannel",i.channelId=null==X?void 0:X.channelId,De(T,{res:i},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}else R(j,O).then((function(e){var i,l,a,s;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(null==e?void 0:e.data);var u,d=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(s=n.watchHistory)&&void 0!==s&&s.enable)if((null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,m,p=function(e,n,t){var o=me(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}((null===(c=n.watchHistory)||void 0===c?void 0:c.profileId)||"",j,null==n?void 0:n.siteOwner);if(p&&p.length)n.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,n.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;d.contentType="video",De(T,{res:d},n,{resolve:t,reject:o})}else V(j,O).then((function(e){var i,l,r,a,s,u;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,n.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",De(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){var i,l,r,a;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(e)),De(T,{res:d},n,{resolve:t,reject:o})}));else De(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}}))},getRenditions:Z,skip:m,getPlayer:n,play:p,pause:f,detectBrowser:e,rewind:w,loadVideo:l,seekToTimeStamp:Y,isPlayerInitialised:h,load:y,authenticateLC:g,dispose:b,enableCaptions:k,disableCaptions:j,getCaptions:I,playSelectedResolution:$,getSource:i,setVolume:pe,getVolume:fe,disableControls:O,setPlaybackSpeed:Q,getEntitlementData:T}}export{Re as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{d as e,g as n,s as t,a as o,b as i,l,c as r,e as a,h as s,f as u,i as d,j as c,k as v,m,p,n as f,r as w,o as h,q as y,t as g,u as b,v as k,w as j,x as I,y as O,z as T,A as P,B as S,C,D as x,E as D,F as R,G as A,H as E,I as B,J as V,K as H,L,M as _,N as M,O as N,P as U}from"./generic-ff184c2f.js";import F from"@babel/runtime/helpers/asyncToGenerator";import q from"@babel/runtime/helpers/defineProperty";import z from"@babel/runtime/regenerator";import J from"video.js";import G from"@babel/runtime/helpers/typeof";import{o as K,g as X,a as W,s as Y,b as Q}from"./util-ad1895db.js";import{g as Z}from"./renditions-090502aa.js";import{playSelectedResolution as $}from"./resolution-ba31e85b.js";import{s as ee}from"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";var ne,te,oe=function(e){return new Promise((function(n,t){if(ie(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)}}))},ie=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},le=function(){var t=F(z.mark((function t(o){var i,l,r,a;return z.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n(null==o?void 0:o.playerId),null!=o&&null!==(i=o.series)&&void 0!==i&&i.enable||null==o||!o.chromecastReceiverId){t.next=20;break}return t.next=4,import("@silvermine/videojs-chromecast");case 4:return a=t.sent,t.prev=5,t.next=8,oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),console.log("Error",t.t0);case 13:return t.prev=13,a.default(J),t.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=o&&o.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return t.stop()}}),t,null,[[5,10,13,16]])})));return function(e){return t.apply(this,arguments)}}(),re=function(e,t){var o=n(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,r,a=this.el(),s=J.dom.getPointerPosition(a,n).x;J.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(u),u&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}}))};function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ue=[],de=0,ce=null;function ve(e,n,o){var i,l,r,a,s,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];te=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration()),m=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.xapiKey,p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,w=Math.floor(e.currentTime()),h=u?100:Math.floor(c/v*100),y={};f?pe(y={completed:u,watchedTime:w,watchedPercentage:h},d,n.siteOwner):("v1"==te?y={videoId:ne,watchedTime:w,watchedPercentage:h,siteOwner:n.siteOwner,userId:n.userId,xApiKey:m}:"v2"==te&&(y=se(se({videoId:ne,watchedTime:w,watchedPercentage:h,doneWatching:u,profileId:d},ce&&{seriesId:ce}),p&&{originalObjectId:p})),t(y,te).then((function(e){})).catch((function(e){}))),de=c+o}function me(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function pe(e,n,t){var i=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),l=me(i),r=(new Date).getTime(),a=o(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return se(se({},e),{},q({},n,s[n]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ne}));d<0?l.push(se(se({content:u},e),{},{addedDate:r,updateDate:r})):l[d]=se(se(se({},l[d]),e),{},{updateDate:r}),localStorage.setItem("".concat(i),JSON.stringify(l))}var fe=function(e,t,o){var i=n(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var l=parseFloat(t)/100;i.volume(l),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},we=function(e){var t=n(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},he=!1,ye=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!he){var a=ge(e,"videoAssets","secondaryVideoAssets"),s=i(a,n);return s&&l(n,s),he=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ge(e,n,t){if(Array.isArray(e))return e.map((function(e){return ge(e,n,t)}));if(null!==e&&"object"===G(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]=ge(e[i],n,t)})),o}return e}function be(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(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?be(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var je=function(e,t,i,l){var d,c,v=l.res,m=l.sres,p=n(e),f=(null==v?void 0:v.contentType)||"video",w=(null==v||null===(d=v[f])||void 0===d||null===(c=d.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;r(v),p&&(p.on("loadstart",(function(){w&&i.resolve({status:!0,msg:"Video Loaded",response:v})})),p.on("loadeddata",(function(){var l,r;(null==p||!p.muted())&&fe(e,sessionStorage.getItem("volume")||"100");var s=o();if(a(),i.resolve(ke({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:v}:{response:v})),null!=t&&t.watchHistory&&null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var u,d,c=ke(ke({},t),v);!function(e,t,o){var i,l,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ce=null==t||null===(l=t.series)||void 0===l?void 0:l.id),ue=[],de=0,ne=o;var a=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=n(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());ue.includes(de)||(e==de?(ue.push(e),ve(s,t,a)):e>de&&(de=e+a))})),s.one("ended",(function(){ve(s,t,a,!0)})))}(e,c,null==s||null===(u=s.video)||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.id)}})),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,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,w=p.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(f)}})),p.on("loadedmetadata",(function(){window.endFirstFrame(p)})),p.tech_.on("retryplaylist",(function(){w&&ye(v,e)})),p.on("error",(function(){var n,t;4===p.error().code&&w?ye(v,e):(s(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured",response:v}))})),p.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,l,r=null===(n=o())||void 0===n||null===(i=n.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.id,a=u().get(r)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){p.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),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(w){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}})))},Ie=function(e,n){var t=null==n?void 0:n.skin;"live"==t?import("./skin-26b3c430.js").then((function(t){t.initialiseSkin(e,n)})):"default"==t?import("./skin-6ab207d5.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-fd6c2622.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-d3ab50f7.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-5f9fe2f6.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t&&import("./skin-87568757.js").then((function(t){t.initaliseSkin(e,n)}))},Oe=function(e,n){n.controlBar.el_.style.color=e,n.controlBar.el_.querySelector(".vjs-play-progress")&&(n.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),n.controlBar.el_.querySelector(".vjs-volume-level")&&(n.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var Te,Pe=function(){var e=F(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=F(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){J.getPlugin("eme")||J.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ce=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(J)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(J)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),oe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Pe,loadEMELibrary:Se});function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function De(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Re=function(t,o,r,a){var u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A,E,B,V,N,U,G,K,X,W,Y,Q=o.res,Z=void 0===Q?null:Q,$=o.sres,ee=void 0===$?null:$;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(m=v.getInstance())||void 0===m||m.S;var ne=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(p=Z)||void 0===p?void 0:p.contentType)||"video",oe=H(null===(f=Z)||void 0===f||null===(w=f[te])||void 0===w||null===(h=w.gist)||void 0===h?void 0:h.videoImageUrl)||H(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),ie=(null===(j=Z)||void 0===j||null===(I=j[te])||void 0===I||null===(T=I.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,ae=(null===(P=Z)||void 0===P||null===(S=P[te])||void 0===S||null===(C=S.streamingInfo)||void 0===C?void 0:C.isLiveStream)||!1,se=(null==r?void 0:r.drmLibrary)||!1,ue=(null===(x=Z)||void 0===x||null===(D=x.ads)||void 0===D||null===(R=D.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(E=A.web)||void 0===E?void 0:E.active)&&(null===(B=Z)||void 0===B||null===(V=B.ads)||void 0===V||null===(N=V.preRoll)||void 0===N||null===(U=N.adTags)||void 0===U||null===(G=U.web)||void 0===G?void 0:G.url);Z=De(De({},Z),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var de=(Y={controls:0!=(null==r?void 0:r.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==r?void 0:r.muted)||!1,autoplay:(null==r?void 0:r.autoplay)||!1,controlBar:{volumePanel:("default"==r.skin||"defaultV2"==r.skin||"live"==(null==r?void 0:r.skin))&&{inline:!1},fullscreenToggle:"default"==r.skin||"defaultV2"==r.skin,audioTrackButton:!1,pictureInPictureToggle:(r.skin,!1)},muteToggle:"multiplayer"==r.skin,liveui:ie},q(Y,"autoplay",null==r?void 0:r.autoplay),q(Y,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!ue),q(Y,"loop",(null==r?void 0:r.loop)||!1),q(Y,"audioPosterMode",null==r?void 0:r.audioPosterMode),q(Y,"html5",De(De({dash:De(De({},!J.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}},null==r?void 0:r.dash),vhs:De(De({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(K=r.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(X=r.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(W=r.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),q(Y,"poster",oe),q(Y,"techOrder",ne),q(Y,"chromecast",{requestCustomDataFn:function(e){var o=n(t),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,l,r,a,s,u,d,c,v,m=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){p.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;p.licenseUrl=f;var w=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];p.licenseToken=w}var h=(null==e||null===(o=e[m])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=h;var y=null==e||null===(l=e[m])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=y;var g=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=g;var b=null==e||null===(u=e[m])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,e,i)}}),Y);if(!J.getPlayers()[t])var ce=J(t,de,function(){var n=F(z.mark((function n(){var o,u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A;return z.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,le(r);case 2:if(ae&&a.resolve(De({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Z}:{response:Z})),window.initialise(ce),window.firstFrame(ce),"white"!==window.controlsColor&&Oe(window.controlsColor,ce),/Android/i.test(navigator.userAgent)&&(J.options.vhs.overrideNative=!0),k=null===(o=Z)||void 0===o||null===(u=o[te])||void 0===u?void 0:u.drmEnabled,j=null===(d=Z)||void 0===d||null===(c=d[te])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!k&&!se){n.next=22;break}if("Safari"!==e()){n.next=15;break}return n.next=13,Se();case 13:n.next=22;break;case 15:if("caliente"!=(null===(I=window)||void 0===I?void 0:I.siteName)){n.next=20;break}return n.next=18,Se();case 18:n.next=22;break;case 20:return n.next=22,Pe();case 22:if(null==r||!r.videoSourceUrl){n.next=25;break}return n.next=25,Pe();case 25:ie&&re(t,j),!ue||null!=r&&null!==(m=r.customData)&&void 0!==m&&m.disableAds||L(t,ue,Z),T=i(Z,t),null!=r&&r.nearestClusterUrl&&(T=_(T,r.nearestClusterUrl)),T?l(t,T):(a.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Z}),s(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Z)||void 0===p||null===(f=p[te])||void 0===f||null===(w=f.contentDetails)||void 0===w||null===(h=w.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.closedCaptions)||void 0===b?void 0:b.length)>0)&&(A=(null===(S=Z)||void 0===S||null===(C=S[te])||void 0===C||null===(x=C.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(D=Z)||void 0===D||null===(R=D[te])||void 0===R?void 0:R.closedCaptions),P=A.filter((function(e){return"VTT"===e.format})),M(t,P)),null!=r&&r.disableControls?O(t):Ie(t,De(De(De({},r),de),{},{liveVideo:ae,isDvrEnabled:ie,res:Z,sres:ee})),je(t,De(De(De({},r),de),{},{liveVideo:ae}),a,{res:Z,sres:ee});case 33:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Ae(){return{loadVideoInstantly:v,onTimeUpdate:K,getVideoDuration:X,onVideoEnded:W,init:function(n){return new Promise((function(t,o){var i,l,a,s,u,v,m,p,f,w,y;if(!h(null==n?void 0:n.playerId)){var g=(null==n?void 0:n.videoSourceUrl)||!1,b=null==n?void 0:n.asat,k=(null==n||null===(i=n.epg)||void 0===i?void 0:i.enable)||!1,j=null==n?void 0:n.videoId,I=(null==n||null===(l=n.series)||void 0===l?void 0:l.enable)||!1;window.videoId=j;var O=null==n?void 0:n.token;if(P(n)){if(S().set(null==n?void 0:n.refreshToken),!O||C(O))return void o({status:!1,msg:"".concat(O?"Token is expired !":"Missing Authorization Token"),response:{token:O}});Te=JSON.parse(atob(O.split(".")[1]))}window.siteId=null===(a=Te)||void 0===a?void 0:a.siteId,window.siteName=null===(s=Te)||void 0===s?void 0:s.site,n.isAnonymousUser=!(null===(u=Te)||void 0===u||!u.anonymousId),n.siteOwner=(null===(v=Te)||void 0===v?void 0:v.site)||null,n.userId=(null===(m=Te)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(p=Te)||void 0===p?void 0:p.userId),window.watchHistory=n.watchHistory||null,sessionStorage.setItem("vlp_token",O);var T=null==n?void 0:n.playerId;n.chromecastReceiverId=null!=n&&n.series?null:null==n?void 0:n.chromecastReceiverId;var H=null==n?void 0:n.airplay,L=null==n?void 0:n.apiBaseUrl,_=(null==n||null===(f=n.analytics)||void 0===f?void 0:f.gaId)||null,M=null==n?void 0:n.errors;M&&(window.customErrors=M),window.customData=null==n?void 0:n.customData,ee(null==n||null===(w=n.customData)||void 0===w?void 0:w.localisation),L&&(window.playerEntitlementUrl=L),window.controlsColor=(null==n?void 0:n.controlsColor)||"white",null!=n&&n.skin&&!x(n.skin)||(n.skin="defaultV2"),Promise.resolve().then((function(){return Ce})).then((function(e){e.importIMA()})),H&&"Safari"==e()&&Promise.resolve().then((function(){return Ce})).then((function(e){e.importAirplay()})),_&&oe("https://www.googletagmanager.com/gtag/js?id=".concat(_)).then((function(){return D(_)})).catch((function(e){}));var F=null===(y=document)||void 0===y?void 0:y.getElementById("".concat(T));if(F&&F.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var q="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",z={directPlaybackUrl:g,id:q};b?R(q,O).then((function(e){Re(T,{res:De(De({},e),z)},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,q)})):Re(T,{res:z},n,{resolve:t,reject:o})}else if(I){var J,G=sessionStorage.getItem("season-idx")||0;N.set(parseInt(G));var K=null==n||null===(J=n.series)||void 0===J?void 0:J.id;E(K,O).then((function(e){var i,l,a,s=e.data,u=e.data.seasons;U(u);var v=j||(null==u||null===(i=u[0])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(e,n){var t=new Map;d({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),c(t)})).catch((function(e){return console.log(e)}))}(K,O),R(v,O).then((function(e){var i,l,a;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(e.data),Re(T,{res:null==e?void 0:e.data,sres:s},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))})).catch((function(e){A(e,T,o)}))}else if(k){var X=null==n?void 0:n.epg;B(X,O).then((function(e){var i=null==e?void 0:e.data;i.contentType="linearchannel",i.channelId=null==X?void 0:X.channelId,Re(T,{res:i},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}else R(j,O).then((function(e){var i,l,a,s;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(null==e?void 0:e.data);var u,d=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(s=n.watchHistory)&&void 0!==s&&s.enable)if((null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,m,p=function(e,n,t){var o=me(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}((null===(c=n.watchHistory)||void 0===c?void 0:c.profileId)||"",j,null==n?void 0:n.siteOwner);if(p&&p.length)n.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,n.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;d.contentType="video",Re(T,{res:d},n,{resolve:t,reject:o})}else V(j,O).then((function(e){var i,l,r,a,s,u;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,n.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",Re(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){var i,l,r,a;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(e)),Re(T,{res:d},n,{resolve:t,reject:o})}));else Re(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}}))},getRenditions:Z,skip:m,getPlayer:n,play:p,pause:f,detectBrowser:e,rewind:w,loadVideo:l,seekToTimeStamp:Y,isPlayerInitialised:h,load:y,authenticateLC:g,dispose:b,enableCaptions:k,disableCaptions:j,getCaptions:I,playSelectedResolution:$,getSource:i,setVolume:fe,getVolume:we,disableControls:O,setPlaybackSpeed:Q,getEntitlementData:T}}export{Ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,m as r,r as t}from"./generic-
|
|
1
|
+
import{g as e,m as r,r as t}from"./generic-ff184c2f.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import a from"video.js";import{s}from"./loader-580278fe.js";import{q as c,p as u}from"./generic-ff184c2f.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function m(e){var t=d();return function(){var i,l=n(e);if(t){var r=n(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return o(this,i)}}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}var p=a.getComponent("Component"),v=function(o){l(d,p);var n=m(d);function d(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),l=n.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o=document.getElementById(t);if(o){var n,r,a,s,c,u,m,d,p=window.getComputedStyle(o,null),v=p.getPropertyValue("height"),f=p.getPropertyValue("width"),h=v.slice(0,-2);if(f.slice(0,-2)-135<=135)e.style.bottom="290px",e.style.height="352px";else"live"==l.config.skin&&(null===(n=i(l))||void 0===n||null===(r=n.config)||void 0===r||!r.liveui)&&(null===(a=i(l))||void 0===a||null===(s=a.config)||void 0===s||!s.liveVideo)||null!==(c=i(l))&&void 0!==c&&null!==(u=c.config)&&void 0!==u&&u.liveui&&null!==(m=i(l))&&void 0!==m&&null!==(d=m.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(h-135,"px"),e.style.height="".concat(h-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(h-105,"px"))}})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(d,[{key:"createEl",value:function(){return a.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,a=this,s=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==s||null===(n=s.classList)||void 0===n||n.add("".concat(this.config.skin)):null==s||null===(r=s.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(s,this.playerId),window.onresize=function(){a.multicamCssPositioning(s,a.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=a.dom.createEl("div",{className:"tile ".concat(t)});return 0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),a.dom.appendContent(l,o),o.addEventListener("click",(function(t){s(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),d}();export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import o from"video.js";import{g as s,e as l,h as i}from"./icons-3e9a1686.js";import{_ as c,g as m,q as d,p}from"./generic-ff184c2f.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(e){var t=h();return function(){var a,o=n(e);if(t){var s=n(this).constructor;a=Reflect.construct(o,arguments,s)}else a=o.apply(this,arguments);return r(this,a)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=o.getComponent("Component"),f=function(r){a(h,v);var n=u(h);function h(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(a=n.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.streams=r.streams,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a}return t(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"stream-container hidden"});o.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(c(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var a=document.getElementById(this.playerId);if(a){var r=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(r,"px"),a.style.overflow="hidden",o.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),r=o.dom.createEl("div",{className:"stream-selector-head"}),n=o.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});n.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=o.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=o.dom.createEl("div",{className:"stream-selector-content"}),u=o.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,r=o.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(r.classList.add("selected"),r.style.border="4px solid #D2393B"),r.onclick=function(){for(var a=o.dom.$$(".stream"),n=0;n<a.length;n++)a[n].style.border="none",a[n].classList.remove("selected");r.classList.add("selected"),r.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id).then((function(e){p(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},r.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),n.alt="No Thumbnail Available",r.append(n),o.dom.appendContent(u,r),o.dom.appendContent(c,u)},v=0;v<this.streams.length;v++)h(v);o.dom.appendContent(r,n),o.dom.appendContent(r,s),o.dom.appendContent(e,r),o.dom.appendContent(e,c),m(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),h}();export{f as default};
|