@viewlift/player-backup 1.0.36-backup → 1.0.38-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-b7c87b4c.js +1 -0
- package/cjs/{caption-settings-dbada3b2.js → caption-settings-6fb10596.js} +1 -1
- package/cjs/{features-051b6eb7.js → features-ce52c687.js} +1 -1
- package/cjs/generic-34b93767.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-632e70ee.js → keyboardShortcuts-e2294e8c.js} +1 -1
- package/cjs/{multicam-a3680cfa.js → multicam-da7b3a0f.js} +1 -1
- package/cjs/{multicamv2-7dbc3837.js → multicamv2-f5caa9b8.js} +1 -1
- package/cjs/{mwebPotraitTray-bfe4c196.js → mwebPotraitTray-49514a7f.js} +1 -1
- package/cjs/{nextEpisodeButton-1d1aeda5.js → nextEpisodeButton-00482f4a.js} +1 -1
- package/cjs/{playlist-608ce6c6.js → playlist-c42fc8f7.js} +1 -1
- package/cjs/{renditions-0ea4d69d.js → renditions-fdf1dbe0.js} +1 -1
- package/cjs/{resolution-fe5b220a.js → resolution-46bd5b25.js} +1 -1
- package/cjs/{series-3a0b44af.js → series-9d55a1b1.js} +1 -1
- package/cjs/{series-v2-15682130.js → series-v2-5248c1aa.js} +1 -1
- package/cjs/{settings-icon-0c878aab.js → settings-icon-dc047322.js} +1 -1
- package/cjs/{skin-027ed57e.js → skin-0483e494.js} +1 -1
- package/cjs/{skin-cfbb5242.js → skin-201232fe.js} +1 -1
- package/cjs/{skin-dd57424b.js → skin-69a1d035.js} +1 -1
- package/cjs/{skin-c17c7ceb.js → skin-a59253b4.js} +1 -1
- package/cjs/{skin-7a40a0a9.js → skin-efe17260.js} +1 -1
- package/cjs/{util-dc21e933.js → util-af14daa4.js} +1 -1
- package/cjs/{videoSelector-bd81ac72.js → videoSelector-e914e610.js} +1 -1
- package/esm/autoNextVideo-2381bc10.js +1 -0
- package/esm/{caption-settings-124248ee.js → caption-settings-26981aa4.js} +1 -1
- package/esm/{features-ed982613.js → features-943c7a36.js} +1 -1
- package/esm/generic-b8e2ad04.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-e9212a70.js → keyboardShortcuts-473cff21.js} +1 -1
- package/esm/{multicam-b20d3cfb.js → multicam-b48d3050.js} +1 -1
- package/esm/{multicamv2-fd3841fd.js → multicamv2-fbd1d91a.js} +1 -1
- package/esm/{mwebPotraitTray-b1cc5bb1.js → mwebPotraitTray-a42d909d.js} +1 -1
- package/esm/{nextEpisodeButton-315ef23f.js → nextEpisodeButton-af7bd985.js} +1 -1
- package/esm/{playlist-a4e5ff0b.js → playlist-9d9240ea.js} +1 -1
- package/esm/{renditions-d47b69ea.js → renditions-f4e243dc.js} +1 -1
- package/esm/{resolution-cb0b4822.js → resolution-086a6b69.js} +1 -1
- package/esm/{series-96edc6bf.js → series-fd6389e6.js} +1 -1
- package/esm/{series-v2-d5165f91.js → series-v2-d4980980.js} +1 -1
- package/esm/{settings-icon-78c52e6d.js → settings-icon-0d205b61.js} +1 -1
- package/esm/{skin-c0c71675.js → skin-5304f04f.js} +1 -1
- package/esm/{skin-3962958a.js → skin-5660a166.js} +1 -1
- package/esm/{skin-96963327.js → skin-667a97cb.js} +1 -1
- package/esm/{skin-82f3720f.js → skin-8c305261.js} +1 -1
- package/esm/{skin-541ea047.js → skin-aa37ff43.js} +1 -1
- package/esm/{util-dfc710ec.js → util-d1cbd099.js} +1 -1
- package/esm/{videoSelector-7f5d3356.js → videoSelector-2432d483.js} +1 -1
- package/package.json +1 -1
- package/cjs/autoNextVideo-bfb231cd.js +0 -1
- package/cjs/generic-301735bf.js +0 -1
- package/esm/autoNextVideo-f9e0f67d.js +0 -1
- package/esm/generic-f6ebd709.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),n=require("./generic-34b93767.js"),i=require("./util-af14daa4.js"),o=0,u=0,a=function(){var e=t(r.mark((function e(t,i,o,s){var d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getToken();case 2:if(d=e.sent,u=t,!(t>o.length-1)){e.next=6;break}return e.abrupt("return");case 6:n.load(i,o[t].id,d).then((function(e){n.highlightVideo(u),u++,n.setVideoIdx(u),c(e)})).catch((function(e){c(e),setTimeout((function(){n.highlightVideo(u),u++,n.setVideoIdx(u),a(u,i,o,d,s)}),5e3)}));case 7:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),c=function(t){e&&e(t)};exports.autoPlayNext=function(s){clearTimeout(o);var d=null==s?void 0:s.content;e=null==s?void 0:s.cb;var h=s.playerId;i.onVideoEnded(h,t(r.mark((function t(){var i,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.getToken();case 2:if(i=t.sent,0!==(null==(s=n.getPlayer(h))?void 0:s.currentTime())){t.next=6;break}return t.abrupt("return");case 6:if(!((u=n.getVideoIdx())>d.length-1)){t.next=9;break}return t.abrupt("return");case 9:n.load(h,d[u].id,i).then((function(e){n.highlightVideo(u),n.setCurrentVideo(e.response),u++,n.setVideoIdx(u),c(e)})).catch((function(t){c(t),n.highlightVideo(u),u++,n.setVideoIdx(u),o=setTimeout((function(){n.isPaused(h)&&a(u,h,d,e)}),5e3)}));case 10:case"end":return t.stop()}}),t)}))))},exports.switchToNext=a;
|
|
@@ -1 +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"),r=require("video.js"),i=require("./icons-0f7b3404.js"),c=require("./generic-
|
|
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"),r=require("video.js"),i=require("./icons-0f7b3404.js"),c=require("./generic-34b93767.js");function l(e){var t=s();return function(){var n,r=o(e);if(t){var i=o(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return a(this,n)}}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=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=r.getComponent("Component"),u=function(){n(o,d);var a=l(o);function o(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,o),(n=a.call(this,t,r)).playerId=r.playerId,n.seriesData=r.sres,n.currentVideoData=r.res,n.initialiseStructure(),n.loadCSS(),n}return t(o,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(i.CaptionsSvgV2())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./caption-settings-67212c17.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=r.dom.createEl("div",{className:"caption-selection-container hidden"});r.dom.$(".caption-selector-icon",this.el()).onclick=function(){var e;null!==(e=a.classList)&&void 0!==e&&e.contains("hidden")?(c.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px"):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");a.style.height="".concat(o),r.dom.appendContent(n,a),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(a),c.detectOrientationChange(this.playerId,a)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=r.dom.createEl("div",{className:"caption-selector-head"}),o=r.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var l=r.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),s=r.dom.createEl("div",{className:"caption-selector-content"}),d=r.dom.createEl("div",{className:"caption-container"}),u=this.createLanguageContanier();r.dom.appendContent(d,u);var p=this.createFontSizeContainer();r.dom.appendContent(d,p),r.dom.appendContent(a,o),r.dom.appendContent(a,l),r.dom.appendContent(e,a),r.dom.appendContent(e,s),r.dom.appendContent(s,d),c.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createLanguageContanier",value:function(){var e=this,t=r.dom.createEl("div",{className:"caption-language-container"}),n=r.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});r.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 i=r.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});i.setAttribute("type","radio"),i.onchange=function(t){c.getCaptions(e.playerId).map((function(t){return c.disableCaptions(e.playerId,t.id)}))},r.dom.appendContent(a,i),r.dom.appendContent(a,o),r.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 i=document.createElement("div");i.className="caption - ".concat(n),i.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=r.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"),r.dom.appendContent(o,s),r.dom.appendContent(o,i),r.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=r.dom.createEl("div",{className:"caption-font-container"}),t=r.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});r.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,i=document.createElement("label");i.className="caption-font-holder",i.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=r.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)}},r.dom.appendContent(i,l),r.dom.appendContent(i,c),r.dom.appendContent(e,i)}return e}}]),o}();exports.default=u;
|
|
@@ -1 +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-
|
|
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-34b93767.js"),s=require("./renditions-fdf1dbe0.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-6fb10596.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.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-f5caa9b8.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-da7b3a0f.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-49514a7f.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-00482f4a.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-c42fc8f7.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-46bd5b25.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-9d55a1b1.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-5248c1aa.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-dc047322.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.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-e914e610.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("video.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("axios");require("js-cookie");var r=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),a={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 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 s(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?d(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var u={name:"@viewlift/player-backup",version:"1.0.38-backup",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:T(),params:s({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":u.version},withCredentials:!0})},v=function(){var e=n(o.mark((function e(t,n){var r,l,a;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O();case 2:if(r=e.sent,"v1"!=n){e.next=8;break}return l={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",i({url:E(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(l),withCredentials:!0}));case 8:if("v2"!=n){e.next=11;break}return a=s({doneWatching:null==t?void 0:t.doneWatching,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},(null==t?void 0:t.seriesId)&&{seriesId:t.seriesId}),e.abrupt("return",i({url:w(),method:"POST",headers:{Authorization:r},data:a,params:s({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),m=function(e,t){var n,o,r=(null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:I(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return i({method:"GET",url:f(e,v),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},p=function(e){return y()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},g=function(){return y()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},I=function(e){return y()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},f=function(e,t){return y()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(t,"/").concat(e)},E=function(){return y()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},w=function(){return y()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},T=function(){return y()+"".concat(null==a?void 0:a.getVideoDetails)},y=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},h=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},_=null;function b(){return{set:function(e){e&&(_=e)},get:function(){return _}}}var O=function(){var e=n(o.mark((function e(){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!h(t)){e.next=5;break}return e.abrupt("return",D().then((function(e){var n,o,i=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&b().set(r),i||t})).catch((function(e){return console.log("Error fetching refresh token",e),t})));case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=b().get(),t=y();return i({method:"GET",url:t+"/identity/refresh/".concat(e)})},V=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 o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},S=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var x=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"};function C(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 L(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?C(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):C(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=r(navigator.userAgent);var W,A,k,P,F,R=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},N=function(e){var t=j(e,"video.tags",[]),n=j(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},j=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},B=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},U=function(){var e,t,n,o,i,r,l,a,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,g=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,I=oe(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),T=j(p,"video.gist.id",""),y=L(L({},H(g)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:R(w,E),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===(t=window)||void 0===t?void 0:t.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:j(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:j(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:j(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==I||null===(n=I.options_)||void 0===n?void 0:n.autoplay)||1,VIEWLIFT_MUTE:(null==I||null===(o=I.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:N(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(j(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+j(p,"video.gist.permalink","")),VIEWLIFT_COPPA:j(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.site)||void 0===l?void 0:l.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:j(null===(a=window)||void 0===a||null===(d=a.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*j(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:j(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:j(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:j(p,"video.series[0].gist.title",j(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:j(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:j(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:j(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},H=function(e){var t,n,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(B()?s?a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=B()?L(L({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):L(L({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=B()?L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},M=function(e,t){var n,o,i,r,l,a,d,s,u,c,v,m,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,f=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[g])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[g])||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.audioAssetSource&&null!=E&&E.hls)return G(E);if(I){var y=q(f,t);return y.src=U(y.src,t,e),y}if("Safari"!==x()&&T)return z(f);if(w){var h=G(f);return h.src=U(h.src,t,e),h}if(null!=f&&f.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(f);return _.src=U(_.src,t,e),_}return null},z=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},G=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},q=function(e,n){var o=e.fairPlay,i=e.widevine,r=e.playReady,l=x(),a=oe(n);if("Safari"===l){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};t.xhr(i,(function(e,t,n){console.log(e),e&&o(e),o(null,new Uint8Array(n))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(n,o,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};t.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(o);try{a.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(a.eme(),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var Y=function(e){A=e},X=function(e){k=e},J=function(e){if(P){var t=P.get(e);X(t+1)}},K=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})}))},Z=!1,Q=function(e,t,n){var o=U(t,e,n),i=oe(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=oe(e);if(null!==r.el_){Z=!0;var l={id:e,adTagUrl:"".concat(t,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Z&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},$=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},ee="";function te(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}var ne=function(e){return!!t.getPlayer("".concat(e))},oe=function(e){return!!t.getPlayer("".concat(e))&&t.getPlayer("".concat(e))},ie=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()},re=function(e,t){oe(e).src(t)},le=function(t,n,o,i){var r,l,a,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);ne(n)&&V(n,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?te(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):te(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},i&&{videoId:i}))};exports.addCaptions=K,exports.clearError=S,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 $(e)},exports.createIdxMapping=function(e){P=new Map,e.map((function(e,t){P.set(e.id,t)}))},exports.detectBrowser=x,exports.detectOrientationChange=function(e,t){var n,o=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(ee!==n){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");t&&(t.style.height="".concat(o)),ee=n}}(e,t)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){o()}),100)}))},exports.disableCaptions=function(e,t){for(var n=oe(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var o=t.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=t.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var t=oe(e);if(ie(),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){for(var n=oe(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=t||(i.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=function(){return W},exports.getCurrentVideo=function(){return A},exports.getLinearChannelDetails=function(e,t){var n,o;return i({url:y()+a.getLinearChannelDetails,params:s(s(s(s(s({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t}})},exports.getPlayer=oe,exports.getSeriesDetails=function(e,t){var n,o,r=JSON.parse(atob(t.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.seriesData})})):i({url:y()+"/v3/content/series/".concat(e),params:{site:l},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 i({method:"GET",url:g(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var o=e.videoId;return i({method:"GET",url:p(o),headers:{Authorization:e.token}})},exports.getSeriesWatchMap=function(){return F},exports.getSource=M,exports.getToken=O,exports.getVideoDetails=c,exports.getVideoIdx=function(){return k},exports.getVideoInfo=m,exports.handleError=V,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=Q,exports.initiateErrorHandling=le,exports.isNotAValidSkin=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},exports.isPaused=function(e){return t(e).paused()},exports.isPlayerInitialised=ne,exports.isTokenExpired=h,exports.load=function(e,t,n){var o,i,r;J(t);var l=0,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&m(t,n).then((function(e){var t,n,o,i,r,d;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),l=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,a=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){c(t,n).then((function(t){var n,r,d,s,u,c,v,m,p,g,I=null==t?void 0:t.data,f=(null==I||null===(n=I.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;Y(t.data);var E=(null==I||null===(d=I.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==I||null===(v=I.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(g=p.web)||void 0===g?void 0:g.url);E&&Q(e,E,I);var w=M(I,e);if(w){var T,y,h,_,b,O,D,x,C,L,W,A,k,P,F=(null==I||null===(T=I.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.videoImageUrl)||(null==I||null===(h=I.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=oe(e);if(R.poster(F),re(e,w),R.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:I})})),R.on("loadeddata",(function(){S(),o({status:!0,msg:"Video Loaded",response:I})})),R.one("play",(function(){l&&a<95&&setTimeout((function(){R.currentTime(l)}),0)})),R.one("error",(function(){var e;i({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(O=I.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(x=D.closedCaptions)||void 0===x?void 0:x.length)>0||(null==I||null===(C=I.video)||void 0===C||null===(L=C.closedCaptions)||void 0===L?void 0:L.length)>0)W=((null==I||null===(A=I.video)||void 0===A||null===(k=A.contentDetails)||void 0===k?void 0:k.closedCaptions)||(null==I||null===(P=I.video)||void 0===P?void 0:P.closedCaptions)).filter((function(e){return"VTT"===e.format})),K(e,W);else!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)}))}(e)}else V(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(n){le(n,e,i,t)}))}))},exports.loadVideo=re,exports.loadVideoInstantly=function(e,t,n){var o=oe(e);return o.src(t),new Promise((function(e,t){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=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=$,exports.pause=function(e){t(e).pause()},exports.play=function(e){t(e).play()},exports.refreshTokenManager=b,exports.rewind=function(e,n){var o=t(e),i=o.currentTime(),r=i<=n?0:i-n;o.currentTime(r)},exports.saveWatchHistory=v,exports.setCurrentSeries=function(e){W=e},exports.setCurrentVideo=Y,exports.setSeriesWatchMap=function(e){F=e},exports.setVideoIdx=X,exports.setVideoIdxById=J,exports.skip=function(e,n){var o=t(e),i=o.currentTime()+n;o.currentTime(i)};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),t=require("axios"),o=require("./generic-301735bf.js"),r=require("video.js"),l=require("./util-dc21e933.js"),a=require("./renditions-0ea4d69d.js"),d=require("./resolution-fe5b220a.js"),s=require("./localisation-56e0a999.js");function u(){var e,i;null===(e=window)||void 0===e||null===(i=e.dataLayer)||void 0===i||i.push(arguments)}function c(e,i){u("event",e,i)}function v(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}function m(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}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");function f(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function w(){var e=window.sessionStorage.getItem("uid");return e||(e=f(),window.sessionStorage.setItem("uid",e),e)}function p(){return h.apply(this,arguments)}function h(){return h=i(n.mark((function e(){var i,t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getToken();case 2:if(i=e.sent,null==(t=JSON.parse(atob(i.split(".")[1])))||!t.anonymousId){e.next=8;break}return e.abrupt("return","guest-user");case 8:return e.abrupt("return",null==t?void 0:t.userId);case 9:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}window.initialise=function(e){window.sid=f(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var i=Math.floor(e.currentTime());e.on("error",(function(){var n,t,o,r=Math.floor(e.currentTime());c(r?"FAILED_TO_START":"DROPPED_STREAM",m({pfm:window.platform,uid:w(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:i===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var i,n,t;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),c("PLAY",m({pfm:window.platform,uid:w(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(t=n.beacon)||void 0===t?void 0:t.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(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,i){var n,t;if(i.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=i&&null!==(n=i.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting"))c("BUFFERING",m({pfm:window.platform,uid:w(),vid:window.videoId,videoPosition:i.el_&&Math.floor(i.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:i.el_&&Math.floor(i.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var i,n,t;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",m({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:w(),vid:window.videoId},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(t=n.beacon)||void 0===t?void 0:t.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 i,n,t,o,r,l;c("AD_REQUEST",m({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:w(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(t=n.beacon)||void 0===t?void 0:t.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",m({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:w(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var i=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!i.includes(n)&&(i.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 i=e.currentTime(),n=e.duration(),t=e.buffered(),o=0;o<t.length;o++){var r=t.start(o),l=t.end(o);if(g(i,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var g=function(e,i,n){return e>=i&&e<=n};window.fireEvent=function(){var e=i(n.mark((function e(i){var r,l,a,d,s,u,c,v,f,h,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h=[m(m(m({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params),{},{uid:w(),vid:window.videoId,url:i.url||document.location.href,ref:i.ref||document.referrer,pa:i.eventName,vpos:i.videoPosition,environment:window.environment,dp1:i.dp1||null,dp2:i.dp2||null,dp3:i.dp3||null,dp4:i.dp4||null,dp5:i.dp5||null,apos:!0===i.isAdEvent?i.videoPosition:null,apod:!0===i.isAdEvent?(n=i.adPosition,n?String(n):""):null,profid:p(),player:i.playerType||"native",media_type:i.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:i.ttFirstFrame,bitrate:i.bitrate,connectionspeed:null,resolutionheight:i.resHeight,resolutionwidth:i.resWidth,bufferhealth:i.bufferHealth},(null==i?void 0:i.duration)&&{duration:i.duration}),null===(d=window)||void 0===d||null===(s=d.customData)||void 0===s||null===(u=s.beacon)||void 0===u?void 0:u.params)],e.next=3,o.getToken();case 3:g=e.sent,t({url:(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.beacon)||void 0===f?void 0:f.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:h}).catch((function(e){console.error(e)}));case 5:case"end":return e.stop()}var n}),e)})));return function(i){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 y,b,T=function(e){var i,n,t=o.getPlayer(null==e?void 0:e.playerId);null!=e&&null!==(i=e.series)&&void 0!==i&&i.enable||null==e||!e.chromecastReceiverId||null===(n=window)||void 0===n||!n.cast?console.log("Chromecast plugin is not available"):null==t||t.chromecast({receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}),null!=e&&e.airplay&&"Safari"==o.detectBrowser()?null==t||t.airPlay({addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available")},P=function(e,i){var n=o.getPlayer(e);n&&i&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(i){var n,t,o,l,a,d=this.el(),s=r.dom.getPointerPosition(d,i).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t||null===(o=t.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*s,v.seek()}}))};function k(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}var I=[],O=0,E=null;function S(i,n,t){var r,l,a,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];b=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.apiVersion)||"v1";var s=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,u=Math.floor(i.currentTime()),c=Math.floor(i.duration()),v=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,m={};"v1"==b?m={videoId:y,watchedTime:Math.floor(i.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:v}:"v2"==b&&(m=function(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}({videoId:y,watchedTime:Math.floor(i.currentTime()),watchedPercentage:d?100:Math.floor(u/c*100),doneWatching:d,profileId:s},E&&{seriesId:E})),o.saveWatchHistory(m,n.token,b).then((function(e){})).catch((function(e){})),O=u+t}var j=function(e,i,n){var t=o.getPlayer(e);if(t)if(i>=0&&i<=100){t.muted()&&t.muted(!1);var r=parseFloat(i)/100;t.volume(r),n&&n({status:!0,msg:"Volume set to ".concat(i,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},D=function(e){var i=o.getPlayer(e);return i?parseInt(100*i.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function C(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}var A=function(i,n,t,r){var l,a,d=r.res,s=r.sres,u=o.getPlayer(i),c=(null==d||null===(l=d.video)||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;o.setCurrentVideo(d),u.on("loadstart",(function(){c&&t.resolve({status:!0,msg:"Video Loaded",response:d})})),u.on("loadeddata",(function(){var r;(null==u||!u.muted())&&j(i,sessionStorage.getItem("volume")||"100");var l,a,c=o.getCurrentVideo();(o.clearError(),t.resolve(function(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:d}:{response:d})),null!=n&&n.watchHistory&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.enable&&!n.isAnonymousUser)&&function(e,i,n){var t,r;null!=i&&i.series&&(E=null==i||null===(t=i.series)||void 0===t?void 0:t.id),I=[],O=0,y=n;var l=(null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.interval)||30,a=o.getPlayer(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());I.includes(O)||(e==O?(I.push(e),S(a,i,l)):e>O&&(O=e+l))})),a.on("ended",(function(){S(a,i,l,!0)})))}(i,n,null==c||null===(l=c.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.id)})),u.textTracks().on("change",(function(e){var i=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];u.trigger("subtitlechanged",i)})),u.on("subtitlechanged",(function(e,i){var n,t,o,r,l,a,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t||null===(o=t.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(d=a.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=i?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.one("error",(function(){var e,n;o.handleError(i,(null==u||null===(e=u.error())||void 0===e?void 0:e.message)||"Some error occured"),t.reject({status:!1,msg:(null==u||null===(n=u.error())||void 0===n?void 0:n.message)||"Some error occured"})})),u.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var i,t,r,l=null===(i=o.getCurrentVideo())||void 0===i||null===(t=i.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id,a=o.getSeriesWatchMap().get(l)||{t:0,p:0},d=a.t,s=a.p;d&&s<95&&setTimeout((function(){u.currentTime(d)}),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)}))},R=function(e,i){var n=null==i?void 0:i.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-7a40a0a9.js")})).then((function(n){n.initialiseSkin(e,i)})):"default"==n?Promise.resolve().then((function(){return require("./skin-dd57424b.js")})).then((function(n){n.initialiseSkin(e,i)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-027ed57e.js")})).then((function(i){i.initaliseSkin(e)})):"defaultV2"==n?Promise.resolve().then((function(){return require("./skin-cfbb5242.js")})).then((function(n){n.initialiseSkin(e,i)})):"multiplayer"==n&&Promise.resolve().then((function(){return require("./skin-c17c7ceb.js")})).then((function(n){n.initialiseSkin(e,i)}))},F=function(e){return new Promise((function(i,n){if(x(e))n("".concat(e," is alread initialised"));else{var t=document.createElement("script");t.async=!1,t.src=e,t.onload=function(){i()},t.onerror=function(i){n("Error while loading script ".concat(e," : ").concat(i))},document.head.appendChild(t)}}))},x=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},B=function(e,i){i.controlBar.el_.style.color=e,i.controlBar.el_.querySelector(".vjs-play-progress")&&(i.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),i.controlBar.el_.querySelector(".vjs-volume-level")&&(i.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var M,H=function(){var e=i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),V=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){F("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(r)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),F("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:H,loadEMELibrary:_});function N(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}function q(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}var L=function(t,l,a,d){var s,u,c,v,m,f,w,p,h,g,y,b,k,I,O,E,S,j,D,C,F,x,M,V,N,L,W,U,z,G,J,K,Q=l.res,Y=void 0===Q?null:Q,X=l.sres,Z=void 0===X?null:X,$=(null===(s=window)||void 0===s||null===(u=s.cast)||void 0===u||null===(c=u.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(m=v.getInstance())||void 0===m?void 0:m.S)||void 0,ee=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==$&&"NOT_CONNECTED"!==$?["html5","chromecast"]:["chromecast","html5"]:["html5"],ie=o.impolicy16x9(null===(f=Y)||void 0===f||null===(w=f.video)||void 0===w||null===(p=w.gist)||void 0===p?void 0:p.videoImageUrl)||o.impolicy16x9(null===(h=Y)||void 0===h||null===(g=h.video)||void 0===g||null===(y=g.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),ne=(null===(k=Y)||void 0===k||null===(I=k.video)||void 0===I||null===(O=I.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,te=(null===(E=Y)||void 0===E||null===(S=E.video)||void 0===S||null===(j=S.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,oe=(null==a?void 0:a.drmLibrary)||!1,re=(null===(D=Y)||void 0===D||null===(C=D.ads)||void 0===C||null===(F=C.preRoll)||void 0===F||null===(x=F.adTags)||void 0===x||null===(M=x.web)||void 0===M?void 0:M.active)&&(null===(V=Y)||void 0===V||null===(N=V.ads)||void 0===N||null===(L=N.preRoll)||void 0===L||null===(W=L.adTags)||void 0===W||null===(U=W.web)||void 0===U?void 0:U.url);Y=q(q({},Y),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var le=(K={controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,audioTrackButton:!1,pictureInPictureToggle:(a.skin,!1)},muteToggle:"multiplayer"==a.skin,liveui:ne},e(K,"autoplay",null==a?void 0:a.autoplay),e(K,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!re),e(K,"loop",(null==a?void 0:a.loop)||!1),e(K,"audioPosterMode",null==a?void 0:a.audioPosterMode),e(K,"html5",q(q({dash:q(q({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:q(q({experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==a||null===(z=a.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==a?void 0:a.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==a?void 0:a.experimentalBufferBasedABR)||!1})},0==(null==a||null===(G=a.customData)||void 0===G?void 0:G.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(J=a.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(K,"poster",ie),e(K,"techOrder",ee),e(K,"chromecast",{requestCustomDataFn:function(e){var i=o.getPlayer(t);console.log(i.textTracksJson_);var n=i.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,i,n){var t,o,r,l,a,d,s,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=i.keySystemOptions&&i.keySystemOptions[0]&&i.keySystemOptions[0].options&&i.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=i.keySystemOptions&&i.keySystemOptions[0]&&i.keySystemOptions[0].options&&i.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(t=e.video)||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.title;m.mediaTitle=g;var y=null==e||null===(s=e.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(Y,e,n)}}),K),ae=r(t,le,function(){var e=i(n.mark((function e(){var i,l,s,u,c,v,m,f,w,p,h,g,y,b,k,I,O,E,S,j,D,C,F,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(T(a),te&&d.resolve(q({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),window.initialise(ae),window.firstFrame(ae),"white"!==window.controlsColor&&B(window.controlsColor,ae),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),b=null===(i=Y)||void 0===i||null===(l=i.video)||void 0===l?void 0:l.drmEnabled,k=null===(s=Y)||void 0===s||null===(u=s.video)||void 0===u||null===(c=u.liveDetails)||void 0===c?void 0:c.startOverTime,!b&&!oe){e.next=21;break}if("Safari"!==o.detectBrowser()){e.next=14;break}return e.next=12,_();case 12:e.next=21;break;case 14:if("caliente"!=(null===(I=window)||void 0===I?void 0:I.siteName)){e.next=19;break}return e.next=17,_();case 17:e.next=21;break;case 19:return e.next=21,H();case 21:ne&&P(t,k),!re||null!=a&&null!==(v=a.customData)&&void 0!==v&&v.disableAds||o.initialiseAdvertisement(t,re,Y),(O=o.getSource(Y,t))?o.loadVideo(t,O):(d.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),o.handleError(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Y)||void 0===m||null===(f=m.video)||void 0===f||null===(w=f.contentDetails)||void 0===w||null===(p=w.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(h=Y)||void 0===h||null===(g=h.video)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0)&&(x=(null===(S=Y)||void 0===S||null===(j=S.video)||void 0===j||null===(D=j.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(C=Y)||void 0===C||null===(F=C.video)||void 0===F?void 0:F.closedCaptions),E=x.filter((function(e){return"VTT"===e.format})),o.addCaptions(t,E)),null!=a&&a.disableControls?o.disableControls(t):R(t,q(q(q({},a),le),{},{liveVideo:te,isDvrEnabled:ne,res:Y,sres:Z})),A(t,q(q(q({},a),le),{},{liveVideo:te}),d,{res:Y,sres:Z});case 28:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:o.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(e){return new Promise((function(i,n){var t,r,l,a,d,c,v,m,f,w,p;if(!o.isPlayerInitialised(null==e?void 0:e.playerId)){var h=(null==e||null===(t=e.epg)||void 0===t?void 0:t.enable)||!1,g=null==e?void 0:e.videoId,y=(null==e||null===(r=e.series)||void 0===r?void 0:r.enable)||!1;window.videoId=g;var b=null==e?void 0:e.token;if(o.refreshTokenManager().set(null==e?void 0:e.refreshToken),b&&!o.isTokenExpired(b)){M=JSON.parse(atob(b.split(".")[1])),window.siteId=null===(l=M)||void 0===l?void 0:l.siteId,window.siteName=null===(a=M)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(d=M)||void 0===d||!d.anonymousId),e.siteOwner=(null===(c=M)||void 0===c?void 0:c.site)||null,e.userId=(null===(v=M)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(m=M)||void 0===m?void 0:m.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",b);var T=null==e?void 0:e.playerId,P=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,k=null==e?void 0:e.airplay,I=null==e?void 0:e.apiBaseUrl,O=(null==e||null===(f=e.analytics)||void 0===f?void 0:f.gaId)||null,E=null==e?void 0:e.errors;E&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,s.setLocalisation(null==e||null===(w=e.customData)||void 0===w?void 0:w.localisation),I&&(window.playerEntitlementUrl=I),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!o.isNotAValidSkin(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return V})).then((function(e){e.importIMA()})),!P||null!=e&&e.series||Promise.resolve().then((function(){return V})).then((function(e){e.importChromecast()})),k&&"Safari"==o.detectBrowser()&&Promise.resolve().then((function(){return V})).then((function(e){e.importAirplay()})),O&&F("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then((function(){return e=O,window.dataLayer=window.dataLayer||[],u("js",new Date),void u("config",e);var e})).catch((function(e){}));var S=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(T));if(S&&S.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var j,D=null==e||null===(j=e.series)||void 0===j?void 0:j.id;o.getSeriesDetails(D,b).then((function(t){var r,l,a,d=t.data,s=t.data.seasons;o.setCurrentSeries(s);var u=g||(null==s||null===(r=s[0])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(e,i){var n=new Map;o.getSeriesWatchHistory({videoId:e,token:i}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),o.setSeriesWatchMap(n)})).catch((function(e){return console.log(e)}))}(D,b),o.getVideoDetails(u,b).then((function(t){var r,l,a;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,o.setCurrentVideo(t.data),L(T,{res:null==t?void 0:t.data,sres:d},e,{resolve:i,reject:n})})).catch((function(e){o.initiateErrorHandling(e,T,n,g)}))})).catch((function(e){o.initiateErrorHandling(e,T,n)}))}else if(h){var C=null==e?void 0:e.epg;o.getLinearChannelDetails(C,b).then((function(t){var o=null==t?void 0:t.data;o.contentType="linearchannel",L(T,{res:o},e,{resolve:i,reject:n})})).catch((function(e){o.initiateErrorHandling(e,T,n,g)}))}else o.getVideoDetails(g,b).then((function(t){var r,l,a,d;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,o.setCurrentVideo(null==t?void 0:t.data);var s=null==t?void 0:t.data;null!=e&&e.watchHistory&&null!=e&&null!==(d=e.watchHistory)&&void 0!==d&&d.enable?o.getVideoInfo(g,b).then((function(t){var o,r,l,a,d,u;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==t?void 0:t.data)),e.watchHistoryResumeTime=(null==t||null===(d=t.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==t||null===(u=t.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",L(T,{res:s},e,{resolve:i,reject:n})})).catch((function(t){var o,r,l,a;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(t)),L(T,{res:s},e,{resolve:i,reject:n})})):L(T,{res:s},e,{resolve:i,reject:n})})).catch((function(e){o.initiateErrorHandling(e,T,n,g)}))}else n({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}})}}))},getRenditions:a.getRenditions,skip:o.skip,getPlayer:o.getPlayer,play:o.play,pause:o.pause,detectBrowser:o.detectBrowser,rewind:o.rewind,loadVideo:o.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:o.isPlayerInitialised,load:o.load,dispose:o.dispose,enableCaptions:o.enableCaptions,disableCaptions:o.disableCaptions,getCaptions:o.getCaptions,playSelectedResolution:d.playSelectedResolution,getSource:o.getSource,setVolume:j,getVolume:D,disableControls:o.disableControls,setPlaybackSpeed:l.setPlaybackSpeed}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),t=require("axios"),o=require("./generic-34b93767.js"),r=require("video.js"),l=require("./util-af14daa4.js"),a=require("./renditions-fdf1dbe0.js"),d=require("./resolution-46bd5b25.js"),s=require("./localisation-56e0a999.js");function u(){var e,i;null===(e=window)||void 0===e||null===(i=e.dataLayer)||void 0===i||i.push(arguments)}function c(e,i){u("event",e,i)}function v(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}function m(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}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");function f(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function w(){var e=window.sessionStorage.getItem("uid");return e||(e=f(),window.sessionStorage.setItem("uid",e),e)}function p(){return h.apply(this,arguments)}function h(){return h=i(n.mark((function e(){var i,t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getToken();case 2:if(i=e.sent,null==(t=JSON.parse(atob(i.split(".")[1])))||!t.anonymousId){e.next=8;break}return e.abrupt("return","guest-user");case 8:return e.abrupt("return",null==t?void 0:t.userId);case 9:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}window.initialise=function(e){window.sid=f(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var i=Math.floor(e.currentTime());e.on("error",(function(){var n,t,o,r=Math.floor(e.currentTime());c(r?"FAILED_TO_START":"DROPPED_STREAM",m({pfm:window.platform,uid:w(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:i===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var i,n,t;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),c("PLAY",m({pfm:window.platform,uid:w(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(t=n.beacon)||void 0===t?void 0:t.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(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,i){var n,t;if(i.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=i&&null!==(n=i.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting"))c("BUFFERING",m({pfm:window.platform,uid:w(),vid:window.videoId,videoPosition:i.el_&&Math.floor(i.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:i.el_&&Math.floor(i.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var i,n,t;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",m({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:w(),vid:window.videoId},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(t=n.beacon)||void 0===t?void 0:t.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 i,n,t,o,r,l;c("AD_REQUEST",m({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:w(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(t=n.beacon)||void 0===t?void 0:t.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",m({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:w(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var i=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!i.includes(n)&&(i.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 i=e.currentTime(),n=e.duration(),t=e.buffered(),o=0;o<t.length;o++){var r=t.start(o),l=t.end(o);if(g(i,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var g=function(e,i,n){return e>=i&&e<=n};window.fireEvent=function(){var e=i(n.mark((function e(i){var r,l,a,d,s,u,c,v,f,h,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h=[m(m(m({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params),{},{uid:w(),vid:window.videoId,url:i.url||document.location.href,ref:i.ref||document.referrer,pa:i.eventName,vpos:i.videoPosition,environment:window.environment,dp1:i.dp1||null,dp2:i.dp2||null,dp3:i.dp3||null,dp4:i.dp4||null,dp5:i.dp5||null,apos:!0===i.isAdEvent?i.videoPosition:null,apod:!0===i.isAdEvent?(n=i.adPosition,n?String(n):""):null,profid:p(),player:i.playerType||"native",media_type:i.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:i.ttFirstFrame,bitrate:i.bitrate,connectionspeed:null,resolutionheight:i.resHeight,resolutionwidth:i.resWidth,bufferhealth:i.bufferHealth},(null==i?void 0:i.duration)&&{duration:i.duration}),null===(d=window)||void 0===d||null===(s=d.customData)||void 0===s||null===(u=s.beacon)||void 0===u?void 0:u.params)],e.next=3,o.getToken();case 3:g=e.sent,t({url:(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.beacon)||void 0===f?void 0:f.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:h}).catch((function(e){console.error(e)}));case 5:case"end":return e.stop()}var n}),e)})));return function(i){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 y,b,T=function(e){var i,n,t=o.getPlayer(null==e?void 0:e.playerId);null!=e&&null!==(i=e.series)&&void 0!==i&&i.enable||null==e||!e.chromecastReceiverId||null===(n=window)||void 0===n||!n.cast?console.log("Chromecast plugin is not available"):null==t||t.chromecast({receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}),null!=e&&e.airplay&&"Safari"==o.detectBrowser()?null==t||t.airPlay({addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available")},P=function(e,i){var n=o.getPlayer(e);n&&i&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(i){var n,t,o,l,a,d=this.el(),s=r.dom.getPointerPosition(d,i).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t||null===(o=t.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*s,v.seek()}}))};function k(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}var I=[],O=0,E=null;function S(i,n,t){var r,l,a,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];b=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.apiVersion)||"v1";var s=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,u=Math.floor(i.currentTime()),c=Math.floor(i.duration()),v=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,m={};"v1"==b?m={videoId:y,watchedTime:Math.floor(i.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:v}:"v2"==b&&(m=function(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}({videoId:y,watchedTime:Math.floor(i.currentTime()),watchedPercentage:d?100:Math.floor(u/c*100),doneWatching:d,profileId:s},E&&{seriesId:E})),o.saveWatchHistory(m,b).then((function(e){})).catch((function(e){})),O=u+t}var j=function(e,i,n){var t=o.getPlayer(e);if(t)if(i>=0&&i<=100){t.muted()&&t.muted(!1);var r=parseFloat(i)/100;t.volume(r),n&&n({status:!0,msg:"Volume set to ".concat(i,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},D=function(e){var i=o.getPlayer(e);return i?parseInt(100*i.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function C(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}var A=function(i,n,t,r){var l,a,d=r.res,s=r.sres,u=o.getPlayer(i),c=(null==d||null===(l=d.video)||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;o.setCurrentVideo(d),u.on("loadstart",(function(){c&&t.resolve({status:!0,msg:"Video Loaded",response:d})})),u.on("loadeddata",(function(){var r;(null==u||!u.muted())&&j(i,sessionStorage.getItem("volume")||"100");var l,a,c=o.getCurrentVideo();(o.clearError(),t.resolve(function(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:d}:{response:d})),null!=n&&n.watchHistory&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.enable&&!n.isAnonymousUser)&&function(e,i,n){var t,r;null!=i&&i.series&&(E=null==i||null===(t=i.series)||void 0===t?void 0:t.id),I=[],O=0,y=n;var l=(null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.interval)||30,a=o.getPlayer(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());I.includes(O)||(e==O?(I.push(e),S(a,i,l)):e>O&&(O=e+l))})),a.on("ended",(function(){S(a,i,l,!0)})))}(i,n,null==c||null===(l=c.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.id)})),u.textTracks().on("change",(function(e){var i=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];u.trigger("subtitlechanged",i)})),u.on("subtitlechanged",(function(e,i){var n,t,o,r,l,a,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t||null===(o=t.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(d=a.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=i?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.one("error",(function(){var e,n;o.handleError(i,(null==u||null===(e=u.error())||void 0===e?void 0:e.message)||"Some error occured"),t.reject({status:!1,msg:(null==u||null===(n=u.error())||void 0===n?void 0:n.message)||"Some error occured"})})),u.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var i,t,r,l=null===(i=o.getCurrentVideo())||void 0===i||null===(t=i.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id,a=o.getSeriesWatchMap().get(l)||{t:0,p:0},d=a.t,s=a.p;d&&s<95&&setTimeout((function(){u.currentTime(d)}),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)}))},R=function(e,i){var n=null==i?void 0:i.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-efe17260.js")})).then((function(n){n.initialiseSkin(e,i)})):"default"==n?Promise.resolve().then((function(){return require("./skin-69a1d035.js")})).then((function(n){n.initialiseSkin(e,i)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-0483e494.js")})).then((function(i){i.initaliseSkin(e)})):"defaultV2"==n?Promise.resolve().then((function(){return require("./skin-201232fe.js")})).then((function(n){n.initialiseSkin(e,i)})):"multiplayer"==n&&Promise.resolve().then((function(){return require("./skin-a59253b4.js")})).then((function(n){n.initialiseSkin(e,i)}))},F=function(e){return new Promise((function(i,n){if(x(e))n("".concat(e," is alread initialised"));else{var t=document.createElement("script");t.async=!1,t.src=e,t.onload=function(){i()},t.onerror=function(i){n("Error while loading script ".concat(e," : ").concat(i))},document.head.appendChild(t)}}))},x=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},B=function(e,i){i.controlBar.el_.style.color=e,i.controlBar.el_.querySelector(".vjs-play-progress")&&(i.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),i.controlBar.el_.querySelector(".vjs-volume-level")&&(i.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var M,H=function(){var e=i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),V=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){F("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(r)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),F("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:H,loadEMELibrary:_});function N(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);i&&(t=t.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,t)}return n}function q(i){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N(Object(t),!0).forEach((function(n){e(i,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))}return i}var L=function(t,l,a,d){var s,u,c,v,m,f,w,p,h,g,y,b,k,I,O,E,S,j,D,C,F,x,M,V,N,L,W,U,z,G,J,K,Q=l.res,Y=void 0===Q?null:Q,X=l.sres,Z=void 0===X?null:X,$=(null===(s=window)||void 0===s||null===(u=s.cast)||void 0===u||null===(c=u.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(m=v.getInstance())||void 0===m?void 0:m.S)||void 0,ee=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==$&&"NOT_CONNECTED"!==$?["html5","chromecast"]:["chromecast","html5"]:["html5"],ie=o.impolicy16x9(null===(f=Y)||void 0===f||null===(w=f.video)||void 0===w||null===(p=w.gist)||void 0===p?void 0:p.videoImageUrl)||o.impolicy16x9(null===(h=Y)||void 0===h||null===(g=h.video)||void 0===g||null===(y=g.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),ne=(null===(k=Y)||void 0===k||null===(I=k.video)||void 0===I||null===(O=I.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,te=(null===(E=Y)||void 0===E||null===(S=E.video)||void 0===S||null===(j=S.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,oe=(null==a?void 0:a.drmLibrary)||!1,re=(null===(D=Y)||void 0===D||null===(C=D.ads)||void 0===C||null===(F=C.preRoll)||void 0===F||null===(x=F.adTags)||void 0===x||null===(M=x.web)||void 0===M?void 0:M.active)&&(null===(V=Y)||void 0===V||null===(N=V.ads)||void 0===N||null===(L=N.preRoll)||void 0===L||null===(W=L.adTags)||void 0===W||null===(U=W.web)||void 0===U?void 0:U.url);Y=q(q({},Y),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var le=(K={controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,audioTrackButton:!1,pictureInPictureToggle:(a.skin,!1)},muteToggle:"multiplayer"==a.skin,liveui:ne},e(K,"autoplay",null==a?void 0:a.autoplay),e(K,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!re),e(K,"loop",(null==a?void 0:a.loop)||!1),e(K,"audioPosterMode",null==a?void 0:a.audioPosterMode),e(K,"html5",q(q({dash:q(q({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:q(q({experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==a||null===(z=a.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==a?void 0:a.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==a?void 0:a.experimentalBufferBasedABR)||!1})},0==(null==a||null===(G=a.customData)||void 0===G?void 0:G.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(J=a.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(K,"poster",ie),e(K,"techOrder",ee),e(K,"chromecast",{requestCustomDataFn:function(e){var i=o.getPlayer(t);console.log(i.textTracksJson_);var n=i.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,i,n){var t,o,r,l,a,d,s,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=i.keySystemOptions&&i.keySystemOptions[0]&&i.keySystemOptions[0].options&&i.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=i.keySystemOptions&&i.keySystemOptions[0]&&i.keySystemOptions[0].options&&i.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(t=e.video)||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.title;m.mediaTitle=g;var y=null==e||null===(s=e.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(Y,e,n)}}),K),ae=r(t,le,function(){var e=i(n.mark((function e(){var i,l,s,u,c,v,m,f,w,p,h,g,y,b,k,I,O,E,S,j,D,C,F,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(T(a),te&&d.resolve(q({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),window.initialise(ae),window.firstFrame(ae),"white"!==window.controlsColor&&B(window.controlsColor,ae),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),b=null===(i=Y)||void 0===i||null===(l=i.video)||void 0===l?void 0:l.drmEnabled,k=null===(s=Y)||void 0===s||null===(u=s.video)||void 0===u||null===(c=u.liveDetails)||void 0===c?void 0:c.startOverTime,!b&&!oe){e.next=21;break}if("Safari"!==o.detectBrowser()){e.next=14;break}return e.next=12,_();case 12:e.next=21;break;case 14:if("caliente"!=(null===(I=window)||void 0===I?void 0:I.siteName)){e.next=19;break}return e.next=17,_();case 17:e.next=21;break;case 19:return e.next=21,H();case 21:ne&&P(t,k),!re||null!=a&&null!==(v=a.customData)&&void 0!==v&&v.disableAds||o.initialiseAdvertisement(t,re,Y),(O=o.getSource(Y,t))?o.loadVideo(t,O):(d.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),o.handleError(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Y)||void 0===m||null===(f=m.video)||void 0===f||null===(w=f.contentDetails)||void 0===w||null===(p=w.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(h=Y)||void 0===h||null===(g=h.video)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0)&&(x=(null===(S=Y)||void 0===S||null===(j=S.video)||void 0===j||null===(D=j.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(C=Y)||void 0===C||null===(F=C.video)||void 0===F?void 0:F.closedCaptions),E=x.filter((function(e){return"VTT"===e.format})),o.addCaptions(t,E)),null!=a&&a.disableControls?o.disableControls(t):R(t,q(q(q({},a),le),{},{liveVideo:te,isDvrEnabled:ne,res:Y,sres:Z})),A(t,q(q(q({},a),le),{},{liveVideo:te}),d,{res:Y,sres:Z});case 28:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:o.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(e){return new Promise((function(i,n){var t,r,l,a,d,c,v,m,f,w,p;if(!o.isPlayerInitialised(null==e?void 0:e.playerId)){var h=(null==e||null===(t=e.epg)||void 0===t?void 0:t.enable)||!1,g=null==e?void 0:e.videoId,y=(null==e||null===(r=e.series)||void 0===r?void 0:r.enable)||!1;window.videoId=g;var b=null==e?void 0:e.token;if(o.refreshTokenManager().set(null==e?void 0:e.refreshToken),b&&!o.isTokenExpired(b)){M=JSON.parse(atob(b.split(".")[1])),window.siteId=null===(l=M)||void 0===l?void 0:l.siteId,window.siteName=null===(a=M)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(d=M)||void 0===d||!d.anonymousId),e.siteOwner=(null===(c=M)||void 0===c?void 0:c.site)||null,e.userId=(null===(v=M)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(m=M)||void 0===m?void 0:m.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",b);var T=null==e?void 0:e.playerId,P=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,k=null==e?void 0:e.airplay,I=null==e?void 0:e.apiBaseUrl,O=(null==e||null===(f=e.analytics)||void 0===f?void 0:f.gaId)||null,E=null==e?void 0:e.errors;E&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,s.setLocalisation(null==e||null===(w=e.customData)||void 0===w?void 0:w.localisation),I&&(window.playerEntitlementUrl=I),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!o.isNotAValidSkin(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return V})).then((function(e){e.importIMA()})),!P||null!=e&&e.series||Promise.resolve().then((function(){return V})).then((function(e){e.importChromecast()})),k&&"Safari"==o.detectBrowser()&&Promise.resolve().then((function(){return V})).then((function(e){e.importAirplay()})),O&&F("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then((function(){return e=O,window.dataLayer=window.dataLayer||[],u("js",new Date),void u("config",e);var e})).catch((function(e){}));var S=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(T));if(S&&S.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var j,D=null==e||null===(j=e.series)||void 0===j?void 0:j.id;o.getSeriesDetails(D,b).then((function(t){var r,l,a,d=t.data,s=t.data.seasons;o.setCurrentSeries(s);var u=g||(null==s||null===(r=s[0])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(e,i){var n=new Map;o.getSeriesWatchHistory({videoId:e,token:i}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),o.setSeriesWatchMap(n)})).catch((function(e){return console.log(e)}))}(D,b),o.getVideoDetails(u,b).then((function(t){var r,l,a;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,o.setCurrentVideo(t.data),L(T,{res:null==t?void 0:t.data,sres:d},e,{resolve:i,reject:n})})).catch((function(e){o.initiateErrorHandling(e,T,n,g)}))})).catch((function(e){o.initiateErrorHandling(e,T,n)}))}else if(h){var C=null==e?void 0:e.epg;o.getLinearChannelDetails(C,b).then((function(t){var o=null==t?void 0:t.data;o.contentType="linearchannel",L(T,{res:o},e,{resolve:i,reject:n})})).catch((function(e){o.initiateErrorHandling(e,T,n,g)}))}else o.getVideoDetails(g,b).then((function(t){var r,l,a,d;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,o.setCurrentVideo(null==t?void 0:t.data);var s=null==t?void 0:t.data;null!=e&&e.watchHistory&&null!=e&&null!==(d=e.watchHistory)&&void 0!==d&&d.enable?o.getVideoInfo(g,b).then((function(t){var o,r,l,a,d,u;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==t?void 0:t.data)),e.watchHistoryResumeTime=(null==t||null===(d=t.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==t||null===(u=t.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",L(T,{res:s},e,{resolve:i,reject:n})})).catch((function(t){var o,r,l,a;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(t)),L(T,{res:s},e,{resolve:i,reject:n})})):L(T,{res:s},e,{resolve:i,reject:n})})).catch((function(e){o.initiateErrorHandling(e,T,n,g)}))}else n({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}})}}))},getRenditions:a.getRenditions,skip:o.skip,getPlayer:o.getPlayer,play:o.play,pause:o.pause,detectBrowser:o.detectBrowser,rewind:o.rewind,loadVideo:o.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:o.isPlayerInitialised,load:o.load,dispose:o.dispose,enableCaptions:o.enableCaptions,disableCaptions:o.disableCaptions,getCaptions:o.getCaptions,playSelectedResolution:d.playSelectedResolution,getSource:o.getSource,setVolume:j,getVolume:D,disableControls:o.disableControls,setPlaybackSpeed:l.setPlaybackSpeed}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-34b93767.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}}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/assertThisInitialized"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/regenerator"),u=require("video.js"),c=require("./loader-393b838a.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/assertThisInitialized"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/regenerator"),u=require("video.js"),c=require("./loader-393b838a.js"),d=require("./generic-34b93767.js");function v(e){var t=m();return function(){var i,l=o(e);if(t){var r=o(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return n(this,i)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var h=u.getComponent("Component"),p=function(){r(m,h);var n,o=v(m);function m(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,m),i=o.call(this,e,r),a(l(i),"multicamCssPositioning",(function(e,t){var r,n,o,a,s,u,c,d,v=window.getComputedStyle(document.getElementById(t),null),m=v.getPropertyValue("height"),h=v.getPropertyValue("width"),p=m.slice(0,-2);h.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==i.config.skin&&(null===(r=l(i))||void 0===r||null===(n=r.config)||void 0===n||!n.liveui)&&(null===(o=l(i))||void 0===o||null===(a=o.config)||void 0===a||!a.liveVideo)||null!==(s=l(i))&&void 0!==s&&null!==(u=s.config)&&void 0!==u&&u.liveui&&null!==(c=l(i))&&void 0!==c&&null!==(d=c.config)&&void 0!==d&&d.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"))})),i.playerId=r.playerId,i.streams=null==r?void 0:r.streams,i.config=null==r?void 0:r.config,i.createUI(null==r?void 0:r.streams),i}return i(m,[{key:"createEl",value:function(){return u.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:(n=e(s.mark((function e(t,i){var l,r,n,o=this;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=this.el(),r=u.dom.createEl("div",{className:"tile ".concat(i)}),0==i&&(r.style.border="2px solid red"),r.style.backgroundImage="url(".concat(t.img,")"),u.dom.appendContent(l,r),e.next=7,d.getToken();case 7:return n=e.sent,r.addEventListener("click",(function(e){c.showLoader(o.playerId),o.removeSelectedTile();var i=document.getElementsByClassName("".concat(e.srcElement.className))[0];i&&(i.style.border="2px solid red"),d.load(o.playerId,t.id,n).then((function(e){d.play(o.playerId)}))})),e.abrupt("return",l);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{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)}))}}]),m}();exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/regenerator"),l=require("video.js"),i=require("./icons-0f7b3404.js"),c=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/regenerator"),l=require("video.js"),i=require("./icons-0f7b3404.js"),c=require("./generic-34b93767.js");function d(e){var t=u();return function(){var r,n=s(e);if(t){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}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("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var m=l.getComponent("Component"),p=function(){n(u,m);var a,s=d(u);function u(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,u),(r=s.call(this,e,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return r(u,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(i.BroadcastIcon())});return l.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=l.dom.createEl("div",{className:"stream-container hidden"});l.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(c.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=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(r,"px"),document.getElementById(this.playerId).style.overflow="hidden",l.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:(a=e(o.mark((function e(t){var r,n,a,s,d,u,m,p,h,v=this;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.getToken();case 2:r=e.sent,n=this.el(),a=l.dom.createEl("div",{className:"stream-selector-head"}),(s=l.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())})).onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"},d=l.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),u=l.dom.createEl("div",{className:"stream-selector-content"}),m=l.dom.createEl("div",{className:"stream-tray"}),p=o.mark((function e(t){var n,a,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=l.dom.createEl("div",{className:"stream -".concat(t),innerHTML:"".concat(i.SelectedStream())}),0==t&&(a.classList.add("selected"),a.style.border="4px solid #D2393B"),a.onclick=function(){for(var e=l.dom.$$(".stream"),n=0;n<e.length;n++)e[n].style.border="none",e[n].classList.remove("selected");a.classList.add("selected"),a.style.border="4px solid #D2393B",c.load(v.playerId,v.streams[t].id,r).then((function(e){c.play(v.playerId),console.log(e)})).catch((function(e){console.log(e)}))},a.style.backgroundImage="url(".concat(v.streams[t].img,")"),(s=document.createElement("img")).className="stream-thumbnail-image",s.src="".concat(null==v||null===(n=v.streams[t])||void 0===n?void 0:n.img),s.alt="No Thumbnail Available",a.append(s),l.dom.appendContent(m,a),l.dom.appendContent(u,m);case 11:case"end":return e.stop()}}),e)})),h=0;case 12:if(!(h<this.streams.length)){e.next=17;break}return e.delegateYield(p(h),"t0",14);case 14:h++,e.next=12;break;case 17:l.dom.appendContent(a,s),l.dom.appendContent(a,d),l.dom.appendContent(t,a),l.dom.appendContent(t,u),c.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(v.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}]),u}();exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/regenerator"),i=require("video.js"),a=require("./loader-393b838a.js"),c=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/regenerator"),i=require("video.js"),a=require("./loader-393b838a.js"),c=require("./generic-34b93767.js");function u(e){var t=d();return function(){var r,n=o(e);if(t){var s=o(this).constructor;r=Reflect.construct(n,arguments,s)}else r=n.apply(this,arguments);return l(this,r)}}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("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var v=i.getComponent("Component"),m=function(){n(d,v);var l,o=u(d);function d(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),(r=o.call(this,e,n)).playerId=n.playerId,r.config=n.config,r.createUI(null==n?void 0:n.config.streams),r}return r(d,[{key:"createEl",value:function(){return i.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,r,n,l,o,s,a,c,u=this.el(),d=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(r=this.config)||void 0===r?void 0:r.liveVideo)||!(null!=this&&null!==(n=this.config)&&void 0!==n&&n.liveui)&&!(null!=this&&null!==(l=this.config)&&void 0!==l&&l.liveVideo)||!1;d?null==u||null===(o=u.classList)||void 0===o||o.add("dvr"):null==u||null===(s=u.classList)||void 0===s||s.add("nondvr");var v=i.dom.createEl("div",{className:"broadcast"});v.innerHTML="Broadcasts";var m=i.dom.createEl("div",{className:"potraittray hideMWebTray"});d?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=i.dom.createEl("div",{className:"tilecontainer-potrait"});i.dom.appendContent(u,v),i.dom.appendContent(u,m),i.dom.appendContent(m,h),v.addEventListener("click",(function(){null!=m&&m.classList.contains("hideMWebTray")?(m.classList.remove("hideMWebTray"),u.style.background="darkgray"):(null==m||m.classList.add("hideMWebTray"),u.style.background="gray")})),this.loadCSS();for(var p=0;p<e.length;p++)this.createTile(e[p],p)}},{key:"createTile",value:(l=e(s.mark((function e(t,r){var n,l,o,u,d=this;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.el(),l=i.dom.createEl("div",{className:"tile-potrait-mweb ".concat(r)}),0==r&&(l.style.border="2px solid red"),l.style.backgroundImage="url(".concat(t.img,")"),o=i.dom.$(".tilecontainer-potrait",this.contentEl()),i.dom.appendContent(o,l),e.next=8,c.getToken();case 8:return u=e.sent,l.addEventListener("click",(function(e){a.showLoader(d.playerId),d.removeSelectedTile();var r=document.getElementsByClassName("".concat(e.srcElement.className))[0];r&&(r.style.border="2px solid red"),c.load(d.playerId,t.id,u).then((function(e){c.play(d.playerId)}))})),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{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"),r=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),n=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),l=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==r||r.classList.add("hide-controls"),null==n||n.classList.add("hide-controls"),null==l||l.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.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")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")))}}]),d}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/regenerator"),s=require("video.js"),a=require("./icons-0f7b3404.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/regenerator"),s=require("video.js"),a=require("./icons-0f7b3404.js"),d=require("./generic-34b93767.js");function u(e){var n=c();return function(){var t,r=o(e);if(n){var l=o(this).constructor;t=Reflect.construct(r,arguments,l)}else t=r.apply(this,arguments);return i(this,t)}}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("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var p=s.getComponent("Component"),v=function(){r(i,p);var e=u(i);function i(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=e.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(i,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"play-next"}),n=s.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(a.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return s.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=s.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=s.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=s.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=s.dom.createEl("div",{className:"next-eps-image"}),o=s.dom.createEl("div",{className:"next-eps-description"});s.dom.appendContent(r,i),s.dom.appendContent(r,o),s.dom.appendContent(n,t),s.dom.appendContent(n,r),this.toggleContentOnHover(e,n),s.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",(function(){s.dom.removeClass(n,"nextepisode-hidden")})),n.addEventListener("mouseover",(function(){s.dom.removeClass(n,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){s.dom.addClass(n,"nextepisode-hidden")})),n.addEventListener("mouseout",(function(){s.dom.addClass(n,"nextepisode-hidden")}))}}]),i}(),m=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},f=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,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},h=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,r){e.gist.id===n&&(t=r)})),t):null},x=function(n){var t,r;s.dom.$(".next-eps"),s.dom.$(".play-next").onclick=e(l.mark((function e(){var t,r;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.getToken();case 2:r=e.sent,d.load("my-player",null==n||null===(t=n.gist)||void 0===t?void 0:t.id,r).then((function(e){d.setCurrentVideo(e.response)}));case 4:case"end":return e.stop()}}),e)})));var i=s.dom.$(".next-eps-image"),o=d.parseHtmlString("<img src=".concat(null==n||null===(t=n.gist)||void 0===t?void 0:t.videoImageUrl," />")),a=null==o?void 0:o.firstChild;null==i||i.append(a);for(var u=s.dom.$(".next-eps-description"),c=d.parseHtmlString("<div class='next-eps-title'>".concat(null==n?void 0:n.title,"</div>\n <div class='next-eps-description-details'>").concat(null==n||null===(r=n.gist)||void 0===r?void 0:r.description,"</div>"));null!=c&&c.firstChild;)null==u||u.appendChild(c.firstChild)};exports.default=v,exports.initaliseFunctionality=function(e,n){var t=m(e,n.video.gist.id),r=h(e[t],n.video.gist.id),i=f(e[t],r);x(i.nextEp)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/regenerator"),r=require("video.js"),c=require("./icons-0f7b3404.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/regenerator"),r=require("video.js"),c=require("./icons-0f7b3404.js"),d=require("./generic-34b93767.js"),u=require("./autoNextVideo-b7c87b4c.js");function p(e){var t=m();return function(){var n,l=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return i(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-af14daa4.js");var v=r.getComponent("Component"),y=function(){a(m,v);var i,o=p(m);function m(e){var t,l,a,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,m),(i=o.call(this,e,s)).playerId=s.playerId,i.seriesData=s.sres,i.videos=null==s||null===(t=s.playlist)||void 0===t?void 0:t.content,i.cb=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.cb)||null,i.autoNext=(null==s||null===(a=s.playlist)||void 0===a?void 0:a.autoNext)||!1,i.currentVideoData=s.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&u.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return l(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(c.EpisodesSvg())});return r.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=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.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=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:(i=t(s.mark((function t(n){var l,a,i,o,u,p,m,v,y=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.getToken();case 2:l=t.sent,a=this.el(),i=r.dom.createEl("div",{className:"playlist-selector-head"}),(o=r.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(c.crossIconSvg())})).onclick=function(){n.classList.add("hidden"),a.classList.remove("open"),n.style.right="-350px"},u=r.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=r.dom.createEl("div",{className:"playlist-selector-content"}),m=s.mark((function t(n){var a,i,o,c,u,m,v,h,g;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=r.dom.createEl("div",{className:"playlist-container"}),c=r.dom.createEl("div",{className:"playlist-section",index:n}),u=r.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(a=y.videos[n])||void 0===a?void 0:a.title)||"")}),m=r.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(y.videos[n].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")}),r.dom.appendContent(c,u),r.dom.appendContent(c,m),r.dom.appendContent(o,c),r.dom.appendContent(p,o),v=r.dom.createEl("div",{className:"playlist-section-expanded hidden"}),h=r.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=y.videos[n])||void 0===i?void 0:i.description)||"")}),(g=r.dom.createEl("div",{className:"playlist-image"})).style.backgroundImage="url(".concat(y.videos[n].img,")"),r.dom.appendContent(v,g),r.dom.appendContent(v,h),r.dom.appendContent(o,v),r.dom.appendContent(p,o),v.onclick=function(e){e.stopPropagation(),d.setVideoIdx(n+1),d.load(y.playerId,y.videos[n].id,l).then((function(e){null!=y&&y.cb&&y.cb(e)})).catch((function(e){null!=y&&y.cb&&y.cb(e)}))},c.onclick=function(t){var n,l,a,i=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(i=e(i))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(o.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(a=s.classList)||void 0===a||a.add("hidden"),o.style.backgroundColor="unset")};case 18:case"end":return t.stop()}}),t)})),v=0;case 11:if(!(v<this.videos.length)){t.next=16;break}return t.delegateYield(m(v),"t0",13);case 13:v++,t.next=11;break;case 16:r.dom.appendContent(i,o),r.dom.appendContent(i,u),r.dom.appendContent(n,i),r.dom.appendContent(n,p),d.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(y.playerId),null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(e,"px")}));case 22:case"end":return t.stop()}}),t,this)}))),function(e){return i.apply(this,arguments)})}]),m}();exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=require("./generic-
|
|
1
|
+
"use strict";var l=require("./generic-34b93767.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};
|
|
@@ -1 +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-
|
|
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-34b93767.js");function c(e){var t=u();return function(){var n,i=d(e);if(t){var a=d(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js");var h=r.getComponent("Component"),v=function(){a(d,h);var o=c(d);function d(n){var a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),a=o.call(this,n,s),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==s?void 0:s.playerId,a.skin=null==s?void 0:s.skin,a.icon=null==s?void 0:s.icon,a.masterRenditions=[],a.fontSizeOptions=[10,12,14],a.createRenditions(s.renditions),window.height=null,a}return n(d,[{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,p(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,p(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,p(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),v=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});v.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(v,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,p(n.playerId,null,!0)})),r.dom.appendContent(h,v),r.dom.appendContent(t,h)}}}]),d}(),p=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=v,exports.playSelectedResolution=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=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-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=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-34b93767.js"),u=require("./loader-393b838a.js"),p=require("./icons-0f7b3404.js");function v(e){var i=h();return function(){var t,n=a(e);if(i){var s=a(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return r(this,t)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var f,m=c.getComponent("Component"),g=function(){s(r,m);var e=v(r);function r(t){var s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,r),s=e.call(this,t,a),o(n(s),"seriesData",[]),s.seriesData=a.seriesData,f=a.playerId,b(s.el(),s.seriesData),s.loadCSS(),s}return t(r,[{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)}))}}]),r}();function y(){return(y=e(l.mark((function e(i,t,n,s){var r;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.getToken();case 2:r=e.sent,d.pause(f),u.showLoader(f),d.load(f,t,r).then((function(e){d.setCurrentVideo(e.response),d.play(f)}));case 6: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 n=d.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=b,exports.handleSeasonChange=function(e,i,t,n){var s=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){}))}(n),s.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")}(s,r)}));for(var m=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),p[i].addEventListener("click",(function(){return function(e,i,t,n){return y.apply(this,arguments)}(i,f[i].id,t,u)})),e.episodes[i].id==h&&u[i].classList.add("highlight-active-eps")},g=0;g<c.length;g++)m(g)},exports.seriesModule=g;
|