@viewlift/player-backup 1.0.96-backup → 1.0.97-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-ec14e1d6.js → autoNextVideo-6c2cc63d.js} +1 -1
- package/cjs/bundle.css +1 -1
- package/cjs/caption-settings-9975aa4f.js +1 -0
- package/cjs/{features-dd992854.js → features-6c341397.js} +1 -1
- package/cjs/generic-513fe379.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-df898e27.js → keyboardShortcuts-3ac9a37b.js} +1 -1
- package/cjs/multicam-3e202f2a.js +1 -0
- package/cjs/multicamv2-b0d86b34.js +1 -0
- package/cjs/{mwebPotraitTray-4507a925.js → mwebPotraitTray-53743e17.js} +1 -1
- package/cjs/{nextEpisodeButton-ff3aab79.js → nextEpisodeButton-baa5c48d.js} +1 -1
- package/cjs/playlist-a877f18d.js +1 -0
- package/cjs/{renditions-ebfc0c1b.js → renditions-fbaf9ed4.js} +1 -1
- package/cjs/{resolution-7e6c58e5.js → resolution-0e52631e.js} +1 -1
- package/cjs/{series-9008b36d.js → series-849c5c04.js} +1 -1
- package/cjs/series-v2-8eb5a774.js +1 -0
- package/cjs/settings-icon-7f2ca371.js +1 -0
- package/cjs/{skin-66635068.js → skin-0d151e90.js} +1 -1
- package/cjs/{skin-7631a75f.js → skin-2fdf2de5.js} +1 -1
- package/cjs/{skin-22db2127.js → skin-4c85165c.js} +1 -1
- package/cjs/{skin-9f0e9d17.js → skin-550cf84f.js} +1 -1
- package/cjs/{skin-362e29f3.js → skin-6350f905.js} +1 -1
- package/cjs/skin-8fa76c87.js +1 -0
- package/cjs/{skin-56a9cb0c.js → skin-e1671a81.js} +1 -1
- package/cjs/{util-aab98883.js → util-462eea7f.js} +1 -1
- package/cjs/{videoSelector-8fdceb6e.js → videoSelector-a1bfbb8a.js} +1 -1
- package/esm/{autoNextVideo-37aefa8c.js → autoNextVideo-f070f6bd.js} +1 -1
- package/esm/bundle.css +1 -1
- package/esm/caption-settings-a2feea30.js +1 -0
- package/esm/{features-da90adf7.js → features-e13a7a55.js} +1 -1
- package/esm/generic-735b9e62.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-8814c4b5.js → keyboardShortcuts-30b74bad.js} +1 -1
- package/esm/multicam-6ddc9f8e.js +1 -0
- package/esm/multicamv2-dc13e606.js +1 -0
- package/esm/{mwebPotraitTray-45f16c76.js → mwebPotraitTray-42c0ac47.js} +1 -1
- package/esm/{nextEpisodeButton-8266f26e.js → nextEpisodeButton-87a189d1.js} +1 -1
- package/esm/playlist-1a60af58.js +1 -0
- package/esm/{renditions-bebe05c1.js → renditions-e3fe9bf6.js} +1 -1
- package/esm/{resolution-8461bc29.js → resolution-596d214c.js} +1 -1
- package/esm/{series-f21ef8c7.js → series-e6bc255c.js} +1 -1
- package/esm/series-v2-a8841193.js +1 -0
- package/esm/settings-icon-31693384.js +1 -0
- package/esm/{skin-f45c0e82.js → skin-01839bbf.js} +1 -1
- package/esm/{skin-b785a5b5.js → skin-17aa9c7f.js} +1 -1
- package/esm/skin-808893ac.js +1 -0
- package/esm/{skin-8c9cf6db.js → skin-80dfe0b7.js} +1 -1
- package/esm/skin-8a01ff24.js +1 -0
- package/esm/{skin-ac86c6e6.js → skin-a0ca0063.js} +1 -1
- package/esm/{skin-2f5f2197.js → skin-fc2c2b9a.js} +1 -1
- package/esm/{util-2920fb7e.js → util-536c46af.js} +1 -1
- package/esm/videoSelector-cf1e1fef.js +1 -0
- package/package.json +1 -1
- package/cjs/caption-settings-224cfc12.js +0 -1
- package/cjs/generic-f509b427.js +0 -1
- package/cjs/multicam-f8428281.js +0 -1
- package/cjs/multicamv2-9fb6366a.js +0 -1
- package/cjs/playlist-c8dc40a7.js +0 -1
- package/cjs/series-v2-e102c492.js +0 -1
- package/cjs/settings-icon-e4b67366.js +0 -1
- package/cjs/skin-921d35a8.js +0 -1
- package/esm/caption-settings-35efef10.js +0 -1
- package/esm/generic-fe5217fd.js +0 -1
- package/esm/multicam-7d8111cd.js +0 -1
- package/esm/multicamv2-de9d0b4d.js +0 -1
- package/esm/playlist-48ae732d.js +0 -1
- package/esm/series-v2-6ca2cb1a.js +0 -1
- package/esm/settings-icon-97fb69ce.js +0 -1
- package/esm/skin-0b7765b0.js +0 -1
- package/esm/skin-3470b8fa.js +0 -1
- package/esm/videoSelector-291bec50.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"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-515b2da0.js"),d=require("./generic-513fe379.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/regenerator"),require("axios");var c=require("./autoNextVideo-6c2cc63d.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("js-cookie"),require("ua-parser-js"),require("./util-462eea7f.js");var v=l.getComponent("Component"),p=function(){i(g,v);var p,m,h=(p=g,m=u(),function(){var e,t=r(p);if(m){var n=r(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function g(n){var i,o,r,l,a,u,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,g),(u=h.call(this,n,v)).playerId=v.playerId,u.seriesData=v.sres,u.videos=null==v||null===(i=v.sres)||void 0===i?void 0:i.seasons,u.currentVideoData=v.res,u.initialiseStructure(),u.loadCSS(),u.selectedSeason=0,u.cb=null==v||null===(o=v.series)||void 0===o?void 0:o.cb,u.autoPlayNext=(null==v||null===(r=v.series)||void 0===r?void 0:r.autoPlayNext)||!1,sessionStorage.getItem("token"),u.watchMap=d.getSeriesWatchMap(),null!==(l=s(u))&&void 0!==l&&l.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var p,m,f,C,y=null==v||null===(p=v.sres)||void 0===p?void 0:p.seasons,b=[];y.map((function(t){b.push.apply(b,e(t.episodes))})),d.createIdxMapping(b),d.setVideoIdxById(null===(m=u.options_)||void 0===m||null===(f=m.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),c.autoPlayNext({playerId:u.playerId,content:b,cb:u.cb,series:null==v?void 0:v.sres})}return u}return n(g,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-70137d8c.js")})).then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(d.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=d.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();l.dom.appendContent(r,c),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),d.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;d.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map((function(e){var t,n,i,o,r;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}}));for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=d.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),g}();exports.default=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),a=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),l=require("./icons-515b2da0.js"),d=require("./generic-513fe379.js"),s=require("./renditions-fbaf9ed4.js"),c=require("./resolution-0e52631e.js"),u=require("./localisation-56e0a999.js");function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=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=r.getComponent("Component"),v=function(){n(y,h);var v,m,g=(v=y,m=p(),function(){var e,t=o(v);if(m){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return i(this,e)});function y(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(a=g.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(y,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l.SettingsSvgV2())});return r.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(),a=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",d.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),r.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),d.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),n=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:u.getLocalisation("settingsTitle")||"Settings"}),o=r.dom.createEl("div",{className:"settings-selector-content"}),s=r.dom.createEl("div",{className:"settings-container"}),c=this.createVideoQualityContainer();r.dom.appendContent(s,c);var p=this.createAudioQualityContainer();r.dom.appendContent(s,p),r.dom.appendContent(a,n),r.dom.appendContent(a,i),r.dom.appendContent(e,a),r.dom.appendContent(e,o),r.dom.appendContent(o,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 a=r.dom.createEl("div",{className:"audio-language-container"}),n=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:u.getLocalisation("audioLanguageText")||"Audio Language"});r.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var l=r.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(a){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=r.dom.createEl("div",{className:"video-quality-container"}),n=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:u.getLocalisation("videoQualityText")||"Video Quality"});r.dom.appendContent(a,n);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 o=function(e){var n,o,s,p=document.createElement("label"),h=document.createElement("div"),v=document.createElement("div");v.className="video-quality-bitrate-label",h.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===(n=i[e])||void 0===n?void 0:n.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),y=document.createTextNode(g),f="".concat(t.isEnhancedBitrate(i[e])?u.getLocalisation("enhancedBitrateLabel")||"Enhanced Bitrate":""),b=document.createTextNode(f);if(v.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=r.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(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?c.playSelectedResolution(t.playerId,n,!0):c.playSelectedResolution(t.playerId,n)};var E=document.createElement("span");E.className=f?"check-mark center":"check-mark";var N=d.parseSvgString(l.TickMarkIcon());E.appendChild(N),h.appendChild(q),h.appendChild(E),h.appendChild(m),r.dom.appendContent(p,h),p.appendChild(v),r.dom.appendContent(a,p)},p=0;p<i.length;p++)o(p);return a}}]),y}();exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-513fe379.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("./features-
|
|
1
|
+
"use strict";var e=require("./features-6c341397.js"),l=require("./icons-515b2da0.js"),t=require("./generic-513fe379.js"),n=require("./renditions-fbaf9ed4.js"),i=require("@babel/runtime/helpers/toConsumableArray"),o=require("./autoNextVideo-6c2cc63d.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("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-462eea7f.js");var r=t.getCurrentSeries(),a=[];null==r||r.map((function(e){return a.push.apply(a,i(e.episodes))}));var d=function(e,l){var n=t.getPlayer(e),i=Math.floor(n.currentTime());if(Math.floor(n.duration())!=i){n.pause(e);var r=t.getVideoIdx();o.switchToNext(r,e,a)}};function u(l,i){var o=t.getPlayer(l);o&&(o.on("loadeddata",(function(){var r,u,s;(null===(r=n.getRenditions(l))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(l,i),(null===(u=t.getCaptions(l))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(l,i),null!=i&&null!==(s=i.series)&&void 0!==s&&s.enable&&function(e,l){var n;null==l||null===(n=l.series)||void 0===n||n.cb;var i=t.getPlayer(e);i.on("timeupdate",(function(){var e,l=Math.floor(i.currentTime()),n=i.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];n-l<=10&&t.getVideoIdx()<=(null==a?void 0:a.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=a.filter((function(e,l){return l==t.getVideoIdx()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var u,s,v,c,m,p,g,h,f,y,b;(null===(u=document.getElementsByClassName("next-ep-preview"))||void 0===u?void 0:u[0]).style.visibility="hidden";var C=null===(s=document.getElementsByClassName("next-ep-title"))||void 0===s?void 0:s[0],x=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],q=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],w=null===(m=r[0])||void 0===m?void 0:m.title;(null===(p=w)||void 0===p?void 0:p.length)>60&&(w=w.substr(0,60)+"..."),C.textContent="".concat(w),x.src=(null===(g=r[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(b=y.customData)||void 0===b?void 0:b.fallbackImage),q.onclick=function(){return d(e)}}else{var j,E,N,B,V,S,k,P=document.createElement("div");P.className="next-ep-preview",P.style.visibility="hidden",document.getElementById(e).append(P);var I=document.createElement("div");I.className="next-ep-header",I.textContent="Next up";var M=null===(j=r[0])||void 0===j?void 0:j.title,R=document.createElement("img");R.className="next-ep-img",R.src=(null===(E=r[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(S=V.customData)||void 0===S?void 0:S.fallbackImage);var T=document.createElement("div");T.className="next-ep-title",(null===(k=M)||void 0===k?void 0:k.length)>60&&(M=M.substr(0,60)+"..."),T.textContent="".concat(M);var O=document.createElement("div");O.className="next-ep-content",O.append(R),O.append(T),O.onclick=function(){return d(e)},P.append(I),P.append(O)}}(l,i),function(e,l){var t,n=Math.floor(e/60),i=null===(t=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===t?void 0:t[0];i&&(i.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==i?void 0:i.liveVideo)||!1)})),o.one("play",(function(){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.customData)&&void 0!==n&&n.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o?void 0:o.iframeOverlayUrl)})))}exports.initialiseSkin=function(n,i){!function(){"Chrome"==t.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));Promise.resolve().then((function(){return require("./skin-8fa76c87.js")})).then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),u(n,i),function(e,n){var i,o,r,a,d,u,s=t.getPlayer(e);null==s||null===(i=s.controlBar)||void 0===i||null===(o=i.getChild("FullscreenToggle"))||void 0===o||null===(r=o.el())||void 0===r||r.appendChild(t.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==s||null===(a=s.controlBar)||void 0===a||null===(d=a.getChild("FullscreenToggle"))||void 0===d||null===(u=d.el())||void 0===u||u.appendChild(t.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var v=document.getElementsByClassName("vjs-time-control");n.liveVideo&&v[0]&&(v[0].style.display="none")}(n,i),function(t,n){var i,o,r,a,d,u;0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(t,"defaultV2",l.SkipSvgV2());(0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(t,"defaultV2",l.RewindSvgV2());n.liveVideo||e.addSlowMotion(t);(null==n||null===(i=n.relatedVideos)||void 0===i||null===(o=i.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector(t,null==n?void 0:n.relatedVideos);(null==n||null===(r=n.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector(t,null==n?void 0:n.streams);(null==n||null===(a=n.playlist)||void 0===a||null===(d=a.content)||void 0===d?void 0:d.length)>0&&e.addPlaylistSelector(t,null==n?void 0:n.playlist);null!=n&&null!==(u=n.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(t,n)}(n,i),function(e,l){var n=t.getPlayer(e),i=null==l?void 0:l.tvProviderLogoUrl;if(!i)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(i),r.alt="Provider Image",o.append(r),n.el().appendChild(o),n.on("useractive",(function(){o.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||o.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(n,i)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-513fe379.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)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=require("./features-
|
|
1
|
+
"use strict";var e,t=require("./features-6c341397.js"),n=require("./icons-515b2da0.js"),r=require("./generic-513fe379.js"),s=require("@babel/runtime/helpers/defineProperty"),o=require("./keyboardShortcuts-3ac9a37b.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-fbaf9ed4.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){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-513fe379.js"),r=require("./features-6c341397.js"),i=require("./renditions-fbaf9ed4.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){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(t)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.default=".tvProviderImage{\n position: absolute;\n right: 1rem;\n top: 1rem;\n max-height: 100px;\n max-width: 100px;\n}\n.tvProviderImage>img{\n height: 100%;\n width: 100%;\n}\n.vjs-button>.vjs-icon-placeholder:before {\n font-size: 2.2em;\n line-height: 2.6;\n}\n.vjs-control-bar{\n z-index: 1 !important;\n height: 6em !important;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #000 100%) !important;\n}\n\n.vjs-fade>* {\n visibility: hidden !important;\n opacity: 0 !important;\n transition: visibility 1s, opacity 1s !important;\n}\n\n.video-js .vjs-progress-control {\n left: -6px;\n position: absolute;\n width: 100%;\n height: 0.5em;\n top: -0.5em;\n transition: height .1s,top .1s;\n}\n\n.video-js .vjs-custom-control-spacer {\n display: block;\n flex: 1 1 auto;\n}\n\n.vjs-remaining-time.vjs-time-control.vjs-control {\n position: absolute;\n right: 0;\n bottom: 18px;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder {\n margin: 0 41px 0 14px;\n}\n.vjs-remaining-time.vjs-time-control.vjs-control{\n display: none;\n}\n\nbutton.vjs-control.vjs-button.vjs-slowmo-button {\n font-size: 14px;\n font-weight: 500;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder{\n height: 6px !important;\n}\n\n.video-js .vjs-play-progress:before {\n font-size: 1.9em;\n}\n\n.video-js .vjs-current-time { display: block; }\n\n.video-js .vjs-current-time {\n display: block;\n position: absolute;\n right: 0em;\n bottom: 1.8em;\n font-size: 12px;\n font-weight: 600;\n}\n\n.video-js .vjs-button{\n width: 6em;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\nbutton.vjs-control.vjs-button.vjs-slowmo-button{\n align-self: center;\n height: min-content;\n padding: 5px 2px;\n border-radius: 8px;\n}\n\n\n.vjs-fullscreen .icon-minimize,\n.icon-maximize {\n display: block;\n height: 32px;\n}\n\n.vjs-fullscreen .icon-maximize,\n.icon-minimize {\n display: none;\n height: 32px;\n}\n\nbutton.vjs-play-control.vjs-control.vjs-button{\n outline: none !important;\n}\n\n.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,\n.vjs-icon-fullscreen-enter:before {\n content: '' !important;\n}\n\n.video-js button.vjs-fullscreen-control.vjs-control.vjs-button {\n display: flex;\n justify-content: center;\n align-items: center;\n transform: rotate(90deg);\n}\n\n.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before{\n display: none;\n}\n.video-js .vjs-volume-panel .vjs-volume-control{\n margin-left: -10px;\n}\n\n.skipbtn:hover{\n cursor: pointer;\n}\n\n.rewindbtn:hover{\n cursor: pointer;\n}\n\n.vjs-live-control{\n position: absolute !important;\n right: 0em !important;\n background-color: none;\n bottom: 1.8em !important;\n font-weight: 700 !important;\n font-size: 11px !important;\n}\n\n.vjs-seek-to-live-control.vjs-control{\n position: absolute !important;\n right: 0em !important;\n background-color: none;\n bottom: 3.2em !important;\n}\n\n.vjs-seek-to-live-control.vjs-control >span.vjs-icon-placeholder{\n display:none;\n}\n\n.video-js.vjs-paused .vjs-big-play-button {\n width: 90px;\n height: 90px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n margin: auto;\n font-size: 6em;\n line-height: 1.3em;\n}\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{\n font-weight: bold;\n}\n\n.vjs-menu > ul.vjs-menu-content{\n bottom: 3.5em !important;\n right: -1em;\n}\n\n.video-js .vjs-chromecast-button .vjs-icon-placeholder {\n width: 17px !important;\n height: 17px !important;\n}\n\n.vjs-subs-caps-button.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button{\n /* display: flex;\n justify-content: center;\n align-items: center; */\n display: none;\n}\n\nbutton.vjs-subs-caps-button.vjs-menu-button.vjs-menu-button-popup.vjs-button{\n height: min-content;\n width: min-content;\n}\n.video-js .vjs-volume-panel.vjs-volume-panel-vertical{\n width: 6em;\n}\n\n.video-js .content{\n bottom: 3.4rem !important;\n right: -4rem !important; \n}\n\n.setting-icon > svg{\n height:18px !important;\n}\n\n.output-overlay{\n position: absolute;\n bottom: 0;\n height: 100%;\n width: 100%;\n z-index: 0;\n border: 0;\n pointer-events:none\n}\n\niframe{\n width: 100%;\n height: 100%;\n}\n\n\n@media(max-width:600px){\n .tvProviderImage{\n display: none\n }\n.vjs-fullscreen .icon-minimize,\n .icon-maximize {\n height: 30px !important;\n }\n\n .vjs-fullscreen .icon-maximize,\n .icon-minimize {\n height: 30px !important;\n }\n\n button.vjs-fullscreen-control.vjs-control.vjs-button>span.vjs-icon-placeholder::before {\n height: min-content;\n }\n\n .vjs-seek-to-live-control.vjs-control{\n position: relative !important;\n right: 0em !important;\n bottom: 0 !important;\n }\n\n .video-js .vjs-progress-control{\n top: -0.85em;\n }\n .vjs-live-control{\n right: -1em !important;\n position: relative !important;\n bottom: 0 !important;\n font-size: 12px !important;\n }\n button.vjs-slowmo-button{\n display: none;\n }\n button.vjs-rewind-button{\n display: none;\n }\n button.vjs-rewind-button>svg{\n height: 20px;\n }\n .video-js .vjs-button{\n width: 4.8em;\n }\n .video-js .widget-selection{\n display: none;\n }\n .video-js .container{\n display: none !important;\n }\n .video-js .vjs-control-bar{\n height: 4em !important;\n }\n .video-js .vjs-button>.vjs-icon-placeholder:before{\n font-size: 2.5em;\n line-height: 1.5;\n }\n .video-js .vjs-play-progress:before {\n font-size: 1.2em;\n position: absolute;\n right: -0.5em;\n /* top: -0.3333333333em; */\n z-index: 1;\n}\nbutton.vjs-skip-button>svg{\n height: 20px;\n}\nbutton.vjs-big-play-button {\n width: 50px !important;\n height: 50px !important;\n font-size: 2.1rem !important;\n}\n.vjs-seek-to-live-control.vjs-control >span.vjs-icon-placeholder{\n display: block;\n}\n\n.stream-selector-icon>svg{\n width: 24px;\n height: 24px;\n}\n.video-js.vjs-live .vjs-progress-control .vjs-progress-holder{\n margin: 0 12px 0 21px;\n}\n.vjs-seek-to-live-text{\n font-size: 12px;\n}\n.video-js .vjs-progress-control .vjs-progress-holder {\n margin: 0 40px 0px 21px;\n}\n.video-js .vjs-current-time{\n bottom: 2em !important;\n}\n}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-6c341397.js"),r=require("./keyboardShortcuts-3ac9a37b.js"),i=require("./icons-515b2da0.js"),n=require("./generic-513fe379.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-fbaf9ed4.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-baa5c48d.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 t=require("./generic-
|
|
1
|
+
"use strict";var t=require("./generic-513fe379.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)}};
|
|
@@ -1 +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-
|
|
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-513fe379.js"),d=require("./autoNextVideo-6c2cc63d.js"),s=require("./localisation-56e0a999.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-462eea7f.js");var u=r.getComponent("Component"),v=function(){n(h,u);var v,m,p=(v=h,m=c(),function(){var e,t=i(v);if(m){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function h(t){var n,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(i=p.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.videos=r.related.content,i.cb=(null==r||null===(n=r.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==r||null===(o=r.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(l.setVideoIdx(0),d.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(h,[{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)}}]),h}();exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n,t,
|
|
1
|
+
import{b as n,t,T as i,e as o,U as e,S as a,V as c}from"./generic-735b9e62.js";import{a as u}from"./util-536c46af.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||t(h,d[f].id).then((function(n){i(f),o(n.response),f++,c(f),v(n)})).catch((function(n){v(n),i(f),f++,c(f),r=setTimeout((function(){e(h)&&m(f,h,d)}),5e3)})))}))},m=function n(o,e,a,u){f=o,o>a.length-1||t(e,a[o].id).then((function(n){i(f),f++,c(f),v(n)})).catch((function(t){v(t),setTimeout((function(){i(f),f++,c(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,6 @@
|
|
|
135
136
|
.widget-selector-content #sr-widget{
|
|
136
137
|
padding: 0 18px;
|
|
137
138
|
}
|
|
138
|
-
|
|
139
139
|
.vjs-poster {
|
|
140
140
|
display: inline-block;
|
|
141
141
|
vertical-align: middle;
|
|
@@ -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"axios";import{y as l,x as s,Y as d,Z as p,_ as m,$ as u,w as v}from"./generic-735b9e62.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}var h=i.getComponent("Component"),y=function(){n(b,h);var y,g,C=(y=b,g=f(),function(){var e,t=o(y);if(g){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function b(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(i=C.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(b,[{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}}]),b}();export{y 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{b as a,
|
|
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{b as a,P as s,r as c,n as d}from"./generic-735b9e62.js";import{g as u}from"./renditions-e3fe9bf6.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-6ddc9f8e.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-596d214c.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-87a189d1.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-42c0ac47.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-e6bc255c.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-cf1e1fef.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-a2feea30.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-31693384.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-1a60af58.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-a8841193.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-dc13e606.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 n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import"js-cookie";import r from"ua-parser-js";import a from"@babel/runtime/helpers/toConsumableArray";var l={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(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 d(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var s={name:"@viewlift/player",version:"1.0.102",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,n){var t,o,r,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:_(),params:d({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":s.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+l.getLinearChannelDetails,params:d(d(d(d(d({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===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:n}})},m=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:b()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},p=function(){var e=n(t.mark((function e(n,o){var r,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return a={siteOwner:null==n?void 0:n.siteOwner,userId:null==n?void 0:n.userId,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},e.abrupt("return",i({url:h(),method:"POST",headers:{Authorization:r,"x-api-key":n.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:T(),method:"POST",headers:{Authorization:r},data:d({},n),params:d({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),f=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var a,l,u=JSON.parse(atob(n.split(".")[1])),d=(null==u?void 0:u.site)||null;return i({method:"GET",url:y(e),params:{site:d},headers:{Authorization:n,"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(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:w(e,v),headers:{Authorization:n,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},g=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:I(o),headers:{Authorization:e.token},timeout:15e3})},I=function(e){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV1)},y=function(e){return b()+"".concat(null==l?void 0:l.getVideoInfoV1,"/").concat(e)},w=function(e,n){return b()+"".concat(null==l?void 0:l.getVideoInfoV2,"/").concat(n,"/").concat(e)},h=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV1)},T=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV2)},_=function(){var e,n,t,o,i=b()+"".concat(null==l?void 0:l.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":i},b=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==l?void 0:l.apiBaseUrl)},O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},D=null;function V(){return{set:function(e){e&&(D=e)},get:function(){return D}}}var L,S,C,A,R,W,k=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=V().get(),o=b(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),F=null,P=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=6;break}return F||(F=k().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&V().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){F=null}))),e.abrupt("return",F);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},x=function(e){S=e},j=function(){return S},U=function(e){L=e},B=function(){return L},H=function(){return C},M=function(e){C=e},z=function(e){R=e},G=function(){return R},Y=function(e){A=new Map,e.map((function(e,n){A.set(e.id,n)}))},q=function(e){if(A){var n=A.get(e);M(n+1)}},X=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}}),J=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},K=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Z=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Q(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?$(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):$(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var ee=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ne=function(e){var n=te(e,"video.tags",[]),t=te(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},te=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},oe=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},ie=function(){var e,n,t,o,i,r,a,l,u,d,s,c,v,m,p,f,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,y=(null==E?void 0:E.contentType)||"video",w=null==E||null===(e=E[y])||void 0===e?void 0:e.metadata,h=Ue(I);if(!g.includes("VIEWLIFT_"))return g;var T=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(T.getPropertyValue("height").slice(0,-2)),b=Math.trunc(T.getPropertyValue("width").slice(0,-2)),O="linearchannel"===y?null==E||null===(n=E.linearchannel)||void 0===n||null===(t=n.channels)||void 0===t||null===(o=t.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===o||null===(i=o.content)||void 0===i?void 0:i.id:te(E,"video.gist.id",""),D=Q(Q({},le(w)),{},{VIEWLIFT_WIDTH:b,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:ee(b,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(r=window)||void 0===r?void 0:r.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:te(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:te(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:te(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==h||null===(a=h.options_)||void 0===a?void 0:a.autoplay)||1,VIEWLIFT_MUTE:(null==h||null===(l=h.options_)||void 0===l?void 0:l.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:ne(E),VIEWLIFT_MEDIA_ID:O,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(te(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:O,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+te(E,"video.gist.permalink","")),VIEWLIFT_COPPA:te(null===(u=window)||void 0===u||null===(d=u.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:te(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(m=v.site)||void 0===m?void 0:m.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*te(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:te(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:O,VIEWLIFT_CONTENT_TITLE:te(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:te(E,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:te(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:re(),VIEWLIFT_CONTENT_TAGS:ne(E)},null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f?void 0:f.macros);for(var V in D){var L=new RegExp("\\b("+V+")\\b","g");g=g.replace(L,D[V])}return g},re=function(){var e=X.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=B(),i=j(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,a=X.get(),l=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},le=function(e){var n,t,o,i,r,a,l={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var d=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return d||s?(oe()?d?l=Q(Q({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):s&&(l=Q(Q({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):d?l=Q(Q({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):s&&(l=Q(Q({},l),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),d?l=Q(Q({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):s&&(l=Q(Q({},l),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),l=oe()?Q(Q({},l),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):Q(Q({},l),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(l=Q(Q({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),l=oe()?Q(Q({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):Q(Q({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),l},ue=function(e,n){var t,o,i,r,a,l,u,d,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,y=(null==e||null===(l=e[f])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(d=u.videoAssets)||void 0===d?void 0:d.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return null==e?void 0:e.directPlaybackUrl;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return se(E);if(g){var h=ce(I,n);return h.src=ie(h.src,n,e),h}if("Safari"!==Z()&&w)return de(I);if(y){var T=se(I);return T.src=ie(T.src,n,e),T}if(null!=I&&I.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return _.src=ie(_.src,n,e),_}return null},de=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},se=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ce=function(e,n){var t=e.fairPlay,i=e.widevine,r=e.playReady,a=Z();if(Ue(n),"Safari"===a){var l=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(n,t,i,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);return ve(n),l}var u,d={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ve(n),d.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(d.keySystemOptions=[],d.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),d.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),d};var ve=function(e){var n=Ue(e);if("function"==typeof n.eme)try{n.eme()}catch(e){console.log("EME ERROR :",e)}},me=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},pe=function(e,n){var t,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(t=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===t||null===(o=t[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=Ue(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=n||(l.mode="showing")}},fe=function(e,n){for(var t=Ue(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},ge=function(e){var n,t=Ue(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},Ie=function(e){var n=Ue(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))},Ee=function(e,n){var t=Ue(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ye=!1,we=function(e,n,t){var o=ie(n,e,t),i=Ue(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=Ue(e);if(null!==r.el_){ye=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ye&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!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 u="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,u="touchend"),r.one(u,(function(){d&&r.ima.initializeAdDisplayContainer()}));var s=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.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,o))},he=["live","carousel","V2","defaultV2","multiplayer","minimalist"],Te=function(e){return!he.includes(e)},_e=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},be=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Oe=function(e){return be(e)},De=function(e){a(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},Ve=function(){var e=a(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},Le=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Se="",Ce=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",o=document.getElementById(e);if(o&&Se!==t){var i=window.getComputedStyle(o,null).getPropertyValue("height");n&&(n.style.height="".concat(i)),Se=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))},Ae=function(e,n){var t,o=Ue(e),i=Ue(e).el(),r=new ResizeObserver((function(){var o;null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")||(t&&clearTimeout(t),t=setTimeout((function(){Re(e,n)}),200))}));r.observe(i),o.on("dispose",(function(){r.disconnect()})),o.on("fullscreenchange",(function(){setTimeout((function(){Re(e,n)}),50)}))},Re=function(e,n){var t;if(n){var o=document.getElementById(e),i=null===(t=window.getComputedStyle(o,null))||void 0===t?void 0:t.height;n.style.height!==i&&(n.style.height="".concat(i))}};function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var ke=function(e){o(e).play()},Fe=function(e){o(e).pause()},Pe=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Ne=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},xe=function(e){return!!o.getPlayer("".concat(e))},je=function(e){return o(e).paused()},Ue=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},Be=function(){var e=n(t.mark((function e(n,o){var i,r,a,l=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=l.length>2&&void 0!==l[2]&&l[2],e.next=3,P();case 3:return r=e.sent,a=Ue(n),e.abrupt("return",new Promise((function(e,t){v(o,r).then((function(t){var r=null==t?void 0:t.data;r.contentType="linearchannel",r.channelId=null==o?void 0:o.channelId;var l=ue(r,n);l&&i?(Ye(n,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){t({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),He=function(){var e=n(t.mark((function e(n,o,i){var r,a,l,u,d,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P();case 2:return u=e.sent,q(o),d=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&&f(o,u).then((function(e){var n,t,o,i,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),d=(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 n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,t){c(o,u).then((function(o){var i,r,a,l,u,c,v,m,p,f,g=null==o?void 0:o.data,I=(null==g||null===(i=g.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;x(o.data);var E=(null==g||null===(a=g.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(u=l.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);E&&we(n,E,g);var y=ue(g,n);if(y){var w,h,T,_,b,O,D,V,L,S,C,A,R,W,k=(null==g||null===(w=g.video)||void 0===w||null===(h=w.gist)||void 0===h?void 0:h.videoImageUrl)||(null==g||null===(T=g.video)||void 0===T||null===(_=T.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),F=Ue(n);if(F.poster(k),Ye(n,y),F.on("loadstart",(function(){I&&e({status:!0,msg:"Video Loaded",response:g})})),F.on("loadeddata",(function(){K(),e({status:!0,msg:"Video Loaded",response:g})})),F.one("play",(function(){d&&s<95&&setTimeout((function(){F.currentTime(d)}),0)})),F.one("error",(function(){var e;t({status:!1,msg:(null==F||null===(e=F.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(O=g.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==g||null===(L=g.video)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0)C=((null==g||null===(A=g.video)||void 0===A||null===(R=A.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==g||null===(W=g.video)||void 0===W?void 0:W.closedCaptions)).filter((function(e){return"VTT"===e.format})),Ee(n,C);else Ie(n)}else J(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){qe(e,n,t,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Me=function(e,n,t){var o=Ue(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},ze=function(e){var n=Ue(e);if(Ge(),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,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Ge=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Ye=function(e,n){var t=Ue(e);t&&t.src(n)},qe=function(n,t,o,i){var r,a,l,u,d,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(u=l.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);xe(t)&&J(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?We(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Xe=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{Ae as $,N as A,V as B,O as C,Te as D,c as E,qe as F,m as G,v as H,f as I,Le as J,we as K,me as L,Ee as M,X as N,U as O,be as P,Oe as Q,B as R,H as S,De as T,je as U,M as V,Ie as W,_e as X,Ve as Y,Re as Z,Ce as _,j as a,Y as a0,q as a1,Ue as b,ue as c,Z as d,x as e,K as f,P as g,J as h,G as i,g as j,z as k,Ye as l,Me as m,Pe as n,Fe as o,ke as p,xe as q,Ne as r,p as s,He as t,Be as u,ze as v,pe as w,fe as x,ge as y,Xe as z};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"axios";import{g as o,a as r,d as l,b as a,s,c as d,l as u,e as c,f as v,h as f,i as m,j as p,k as w,m as h,n as g,p as y,o as b,r as T,q as k,t as I,u as P,v as O,w as j,x as S,y as E,z as D,A,B as R,C as F,D as x,E as C,F as B,G as M,H as _,I as H,J as N,K as L,L as V,M as U}from"./generic-fe5217fd.js";import W from"video.js";import q from"@babel/runtime/helpers/typeof";import{o as z,g as G,a as J,s as K,b as Q}from"./util-2920fb7e.js";import{g as Y}from"./renditions-bebe05c1.js";import{playSelectedResolution as X}from"./resolution-8461bc29.js";import{s as Z}from"./localisation-0bf399a1.js";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";function $(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function ee(e,t){$("event",e,t)}function te(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 ne(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ie=function(){var e,t,n,i;return(null===(e=r())||void 0===e||null===(t=e.video)||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.id)||(null===(i=r())||void 0===i?void 0:i.id)};function oe(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function re(){var e=window.sessionStorage.getItem("uid");return e||(e=oe(),window.sessionStorage.setItem("uid",e),e)}function le(){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,o();case 2:if(t=e.sent,null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=8;break}return e.abrupt("return","guest-user");case 8:return e.abrupt("return",null==i?void 0:i.userId);case 9:case"end":return e.stop()}}),e)}))),ae.apply(this,arguments)}window.initialise=function(e){window.sid=oe(),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());ee(r?"FAILED_TO_START":"DROPPED_STREAM",ne({pfm:window.platform,uid:re(),vid:ie(),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),ee("PLAY",ne({pfm:window.platform,uid:re(),vid:ie(),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,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))ee("BUFFERING",ne({pfm:window.platform,uid:re(),vid:ie(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}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,ee("FIRST_FRAME",ne({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),vid:ie()},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,l;ee("AD_REQUEST",ne({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),vid:ie(),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}),ee("AD_IMPRESSION",ne({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ie()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.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),l=i.end(o);if(se(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var se=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var r,l,a,s,d,u,c,v,f,m,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=ne,e.t1=ne,e.t2=ne({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=re(),e.t5=ie(),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,le();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===(s=window)||void 0===s||null===(d=s.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,o();case 37:p=e.sent,i({url:(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.beacon)||void 0===f?void 0:f.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:p},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,ue,ce=function(e){return new Promise((function(t,n){if(ve(e))n("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){t()},i.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},ve=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},fe=function(){var e=t(n.mark((function e(t){var i,o,r,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=a(null==t?void 0:t.playerId),null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){e.next=20;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=e.sent,e.prev=5,e.next=8,ce("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,s.default(W),e.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=t&&t.airplay&&"Safari"==l()?null==o||o.airPlay({addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),me=function(e,t){var n=a(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,i,o,r,l,a=this.el(),s=W.dom.getPointerPosition(a,t).x;W.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,u=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S;if(console.log(d),d&&"CONNECTED"===u){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 pe(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 we(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var he=[],ge=0,ye=null;function be(t,n,i){var o,l,a,d,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ue=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var v=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,f=Math.floor(t.currentTime()),m=Math.floor(t.duration()),p=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,w=(null==n||null===(d=n.video)||void 0===d?void 0:d.originalObjectId)||null,h=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,g=Math.floor(t.currentTime()),y=c?100:Math.floor(f/m*100),b={};h?function(t,n,i){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(i),l=Te(o),a=(new Date).getTime(),s=r(),d=(null==s?void 0:s.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(t,n){return we(we({},t),{},e({},n,d[n]))}),{}),c=l.findIndex((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===de}));c<0?l.push(we(we({content:u},t),{},{addedDate:a,updateDate:a})):l[c]=we(we(we({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(o),JSON.stringify(l))}(b={completed:c,watchedTime:g,watchedPercentage:y},v,n.siteOwner):("v1"==ue?b={videoId:de,watchedTime:g,watchedPercentage:y,siteOwner:n.siteOwner,userId:n.userId,xApiKey:p}:"v2"==ue&&(b=we(we({videoId:de,watchedTime:g,watchedPercentage:y,doneWatching:c,profileId:v},ye&&{seriesId:ye}),w&&{originalObjectId:w})),s(b,ue).then((function(e){})).catch((function(e){}))),ge=f+i}function Te(e){var t=[];return e&&(t=JSON.parse(localStorage.getItem("".concat(e))||"[]")),t}var ke=function(e,t,n){var i=a(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var o=parseFloat(t)/100;i.volume(o),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Ie=function(e){var t=a(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Pe=!1,Oe=function(e,t){var n,i,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(n=e[o])||void 0===n||null===(i=n.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!Pe){var r=je(e,"videoAssets","secondaryVideoAssets"),l=d(r,t);return l&&u(t,l),Pe=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function je(e,t,n){if(Array.isArray(e))return e.map((function(e){return je(e,t,n)}));if(null!==e&&"object"===q(e)){var i={};return Object.keys(e).forEach((function(o){o===t&&void 0!==e[n]?i[o]=e[n]:o===n&&void 0!==e[t]?i[o]=e[t]:i[o]=je(e[o],t,n)})),i}return e}function Se(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 Ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Se(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Se(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var De=function(e,t,n,i){var o,l,s=i.res,d=i.sres,u=a(e),p=(null==s?void 0:s.contentType)||"video",w=(null==s||null===(o=s[p])||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;c(s),u&&(u.on("loadstart",(function(){w&&n.resolve({status:!0,msg:"Video Loaded",response:s})})),u.on("loadeddata",(function(){var i,o;(null==u||!u.muted())&&ke(e,sessionStorage.getItem("volume")||"100");var l=r();if(v(),n.resolve(Ee({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:s}:{response:s})),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var c,f,m=Ee(Ee({},t),s);!function(e,t,n){var i,o,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ye=null==t||null===(o=t.series)||void 0===o?void 0:o.id),he=[],ge=0,de=n;var l=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=a(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());he.includes(ge)||(e==ge?(he.push(e),be(s,t,l)):e>ge&&(ge=e+l))})),s.one("ended",(function(){be(s,t,l,!0)})))}(e,m,null==l||null===(c=l.video)||void 0===c||null===(f=c.gist)||void 0===f?void 0:f.id)}})),u.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];u.trigger("subtitlechanged",t)})),u.on("subtitlechanged",(function(e,t){var n,i,o,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,m=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var p,w=m.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));p=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(p)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.tech_.on("retryplaylist",(function(){w&&Oe(s,e)})),u.on("error",(function(){var t,i;4===u.error().code&&w?Oe(s,e):(f(e,(null==u||null===(t=u.error())||void 0===t?void 0:t.message)||"Some error occured"),n.reject({status:!1,msg:(null==u||null===(i=u.error())||void 0===i?void 0:i.message)||"Some error occured"}))})),u.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,o,l=null===(n=r())||void 0===n||null===(i=n.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id,a=m().get(l)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){u.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),u.on("volumechange",(function(){var e=100*u.volume().toFixed(2);u.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),u.on("chromecastDisconnected",(function(){if(w){u.currentSource();for(var e=u.textTracks(),t=e.length-1;t>=0;t--)u.removeRemoteTextTrack(e[t])}})))},Ae=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-f45c0e82.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-2f5f2197.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-8c9cf6db.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-ac86c6e6.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n?import("./skin-0b7765b0.js").then((function(n){n.initialiseSkin(e,t)})):"minimalist"==n&&import("./skin-b785a5b5.js").then((function(n){n.initaliseSkin(e,t)}))},Re=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var Fe,xe=function(){var e=t(n.mark((function e(){return n.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)}}(),Ce=function(){var e=t(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){W.getPlugin("eme")||W.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){ce("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(W)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(W)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),ce("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:xe,loadEMELibrary:Ce});function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _e(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Me(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Me(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var He=function(i,o,r,s){var c,v,m,p,w,h,g,y,b,T,k,I,P,O,j,S,E,A,R,F,x,C,B,M,_,H,U,q,z,G,J,K,Q,Y=o.res,X=void 0===Y?null:Y,Z=o.sres,$=void 0===Z?null:Z;null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(p=m.CastContext)||void 0===p||null===(w=p.getInstance())||void 0===w||w.S;var ee=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(h=X)||void 0===h?void 0:h.contentType)||"video",ne=N(null===(g=X)||void 0===g||null===(y=g[te])||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||N(null===(T=X)||void 0===T||null===(k=T[te])||void 0===k||null===(I=k.gist)||void 0===I||null===(P=I.imageGist)||void 0===P?void 0:P.r16x9),ie=(null===(O=X)||void 0===O||null===(j=O[te])||void 0===j||null===(S=j.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,oe=(null===(E=X)||void 0===E||null===(A=E[te])||void 0===A||null===(R=A.streamingInfo)||void 0===R?void 0:R.isLiveStream)||!1,re=(null==r?void 0:r.drmLibrary)||!1,le=(null===(F=X)||void 0===F||null===(x=F.ads)||void 0===x||null===(C=x.preRoll)||void 0===C||null===(B=C.adTags)||void 0===B||null===(M=B.web)||void 0===M?void 0:M.active)&&(null===(_=X)||void 0===_||null===(H=_.ads)||void 0===H||null===(U=H.preRoll)||void 0===U||null===(q=U.adTags)||void 0===q||null===(z=q.web)||void 0===z?void 0:z.url);X=_e(_e({},X),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var ae=(Q={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},e(Q,"autoplay",null==r?void 0:r.autoplay),e(Q,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!le),e(Q,"loop",(null==r?void 0:r.loop)||!1),e(Q,"audioPosterMode",null==r?void 0:r.audioPosterMode),e(Q,"html5",_e(_e({dash:_e(_e({},!W.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}}}}}),vhs:_e(_e({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(G=r.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(J=r.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(K=r.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(Q,"poster",ne),e(Q,"techOrder",ee),e(Q,"chromecast",{requestCustomDataFn:function(e){var t=a(i),n=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,s,d,u,c,v,f=(null==e?void 0:e.contentType)||"video",m={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){m.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var h=(null==e||null===(i=e[f])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";m.contentType=h;var g=null==e||null===(r=e[f])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=g;var y=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=y;var b=null==e||null===(d=e[f])||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=b,m.subTitles=n,m.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(X,e,n)}}),Q),se=W(i,ae,function(){var e=t(n.mark((function e(){var t,o,a,c,v,m,p,w,h,g,y,b,T,k,I,P,O,j,S,E,A,R,F,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fe(r);case 2:if(oe&&s.resolve(_e({status:!0,msg:"Player Initialised"},$?{seriesResponse:$,response:X}:{response:X})),window.initialise(se),window.firstFrame(se),"white"!==window.controlsColor&&Re(window.controlsColor,se),/Android/i.test(navigator.userAgent)&&(W.options.vhs.overrideNative=!0),k=null===(t=X)||void 0===t||null===(o=t[te])||void 0===o?void 0:o.drmEnabled,I=null===(a=X)||void 0===a||null===(c=a[te])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!k&&!re){e.next=22;break}if("Safari"!==l()){e.next=15;break}return e.next=13,Ce();case 13:e.next=22;break;case 15:if("caliente"!=(null===(P=window)||void 0===P?void 0:P.siteName)){e.next=20;break}return e.next=18,Ce();case 18:e.next=22;break;case 20:return e.next=22,xe();case 22:ie&&me(i,I),!le||null!=r&&null!==(m=r.customData)&&void 0!==m&&m.disableAds||L(i,le,X),(O=d(X,i))?u(i,O):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:X}),f(i,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=X)||void 0===p||null===(w=p[te])||void 0===w||null===(h=w.contentDetails)||void 0===h||null===(g=h.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(y=X)||void 0===y||null===(b=y[te])||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(x=(null===(S=X)||void 0===S||null===(E=S[te])||void 0===E||null===(A=E.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(R=X)||void 0===R||null===(F=R[te])||void 0===F?void 0:F.closedCaptions),j=x.filter((function(e){return"VTT"===e.format})),V(i,j)),null!=r&&r.disableControls?D(i):Ae(i,_e(_e(_e({},r),ae),{},{liveVideo:oe,isDvrEnabled:ie,res:X,sres:$})),De(i,_e(_e(_e({},r),ae),{},{liveVideo:oe}),s,{res:X,sres:$});case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Ne(){return{loadVideoInstantly:h,onTimeUpdate:z,getVideoDuration:G,onVideoEnded:J,init:function(e){return new Promise((function(t,n){var i,o,r,a,s,d,u,v,f,m,h;if(!k(null==e?void 0:e.playerId)){var g=(null==e?void 0:e.videoSourceUrl)||!1,y=null==e?void 0:e.asat,b=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,T=null==e?void 0:e.videoId,I=(null==e||null===(o=e.series)||void 0===o?void 0:o.enable)||!1;window.videoId=T;var P=null==e?void 0:e.token;if(A(e)){if(R().set(null==e?void 0:e.refreshToken),!P||F(P))return void n({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}});Fe=JSON.parse(atob(P.split(".")[1]))}window.siteId=null===(r=Fe)||void 0===r?void 0:r.siteId,window.siteName=null===(a=Fe)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=Fe)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=Fe)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=Fe)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=Fe)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",P);var O=null==e?void 0:e.playerId;e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId;var j=null==e?void 0:e.airplay,S=null==e?void 0:e.apiBaseUrl,E=(null==e||null===(f=e.analytics)||void 0===f?void 0:f.gaId)||null,D=null==e?void 0:e.errors;D&&(window.customErrors=D),window.customData=null==e?void 0:e.customData,Z(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),S&&(window.playerEntitlementUrl=S),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!x(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Be})).then((function(e){e.importIMA()})),j&&"Safari"==l()&&Promise.resolve().then((function(){return Be})).then((function(e){e.importAirplay()})),E&&ce("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then((function(){return e=E,window.dataLayer=window.dataLayer||[],$("js",new Date),void $("config",e);var e})).catch((function(e){}));var N=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(O));if(N&&N.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",V={directPlaybackUrl:g,id:L};y?C(L,P).then((function(i){He(O,{res:_e(_e({},i),V)},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,L)})):He(O,{res:V},e,{resolve:t,reject:n})}else if(I){var W,q=null==e||null===(W=e.series)||void 0===W?void 0:W.id;M(q,P).then((function(i){var o,r,l,a=i.data,s=i.data.seasons;U(s);var d=T||(null==s||null===(o=s[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;p({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),w(n)})).catch((function(e){return console.log(e)}))}(q,P),C(d,P).then((function(i){var o,r,l;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),He(O,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,T)}))})).catch((function(e){B(e,O,n)}))}else if(b){var z=null==e?void 0:e.epg;_(z,P).then((function(i){var o=null==i?void 0:i.data;o.contentType="linearchannel",o.channelId=null==z?void 0:z.channelId,He(O,{res:o},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,T)}))}else C(T,P).then((function(i){var o,r,l,a;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s,d=null==i?void 0:i.data;if(null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable)if((null===(s=e.watchHistory)||void 0===s?void 0:s.saveOffline)||!1){var u,v,f,m=function(e,t,n){var i=Te(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(n)),o=[];return i&&Array.isArray(i)&&(o=i.filter((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===t}))),o}((null===(u=e.watchHistory)||void 0===u?void 0:u.profileId)||"",T,null==e?void 0:e.siteOwner);if(m&&m.length)e.watchHistoryResumeTime=(null===(v=m[0])||void 0===v?void 0:v.watchedTime)||null,e.watchedPercentage=(null===(f=m[0])||void 0===f?void 0:f.watchedPercentage)||null;d.contentType="video",He(O,{res:d},e,{resolve:t,reject:n})}else H(T,P).then((function(i){var o,r,l,a,s,u;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(s=i.data)||void 0===s?void 0:s.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",He(O,{res:d},e,{resolve:t,reject:n})})).catch((function(i){var o,r,l,a;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),He(O,{res:d},e,{resolve:t,reject:n})}));else He(O,{res:d},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,T)}))}}))},getRenditions:Y,skip:g,getPlayer:a,play:y,pause:b,detectBrowser:l,rewind:T,loadVideo:u,seekToTimeStamp:K,isPlayerInitialised:k,load:I,authenticateLC:P,dispose:O,enableCaptions:j,disableCaptions:S,getCaptions:E,playSelectedResolution:X,getSource:d,setVolume:ke,getVolume:Ie,disableControls:D,setPlaybackSpeed:Q}}export{Ne as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"axios";import{g as o,a as r,d as l,b as a,s,c as d,l as u,e as c,f as v,h as f,i as m,j as p,k as w,m as h,n as g,p as y,o as b,r as T,q as k,t as I,u as P,v as O,w as j,x as S,y as E,z as D,A,B as R,C as x,D as C,E as F,F as B,G as M,H as _,I as H,J as N,K as L,L as V,M as U,N as W,O as q}from"./generic-735b9e62.js";import z from"video.js";import G from"@babel/runtime/helpers/typeof";import{o as J,g as K,a as Q,s as Y,b as X}from"./util-536c46af.js";import{g as Z}from"./renditions-e3fe9bf6.js";import{playSelectedResolution as $}from"./resolution-596d214c.js";import{s as ee}from"./localisation-0bf399a1.js";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";function te(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function ne(e,t){te("event",e,t)}function ie(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 oe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ie(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var re=function(){var e,t,n,i;return(null===(e=r())||void 0===e||null===(t=e.video)||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.id)||(null===(i=r())||void 0===i?void 0:i.id)};function le(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ae(){var e=window.sessionStorage.getItem("uid");return e||(e=le(),window.sessionStorage.setItem("uid",e),e)}function se(){return de.apply(this,arguments)}function de(){return de=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,o();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)}))),de.apply(this,arguments)}window.initialise=function(e){window.sid=le(),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());ne(r?"FAILED_TO_START":"DROPPED_STREAM",oe({pfm:window.platform,uid:ae(),vid:re(),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),ne("PLAY",oe({pfm:window.platform,uid:ae(),vid:re(),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,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))ne("BUFFERING",oe({pfm:window.platform,uid:ae(),vid:re(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}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,ne("FIRST_FRAME",oe({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ae(),vid:re()},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,l;ne("AD_REQUEST",oe({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ae(),vid:re(),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}),ne("AD_IMPRESSION",oe({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ae(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:re()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.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),l=i.end(o);if(ue(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var ue=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var r,l,a,s,d,u,c,v,f,m,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=oe,e.t1=oe,e.t2=oe({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=ae(),e.t5=re(),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,se();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===(s=window)||void 0===s||null===(d=s.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,o();case 37:p=e.sent,i({url:(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.beacon)||void 0===f?void 0:f.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:p},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 ce,ve,fe=function(e){return new Promise((function(t,n){if(me(e))n("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){t()},i.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},me=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},pe=function(){var e=t(n.mark((function e(t){var i,o,r,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=a(null==t?void 0:t.playerId),null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){e.next=20;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=e.sent,e.prev=5,e.next=8,fe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,s.default(z),e.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=t&&t.airplay&&"Safari"==l()?null==o||o.airPlay({addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),we=function(e,t){var n=a(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,i,o,r,l,a=this.el(),s=z.dom.getPointerPosition(a,t).x;z.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,u=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S;if(console.log(d),d&&"CONNECTED"===u){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 he(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 ge(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?he(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):he(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ye=[],be=0,Te=null;function ke(t,n,i){var o,l,a,d,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ve=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var v=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,f=Math.floor(t.currentTime()),m=Math.floor(t.duration()),p=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,w=(null==n||null===(d=n.video)||void 0===d?void 0:d.originalObjectId)||null,h=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,g=Math.floor(t.currentTime()),y=c?100:Math.floor(f/m*100),b={};h?function(t,n,i){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(i),l=Ie(o),a=(new Date).getTime(),s=r(),d=(null==s?void 0:s.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(t,n){return ge(ge({},t),{},e({},n,d[n]))}),{}),c=l.findIndex((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===ce}));c<0?l.push(ge(ge({content:u},t),{},{addedDate:a,updateDate:a})):l[c]=ge(ge(ge({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(o),JSON.stringify(l))}(b={completed:c,watchedTime:g,watchedPercentage:y},v,n.siteOwner):("v1"==ve?b={videoId:ce,watchedTime:g,watchedPercentage:y,siteOwner:n.siteOwner,userId:n.userId,xApiKey:p}:"v2"==ve&&(b=ge(ge({videoId:ce,watchedTime:g,watchedPercentage:y,doneWatching:c,profileId:v},Te&&{seriesId:Te}),w&&{originalObjectId:w})),s(b,ve).then((function(e){})).catch((function(e){}))),be=f+i}function Ie(e){var t=[];return e&&(t=JSON.parse(localStorage.getItem("".concat(e))||"[]")),t}var Pe=function(e,t,n){var i=a(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var o=parseFloat(t)/100;i.volume(o),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Oe=function(e){var t=a(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},je=!1,Se=function(e,t){var n,i,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(n=e[o])||void 0===n||null===(i=n.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!je){var r=Ee(e,"videoAssets","secondaryVideoAssets"),l=d(r,t);return l&&u(t,l),je=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Ee(e,t,n){if(Array.isArray(e))return e.map((function(e){return Ee(e,t,n)}));if(null!==e&&"object"===G(e)){var i={};return Object.keys(e).forEach((function(o){o===t&&void 0!==e[n]?i[o]=e[n]:o===n&&void 0!==e[t]?i[o]=e[t]:i[o]=Ee(e[o],t,n)})),i}return e}function De(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 Ae(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?De(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):De(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Re=function(e,t,n,i){var o,l,s=i.res,d=i.sres,u=a(e),p=(null==s?void 0:s.contentType)||"video",w=(null==s||null===(o=s[p])||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;c(s),u&&(u.on("loadstart",(function(){w&&n.resolve({status:!0,msg:"Video Loaded",response:s})})),u.on("loadeddata",(function(){var i,o;(null==u||!u.muted())&&Pe(e,sessionStorage.getItem("volume")||"100");var l=r();if(v(),n.resolve(Ae({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:s}:{response:s})),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var c,f,m=Ae(Ae({},t),s);!function(e,t,n){var i,o,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(Te=null==t||null===(o=t.series)||void 0===o?void 0:o.id),ye=[],be=0,ce=n;var l=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=a(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());ye.includes(be)||(e==be?(ye.push(e),ke(s,t,l)):e>be&&(be=e+l))})),s.one("ended",(function(){ke(s,t,l,!0)})))}(e,m,null==l||null===(c=l.video)||void 0===c||null===(f=c.gist)||void 0===f?void 0:f.id)}})),u.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];u.trigger("subtitlechanged",t)})),u.on("subtitlechanged",(function(e,t){var n,i,o,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,m=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var p,w=m.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));p=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(p)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.tech_.on("retryplaylist",(function(){w&&Se(s,e)})),u.on("error",(function(){var t,i;4===u.error().code&&w?Se(s,e):(f(e,(null==u||null===(t=u.error())||void 0===t?void 0:t.message)||"Some error occured"),n.reject({status:!1,msg:(null==u||null===(i=u.error())||void 0===i?void 0:i.message)||"Some error occured"}))})),u.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,o,l=null===(n=r())||void 0===n||null===(i=n.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id,a=m().get(l)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){u.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),u.on("volumechange",(function(){var e=100*u.volume().toFixed(2);u.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),u.on("chromecastDisconnected",(function(){if(w){u.currentSource();for(var e=u.textTracks(),t=e.length-1;t>=0;t--)u.removeRemoteTextTrack(e[t])}})))},xe=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-01839bbf.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-fc2c2b9a.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-80dfe0b7.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-a0ca0063.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n?import("./skin-8a01ff24.js").then((function(n){n.initialiseSkin(e,t)})):"minimalist"==n&&import("./skin-17aa9c7f.js").then((function(n){n.initaliseSkin(e,t)}))},Ce=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var Fe,Be=function(){var e=t(n.mark((function e(){return n.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)}}(),Me=function(){var e=t(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){z.getPlugin("eme")||z.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_e=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){fe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(z)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(z)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),fe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Be,loadEMELibrary:Me});function He(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 Ne(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?He(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):He(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Le=function(i,o,r,s){var c,v,m,p,w,h,g,y,b,T,k,I,P,O,j,S,E,A,R,x,C,F,B,M,_,H,W,q,G,J,K,Q,Y,X=o.res,Z=void 0===X?null:X,$=o.sres,ee=void 0===$?null:$;null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(p=m.CastContext)||void 0===p||null===(w=p.getInstance())||void 0===w||w.S;var te=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],ne=(null===(h=Z)||void 0===h?void 0:h.contentType)||"video",ie=N(null===(g=Z)||void 0===g||null===(y=g[ne])||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||N(null===(T=Z)||void 0===T||null===(k=T[ne])||void 0===k||null===(I=k.gist)||void 0===I||null===(P=I.imageGist)||void 0===P?void 0:P.r16x9),oe=(null===(O=Z)||void 0===O||null===(j=O[ne])||void 0===j||null===(S=j.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,re=(null===(E=Z)||void 0===E||null===(A=E[ne])||void 0===A||null===(R=A.streamingInfo)||void 0===R?void 0:R.isLiveStream)||!1,le=(null==r?void 0:r.drmLibrary)||!1,ae=(null===(x=Z)||void 0===x||null===(C=x.ads)||void 0===C||null===(F=C.preRoll)||void 0===F||null===(B=F.adTags)||void 0===B||null===(M=B.web)||void 0===M?void 0:M.active)&&(null===(_=Z)||void 0===_||null===(H=_.ads)||void 0===H||null===(W=H.preRoll)||void 0===W||null===(q=W.adTags)||void 0===q||null===(G=q.web)||void 0===G?void 0:G.url);Z=Ne(Ne({},Z),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var se=(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:oe},e(Y,"autoplay",null==r?void 0:r.autoplay),e(Y,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!ae),e(Y,"loop",(null==r?void 0:r.loop)||!1),e(Y,"audioPosterMode",null==r?void 0:r.audioPosterMode),e(Y,"html5",Ne(Ne({dash:Ne(Ne({},!z.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}}}}}),vhs:Ne(Ne({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(J=r.customData)||void 0===J?void 0:J.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(K=r.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(Q=r.customData)||void 0===Q?void 0:Q.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(Y,"poster",ie),e(Y,"techOrder",te),e(Y,"chromecast",{requestCustomDataFn:function(e){var t=a(i),n=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,s,d,u,c,v,f=(null==e?void 0:e.contentType)||"video",m={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){m.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var h=(null==e||null===(i=e[f])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";m.contentType=h;var g=null==e||null===(r=e[f])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=g;var y=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=y;var b=null==e||null===(d=e[f])||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=b,m.subTitles=n,m.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(Z,e,n)}}),Y),de=z(i,se,function(){var e=t(n.mark((function e(){var t,o,a,c,v,m,p,w,h,g,y,b,T,k,I,P,O,j,S,E,A,R,x,C;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pe(r);case 2:if(re&&s.resolve(Ne({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Z}:{response:Z})),window.initialise(de),window.firstFrame(de),"white"!==window.controlsColor&&Ce(window.controlsColor,de),/Android/i.test(navigator.userAgent)&&(z.options.vhs.overrideNative=!0),k=null===(t=Z)||void 0===t||null===(o=t[ne])||void 0===o?void 0:o.drmEnabled,I=null===(a=Z)||void 0===a||null===(c=a[ne])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!k&&!le){e.next=22;break}if("Safari"!==l()){e.next=15;break}return e.next=13,Me();case 13:e.next=22;break;case 15:if("caliente"!=(null===(P=window)||void 0===P?void 0:P.siteName)){e.next=20;break}return e.next=18,Me();case 18:e.next=22;break;case 20:return e.next=22,Be();case 22:oe&&we(i,I),!ae||null!=r&&null!==(m=r.customData)&&void 0!==m&&m.disableAds||L(i,ae,Z),O=d(Z,i),null!=r&&r.nearestClusterUrl&&(O=V(O,r.nearestClusterUrl)),O?u(i,O):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Z}),f(i,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Z)||void 0===p||null===(w=p[ne])||void 0===w||null===(h=w.contentDetails)||void 0===h||null===(g=h.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(y=Z)||void 0===y||null===(b=y[ne])||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(C=(null===(S=Z)||void 0===S||null===(E=S[ne])||void 0===E||null===(A=E.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(R=Z)||void 0===R||null===(x=R[ne])||void 0===x?void 0:x.closedCaptions),j=C.filter((function(e){return"VTT"===e.format})),U(i,j)),null!=r&&r.disableControls?D(i):xe(i,Ne(Ne(Ne({},r),se),{},{liveVideo:re,isDvrEnabled:oe,res:Z,sres:ee})),Re(i,Ne(Ne(Ne({},r),se),{},{liveVideo:re}),s,{res:Z,sres:ee});case 30:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Ve(){return{loadVideoInstantly:h,onTimeUpdate:J,getVideoDuration:K,onVideoEnded:Q,init:function(e){return new Promise((function(t,n){var i,o,r,a,s,d,u,v,f,m,h;if(!k(null==e?void 0:e.playerId)){var g=(null==e?void 0:e.videoSourceUrl)||!1,y=null==e?void 0:e.asat,b=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,T=null==e?void 0:e.videoId,I=(null==e||null===(o=e.series)||void 0===o?void 0:o.enable)||!1;window.videoId=T;var P=null==e?void 0:e.token;if(A(e)){if(R().set(null==e?void 0:e.refreshToken),!P||x(P))return void n({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}});Fe=JSON.parse(atob(P.split(".")[1]))}window.siteId=null===(r=Fe)||void 0===r?void 0:r.siteId,window.siteName=null===(a=Fe)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=Fe)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=Fe)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=Fe)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=Fe)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",P);var O=null==e?void 0:e.playerId;e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId;var j=null==e?void 0:e.airplay,S=null==e?void 0:e.apiBaseUrl,E=(null==e||null===(f=e.analytics)||void 0===f?void 0:f.gaId)||null,D=null==e?void 0:e.errors;D&&(window.customErrors=D),window.customData=null==e?void 0:e.customData,ee(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),S&&(window.playerEntitlementUrl=S),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!C(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return _e})).then((function(e){e.importIMA()})),j&&"Safari"==l()&&Promise.resolve().then((function(){return _e})).then((function(e){e.importAirplay()})),E&&fe("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then((function(){return e=E,window.dataLayer=window.dataLayer||[],te("js",new Date),void te("config",e);var e})).catch((function(e){}));var N=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(O));if(N&&N.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",V={directPlaybackUrl:g,id:L};y?F(L,P).then((function(i){Le(O,{res:Ne(Ne({},i),V)},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,L)})):Le(O,{res:V},e,{resolve:t,reject:n})}else if(I){var U,z=sessionStorage.getItem("season-idx")||0;W.set(parseInt(z));var G=null==e||null===(U=e.series)||void 0===U?void 0:U.id;M(G,P).then((function(i){var o,r,l,a=i.data,s=i.data.seasons;q(s);var d=T||(null==s||null===(o=s[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;p({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),w(n)})).catch((function(e){return console.log(e)}))}(G,P),F(d,P).then((function(i){var o,r,l;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),Le(O,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,T)}))})).catch((function(e){B(e,O,n)}))}else if(b){var J=null==e?void 0:e.epg;_(J,P).then((function(i){var o=null==i?void 0:i.data;o.contentType="linearchannel",o.channelId=null==J?void 0:J.channelId,Le(O,{res:o},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,T)}))}else F(T,P).then((function(i){var o,r,l,a;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s,d=null==i?void 0:i.data;if(null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable)if((null===(s=e.watchHistory)||void 0===s?void 0:s.saveOffline)||!1){var u,v,f,m=function(e,t,n){var i=Ie(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(n)),o=[];return i&&Array.isArray(i)&&(o=i.filter((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===t}))),o}((null===(u=e.watchHistory)||void 0===u?void 0:u.profileId)||"",T,null==e?void 0:e.siteOwner);if(m&&m.length)e.watchHistoryResumeTime=(null===(v=m[0])||void 0===v?void 0:v.watchedTime)||null,e.watchedPercentage=(null===(f=m[0])||void 0===f?void 0:f.watchedPercentage)||null;d.contentType="video",Le(O,{res:d},e,{resolve:t,reject:n})}else H(T,P).then((function(i){var o,r,l,a,s,u;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(s=i.data)||void 0===s?void 0:s.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",Le(O,{res:d},e,{resolve:t,reject:n})})).catch((function(i){var o,r,l,a;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Le(O,{res:d},e,{resolve:t,reject:n})}));else Le(O,{res:d},e,{resolve:t,reject:n})})).catch((function(e){B(e,O,n,T)}))}}))},getRenditions:Z,skip:g,getPlayer:a,play:y,pause:b,detectBrowser:l,rewind:T,loadVideo:u,seekToTimeStamp:Y,isPlayerInitialised:k,load:I,authenticateLC:P,dispose:O,enableCaptions:j,disableCaptions:S,getCaptions:E,playSelectedResolution:$,getSource:d,setVolume:Pe,getVolume:Oe,disableControls:D,setPlaybackSpeed:X}}export{Ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,n as r,r as t}from"./generic-
|
|
1
|
+
import{b as e,n as r,r as t}from"./generic-735b9e62.js";function o(o,u){var l,n,i=e(o),c=null==i||null===(l=i.controlBar)||void 0===l||null===(n=l.playToggle)||void 0===n?void 0:n.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(i.muted()?i.muted(!1):i.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 n=document.querySelector(".vjs-fullscreen-control");return void(n&&n.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};
|