@viewlift/player-backup 1.0.120-backup → 1.0.122-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-ff42f1a0.js +1 -0
- package/cjs/{assets/bundle-132a4452.css → bundle.css} +18 -0
- package/cjs/caption-settings-f7372584.js +1 -0
- package/cjs/features-c93010e5.js +1 -0
- package/cjs/generic-57501058.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/keyboardShortcuts-4340bc6b.js +1 -0
- package/cjs/localisation-56e0a999.js +1 -0
- package/cjs/multicam-864bd2bb.js +1 -0
- package/cjs/multicamv2-2ffa7f0c.js +1 -0
- package/cjs/mwebPotraitTray-56d6e4d2.js +1 -0
- package/cjs/nextEpisodeButton-8dfcec10.js +1 -0
- package/cjs/playlist-23f2b341.js +1 -0
- package/cjs/renditions-cc71ec8c.js +1 -0
- package/cjs/resolution-812052c0.js +1 -0
- package/cjs/series-c6ebeb87.js +1 -0
- package/cjs/series-v2-07035af9.js +1 -0
- package/cjs/settings-icon-48c25dc4.js +1 -0
- package/cjs/skin-2075dd29.js +1 -0
- package/cjs/skin-3d8b17fc.js +1 -0
- package/cjs/skin-5ceb29b6.js +1 -0
- package/cjs/skin-65cf70ff.js +1 -0
- package/cjs/skin-65f18828.js +1 -0
- package/cjs/skin-cffba054.js +1 -0
- package/cjs/util-26ad6aca.js +1 -0
- package/cjs/videoSelector-3cdfe35b.js +1 -0
- package/esm/autoNextVideo-739861ed.js +1 -0
- package/esm/{assets/bundle-132a4452.css → bundle.css} +18 -0
- package/esm/caption-settings-835fcf0b.js +1 -0
- package/esm/features-0eeb3c65.js +1 -0
- package/esm/generic-444bf169.js +1 -0
- package/esm/index.js +1 -1
- package/esm/keyboardShortcuts-8624e77b.js +1 -0
- package/esm/localisation-0bf399a1.js +1 -0
- package/esm/multicam-5e992904.js +1 -0
- package/esm/multicamv2-2640b4f1.js +1 -0
- package/esm/mwebPotraitTray-ff38b447.js +1 -0
- package/esm/nextEpisodeButton-5a62159a.js +1 -0
- package/esm/playlist-b612533a.js +1 -0
- package/esm/renditions-11d6f06f.js +1 -0
- package/esm/resolution-4c376392.js +1 -0
- package/esm/series-4d4d1421.js +1 -0
- package/esm/series-v2-c7c9616a.js +1 -0
- package/esm/settings-icon-81bd8bec.js +1 -0
- package/esm/skin-347cf391.js +1 -0
- package/esm/skin-48a28d17.js +1 -0
- package/esm/skin-57962dea.js +1 -0
- package/esm/skin-79e9ebc9.js +1 -0
- package/esm/skin-af53462a.js +1 -0
- package/esm/skin-b1e2e3ce.js +1 -0
- package/esm/util-b468f9d5.js +1 -0
- package/esm/videoSelector-0d8b0001.js +1 -0
- package/package.json +8 -8
- package/cjs/autoNextVideo-29d9f469.js +0 -1
- package/cjs/caption-settings-b70eab43.js +0 -1
- package/cjs/features-6ea4b885.js +0 -1
- package/cjs/index-cedeb8d3.js +0 -1
- package/cjs/keyboardShortcuts-474dc551.js +0 -1
- package/cjs/multicam-9b597ba1.js +0 -1
- package/cjs/multicamv2-60597a5d.js +0 -1
- package/cjs/mwebPotraitTray-5edcb6d8.js +0 -1
- package/cjs/nextEpisodeButton-e87ebb93.js +0 -1
- package/cjs/playlist-b97acf8c.js +0 -1
- package/cjs/series-e7ff61bb.js +0 -1
- package/cjs/series-v2-42b4ec8d.js +0 -1
- package/cjs/settings-icon-6412b88b.js +0 -1
- package/cjs/skin-09534036.js +0 -1
- package/cjs/skin-5f856fdd.js +0 -1
- package/cjs/skin-8f244f99.js +0 -1
- package/cjs/skin-b1a8ce10.js +0 -1
- package/cjs/skin-d952d567.js +0 -1
- package/cjs/skin-f5db00b3.js +0 -1
- package/cjs/videoSelector-5919534a.js +0 -1
- package/esm/autoNextVideo-adfbcb3d.js +0 -1
- package/esm/caption-settings-59314d69.js +0 -1
- package/esm/features-0850f778.js +0 -1
- package/esm/index-ae2ba424.js +0 -1
- package/esm/keyboardShortcuts-5789c691.js +0 -1
- package/esm/multicam-3effe00b.js +0 -1
- package/esm/multicamv2-62cfa047.js +0 -1
- package/esm/mwebPotraitTray-c07b69fd.js +0 -1
- package/esm/nextEpisodeButton-7bb49225.js +0 -1
- package/esm/playlist-dcd1aedb.js +0 -1
- package/esm/series-e88c6368.js +0 -1
- package/esm/series-v2-26a229fb.js +0 -1
- package/esm/settings-icon-c6a27295.js +0 -1
- package/esm/skin-11672afa.js +0 -1
- package/esm/skin-18b88d9a.js +0 -1
- package/esm/skin-3d6c4c12.js +0 -1
- package/esm/skin-65dd93b2.js +0 -1
- package/esm/skin-66ac8234.js +0 -1
- package/esm/skin-8104c990.js +0 -1
- package/esm/videoSelector-648555c7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,i=require("./generic-57501058.js"),t=require("./util-26ad6aca.js"),n=0,o=0,u=function e(t,n,u,c){o=t,t>u.length-1||(i.setVideoIdx(o+1),i.load(n,u[t].id).then((function(e){i.highlightVideo(o),o++,d(e)})).catch((function(t){d(t),setTimeout((function(){i.highlightVideo(o),o++,e(o,n,u)}),5e3)})))},d=function(i){e&&e(i)};exports.autoPlayNext=function(c){clearTimeout(n);var r=null==c?void 0:c.content;e=null==c?void 0:c.cb;var h=c.playerId;t.onVideoEnded(h,(function(){var e=i.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((o=i.getVideoIdx())>r.length-1||(i.setVideoIdx(o+1),i.load(h,r[o].id).then((function(e){i.highlightVideo(o),i.setCurrentVideo(e.response),o++,d(e)})).catch((function(e){d(e),i.highlightVideo(o),o++,n=setTimeout((function(){i.isPaused(h)&&u(o,h,r)}),5e3)}))))}))},exports.switchToNext=u;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
1
13
|
.widget-selection{
|
|
2
14
|
display: flex;
|
|
3
15
|
align-items: center;
|
|
@@ -118,6 +130,12 @@
|
|
|
118
130
|
.widget-selector-content #sr-widget{
|
|
119
131
|
padding: 0 18px;
|
|
120
132
|
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
121
139
|
/* nextep */
|
|
122
140
|
.next-ep-preview{
|
|
123
141
|
position: absolute;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-515b2da0.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator");var c=require("./generic-57501058.js");function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var s=i.getComponent("Component"),d=function(){n(m,s);var d,p,u=(d=m,p=l(),function(){var e,t=o(d);if(p){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function m(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(i=u.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(m,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./caption-settings-34ca0188.js")})).then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=c.getCaptions(this.playerId);null==t||t.map((function(t){return c.disableCaptions(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",c.setUpdatedElHeight(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),c.detectOrientationChange(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(r.crossIconSvg())});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"}),l=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,l),i.dom.appendContent(l,s),c.handleDrawerResizing(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")),c.getCaptions(e.playerId).map((function(t){return c.disableCaptions(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var 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}}]),m}();exports.default=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-57501058.js"),s=require("./renditions-cc71ec8c.js"),u=require("./localisation-56e0a999.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){var t=p();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-f7372584.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("captionSelector",u),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=a.getPlayer(e).el(),r=0,n=a.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-2ffa7f0c.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamView=function(e,t){Promise.resolve().then((function(){return require("./multicam-864bd2bb.js")})).then((function(r){var n=r.default,o=t.streams,l=a.getPlayer(e);i.registerComponent("multicamModule",n),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var r=document.querySelector(".vjs-control-bar");r&&"live"==(null==t?void 0:t.skin)&&(r.style.background="transparent")},exports.addMwebPotraitTrayModule=function(e,t){Promise.resolve().then((function(){return require("./mwebPotraitTray-56d6e4d2.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("mwebPotraitTray",n),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-8dfcec10.js")})).then((function(n){var o=n.default,l=a.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=a.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-23f2b341.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-812052c0.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a.getPlayer(e),u=s.getRenditions(e);(null==u?void 0:u.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:u},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var u=a.parseSvgString(l);return o.append(u),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-c6ebeb87.js")})).then((function(n){var o=n.seriesModule,l=a.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),u=function(e){s[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<s.length;c++)u(c)}))},exports.addSeriesSelectorV2=function(t,r){Promise.resolve().then((function(){return require("./series-v2-07035af9.js")})).then((function(n){var o=n.default,l=a.getPlayer(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({playerId:t},r),l.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-48c25dc4.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("settingsSelector",u),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var u=a.parseSvgString(l);return o.append(u),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=d(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-3cdfe35b.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("js-cookie"),a=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),d={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e,t){u("event",e,t)}function c(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 v(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?c(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var m={name:"@viewlift/player8",version:"1.0.110",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.5.0",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^8.21.1","videojs-contrib-ads":"^7.5.2","videojs-contrib-eme":"^5.5.1","videojs-contrib-quality-menu":"^1.0.3",ima:"npm:videojs-ima@2.2.0"}};window.vl_player_version=m.version;var p=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:_(),params:v({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":m.version},withCredentials:!0})},f=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:O()+d.getLinearChannelDetails,params:v(v(v(v(v({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},w=function(){var e=t(n.mark((function e(t,i){var r,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:if(r=e.sent,"v1"!=i){e.next=8;break}return a={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",o({url:y(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=i){e.next=10;break}return e.abrupt("return",o({url:b(),method:"POST",headers:{Authorization:r},data:v({},t),params:v({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),g=function(e,t){var n,i,r=(null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),u=(null==d?void 0:d.site)||null;return o({method:"GET",url:h(e),params:{site:u},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return o({method:"GET",url:T(e,v),headers:{Authorization:t,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},I=function(e){return O()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return O()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},h=function(e){return O()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},T=function(e,t){return O()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(t,"/").concat(e)},y=function(){return O()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},b=function(){return O()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},_=function(){var e,t,n,i,o=O()+"".concat(null==d?void 0:d.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":o},O=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},D=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},x=null;function F(){return{set:function(e){e&&(x=e)},get:function(){return x}}}var S,P,C,V,A,L,R=function(){var e=t(n.mark((function e(){var t,i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=F().get(),i=O(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),W=null,N=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!D(t)){e.next=6;break}return W||(W=R().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&F().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){W=null}))),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(e){P=e},B=function(){return P},M=function(){return S},j=function(e){C=e},H=function(e){if(V){var t=V.get(e);j(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function z(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 G(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?z(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var q=function(){var e,t,n,i,o,r,a,l=B();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function J(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function K(){return X.apply(this,arguments)}function X(){return(X=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,N();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=Y(),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());s(r?"FAILED_TO_START":"DROPPED_STREAM",G({pfm:window.platform,uid:J(),vid:q(),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),s("PLAY",G({pfm:window.platform,uid:J(),vid:q(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))s("BUFFERING",G({pfm:window.platform,uid:J(),vid:q(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,s("FIRST_FRAME",G({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),vid:q()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;s("AD_REQUEST",G({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),vid:q(),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}),s("AD_IMPRESSION",G({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:q()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(Q(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var Q=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=G,e.t1=G,e.t2=G({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=J(),e.t5=q(),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,K();case 20:return e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,N();case 37:p=e.sent,o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization: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 Z=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},$=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ee=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},te=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ne(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 ie(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ne(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=a(navigator.userAgent);var oe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},re=function(e){var t=ae(e,"video.tags",[]),n=ae(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},ae=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},le=function(){var e,t,n,i,o,a,l,d,u,s,c,v,m,p,f,w,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,h=(null==E?void 0:E.contentType)||"video",T=null==E||null===(e=E[h])||void 0===e?void 0:e.metadata,y=Oe(I);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===h?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:ae(E,"video.gist.id",""),x=ie(ie({},se(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:oe(O,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ae(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ae(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ae(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:re(E),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ae(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+ae(E,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ae(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:ae(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(p=m.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ae(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ae(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:ae(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ae(E,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ae(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ue(),VIEWLIFT_SEASON_NUMBER:de(),VIEWLIFT_CONTENT_TAGS:re(E)},null===(f=window)||void 0===f||null===(w=f.customData)||void 0===w?void 0:w.macros);for(var F in x){var S=new RegExp(F,"g");g=g.replace(S,x[F])}return g},de=function(){var e=U.get();return e>=0?e+1:1},ue=function(){var e,t,n,i=M(),o=B(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=U.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},se=function(e){var t,n,i,o,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var u=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(te()?u?l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=te()?ie(ie({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):ie(ie({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=te()?ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},ce=function(e,t){var n,i,o,r,a,l,d,u,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[f])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[f])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,I=null==e||null===(r=e[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,E=(null==e||null===(l=e[f])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=I&&I.hls)return me(I);if(w){var T=pe(g,t);return T.src=le(T.src,t,e),T}if("Safari"!==ee()&&h)return ve(g);if(E){var y=me(g);return y.src=le(y.src,t,e),y}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=le(b.src,t,e),b}return null},ve=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},me=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},pe=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=ee();if(Oe(t),"Safari"===a){var l=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};console.log("🔐 Requesting FairPlay Certificate...",o),i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return fe(t),l}var d={src:o.url,type:"application/dash+xml"};return fe(t),d.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},d};var fe=function(e){var t=Oe(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==ee()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},we=function(e){var t=Oe(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},ge=function(e,t){var n=Oe(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},Ie=!1,Ee=function(e,t,n){var i=le(t,e,n),o=Oe(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,r=Oe(e);if(null!==r.el_){Ie=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Ie&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},he=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},Te="",ye=function(e,t){var n;if(t){var i=document.getElementById(e),o=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==o&&(t.style.height="".concat(o))}};function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var _e=function(e){return!!i.getPlayer("".concat(e))},Oe=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},De=function(){var e=t(n.mark((function e(t,i){var o,r,a,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,N();case 3:return r=e.sent,a=Oe(t),e.abrupt("return",new Promise((function(e,n){f(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=Y(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ce(r,t);k(r),l&&o?(Se(t,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),xe=function(){var e=t(n.mark((function e(t,i,o){var r,a,l,d,u,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:return d=e.sent,(M()||null)&&H(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&g(i,d).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,p,f,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;k(i.data);var I=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);I&&Ee(t,I,w);var E=ce(w,t);if(E){var h,T,y,b,_,O,D,x,F,S,P,C,V,A,L=(null==w||null===(h=w.video)||void 0===h||null===(T=h.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),R=Oe(t);if(R.poster(L),Se(t,E),R.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),R.on("loadeddata",(function(){$(),e({status:!0,msg:"Video Loaded",response:w})})),R.one("play",(function(){u&&s<95&&setTimeout((function(){R.currentTime(u)}),0)})),R.one("error",(function(){var e;n({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(x=D.closedCaptions)||void 0===x?void 0:x.length)>0||(null==w||null===(F=w.video)||void 0===F||null===(S=F.closedCaptions)||void 0===S?void 0:S.length)>0)P=((null==w||null===(C=w.video)||void 0===C||null===(V=C.contentDetails)||void 0===V?void 0:V.closedCaptions)||(null==w||null===(A=w.video)||void 0===A?void 0:A.closedCaptions)).filter((function(e){return"VTT"===e.format})),ge(t,P);else we(t)}else Z(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Pe(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Fe=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Se=function(e,t){var n=Oe(e);n&&n.src(t)},Pe=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);_e(n)&&Z(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?be(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):be(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.addCaptions=ge,exports.authenticateLC=De,exports.clearError=$,exports.closeOpenDrawers=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},exports.createIconMarkup=function(e){return he(e)},exports.createIdxMapping=function(e){V=new Map,e.map((function(e,t){V.set(e.id,t)}))},exports.detectBrowser=ee,exports.detectOrientationChange=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&Te!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),Te=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},exports.disableCaptions=function(e,t){for(var n=Oe(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=Oe(e);if(Fe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.enableCaptions=function(e,t){var n,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=Oe(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},exports.getCaptions=function(e){var t,n=Oe(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},exports.getCurrentSeries=M,exports.getCurrentVideo=B,exports.getEntitlementData=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getLinearChannelDetails=f,exports.getPlayer=Oe,exports.getSeriesDetails=function(e,t){var n,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:O()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return o({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var i=e.videoId;return o({method:"GET",url:I(i),headers:{Authorization:e.token},timeout:15e3})},exports.getSeriesWatchMap=function(){return A},exports.getSource=ce,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getVideoDetails=p,exports.getVideoIdx=function(){return C},exports.getVideoInfo=g,exports.handleDrawerResizing=function(e,t){var n,i=Oe(e),o=Oe(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){ye(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){ye(e,t)}),50)}))},exports.handleError=Z,exports.highlightVideo=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.impolicy16x9=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},exports.initialiseAdvertisement=Ee,exports.initiateErrorHandling=Pe,exports.isMobile=te,exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=_e,exports.isTokenExpired=D,exports.load=xe,exports.loadVideo=Se,exports.loadVideoInstantly=function(e,t,n){var i=Oe(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=he,exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=F,exports.removeCaptions=we,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)},exports.saveWatchHistory=w,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){S=e},exports.setCurrentVideo=k,exports.setSeriesWatchMap=function(e){A=e},exports.setUpdatedElHeight=ye,exports.setVideoIdx=j,exports.setVideoIdxById=H,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./index-cedeb8d3.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),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/typeof"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@babel/runtime/helpers/inherits"),module.exports=e.VLPlayerCore;
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("videojs-contrib-quality-menu");var e=require("./generic-57501058.js"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("@babel/runtime/helpers/typeof"),l=require("./util-26ad6aca.js"),a=require("./renditions-cc71ec8c.js"),s=require("./resolution-812052c0.js"),u=require("./localisation-56e0a999.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/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var d,c,v=function(e){return new Promise((function(t,n){if(p(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){t()},o.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(o)}}))},p=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},m=function(){var n=t(o.mark((function t(n){var r,l,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=e.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null==n||!n.chromecastReceiverId){t.next=20;break}return t.next=4,import("@silvermine/videojs-chromecast");case 4:return s=t.sent,t.prev=5,t.next=8,v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),console.log("Error",t.t0);case 13:return t.prev=13,s.default(i),t.finish(13);case 16:null!==(a=window)&&void 0!==a&&a.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=n&&n.airplay&&"Safari"==e.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return t.stop()}}),t,null,[[5,10,13,16]])})));return function(e){return n.apply(this,arguments)}}(),f=function(t,n){var o=e.getPlayer(t);o&&n&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(e){var n,o,r,l,a,s=this.el(),u=i.dom.getPointerPosition(s,e).x;i.getPlayer(t).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?g(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var y=[],w=0,b=null;function k(t,o,i){var r,l,a,s,u,v=arguments.length>3&&void 0!==arguments[3]&&arguments[3];c=(null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.apiVersion)||"v1";var p=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,m=Math.floor(t.currentTime()),f=Math.floor(t.duration()),g=null==o||null===(a=o.watchHistory)||void 0===a?void 0:a.xapiKey,y=(null==o||null===(s=o.video)||void 0===s?void 0:s.originalObjectId)||null,k=(null==o||null===(u=o.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,I=Math.floor(t.currentTime()),O=v?100:Math.floor(m/f*100),j={};k?function(t,o,i){var r=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),l=P(r),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,t){return h(h({},e),{},n({},t,u[t]))}),{}),v=l.findIndex((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===d}));v<0?l.push(h(h({content:c},t),{},{addedDate:a,updateDate:a})):l[v]=h(h(h({},l[v]),t),{},{updateDate:a});localStorage.setItem("".concat(r),JSON.stringify(l))}(j={completed:v,watchedTime:I,watchedPercentage:O},p,o.siteOwner):("v1"==c?j={videoId:d,watchedTime:I,watchedPercentage:O,siteOwner:o.siteOwner,userId:o.userId,xApiKey:g}:"v2"==c&&(j=h(h({videoId:d,watchedTime:I,watchedPercentage:O,doneWatching:v,profileId:p},b&&{seriesId:b}),y&&{originalObjectId:y})),e.saveWatchHistory(j,c).then((function(e){})).catch((function(e){}))),w=m+i}function P(e){var t=[];return e&&(t=JSON.parse(localStorage.getItem("".concat(e))||"[]")),t}function I(e,t,n){var o=P(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(n)),i=[];return o&&Array.isArray(o)&&(i=o.filter((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===t}))),i}var O=function(t,n,o){var i=e.getPlayer(t);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var r=parseFloat(n)/100;i.volume(r),o&&o({status:!0,msg:"Volume set to ".concat(n,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(t,"'")})},j=function(t){var n=e.getPlayer(t);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(t,"'")},T=!1,S=function(t,n){var o,i,r=(null==t?void 0:t.contentType)||"video";if(((null==t||null===(o=t[r])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!T){var l=C(t,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,n);return a&&e.loadVideo(n,a),T=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function C(e,t,n){if(Array.isArray(e))return e.map((function(e){return C(e,t,n)}));if(null!==e&&"object"===r(e)){var o={};return Object.keys(e).forEach((function(i){i===t&&void 0!==e[n]?o[i]=e[n]:i===n&&void 0!==e[t]?o[i]=e[t]:o[i]=C(e[i],t,n)})),o}return e}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?D(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):D(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var E=function(t,n,o,i){var r,l,a=i.res,s=i.sres,u=e.getPlayer(t),c=(null==a?void 0:a.contentType)||"video",v=(null==a||null===(r=a[c])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;e.setCurrentVideo(a),u&&(u.on("loadstart",(function(){v?o.resolve({status:!0,msg:"Video Loaded",response:a}):o.resolve(x({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:a}:{response:a}))})),u.on("loadeddata",(function(){var o,i;(null==u||!u.muted())&&O(t,sessionStorage.getItem("volume")||"100");var r=e.getCurrentVideo();if(e.clearError(),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&(!n.isAnonymousUser||null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.saveOffline)){var l,s,c=x(x({},n),a);!function(t,n,o){var i,r,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(b=null==n||null===(r=n.series)||void 0===r?void 0:r.id),y=[],w=0,d=o;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=e.getPlayer(t);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());y.includes(w)||(e==w?(y.push(e),k(s,n,a)):e>w&&(w=e+a))})),s.one("ended",(function(){k(s,n,a,!0)})))}(t,c,null==r||null===(l=r.video)||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.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,o,i,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,m=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var f,g=m.getMediaSession(),h=g.media.tracks.filter((function(e){return"TEXT"==e.type}));f=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(f)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.tech_.on("retryplaylist",(function(){v&&S(a,t)})),u.on("error",(function(){var n,i;(console.log("ERROR",u.error(),u.error().code),4===u.error().code&&v)?S(a,t):(e.handleError(t,(null==u||null===(n=u.error())||void 0===n?void 0:n.message)||"Some error occured"),o.reject({status:!1,msg:(null==u||null===(i=u.error())||void 0===i?void 0:i.message)||"Some error occured",response:a}))})),u.one("play",(function(){var t;if(null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable){var o,i,r,l=null===(o=e.getCurrentVideo())||void 0===o||null===(i=o.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id,a=e.getSeriesWatchMap().get(l)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){u.currentTime(s)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==n?void 0:n.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(v){u.currentSource();for(var e=u.textTracks(),t=e.length-1;t>=0;t--)u.removeRemoteTextTrack(e[t])}})))},R=function(e,t){var n=null==t?void 0:t.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-3d8b17fc.js")})).then((function(n){n.initialiseSkin(e,t)})):"default"==n?Promise.resolve().then((function(){return require("./skin-5ceb29b6.js")})).then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-65cf70ff.js")})).then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?Promise.resolve().then((function(){return require("./skin-65f18828.js")})).then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n?Promise.resolve().then((function(){return require("./skin-cffba054.js")})).then((function(n){n.initialiseSkin(e,t)})):"minimalist"==n&&Promise.resolve().then((function(){return require("./skin-2075dd29.js")})).then((function(n){n.initaliseSkin(e,t)}))},V=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 q,A=function(){var e=t(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("ima"),v("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadEMELibrary:A}),B=function(t,n){var o=new Map;e.getSeriesWatchHistory({videoId:t,token:n}).then((function(t){t.data.map((function(e){o.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),e.setSeriesWatchMap(o)})).catch((function(e){return console.log(e)}))};function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function M(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var L=function(r,l,a,s){var u,d,c,v,p,g,h,y,w,b,k,P,I,O,j,T,S,C,D,x,q,H,B,_,L,U,N,F,z,J,W,G,K,X=l.res,Q=void 0===X?null:X,Y=l.sres,Z=void 0===Y?null:Y;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(p=v.getInstance())||void 0===p||p.S;var $=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ee=(null===(g=Q)||void 0===g?void 0:g.contentType)||"video",te=e.impolicy16x9(null===(h=Q)||void 0===h||null===(y=h[ee])||void 0===y||null===(w=y.gist)||void 0===w?void 0:w.videoImageUrl)||e.impolicy16x9(null===(b=Q)||void 0===b||null===(k=b[ee])||void 0===k||null===(P=k.gist)||void 0===P||null===(I=P.imageGist)||void 0===I?void 0:I.r16x9),ne=(null===(O=Q)||void 0===O||null===(j=O[ee])||void 0===j||null===(T=j.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,oe=(null===(S=Q)||void 0===S||null===(C=S[ee])||void 0===C||null===(D=C.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!0;null==a||a.drmLibrary;var ie=(null===(x=Q)||void 0===x||null===(q=x.ads)||void 0===q||null===(H=q.preRoll)||void 0===H||null===(B=H.adTags)||void 0===B||null===(_=B.web)||void 0===_?void 0:_.active)&&(null===(L=Q)||void 0===L||null===(U=L.ads)||void 0===U||null===(N=U.preRoll)||void 0===N||null===(F=N.adTags)||void 0===F||null===(z=F.web)||void 0===z||z.url);ie="https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",Q=M(M({},Q),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var re=(K={controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!0},muteToggle:"multiplayer"==a.skin,liveui:ne},n(K,"autoplay",null==a?void 0:a.autoplay),n(K,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!1),n(K,"loop",(null==a?void 0:a.loop)||!1),n(K,"audioPosterMode",null==a?void 0:a.audioPosterMode),n(K,"html5",M(M({vhs:M(M({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,withCredentials:!1,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useNetworkInformationApi:!1},(null==a||null===(J=a.customData)||void 0===J?void 0:J.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(G=a.customData)||void 0===G?void 0:G.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(K,"poster",te),n(K,"techOrder",$),n(K,"chromecast",{requestCustomDataFn:function(t){var n=e.getPlayer(r),o=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var o,i,r,l,a,s,u,d,c,v,p=(null==e?void 0:e.contentType)||"video",m={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){m.isDrmEnabled=!0;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var g=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=g}var h=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=h;var y=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=y;var w=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=w;var b=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return m.mediaImage=b,m.subTitles=n,m.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(Q,t,o)}}),K);if(!i.getPlayers()[r])var le=i(r,re,function(){var n=t(o.mark((function t(){var n,l,u,d,c,v,p,g,h,y,w,b,k,P,I,O,j,T,S,C,D,x;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(le),this.setTimeout((function(){le.qualityMenu({useResolutionLabels:!0})}),3e3),t.next=4,m(a);case 4:return oe&&s.resolve(M({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Q}:{response:Q})),window.initialise(le),window.firstFrame(le),"white"!==window.controlsColor&&V(window.controlsColor,le),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),null===(n=Q)||void 0===n||null===(l=n[ee])||void 0===l||l.drmEnabled,P=null===(u=Q)||void 0===u||null===(d=u[ee])||void 0===d||null===(c=d.liveDetails)||void 0===c?void 0:c.startOverTime,t.next=13,A();case 13:ne&&f(r,P),null!=a&&null!==(v=a.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(r,ie,Q),I=e.getSource(Q,r),console.log(I),null!=a&&a.nearestClusterUrl&&(I=e.getUpdatedClusterSource(I,a.nearestClusterUrl)),I?e.loadVideo(r,I):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Q}),e.handleError(r,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Q)||void 0===p||null===(g=p[ee])||void 0===g||null===(h=g.contentDetails)||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(w=Q)||void 0===w||null===(b=w[ee])||void 0===b||null===(k=b.closedCaptions)||void 0===k?void 0:k.length)>0)&&(x=(null===(j=Q)||void 0===j||null===(T=j[ee])||void 0===T||null===(S=T.contentDetails)||void 0===S?void 0:S.closedCaptions)||(null===(C=Q)||void 0===C||null===(D=C[ee])||void 0===D?void 0:D.closedCaptions),O=x.filter((function(e){return"VTT"===e.format})),e.addCaptions(r,O)),null!=a&&a.disableControls?e.disableControls(r):R(r,M(M(M({},a),re),{},{liveVideo:oe,isDvrEnabled:ne,res:Q,sres:Z})),E(r,M(M(M({},a),re),{},{liveVideo:oe}),s,{res:Q,sres:Z});case 22:case"end":return t.stop()}}),t,this)})));return function(){return n.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(o.mark((function t(i,r){var l,a,s,d,c,p,m,f,g,h,y,w,b,k,P,O,j,T,S,C,D,x,E,R,V,A,_,U,N;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(w=(null==n?void 0:n.videoSourceUrl)||!1,b=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,P=null==n?void 0:n.videoId,O=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,window.videoId=P,j=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=15;break}if(e.refreshTokenManager().set(null==n?void 0:n.refreshToken),j&&!e.isTokenExpired(j)){t.next=14;break}return r({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),t.abrupt("return");case 14:q=JSON.parse(atob(j.split(".")[1]));case 15:window.siteId=null===(s=q)||void 0===s?void 0:s.siteId,window.siteName=null===(d=q)||void 0===d?void 0:d.site,n.isAnonymousUser=!(null===(c=q)||void 0===c||!c.anonymousId),n.siteOwner=(null===(p=q)||void 0===p?void 0:p.site)||null,n.userId=(null===(m=q)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(f=q)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,sessionStorage.setItem("vlp_token",j),T=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&n.series?null:null==n?void 0:n.chromecastReceiverId,S=null==n?void 0:n.airplay,C=null==n?void 0:n.apiBaseUrl,D=(null==n||null===(g=n.analytics)||void 0===g?void 0:g.gaId)||null,(x=null==n?void 0:n.errors)&&(window.customErrors=x),window.customData=null==n?void 0:n.customData,u.setLocalisation(null==n||null===(h=n.customData)||void 0===h?void 0:h.localisation),C&&(window.playerEntitlementUrl=C),window.controlsColor=(null==n?void 0:n.controlsColor)||"white",Promise.resolve().then((function(){return H})).then((function(e){e.importIMA()})),S&&"Safari"==e.detectBrowser()&&Promise.resolve().then((function(){return H})).then((function(e){e.importAirplay()})),D&&v("https://www.googletagmanager.com/gtag/js?id=".concat(D)).then((function(){return e.runGtag(D)})).catch((function(e){})),(E=null===(y=document)||void 0===y?void 0:y.getElementById("".concat(T)))&&E.addEventListener("contextmenu",(function(e){return e.preventDefault()})),w?(V={directPlaybackUrl:w,id:R="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},b?e.getVideoDetails(R,j).then((function(e){L(T,{res:M(M({},e),V)},n,{resolve:i,reject:r})})).catch((function(t){e.initiateErrorHandling(t,T,r,R)})):L(T,{res:V},n,{resolve:i,reject:r})):O?(_=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(_)),U=null==n||null===(A=n.series)||void 0===A?void 0:A.id,e.getSeriesDetails(U,j).then((function(t){var o,l,a,s=t.data,u=t.data.seasons;e.setCurrentSeries(u);var d=P||(null==u||null===(o=u[0])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);B(U,j),e.getVideoDetails(d,j).then((function(t){var o,l,a;window.contentType=null==t||null===(o=t.data)||void 0===o||null===(l=o.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(t.data),L(T,{res:null==t?void 0:t.data,sres:s},n,{resolve:i,reject:r})})).catch((function(t){e.initiateErrorHandling(t,T,r,P)}))})).catch((function(t){e.initiateErrorHandling(t,T,r)}))):k?(N=null==n?void 0:n.epg,e.getLinearChannelDetails(N,j).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==N?void 0:N.channelId,L(T,{res:t},n,{resolve:i,reject:r})})).catch((function(t){e.initiateErrorHandling(t,T,r,P)}))):e.getVideoDetails(P,j).then((function(t){var o,l,a,s;window.contentType=null==t||null===(o=t.data)||void 0===o||null===(l=o.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(null==t?void 0:t.data);var u,d=null==t?void 0:t.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(s=n.watchHistory)&&void 0!==s&&s.enable)if((null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,p,m=I((null===(c=n.watchHistory)||void 0===c?void 0:c.profileId)||"",P,null==n?void 0:n.siteOwner);if(m&&m.length)n.watchHistoryResumeTime=(null===(v=m[0])||void 0===v?void 0:v.watchedTime)||null,n.watchedPercentage=(null===(p=m[0])||void 0===p?void 0:p.watchedPercentage)||null;d.contentType="video",L(T,{res:d},n,{resolve:i,reject:r})}else e.getVideoInfo(P,j).then((function(e){var t,o,l,a,s,u;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,n.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",L(T,{res:d},n,{resolve:i,reject:r})})).catch((function(e){var t,o,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(e)),L(T,{res:d},n,{resolve:i,reject:r})}));else L(T,{res:d},n,{resolve:i,reject:r})})).catch((function(t){e.initiateErrorHandling(t,T,r,P)}));case 40:case"end":return t.stop()}}),t)})));return function(e,t){return i.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:e.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:e.enableCaptions,disableCaptions:e.disableCaptions,getCaptions:e.getCaptions,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:O,getVolume:j,disableControls:e.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./generic-57501058.js");exports.initialiseKeyboardEvents=function(r,t){var i,u,l=e.getPlayer(r),n=null==l||null===(i=l.controlBar)||void 0===i||null===(u=i.playToggle)||void 0===u?void 0:u.el_,o=document.getElementsByTagName("video")[0];o&&o.addEventListener("keydown",(function(i){switch(i.key){case" ":return i.preventDefault(),o&&o.focus(),void(n&&n.click());case"m":case"M":return i.preventDefault(),o&&o.focus(),void(l.muted()?l.muted(!1):l.muted(!0));case"f":i.preventDefault(),o&&o.focus();var u=document.querySelector(".vjs-fullscreen-control");return void(u&&u.click());case"F":i.preventDefault();var c=document.querySelector(".vjs-fullscreen-control");return void(c&&c.click());case"ArrowLeft":if((1==t.liveVideo||1==t.liveui)&&0==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.rewind(r,10);case"ArrowRight":if(1==t.liveVideo||1==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.skip(r,10);default:return}}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t={};exports.getLocalisation=function(o){var i;return(null===(i=t)||void 0===i?void 0:i[o])||""},exports.setLocalisation=function(o){t=o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),l=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),a=require("video.js"),s=require("./loader-393b838a.js"),u=require("./generic-57501058.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/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var d=a.getComponent("Component"),v=function(){l(f,d);var v,m,h=(v=f,m=c(),function(){var e,t=n(v);if(m){var i=n(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return r(this,e)});function f(t){var l,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,f),l=h.call(this,t,r),o(i(l),"multicamCssPositioning",(function(e,t){var r=document.getElementById(t);if(r){var n,o,a,s,u,c,d,v,m=window.getComputedStyle(r,null),h=m.getPropertyValue("height"),f=m.getPropertyValue("width"),p=h.slice(0,-2);if(f.slice(0,-2)-135<=135)e.style.bottom="290px",e.style.height="352px";else"live"==l.config.skin&&(null===(n=i(l))||void 0===n||null===(o=n.config)||void 0===o||!o.liveui)&&(null===(a=i(l))||void 0===a||null===(s=a.config)||void 0===s||!s.liveVideo)||null!==(u=i(l))&&void 0!==u&&null!==(c=u.config)&&void 0!==c&&c.liveui&&null!==(d=i(l))&&void 0!==d&&null!==(v=d.config)&&void 0!==v&&v.liveVideo?(e.style.bottom="".concat(p-135,"px"),e.style.height="".concat(p-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(p-105,"px"))}})),l.playerId=r.playerId,l.streams=null==r?void 0:r.streams,l.config=null==r?void 0:r.config,l.createUI(null==r?void 0:r.streams),l}return t(f,[{key:"createEl",value:function(){return a.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,r,n,o,a=this,s=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(r=this.config)||void 0===r?void 0:r.liveVideo)?null==s||null===(n=s.classList)||void 0===n||n.add("".concat(this.config.skin)):null==s||null===(o=s.classList)||void 0===o||o.add("default"),this.loadCSS();for(var u=0;u<e.length;u++)this.createTile(e[u],u);this.multicamCssPositioning(s,this.playerId),window.onresize=function(){a.multicamCssPositioning(s,a.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),r=a.dom.createEl("div",{className:"tile ".concat(t)});return 0==t&&(r.style.border="2px solid red"),r.style.backgroundImage="url(".concat(e.img,")"),a.dom.appendContent(l,r),r.addEventListener("click",(function(t){s.showLoader(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),u.load(i.playerId,e.id).then((function(e){u.play(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicam-a41fe4a6.js")})).then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),f}();exports.default=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-515b2da0.js"),l=require("./generic-57501058.js");function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var c=s.getComponent("Component"),d=function(){r(p,c);var d,u,m=(d=p,u=i(),function(){var e,t=n(d);if(u){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function p(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(r=m.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(p,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-76d8530b.js")})).then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(l.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var a=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var i=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=s.dom.createEl("div",{className:"stream-selector-content"}),d=s.dom.createEl("div",{className:"stream-tray"}),u=function(e){var r,a=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(a.classList.add("selected"),a.style.border="4px solid #D2393B"),a.onclick=function(){for(var r=s.dom.$$(".stream"),n=0;n<r.length;n++)r[n].style.border="none",r[n].classList.remove("selected");a.classList.add("selected"),a.style.border="4px solid #D2393B",l.load(t.playerId,t.streams[e].id).then((function(e){l.play(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},a.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),n.alt="No Thumbnail Available",a.append(n),s.dom.appendContent(d,a),s.dom.appendContent(c,d)},m=0;m<this.streams.length;m++)u(m);s.dom.appendContent(a,n),s.dom.appendContent(a,i),s.dom.appendContent(e,a),s.dom.appendContent(e,c),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),p}();exports.default=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./loader-393b838a.js"),i=require("./generic-57501058.js");function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var c=o.getComponent("Component"),d=function(){l(m,c);var d,u,v=(d=m,u=a(),function(){var e,t=n(d);if(u){var l=n(this).constructor;e=Reflect.construct(t,arguments,l)}else e=t.apply(this,arguments);return r(this,e)});function m(t){var l,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(l=v.call(this,t,r)).playerId=r.playerId,l.config=r.config,l.createUI(null==r?void 0:r.config.streams),l}return t(m,[{key:"createEl",value:function(){return o.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,r,n,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(r=this.config)&&void 0!==r&&r.liveui)&&!(null!=this&&null!==(n=this.config)&&void 0!==n&&n.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var v=o.dom.createEl("div",{className:"broadcast"});v.innerHTML="Broadcasts";var m=o.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==m||null===(a=m.classList)||void 0===a||a.add("dvr"):null==m||null===(c=m.classList)||void 0===c||c.add("nondvr"),m.style.width="".concat(window.innerWidth-50,"px");var h=o.dom.createEl("div",{className:"tilecontainer-potrait"});o.dom.appendContent(d,v),o.dom.appendContent(d,m),o.dom.appendContent(m,h),v.addEventListener("click",(function(){null!=m&&m.classList.contains("hideMWebTray")?(m.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==m||m.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var p=0;p<e.length;p++)this.createTile(e[p],p)}},{key:"createTile",value:function(e,t){var l=this,r=this.el(),n=o.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(n.style.border="2px solid red"),n.style.backgroundImage="url(".concat(e.img,")");var a=o.dom.$(".tilecontainer-potrait",this.contentEl());return o.dom.appendContent(a,n),n.addEventListener("click",(function(t){s.showLoader(l.playerId),l.removeSelectedTile();var r=document.getElementsByClassName("".concat(t.srcElement.className))[0];r&&(r.style.border="2px solid red"),i.load(l.playerId,e.id).then((function(e){i.play(l.playerId)}))})),r}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile-potrait-mweb"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./mwebPotrait-3c11d7cf.js")})).then((function(e){var t=document.createElement("style");t.className="mweb",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleProgressControls",value:function(e){var t=document.querySelector(".vjs-progress-control.vjs-control"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),r=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),n=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==r||r.classList.add("hide-controls"),null==n||n.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),m}();exports.default=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-515b2da0.js"),s=require("./generic-57501058.js");function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var d=o.getComponent("Component"),u=function(){t(p,d);var s,u,c=(s=p,u=a(),function(){var e,n=r(s);if(u){var t=r(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return i(this,e)});function p(n){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,i)).playerId=i.playerId,t.seriesData=i.sres,t.currentVideoData=i.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./nextEpisodeButton-b6e6586f.js")})).then((function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),i=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),r=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(i,r),o.dom.appendContent(i,l),o.dom.appendContent(n,t),o.dom.appendContent(n,i),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),n.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")})),n.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")}))}}]),p}(),c=function(e,n){for(var t=-1,i=0;i<e.length;i++)for(var r=0;r<e[i].episodes.length;r++)if(e[i].episodes[r].id===n){t=i;break}return t},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,i=n-1>=0?n-1:t-1,r=(n+1)%t,o=t>1?e.episodes[i]:null,l=t>1?e.episodes[r]:null;return i===r&&(0===i?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:i,nextEpIdx:r}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach((function(e,i){e.gist.id===n&&(t=i)})),t):null},m=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then((function(e){s.setCurrentVideo(e.response)}))};var i=o.dom.$(".next-eps-image"),r=s.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==r?void 0:r.firstChild;null==i||i.append(l);for(var a=o.dom.$(".next-eps-description"),d=s.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=d&&d.firstChild;)null==a||a.appendChild(d.firstChild)};exports.default=u,exports.initaliseFunctionality=function(e,n){var t=c(e,n.video.gist.id),i=v(e[t],n.video.gist.id),r=p(e[t],i);m(r.nextEp)};
|
|
@@ -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"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-515b2da0.js"),r=require("./generic-57501058.js"),c=require("./autoNextVideo-ff42f1a0.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=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("./util-26ad6aca.js");var u=o.getComponent("Component"),p=function(){l(y,u);var p,m,v=(p=y,m=d(),function(){var e,t=a(p);if(m){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function y(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(a=v.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(y,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./playlist-df87ca90.js")})).then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(r.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=o.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),u=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,u),o.dom.appendContent(a,s),o.dom.appendContent(d,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(d,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,d),r.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}}))}}]),y}();exports.default=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var l=require("./generic-57501058.js");exports.getRenditions=function(i){var n,e=l.getPlayer(i),t=[];if((null==e||null===(n=e.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==e||null===(o=e.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(t=null==u?void 0:u.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var v,r,h=null==e||null===(v=e.dash)||void 0===v||null===(r=v.mediaPlayer)||void 0===r?void 0:r.getBitrateInfoListFor("video");(null==h?void 0:h.length)>0&&(t=null==h?void 0:h.sort((function(l,i){return i.height-l.height})))}return t};
|
|
@@ -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"),i=require("@babel/runtime/helpers/assertThisInitialized"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/helpers/defineProperty"),r=require("video.js"),s=require("./generic-57501058.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/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js");var u=r.getComponent("Component"),h=function(){a(g,u);var h,p,m=(h=g,p=c(),function(){var e,t=d(h);if(p){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function g(n){var a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),a=m.call(this,n,o),l(i(a),"masterRenditions",[]),l(i(a),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",a.fontSizeOptions.map((function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;a.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(a),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),a.playerId=null==o?void 0:o.playerId,a.skin=null==o?void 0:o.skin,a.icon=null==o?void 0:o.icon,a.masterRenditions=[],a.fontSizeOptions=[10,12,14],a.createRenditions(o.renditions),window.height=null,a}return n(g,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),a=s.parseSvgString(this.icon);if(i.append(a),"live"===this.skin){var o=document.createTextNode(" Settings");i.appendChild(o)}var d=r.dom.createEl("div",{className:"content hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),c=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(c,l),this.toggleContentOnHover(n,d);var u=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,a,o=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(a=e.playlist)||void 0===a?void 0:a.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(o,s),r.dom.appendContent(u,o),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",u),"Safari"!=s.detectBrowser()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),a=(e.bitrate/1e6).toFixed(1),o="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(o="".concat(e.height,"p @ ").concat(a,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=r.dom.createEl("p",{innerHTML:o,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(u,i),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,v(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",u)),r.dom.appendContent(c,u),r.dom.appendContent(d,c),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",(function(){var t,n,a=e.activeCues[0];if(console.log((null==a||null===(t=a.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),a&&document.querySelector(".auto.selected")){var o,d,l,r,s,c,u,h;if(null!=a&&null!==(o=a.value)&&void 0!==o&&null!==(d=o.resolution)&&void 0!==d&&d.height&&i!==(null==a||null===(l=a.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==a||null===(u=a.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==a||null===(s=a.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,a,o,d,l=null===(i=this.player_)||void 0===i||null===(a=i.tech_)||void 0===a?void 0:a.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(o=this.player_)||void 0===o||null===(d=o.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),p=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});p.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(p,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,v(n.playerId,null,!0)})),r.dom.appendContent(h,p),r.dom.appendContent(t,h)}}}]),g}(),v=function(e,t,n){var i,a=s.getPlayer(e),o=null==t?void 0:t.bandwidth;if((null==a||null===(i=a.tech_)||void 0===i?void 0:i.vhs)||!1){a.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===o?e.enabled(!0):e.enabled(!1)})),a.handleTechPlaying_();var d=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==a||null===(u=a.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var v,p,m,g;null==a||null===(v=a.dash)||void 0===v||null===(p=v.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==a||null===(m=a.dash)||void 0===m||null===(g=m.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(f)}),100);var w=r.dom.$(".content");w&&r.dom.addClass(w,"hidden")}}};exports.default=h,exports.playSelectedResolution=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-57501058.js"),u=require("./loader-393b838a.js"),p=require("./icons-515b2da0.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var h,f=c.getComponent("Component"),m=function(){n(d,f);var e,l,c=(e=d,l=v(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,h=n.playerId,b(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-9c237975.js")})).then((function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)}))}}]),d}();function g(){return(g=e(l.mark((function e(i,t,s,n){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(h),u.showLoader(h),d.load(h,t).then((function(e){d.setCurrentVideo(e.response),d.play(h)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e,i){for(var t='<div class="hover-div"></div>\n '.concat(p.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=d.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=b,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=d.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then((function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map((function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),p=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),h=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)}));for(var m=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach((function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),p[i].addEventListener("click",(function(){return function(e,i,t,s){return g.apply(this,arguments)}(i,f[i].id,t,u)})),e.episodes[i].id==h&&u[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)m(b)},exports.seriesModule=m;
|
|
@@ -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-57501058.js"),c=require("./autoNextVideo-ff42f1a0.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-26ad6aca.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-fd7485a5.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-57501058.js"),s=require("./renditions-cc71ec8c.js"),c=require("./resolution-812052c0.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./generic-57501058.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var r=function(r){var i=e.getPlayer(r),t=document.getElementById("".concat(r));t&&t.addEventListener("touchstart",(function(){i.paused()?e.play(r):e.pause(r)}))},i=function(r){var i=e.getPlayer(r);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){i(e),r(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t=require("./features-c93010e5.js"),n=require("./icons-515b2da0.js"),r=require("./generic-57501058.js"),s=require("@babel/runtime/helpers/defineProperty"),o=require("./keyboardShortcuts-4340bc6b.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-cc71ec8c.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)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-c93010e5.js"),r=require("./keyboardShortcuts-4340bc6b.js"),i=require("./icons-515b2da0.js"),n=require("./generic-57501058.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-cc71ec8c.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-8dfcec10.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)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./generic-57501058.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)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-c93010e5.js"),t=require("./icons-515b2da0.js"),n=require("./generic-57501058.js"),r=require("./renditions-cc71ec8c.js"),i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./autoNextVideo-ff42f1a0.js"),o=require("@babel/runtime/helpers/typeof"),a=require("video.js"),u=require("@babel/runtime/helpers/asyncToGenerator"),s=require("@babel/runtime/regenerator"),d=require("@babel/runtime/helpers/slicedToArray");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-26ad6aca.js");var c,v,p,m,f=[],h=function(e,t){var r=n.getPlayer(e),i=Math.floor(r.currentTime());if(Math.floor(r.duration())!=i){r.pause(e);var o=n.getVideoIdx();l.switchToNext(o,e,f)}};function g(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function y(e){return x.apply(this,arguments)}function x(){return(x=u(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),l=d(i,2),o=l[0],a=l[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var l=i.width/a,u=i.height/o,s=0;s<o;s++)for(var d=0;d<a;d++){var c=document.createElement("canvas");c.width=l,c.height=u,c.getContext("2d").drawImage(i,d*l,s*u,l,u,0,0,l,u);var v=c.toDataURL("image/png");r.push({uri:v,duration:t.duration})}e(r)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return w.apply(this,arguments)}function w(){return(w=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",g(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function C(e){return E.apply(this,arguments)}function E(){return(E=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return y(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n=e.duration;r[n*t]={src:e.uri,style:{left:"-60px",height:"85px",width:"130px"}}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}c={0:{src:"example-thumbnail.png"}},v=function e(){var t,n,r,i,l;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[r])i.hasOwnProperty(l)&&("object"===o(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},p=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},m=function e(t){return"HTML"!==t.nodeName&&"static"===p(t)("position")?e(t.offsetParent):t},a.registerPlugin("thumbnails",(function(e){var t,n,r,i,l,o,a,u;n=v({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",v(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",(function(e){o=i.duration()})),i.on("loadedmetadata",(function(e){o=i.duration()})),(l=i.controlBar.progressControl).el().appendChild(t),a=function(e){var i,a,u,s,d,c,f,h,g,y;for(a in u=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=m(l.el()).getBoundingClientRect()).width||y.right)+g,c=e.pageX,e.changedTouches&&(c=e.changedTouches[0].pageX),s=c||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=m(l.el()).getBoundingClientRect().left+g,i=Math.floor((s-l.el().offsetLeft)/l.width()*o),n)i>a&&(u=Math.max(u,a));(d=n[u]).src&&r.src!=d.src&&(r.src=d.src),d.style&&r.style!=d.style&&v(r.style,d.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=p(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,d.width||n[0].width)/2)>f?s-=s+h-f:s<h&&(s=h),t.style.left=s+"px"},l.on("mousemove",a),l.on("touchmove",a),u=function(e){t.style.left="-1000px"},l.on("mouseout",u),l.on("touchcancel",u),l.on("touchend",u),i.on("userinactive",u)}));var k=function(){var e=u(s.mark((function e(t,n){var r,i,l,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,l=i.split("\n"),o=[],l.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&l[n-1].includes("#EXT-X-TILES")&&(l[n-1]=l[n-1].split(","),r.uri=t+e,l[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=d(t,2),i=n[0],l=n[1];i=i.toLowerCase(),r[i]=l}))})),o.push(r))})),e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function N(e){return B.apply(this,arguments)}function B(){return(B=u(s.mark((function e(t){var r,i,l,o,a,u,d,c,v,p,m,f,h,g,y,x,b,w,C,E,k,N;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return o=e.sent,e.next=7,o.text();case 7:a=e.sent,u=new DOMParser,d=u.parseFromString(a,"application/xml"),c=null===(i=n.getCurrentVideo())||void 0===i||null===(l=i.video)||void 0===l?void 0:l.runtime,v=d.getElementsByTagName("AdaptationSet"),p=0;case 13:if(!(p<v.length)){e.next=34;break}if("image"!==(m=v[p]).getAttribute("contentType")||"image/png"!==m.getAttribute("mimeType")){e.next=31;break}if(f=m.getElementsByTagName("SegmentTemplate")[0],h=m.getElementsByTagName("Representation")[0],g=h.getElementsByTagName("EssentialProperty")[0],y=g.getAttribute("value"),!f){e.next=31;break}for(f.getAttribute("media"),x=f.getAttribute("duration"),b=f.getAttribute("timescale"),w=x/b,C=Math.round(c/w),E=Math.ceil(C/9),k=f.getAttribute("media"),N=[],p=0;p<E;p++)N.push({duration:w,layout:y,uri:r+"/"+k.replace("$Number$",p)});return e.abrupt("return",N);case 31:p++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function j(){return(j=u(s.mark((function e(t){var r,i,l,o,a,u,d,c,v,p,m,f,h,g,y,x,w,E,B,j,S;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.getPlayer(t),i=r.currentSource(),null==(l=i.src)||!l.includes("m3u8")){e.next=18;break}return e.next=5,b(l);case 5:if(!((null==(o=e.sent)?void 0:o.length)>0)){e.next=16;break}return y=(null==o?void 0:o[0])||null,x=y.uri,w=(null==r||null===(a=r.tech())||void 0===a||null===(u=a.vhs)||void 0===u||null===(d=u.playlists)||void 0===d||null===(c=d.master)||void 0===c||null===(v=c.uri)||void 0===v?void 0:v.substring(0,null==r||null===(p=r.tech())||void 0===p||null===(m=p.vhs)||void 0===m||null===(f=m.playlists)||void 0===f||null===(h=f.master)||void 0===h||null===(g=h.uri)||void 0===g?void 0:g.lastIndexOf("/")))+"/",e.next=11,k(w,x);case 11:return E=e.sent,e.next=14,C(E);case 14:B=e.sent,r.thumbnails(B);case 16:e.next=27;break;case 18:if(null==l||!l.includes("mpd")){e.next=27;break}return e.next=21,N(l);case 21:if(!((null==(j=e.sent)?void 0:j.length)>0)){e.next=27;break}return e.next=25,C(j);case 25:S=e.sent,r.thumbnails(S);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(t,l){var o=n.getPlayer(t);o&&(o.on("loadeddata",(function(){var a,u,s,d,c,v,p;(null===(a=r.getRenditions(t))||void 0===a?void 0:a.length)>0&&e.addSettingsButtonV2(t,l),(null===(u=n.getCaptions(t))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(t,l),!(null!=l&&null!==(s=l.series)&&void 0!==s&&s.enable||null!==(d=window)&&void 0!==d&&null!==(c=d.app_data)&&void 0!==c&&null!==(v=c.appcmsMain)&&void 0!==v&&null!==(p=v.features)&&void 0!==p&&p.auto_play)||null!=l&&l.liveVideo||function(e,t){var r;if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var l;f=[];var o=n.getCurrentSeries();null==o||o.map((function(e){var t;return(t=f).push.apply(t,i(e.episodes))})),null==t||null===(l=t.series)||void 0===l||l.cb}else{var a,u;f=null==t||null===(a=t.relatedVideos)||void 0===a?void 0:a.content,null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var s=n.getPlayer(e);s.on("timeupdate",(function(){var e,t,r=Math.floor(s.currentTime()),i=s.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n.getVideoIdx()<=(null===(t=f)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}));var d,c=f.filter((function(e,t){return t==n.getVideoIdx()}));if((null==c?void 0:c.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,p,m,g,y,x,b,w,C,E,k,N;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var B=null===(p=document.getElementsByClassName("next-ep-title"))||void 0===p?void 0:p[0],j=null===(m=document.getElementsByClassName("next-ep-img"))||void 0===m?void 0:m[0],S=null===(g=document.getElementsByClassName("next-ep-content"))||void 0===g?void 0:g[0],q=null===(y=c[0])||void 0===y?void 0:y.title;(null===(x=q)||void 0===x?void 0:x.length)>60&&(q=q.substr(0,60)+"..."),B.textContent="".concat(q),j.src=(null===(b=c[0])||void 0===b||null===(w=b.gist)||void 0===w||null===(C=w.imageGist)||void 0===C?void 0:C.r16x9)||(null==c||null===(E=c[0])||void 0===E?void 0:E.img)||(null===(k=window)||void 0===k||null===(N=k.customData)||void 0===N?void 0:N.fallbackImage),S.onclick=function(){return h(e)}}else{var T,V,M,P,I,O,A,L,R=document.createElement("div");R.className="next-ep-preview",R.style.visibility="hidden",document.getElementById(e).append(R);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var F=null===(T=c[0])||void 0===T?void 0:T.title,D=document.createElement("img");D.className="next-ep-img",D.src=(null===(V=c[0])||void 0===V||null===(M=V.gist)||void 0===M||null===(P=M.imageGist)||void 0===P?void 0:P.r16x9)||(null==c||null===(I=c[0])||void 0===I?void 0:I.img)||(null===(O=window)||void 0===O||null===(A=O.customData)||void 0===A?void 0:A.fallbackImage);var U=document.createElement("div");U.className="next-ep-title",(null===(L=F)||void 0===L?void 0:L.length)>60&&(F=F.substr(0,60)+"..."),U.textContent="".concat(F);var G=document.createElement("div");G.className="next-ep-content",G.append(D),G.append(U),G.onclick=function(){return h(e)},R.append(X),R.append(G)}}(t,l),function(e,t){var n,r=Math.floor(e/60),i=null===(n=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===n?void 0:n[0];i&&(i.style.marginRight=r>60?"56px":"41px");var l=document.getElementsByClassName("vjs-live-control")[0],o=document.getElementsByClassName("vjs-time-control");t&&l.classList.value.includes("vjs-hidden")&&(o[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==l?void 0:l.liveVideo)||!1),null!=l&&l.liveVideo||n.isMobile()||function(e){j.apply(this,arguments)}(t)})),o.one("play",(function(){var n,r,i,l;null!==(n=window)&&void 0!==n&&null!==(r=n.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.iframeOverlayUrl)})))}exports.initialiseSkin=function(r,i){!function(){"Chrome"==n.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));Promise.resolve().then((function(){return require("./skin-c66e9b42.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),S(r,i),function(e,r){var i,l,o,a,u,s,d=n.getPlayer(e);null==d||null===(i=d.controlBar)||void 0===i||null===(l=i.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),null==d||null===(a=d.controlBar)||void 0===a||null===(u=a.getChild("FullscreenToggle"))||void 0===u||null===(s=u.el())||void 0===s||s.appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var c=document.getElementsByClassName("vjs-time-control");r.liveVideo&&c[0]&&(c[0].style.display="none")}(r,i),function(n,r){var i,l,o,a,u,s;0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(n,"defaultV2",t.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(n,"defaultV2",t.RewindSvgV2());r.liveVideo||e.addSlowMotion(n);(null==r||null===(i=r.relatedVideos)||void 0===i||null===(l=i.content)||void 0===l?void 0:l.length)>0&&e.addVideoSelector(n,null==r?void 0:r.relatedVideos);(null==r||null===(o=r.streams)||void 0===o?void 0:o.length)>1&&e.addMulticamSelector(n,null==r?void 0:r.streams);(null==r||null===(a=r.playlist)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(n,null==r?void 0:r.playlist);null!=r&&null!==(s=r.series)&&void 0!==s&&s.enable&&e.addSeriesSelectorV2(n,r)}(r,i),function(e,t){var r=n.getPlayer(e),i=null==t?void 0:t.tvProviderLogoUrl;if(!i)return;var l=document.createElement("div");l.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",l.append(o),r.el().appendChild(l),r.on("useractive",(function(){l.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||l.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"}))}(r,i)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./generic-57501058.js"),r=require("./features-c93010e5.js"),i=require("./renditions-cc71ec8c.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";var t=require("./generic-57501058.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-515b2da0.js"),l=require("./generic-57501058.js"),d=require("./autoNextVideo-ff42f1a0.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-26ad6aca.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as n,q as t,U as i,c as o,V as e,R as a,W as c}from"./generic-444bf169.js";import{a as u}from"./util-b468f9d5.js";var s,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;s=null==l?void 0:l.cb;var h=l.playerId;u(h,(function(){var u=n(h);0!==(null==u?void 0:u.currentTime())&&((f=a())>d.length-1||(c(f+1),t(h,d[f].id).then((function(n){i(f),o(n.response),f++,v(n)})).catch((function(n){v(n),i(f),f++,r=setTimeout((function(){e(h)&&m(f,h,d)}),5e3)}))))}))},m=function n(o,e,a,u){f=o,o>a.length-1||(c(f+1),t(e,a[o].id).then((function(n){i(f),f++,v(n)})).catch((function(t){v(t),setTimeout((function(){i(f),f++,n(f,e,a)}),5e3)})))},v=function(n){s&&s(n)};export{l as a,m as s};
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
1
13
|
.widget-selection{
|
|
2
14
|
display: flex;
|
|
3
15
|
align-items: center;
|
|
@@ -118,6 +130,12 @@
|
|
|
118
130
|
.widget-selector-content #sr-widget{
|
|
119
131
|
padding: 0 18px;
|
|
120
132
|
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
121
139
|
/* nextep */
|
|
122
140
|
.next-ep-preview{
|
|
123
141
|
position: absolute;
|