@viewlift/player-backup 0.0.95 → 0.0.97
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-815419cb.js → autoNextVideo-823821e8.js} +1 -1
- package/cjs/{caption-settings-6e301004.js → caption-settings-06bd2f1b.js} +1 -1
- package/cjs/{features-fd1e9785.js → features-e9a6ddec.js} +1 -1
- package/cjs/generic-8b99b151.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-1afbf18c.js → keyboardShortcuts-cfd998c2.js} +1 -1
- package/cjs/{multicam-1647c428.js → multicam-21c9a90b.js} +1 -1
- package/cjs/{multicamv2-f48d95fe.js → multicamv2-b47a0ed5.js} +1 -1
- package/cjs/{mwebPotraitTray-a3a2715b.js → mwebPotraitTray-b9d5d45a.js} +1 -1
- package/cjs/{nextEpisodeButton-cc80609a.js → nextEpisodeButton-558689ab.js} +1 -1
- package/cjs/{playlist-a550a735.js → playlist-e915fac2.js} +1 -1
- package/cjs/{renditions-c3ea26e8.js → renditions-bc841552.js} +1 -1
- package/cjs/{resolution-51b38a3e.js → resolution-6a9adf54.js} +1 -1
- package/cjs/{series-6178964e.js → series-2524737b.js} +1 -1
- package/cjs/{series-v2-a265ff17.js → series-v2-479f2065.js} +1 -1
- package/cjs/{settings-icon-b350b587.js → settings-icon-2d81bbd2.js} +1 -1
- package/cjs/{skin-14da56f6.js → skin-10202485.js} +1 -1
- package/cjs/{skin-9eba464b.js → skin-5aec8aa9.js} +1 -1
- package/cjs/{skin-534810ae.js → skin-c0b074fe.js} +1 -1
- package/cjs/{skin-b703ef26.js → skin-ebd720d2.js} +1 -1
- package/cjs/{skin-286f52db.js → skin-f3b6ac00.js} +1 -1
- package/cjs/{util-ce8a4138.js → util-fa21734a.js} +1 -1
- package/cjs/{videoSelector-a4c00f50.js → videoSelector-f8f5120c.js} +1 -1
- package/esm/{autoNextVideo-89ede579.js → autoNextVideo-1672740e.js} +1 -1
- package/esm/{caption-settings-3f6b6163.js → caption-settings-dbd5f53e.js} +1 -1
- package/esm/{features-05101ce6.js → features-3482d3cd.js} +1 -1
- package/esm/generic-7c43020f.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-7fa108ec.js → keyboardShortcuts-c06f3c7b.js} +1 -1
- package/esm/{multicam-bc0aea8a.js → multicam-94da3759.js} +1 -1
- package/esm/{multicamv2-fb91fa98.js → multicamv2-ba47d7a2.js} +1 -1
- package/esm/{mwebPotraitTray-0ff12233.js → mwebPotraitTray-5ab39989.js} +1 -1
- package/esm/{nextEpisodeButton-ec95417f.js → nextEpisodeButton-99c1a28c.js} +1 -1
- package/esm/{playlist-5d3f4436.js → playlist-a58362ab.js} +1 -1
- package/esm/{renditions-0fdb57ed.js → renditions-97276745.js} +1 -1
- package/esm/{resolution-57e7767a.js → resolution-38cd4f5c.js} +1 -1
- package/esm/{series-998e2084.js → series-49346113.js} +1 -1
- package/esm/{series-v2-9bcd5d54.js → series-v2-3323ff23.js} +1 -1
- package/esm/{settings-icon-9bac9ef3.js → settings-icon-000f82ad.js} +1 -1
- package/esm/{skin-bb73c15b.js → skin-3ede6abf.js} +1 -1
- package/esm/{skin-851ea2fb.js → skin-42c2f81d.js} +1 -1
- package/esm/{skin-0aea7a56.js → skin-5b828942.js} +1 -1
- package/esm/{skin-80957fd8.js → skin-83472515.js} +1 -1
- package/esm/{skin-fba79111.js → skin-8b4f4e06.js} +1 -1
- package/esm/{util-9c9ee6b3.js → util-d9f5a7be.js} +1 -1
- package/esm/{videoSelector-8da87dd3.js → videoSelector-37c0086c.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-81b1be69.js +0 -1
- package/esm/generic-4a3c0d6b.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-51594f89.js"),c=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-51594f89.js"),c=require("./generic-8b99b151.js"),s=require("./renditions-bc841552.js"),d=require("./resolution-6a9adf54.js"),u=require("./skin-84083352.js");function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return i(this,n)}}require("@babel/runtime/helpers/defineProperty"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/assertThisInitialized");var m=o.getComponent("Component"),h=function(i){a(h,m);var r=p(h);function h(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(n=r.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l.SettingsSvgV2())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./settings-icon-e6a8feee.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.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(u.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"),o.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=o.dom.createEl("div",{className:"settings-selector-head"}),i=o.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var r=o.dom.createEl("div",{className:"settings-selector-title",innerHTML:"Settings"}),s=o.dom.createEl("div",{className:"settings-selector-content"}),d=o.dom.createEl("div",{className:"settings-container"}),u=this.createVideoQualityContainer();o.dom.appendContent(d,u);var p=this.createAudioQualityContainer();o.dom.appendContent(d,p),o.dom.appendContent(a,i),o.dom.appendContent(a,r),o.dom.appendContent(e,a),o.dom.appendContent(e,s),o.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:"createAudioQualityContainer",value:function(){var e=c.getPlayer(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=o.dom.createEl("div",{className:"audio-language-container"}),a=o.dom.createEl("div",{className:"audio-language-container-title",innerHTML:"Audio Language"});o.dom.appendContent(n,a);for(var i=function(e){var a=document.createElement("label");a.className="audio-language-holder",a.setAttribute("for","language-radio-".concat(e));var i=document.createElement("div");i.className="audio - ".concat(e),i.innerHTML=t[e].label;var r=o.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});r.setAttribute("type","radio"),1==t[e].enabled&&(r.checked=!0),r.onchange=function(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},o.dom.appendContent(a,r),o.dom.appendContent(a,i),o.dom.appendContent(n,a)},r=0;r<t.length;r++)i(r);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=o.dom.createEl("div",{className:"video-quality-container"}),a=o.dom.createEl("div",{className:"video-quality-container-title",innerHTML:"Video Quality"});o.dom.appendContent(n,a);var i=[].concat(e(s.getRenditions(this.playerId)),[{height:"Auto"}]);d.playSelectedResolution(this.playerId,"raw",!0);for(var r=function(e){var a=document.createElement("label");a.className="video-quality-holder",a.setAttribute("for","quality".concat(e));var r=document.createElement("div");r.className="video-quality - ".concat(e),r.innerHTML=i[e].height+"".concat("Auto"==i[e].height?"":"p")+"".concat(i[e].height>=720?"<span class='hd-rendition'> HD</span>":"");var l=o.dom.createEl("input",{className:"radio - ".concat(e),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});l.setAttribute("type","radio"),l.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?d.playSelectedResolution(t.playerId,a,!0):d.playSelectedResolution(t.playerId,a)},o.dom.appendContent(a,l),o.dom.appendContent(a,r),o.dom.appendContent(n,a)},l=0;l<i.length;l++)r(l);return n}}]),h}();exports.default=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-8b99b151.js"),r=require("./renditions-bc841552.js"),i=require("./features-e9a6ddec.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),exports.initialiseSkin=function(t,n){Promise.resolve().then((function(){return require("./skin-f225a42e.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e.getPlayer(t).on("loadeddata",(function(){var e;(null===(e=r.getRenditions(t))||void 0===e?void 0:e.length)>0&&i.addSettingsButtonV2(t,n)}))}(t,n)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=require("./features-
|
|
1
|
+
"use strict";var e,t=require("./features-e9a6ddec.js"),n=require("./icons-51594f89.js"),r=require("./generic-8b99b151.js"),s=require("./skin-84083352.js"),o=require("@babel/runtime/helpers/defineProperty"),i=require("./keyboardShortcuts-cfd998c2.js");function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e,i){var a=r.getPlayer(e);a.one("play",(function(){null!=i&&i.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},i)),null!=i&&i.airplay&&"Safari"==r.detectBrowser()&&a.addChild("airPlayButton"),null!=i&&i.chromecastReceiverId&&a.addChild("chromecastButton"),a.addChild("FullscreenToggle"),a.getChild("FullscreenToggle").el().appendChild(s.createIconMarkup(n.MinimizeSvg(window.controlsColor))),a.getChild("FullscreenToggle").el().appendChild(s.createIconMarkup(n.MaximizeSvg(window.controlsColor))),u(e)})),a.on("loadedmetadata",(function(){"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",n.SettingsSvg())})),a.one("loadedmetadata",(function(){var n;null!=i&&i.streams&&(null==i||null===(n=i.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,i)}))}function u(t){var n=r.getPlayer(t);d(),n.on("pause",(function(){clearTimeout(e),c()})),n.on("play",(function(){d()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){c(),n.paused()||d()})),s.addEventListener("touchstart",(function(){c(),d()})),s.addEventListener("mousemove",(function(){c(),n.paused()||d()}))}function c(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function d(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-bc841552.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.hideControls=u,exports.initialiseSkin=function(e,o){var l;i.initialiseKeyboardEvents(e,o),(null==(l=o)||!l.liveui)&&(null==l||!l.liveVideo)||null!=l&&l.liveui&&null!=l&&l.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.js")})).then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,n){t.addSlowMotion(e)}(e),function(e,t){var o=r.getPlayer(e),i=o.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(s.createIconMarkup(n.NewCaptionsSvg()));var l=document.createElement("div");l.classList.add("caption-header"),i.querySelector(".vjs-menu-content").insertBefore(l,i.querySelector(".vjs-menu-item"));var a=document.createElement("div");if(a.innerText="Captions",a.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(a),"Safari"==r.detectBrowser()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,o),a(e,o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-8b99b151.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(t){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-e9a6ddec.js"),r=require("./keyboardShortcuts-cfd998c2.js"),t=require("./icons-51594f89.js"),i=require("./generic-8b99b151.js"),n=require("./skin-84083352.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-bc841552.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(s,o){r.initialiseKeyboardEvents(s,o),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,i){0==i.liveVideo&&0==i.liveui&&e.addSkipButton(r,"default",t.SkipSvg());(0==i.liveVideo&&0==i.liveui||1==i.liveui)&&e.addRewindButton(r,"default",t.RewindSvg())}(s,o),function(r,n){var s=i.getPlayer(r),o=(null==n?void 0:n.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",t.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-558689ab.js")})).then((function(e){e.initaliseFunctionality(n.sres.seasons,i.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var t;o&&(e.addSeriesModule(r,null==n||null===(t=n.sres)||void 0===t?void 0:t.seasons,n),e.addNextEpisodeButton(n.sres,n.res,r))}))}(s,o),function(e,r){var s=i.getPlayer(e),o=document.getElementsByClassName("vjs-current-time")[0],l=document.getElementsByClassName("vjs-duration")[0],a=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(o&&(o.style.display="none"),l&&(l.style.display="none"),a&&(a.style.display="none"));s.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),s.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var u=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(t.NewCaptionsSvg()));var d=document.createElement("div");d.classList.add("caption-header"),u.querySelector(".vjs-menu-content").insertBefore(d,u.querySelector(".vjs-menu-item"))}(s,o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-e9a6ddec.js"),i=require("./icons-51594f89.js"),l=require("./generic-8b99b151.js"),n=require("./skin-84083352.js"),t=require("./renditions-bc841552.js"),o=require("@babel/runtime/helpers/toConsumableArray"),r=require("./autoNextVideo-823821e8.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-fa21734a.js");var d=l.getCurrentSeries(),a=[];null==d||d.map((function(e){return a.push.apply(a,o(e.episodes))}));var u=function(e,i){var n;null==i||null===(n=i.series)||void 0===n||n.cb;var t=l.getPlayer(e);t.on("timeupdate",(function(){var e,i=Math.floor(t.currentTime()),n=t.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];n-i<=10&&l.getVideoIdx()<=(null==a?void 0:a.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=a.filter((function(e,i){return i==l.getVideoIdx()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var d,u,v,c,m,p,g,h,f,y,b;(null===(d=document.getElementsByClassName("next-ep-preview"))||void 0===d?void 0:d[0]).style.visibility="hidden";var x=null===(u=document.getElementsByClassName("next-ep-title"))||void 0===u?void 0:u[0],C=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],q=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],j=null===(m=r[0])||void 0===m?void 0:m.title;(null===(p=j)||void 0===p?void 0:p.length)>60&&(j=j.substr(0,60)+"..."),x.innerHTML="".concat(j),C.src=(null===(g=r[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(b=y.customData)||void 0===b?void 0:b.fallbackImage),q.onclick=function(){return s(e)}}else{var E,N,V,w,S,B,k,M=document.createElement("div");M.className="next-ep-preview",M.style.visibility="hidden",document.getElementById(e).append(M);var P=document.createElement("div");P.className="next-ep-header",P.innerHTML="Next up";var I=null===(E=r[0])||void 0===E?void 0:E.title,T=document.createElement("img");T.className="next-ep-img",T.src=(null===(N=r[0])||void 0===N||null===(V=N.gist)||void 0===V||null===(w=V.imageGist)||void 0===w?void 0:w.r16x9)||(null===(S=window)||void 0===S||null===(B=S.customData)||void 0===B?void 0:B.fallbackImage);var L=document.createElement("div");L.className="next-ep-title",(null===(k=I)||void 0===k?void 0:k.length)>60&&(I=I.substr(0,60)+"..."),L.innerHTML="".concat(I);var R=document.createElement("div");R.className="next-ep-content",R.append(T),R.append(L),R.onclick=function(){return s(e)},M.append(P),M.append(R)}},s=function(e,i){var n=l.getPlayer(e),t=Math.floor(n.currentTime());if(Math.floor(n.duration())!=t){n.pause(e);var o=l.getVideoIdx();r.switchToNext(o,e,a,sessionStorage.getItem("token"))}};function v(i,n){var o=l.getPlayer(i);o.on("loadeddata",(function(){var r,d,a,s,v,c,m;(null===(r=t.getRenditions(i))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(i,n),(null===(d=l.getCaptions(i))||void 0===d?void 0:d.length)>0&&e.addCaptionButton(i,n),null!=n&&null!==(a=n.series)&&void 0!==a&&a.enable&&u(i,n),s=o.duration(),c=Math.floor(s/60),(m=null===(v=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===v?void 0:v[0])&&(m.style.marginRight=c>60?"56px":"41px")}))}exports.initialiseSkin=function(t,o){Promise.resolve().then((function(){return require("./skin-638aecc2.js")})).then((function(e){var i=document.createElement("style");i.id="default_v2",i.append("".concat(e.default)),document.head.appendChild(i)})),v(t,o),function(e,t){var o=l.getPlayer(e);o.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),o.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var r=document.getElementsByClassName("vjs-time-control");t.liveVideo&&(r[0].style.display="none")}(t,o),function(l,n){var t,o,r,d,a,u;0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(l,"defaultV2",i.SkipSvgV2());(0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(l,"defaultV2",i.RewindSvgV2());n.liveVideo||e.addSlowMotion(l);(null==n||null===(t=n.relatedVideos)||void 0===t||null===(o=t.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector(l,null==n?void 0:n.relatedVideos);(null==n||null===(r=n.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector(l,null==n?void 0:n.streams);(null==n||null===(d=n.playlist)||void 0===d||null===(a=d.content)||void 0===a?void 0:a.length)>0&&e.addPlaylistSelector(l,null==n?void 0:n.playlist);null!=n&&null!==(u=n.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(l,n)}(t,o),function(e,i){var n=l.getPlayer(e),t=null==i?void 0:i.tvProviderLogoUrl;if(!t)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(t),r.alt="Provider Image",o.append(r),n.el().appendChild(o),n.on("useractive",(function(){o.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||o.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(t,o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./generic-
|
|
1
|
+
"use strict";var t=require("./generic-8b99b151.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-51594f89.js"),l=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-51594f89.js"),l=require("./generic-8b99b151.js"),c=require("./skin-84083352.js"),s=require("./autoNextVideo-823821e8.js");function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}require("@babel/runtime/helpers/defineProperty"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-fa21734a.js");var u=r.getComponent("Component"),m=function(o){n(m,u);var i=d(m);function m(t){var n,o,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&s.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb}),r}return t(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.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 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:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),d=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),m=function(e){var n,o=r.dom.createEl("div",{className:"video -".concat(e)}),i=r.dom.createEl("div",{className:"recommended -".concat(e)});i.setAttribute("video-idx",e),i.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";c.highlightVideo(e),l.load(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var a=document.createElement("img");a.className="related-thumbnail-image",a.src="".concat(t.videos[e].img),a.alt="No Thumbnail Available",i.append(a);var s=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(n=t.videos[e])||void 0===n?void 0:n.title)||"")});r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(u,o),r.dom.appendContent(d,u)},v=0;v<this.videos.length;v++)m(v);r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(e,o),r.dom.appendContent(e,d),l.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")}))}}]),m}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as n,o as t,b as o,I as e,H as i,J as a}from"./generic-
|
|
1
|
+
import{g as n,o as t,b as o,I as e,H as i,J as a}from"./generic-7c43020f.js";import{a as s}from"./util-d9f5a7be.js";import{h as c}from"./skin-665ec17e.js";var r,u=0,f=0,l=function(l){clearTimeout(u);var v=null==l?void 0:l.content;r=null==l?void 0:l.cb;var d=l.playerId,g=sessionStorage.getItem("token");s(d,(function(){var s=n(d);0!==(null==s?void 0:s.currentTime())&&((f=i())>v.length-1||t(d,v[f].id,g).then((function(n){c(f),o(n.response),f++,a(f),h(n)})).catch((function(n){h(n),c(f),f++,a(f),u=setTimeout((function(){e(d)&&m(f,d,v,g)}),5e3)})))}))},m=function n(o,e,i,s,r){f=o,o>i.length-1||t(e,i[o].id,s).then((function(n){c(f),f++,a(f),h(n)})).catch((function(t){h(t),setTimeout((function(){c(f),f++,a(f),n(f,e,i,s)}),5e3)}))},h=function(n){r&&r(n)};export{l as a,m as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/typeof";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as c,e as l}from"./icons-f5378bf3.js";import{v as s,u as d,g as p,t as m}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/typeof";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as c,e as l}from"./icons-f5378bf3.js";import{v as s,u as d,g as p,t as m}from"./generic-7c43020f.js";import{a as u}from"./skin-665ec17e.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=r(e);if(t){var i=r(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return o(this,n)}}var v=i.getComponent("Component"),h=function(o){a(h,v);var r=f(h);function h(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(n=r.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return n(h,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(c())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-2e47813b.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=s(this.playerId);null==t||t.map((function(t){return d(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var e;null!==(e=a.classList)&&void 0!==e&&e.contains("hidden")?(u(),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").slice(0,-2);a.style.height="".concat(o,"px"),i.dom.appendContent(n,a),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(a)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=i.dom.createEl("div",{className:"caption-selector-head"}),o=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(l())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var r=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d);var m=this.createFontSizeContainer();i.dom.appendContent(s,m),i.dom.appendContent(a,o),i.dom.appendContent(a,r),i.dom.appendContent(e,a),i.dom.appendContent(e,c),i.dom.appendContent(c,s),p(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 t=this,n=i.dom.createEl("div",{className:"caption-language-container"}),a=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(n,a);var o=document.createElement("label");o.setAttribute("for","radio-off"),o.className="caption-language-holder";var r=document.createElement("div");r.className="caption",r.innerHTML="Off";var c=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});c.setAttribute("type","radio"),c.onchange=function(e){s(t.playerId).map((function(e){return d(t.playerId,e.id)}))},i.dom.appendContent(o,c),i.dom.appendContent(o,r),i.dom.appendContent(n,o);for(var l=s(this.playerId),p=function(e){var a=document.createElement("label");a.className="caption-language-holder",a.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="caption - ".concat(e),o.innerHTML=l[e].label;var r=i.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"language-radio"});return r.onchange=function(n){m(t.playerId,l[e].id)},r.setAttribute("type","radio"),i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(n,a),{v:n}},u=0;u<l.length;u++){var f=p(u);if("object"===e(f))return f.v}}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o=document.createElement("label");o.className="caption-font-holder",o.setAttribute("for","font".concat(a));var r=document.createElement("div");r.className="fontsize - ".concat(a),r.innerHTML=n[a].size+"pt";var c=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});c.setAttribute("type","radio"),c.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(o,c),i.dom.appendContent(o,r),i.dom.appendContent(e,o)}return e}}]),h}();export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{g as a,r as s,j as c}from"./generic-
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{g as a,r as s,j as c}from"./generic-7c43020f.js";import{g as d}from"./renditions-97276745.js";function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}var p=function(t){var o=function(t){r(i,t);var o=m(i);function i(t,n){var r;e(this,i);var l=(r=o.call(this,t,n)).el_;return l.classList.add("vjs-slowmo-button"),l.innerHTML="Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(t);l.getChild("controlBar").addChild("myButton",{},2)},h=function(t,o,l){var a=function(o){r(a,o);var i=m(a);function a(t,n){var r;e(this,a);var o=(r=i.call(this,t,n)).el_;return o.classList.add("vjs-rewind-button"),o.innerHTML=l,r}return n(a,[{key:"handleClick",value:function(){s(t,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(t).getChild("controlBar").addChild("myButton",{},1)},f=function(t,o,l){var a=function(o){r(a,o);var i=m(a);function a(t,n){var r;e(this,a);var o=(r=i.call(this,t,n)).el_;return o.classList.add("vjs-skip-button"),o.innerHTML=l,r}return n(a,[{key:"handleClick",value:function(){c(t,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(t).getChild("controlBar").addChild("myButton",{},1)},g=function(t,e){import("./multicam-94da3759.js").then((function(n){var r=n.default,o=e.streams,l=a(t);i.registerComponent("multicamModule",r),l.getChild("controlBar").addChild("multicamModule",{playerId:t,streams:o,config:e},l.controlBar.children().length)}));var n=document.querySelector(".vjs-control-bar");n&&"live"==(null==e?void 0:e.skin)&&(n.style.background="transparent")},v=function(t,e,n){import("./resolution-38cd4f5c.js").then((function(r){var o=r.default;document.getElementById(t).getElementsByClassName("container")[0]&&document.getElementById(t).getElementsByClassName("container")[0].remove();var l=a(t),s=d(t);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:t,skin:e,icon:n,renditions:s},l.controlBar.children().length-4))}))},y=function(t,e,n){import("./nextEpisodeButton-99c1a28c.js").then((function(r){var o=r.default,l=a(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:t,res:e},l.controlBar.children().length-5)}))},C=function(t,e){import("./mwebPotraitTray-5ab39989.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("mwebPotraitTray",r),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:t,config:e},0)}))},B=function(t,e,n){import("./series-49346113.js").then((function(r){var o=r.seriesModule,l=a(t);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:t,seriesData:e},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(t){s[t].addEventListener("click",(function(){e[t]&&r.handleSeasonChange(e[t],t,l,n)}))},d=0;d<s.length;d++)c(d)}))},b=function(t,e){import("./videoSelector-37c0086c.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:t,related:e},o.controlBar.children().length-3)}))},j=function(t,e){import("./caption-settings-dbd5f53e.js").then((function(n){var r,o,l,s,c=n.default,d=a(t);i.registerComponent("captionSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(t))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("captionSelector",{playerId:t,options:e},d.controlBar.children().length-3)}))},k=function(t,e){import("./settings-icon-000f82ad.js").then((function(n){var r,o,l,s,c=n.default,d=a(t);i.registerComponent("settingsSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(t))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("settingsSelector",{playerId:t,options:e},d.controlBar.children().length-3)}))},O=function(t,e){import("./playlist-a58362ab.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:t,playlist:e},o.controlBar.children().length-3)}))},S=function(e,n){import("./series-v2-3323ff23.js").then((function(r){var o=r.default,l=a(e);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?u(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({playerId:e},n),l.controlBar.children().length-3)}))},M=function(t,e){import("./multicamv2-ba47d7a2.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:t,streams:e},o.controlBar.children().length-4)}))};export{g as a,v as b,C as c,p as d,B as e,y as f,f as g,h,k as i,j,b as k,M as l,O as m,S as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"video.js";import n from"axios";import"js-cookie";import o from"ua-parser-js";var i={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"};function r(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 a(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var l=function(e,t){var o,i;return n({url:E(),params:a({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:t},withCredentials:!0})},d=function(e,t){var o,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.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})})):n({url:T()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},s=function(e,t,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return n({url:g(),method:"POST",headers:{Authorization:t,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r=a({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return n({url:f(),method:"POST",headers:{Authorization:t},data:r,params:a({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},u=function(e,t){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return n({method:"GET",url:I(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return n({method:"GET",url:p(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}})}},c=function(e){var t,o;if("v1"==((null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return n({method:"GET",url:m(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return n({method:"GET",url:v(i),headers:{Authorization:e.token}})},v=function(e){return T()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV2,"/").concat(e)},m=function(){return T()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV1)},I=function(e){return T()+"".concat(null==i?void 0:i.getVideoInfoV1,"/").concat(e)},p=function(e,t){return T()+"".concat(null==i?void 0:i.getVideoInfoV2,"/").concat(t,"/").concat(e)},g=function(){return T()+"".concat(null==i?void 0:i.saveWatchHistoryV1)},f=function(){return T()+"".concat(null==i?void 0:i.saveWatchHistoryV2)},E=function(){return T()+"".concat(null==i?void 0:i.getVideoDetails)},T=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==i?void 0:i.apiBaseUrl)},y=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},w=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var 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)}},O=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var h=function(){var e,t,n,o;return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.onlyPlayReadyDRM||navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(n=window.navigator)||void 0===n||null===(o=n.userAgentData)||void 0===o?void 0:o.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function _(e,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 D(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?_(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=o(navigator.userAgent);var b=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},S=function(e){var t=V(e,"video.tags",[]),n=V(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},V=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},L=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},W=function(){var e,t,n,o,i,r,a,l,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,I=arguments.length>2?arguments[2]:void 0,p=null==I||null===(e=I.video)||void 0===e?void 0:e.metadata,g=me(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),T=Math.trunc(f.getPropertyValue("width").slice(0,-2)),y=V(I,"video.gist.id",""),w=D(D({},C(p)),{},{VIEWLIFT_WIDTH:T,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:b(T,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:V(I,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:V(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:V(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==g||null===(n=g.options_)||void 0===n?void 0:n.autoplay)||1,VIEWLIFT_MUTE:(null==g||null===(o=g.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:S(I),VIEWLIFT_MEDIA_ID:y,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(V(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:y,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+V(I,"video.gist.permalink","")),VIEWLIFT_COPPA:V(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(a=r.site)||void 0===a?void 0:a.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:V(null===(l=window)||void 0===l||null===(d=l.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*V(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:V(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:y,VIEWLIFT_CONTENT_TITLE:V(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:V(I,"video.series[0].gist.title",V(I,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:V(I,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:V(I,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:V(I,"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 O in w){var h=new RegExp("\\b("+O+")\\b","g");v=v.replace(h,w[O])}return v},C=function(e){var t,n,o,i,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var 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===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||u?(L()?s?l=D(D({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=D(D({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=D(D({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=D(D({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=D(D({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=D(D({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=L()?D(D({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):D(D({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=D(D({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=L()?D(D({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):D(D({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""})),l};function P(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 A(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?P(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):P(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var F,R,N,j,k,U=function(e,t){var n,o,i,r,a,l,d,s,u,c,v,m=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,I=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,p=(null==e||null===(r=e.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(l=a.videoAssets)||void 0===l?void 0:l.hls)||!1,g=(null==e||null===(d=e.video)||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||!1,f=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;if(m){var E=H(I,t);return E.src=W(E.src,t,e),f&&(E=A(A({},E),{},{src:x(A(A({},e.video),{},{src:"".concat(E.src)}))})),E}if("Safari"!==h()&&g)return B(I);if(p){var T=M(I);return T.src=W(T.src,t,e),f&&(T=A(A({},T),{},{src:x(A(A({},e.video),{},{src:"".concat(T.src)}))})),T}if(null!=I&&I.mpeg){var y=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return y.src=W(y.src,t,e),y}return null},B=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},x=function(e){var t=e.src;if(e.liveDetails.startOverTime){var n=e.liveDetails.startOverTime,o=e.gist.scheduleStartDate,i=e.gist.scheduleEndDate,r=new Date,a=0,l=r.getTime();a=l-o<1e3*n?l-o:1e3*n;var d=null;i<=l&&null!=i&&(d=new Date(i)),r.setMilliseconds(r.getMilliseconds()-a),t=t.includes("?")?i&&d?"".concat(e.src,"&start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"&start=").concat(r.toISOString()):i&&d?"".concat(e.src,"?start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"?start=").concat(r.toISOString())}return t},M=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},H=function(e,n){var o=e.fairPlay,i=e.widevine,r=e.playReady,a=h(),l=me(n);if("Safari"===a){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 a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};t.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(o);try{l.eme()}catch(e){}return d}if("Chrome"===a||"Firefox"===a){var s={src:i.url,type:"application/dash+xml",keySystemOptions:[]};return s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s}if("IE"===a){var u={src:r.url,type:"application/dash+xml",keySystemOptions:[]};return 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 z=function(e){R=e},G=function(){return R},Y=function(e){F=e},J=function(){return F},K=function(){return N},q=function(e){N=e},X=function(e){k=e},Z=function(){return k},Q=function(e){j=new Map,e.map((function(e,t){j.set(e.id,t)}))},$=function(e){if(j){var t=j.get(e);q(t+1)}},ee=function(e,t){for(var n=me(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id==t&&(i.mode="showing")}},te=function(e,t){for(var n=me(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id===t&&(i.mode="hidden")}},ne=function(e){var t,n=me(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},oe=function(e,t){var n=me(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ie=!1,re=function(e,t,n){var o=W(t,e,n),i=me(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=me(e);if(null!==r.el_){ie=!0;var a={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(),ie&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",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 ae(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 le=function(e){t(e).play()},de=function(e){t(e).pause()},se=function(e,n){var o=t(e),i=o.currentTime()+n;o.currentTime(i)},ue=function(e,n){var o=t(e),i=o.currentTime(),r=i<=n?0:i-n;o.currentTime(r)},ce=function(e){return!!t.getPlayer("".concat(e))},ve=function(e){return t(e).paused()},me=function(e){return!!t.getPlayer("".concat(e))&&t.getPlayer("".concat(e))},Ie=function(e,t,n){var o,i,r;$(t);var a=0,d=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&&u(t,n).then((function(e){var t,n,o,i,r,l;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)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,d=(null==e||null===(l=e.data)||void 0===l?void 0:l.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){l(t,n).then((function(t){var n,r,l,s,u,c,v,m,I,p,g=null==t?void 0:t.data,f=(null==g||null===(n=g.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;z(t.data);var E=(null==g||null===(l=g.ads)||void 0===l||null===(s=l.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(I=m.adTags)||void 0===I||null===(p=I.web)||void 0===p?void 0:p.url);E&&re(e,E,g);var T=U(g,e);if(T){var y,h,_,D,b,S,V,L,W,C,P,A=null==g||null===(y=g.video)||void 0===y||null===(h=y.gist)||void 0===h?void 0:h.videoImageUrl,F=me(e);if(F.poster(A),Ee(e,T),F.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:g})})),F.on("loadeddata",(function(){O(),o({status:!0,msg:"Video Loaded",response:g})})),F.one("play",(function(){a&&d<95&&setTimeout((function(){F.currentTime(a)}),0)})),F.one("error",(function(){var e;i({status:!1,msg:(null==F||null===(e=F.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(_=g.video)||void 0===_||null===(D=_.contentDetails)||void 0===D||null===(b=D.closedCaptions)||void 0===b?void 0:b.length)>0||(null==g||null===(S=g.video)||void 0===S||null===(V=S.closedCaptions)||void 0===V?void 0:V.length)>0)L=((null==g||null===(W=g.video)||void 0===W||null===(C=W.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==g||null===(P=g.video)||void 0===P?void 0:P.closedCaptions)).filter((function(e){return"VTT"===e.format})),oe(e,L);else!function(e){var t=me(e);t.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else w(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(n){Te(n,e,i,t)}))}))},pe=function(e,t,n){var o=me(e);return o.src(t),new Promise((function(e,t){var i=0;o.on("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.on("loadstart",(function(e){i=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},ge=function(e){var t=me(e);if(fe(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},fe=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove()},Ee=function(e,t){me(e).src(t)},Te=function(t,n,o,i){var r,a,l,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);ce(n)&&w(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?ae(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ae(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}))},ye=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")};export{l as A,Te as B,u as C,re as D,oe as E,Y as F,J as G,K as H,ve as I,q as J,Q as K,$ as L,G as a,z as b,O as c,h as d,Z as e,c as f,me as g,w as h,X as i,se as j,de as k,pe as l,Ee as m,ce as n,Ie as o,le as p,ge as q,ue as r,s,ee as t,te as u,ne as v,U as w,ye as x,y,d as z};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/regenerator";import n from"video.js";import{d as i,g as r,s as l,c as a,h as s,a as u,b as d,e as c,f as v,i as m,l as p,j as f,p as w,k as y,r as h,m as g,n as b,o as k,q as O,t as j,u as P,v as I,w as T,x as S,y as C,z as D,A as E,B as x,C as R,D as V,E as A,F as B}from"./generic-4a3c0d6b.js";import{o as L,g as H,a as _,s as M,b as N}from"./util-9c9ee6b3.js";import{g as q}from"./renditions-0fdb57ed.js";import{playSelectedResolution as U}from"./resolution-57e7767a.js";import{i as z}from"./skin-665ec17e.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function F(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}var K,X,G=function(e,o){var t=r(e);t&&o&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(o){var t,i,r,l,a,s=this.el(),u=n.dom.getPointerPosition(s,o).x;n.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(r=i.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*u,v.seek()}}))};function W(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}var Q=[],Y=0,Z=null;function $(e,t,n){var i,r,a,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];X=(null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var u=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.profileId,d=Math.floor(e.currentTime()),c=Math.floor(e.duration()),v=null==t||null===(a=t.watchHistory)||void 0===a?void 0:a.xapiKey,m={};"v1"==X?m={videoId:K,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/c*100),siteOwner:t.siteOwner,userId:t.userId,xApiKey:v}:"v2"==X&&(m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}({videoId:K,watchedTime:Math.floor(e.currentTime()),watchedPercentage:s?100:Math.floor(d/c*100),doneWatching:s,profileId:u},Z&&{seriesId:Z})),l(m,t.token,X).then((function(e){})).catch((function(e){})),Y=d+n}var ee=function(e,o,t){var n=r(e);if(n)if(o>=0&&o<=100){n.muted()&&n.muted(!1);var i=parseFloat(o)/100;n.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(o,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},oe=function(e){var o=r(e);return o?parseInt(100*o.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function te(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}var ne=function(e,t,n,i){var l,v,m=i.res,p=i.sres,f=r(e),w=(null==m||null===(l=m.video)||void 0===l||null===(v=l.streamingInfo)||void 0===v?void 0:v.isLiveStream)||!1;d(m),f.on("loadstart",(function(){w&&n.resolve({status:!0,msg:"Video Loaded",response:m})})),f.on("loadeddata",(function(){var i;(null==f||!f.muted())&&ee(e,sessionStorage.getItem("volume")||"100");var l,s,d=u();(a(),n.resolve(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:m}:{response:m})),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&!t.isAnonymousUser)&&function(e,o,t){var n,i;null!=o&&o.series&&(Z=null==o||null===(n=o.series)||void 0===n?void 0:n.id),Q=[],Y=0,K=t;var l=(null==o||null===(i=o.watchHistory)||void 0===i?void 0:i.interval)||30,a=r(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());Q.includes(Y)||(e==Y?(Q.push(e),$(a,o,l)):e>Y&&(Y=e+l))})),a.on("ended",(function(){$(a,o,l,!0)})))}(e,t,null==d||null===(l=d.video)||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.id)})),f.textTracks().on("change",(function(e){var o=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];f.trigger("subtitlechanged",o)})),f.on("subtitlechanged",(function(e,o){var t,n,i,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(n=t.cast)||void 0===n||null===(i=n.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,w=p.getMediaSession(),y=w.media.tracks.filter((function(e){return"TEXT"==e.type}));f=o?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(f)}})),f.on("loadedmetadata",(function(){})),f.one("error",(function(){var o,t;s(e,(null==f||null===(o=f.error())||void 0===o?void 0:o.message)||"Some error occured"),n.reject({status:!1,msg:(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"})})),f.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var o,n,i,r=null===(o=u())||void 0===o||null===(n=o.video)||void 0===n||null===(i=n.gist)||void 0===i?void 0:i.id,l=c().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){f.currentTime(a)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&f.currentTime(null==t?void 0:t.watchHistoryResumeTime)})),f.on("volumechange",(function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},ie=function(e,o){var t=null==o?void 0:o.skin;"live"==t?import("./skin-fba79111.js").then((function(t){t.initialiseSkin(e,o)})):"default"==t?import("./skin-bb73c15b.js").then((function(t){t.initialiseSkin(e,o)})):"carousel"==t?import("./skin-851ea2fb.js").then((function(o){o.initaliseSkin(e)})):"defaultV2"==t?import("./skin-80957fd8.js").then((function(t){t.initialiseSkin(e,o)})):"multiplayer"==t&&import("./skin-0aea7a56.js").then((function(t){t.initialiseSkin(e,o)}))},re=function(e){return new Promise((function(o,t){if(le(e))t("".concat(e," is alread initialised"));else{var n=document.createElement("script");n.async=!1,n.src=e,document.head.appendChild(n),o()}}))},le=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};function ae(){var e,o;null===(e=window)||void 0===e||null===(o=e.dataLayer)||void 0===o||o.push(arguments)}var se=function(e,o){o.controlBar.el_.style.color=e,o.controlBar.el_.querySelector(".vjs-play-progress")&&(o.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),o.controlBar.el_.querySelector(".vjs-volume-level")&&(o.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var ue,de=function(){var o=e(t.mark((function e(){return t.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 o.apply(this,arguments)}}(),ce=function(){var o=e(t.mark((function e(){return t.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 o.apply(this,arguments)}}(),ve=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){re("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(n)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(n)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),re("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:de,loadEMELibrary:ce});function me(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}var fe=function(l,a,u,d){var c,v,m,p,f,w,y,h,b,k,O,j,P,I,C,D,E,x,R,B,L,H,_,M=a.res,N=void 0===M?null:M,q=a.sres,U=void 0===q?null:q,z=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(p=m.CastContext)||void 0===p||null===(f=p.getInstance())||void 0===f?void 0:f.S)||void 0,F=null!=u&&u.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==z&&"NOT_CONNECTED"!==z?["html5","chromecast"]:["chromecast","html5"]:["html5"],K=null==N||null===(w=N.video)||void 0===w||null===(y=w.gist)||void 0===y?void 0:y.videoImageUrl,X=(null==N||null===(h=N.video)||void 0===h||null===(b=h.liveDetails)||void 0===b?void 0:b.isDvrEnabled)||!1,W=function(e){var o,t={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(o=window)&&void 0!==o&&o.cast&&(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"==i()&&(t=J(J({},t),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-6}})),t}(u),Q=(null==N||null===(k=N.video)||void 0===k||null===(O=k.streamingInfo)||void 0===O?void 0:O.isLiveStream)||!1,Y=(null==u?void 0:u.drmLibrary)||!1,Z=(null==N||null===(j=N.ads)||void 0===j||null===(P=j.preRoll)||void 0===P||null===(I=P.adTags)||void 0===I||null===(C=I.web)||void 0===C?void 0:C.active)&&(null==N||null===(D=N.ads)||void 0===D||null===(E=D.preRoll)||void 0===E||null===(x=E.adTags)||void 0===x||null===(R=x.web)||void 0===R?void 0:R.url),$=(_={controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:("default"==u.skin||"defaultV2"==u.skin||"live"==(null==u?void 0:u.skin))&&{inline:!1},fullscreenToggle:"default"==u.skin||"defaultV2"==u.skin,audioTrackButton:!1,pictureInPictureToggle:(u.skin,!1)},muteToggle:"multiplayer"==u.skin,liveui:X},o(_,"autoplay",null==u?void 0:u.autoplay),o(_,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!Z),o(_,"loop",(null==u?void 0:u.loop)||!1),o(_,"html5",pe(pe({vhs:pe(pe({experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==u||null===(B=u.customData)||void 0===B?void 0:B.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==u?void 0:u.enableLowInitialPlaylist)||!1})},0==(null==u||null===(L=u.customData)||void 0===L?void 0:L.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(H=u.customData)||void 0===H?void 0:H.nativeVideoTracks)&&{nativeVideoTracks:!1})),o(_,"poster",K),o(_,"techOrder",F),o(_,"chromecast",{requestCustomDataFn:function(e){var o=r(l);console.log(o.textTracksJson_);var t=o.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,o,t){var n,i,r,l,a,s,u,d,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var p=o.keySystemOptions&&o.keySystemOptions[0]&&o.keySystemOptions[0].options&&o.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var f=o.keySystemOptions&&o.keySystemOptions[0]&&o.keySystemOptions[0].options&&o.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=f}var w=(null==e||null===(n=e.video)||void 0===n||null===(i=n.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=w;var y=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=y;var h=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=h;var g=null==e||null===(u=e.video)||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return m.mediaImage=g,m.subTitles=t,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}(N,e,t)}}),o(_,"plugins",W),_),ee=n(l,$,function(){var o=e(t.mark((function e(){var o,r,a,c,v,m,p,f,w,y,h,b,k,O,j,P,I;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Q&&d.resolve(pe({status:!0,msg:"Player Initialised"},U?{seriesResponse:U,response:N}:{response:N})),"white"!==window.controlsColor&&se(window.controlsColor,ee),/Android/i.test(navigator.userAgent)&&(n.options.vhs.overrideNative=!0),y=null==N||null===(o=N.video)||void 0===o?void 0:o.drmEnabled,h=null==N||null===(r=N.video)||void 0===r||null===(a=r.liveDetails)||void 0===a?void 0:a.startOverTime,!y&&!Y){e.next=13;break}if("Safari"!==i()){e.next=11;break}return e.next=9,ce();case 9:e.next=13;break;case 11:return e.next=13,Promise.all([ce(),de()]);case 13:X&&G(l,h),!Z||null!=u&&null!==(c=u.customData)&&void 0!==c&&c.disableAds||V(l,Z,N),b=T(N,l),"IN"==u.countryCode&&(n.Vhs.xhr.beforeRequest=function(e){e.uri=e.uri.replace("us-e","a-m")}),b?g(l,b):(d.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:N}),s(l,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==N||null===(v=N.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(p=m.closedCaptions)||void 0===p?void 0:p.length)>0||(null==N||null===(f=N.video)||void 0===f||null===(w=f.closedCaptions)||void 0===w?void 0:w.length)>0)&&(I=(null==N||null===(O=N.video)||void 0===O||null===(j=O.contentDetails)||void 0===j?void 0:j.closedCaptions)||(null==N||null===(P=N.video)||void 0===P?void 0:P.closedCaptions),k=I.filter((function(e){return"VTT"===e.format})),A(l,k)),null!=u&&u.disableControls?S(l):ie(l,pe(pe(pe({},u),$),{},{liveVideo:Q,isDvrEnabled:X,res:N,sres:U})),ne(l,pe(pe(pe({},u),$),{},{liveVideo:Q}),d,{res:N,sres:U});case 21:case"end":return e.stop()}}),e)})));return function(){return o.apply(this,arguments)}}())};function we(){return{loadVideoInstantly:p,onTimeUpdate:L,getVideoDuration:H,onVideoEnded:_,init:function(e){return new Promise((function(o,t){var n,r,l,a,s,u,c,p,f;if(!b(null==e?void 0:e.playerId)){var w=null==e?void 0:e.videoId,y=(null==e||null===(n=e.series)||void 0===n?void 0:n.enable)||!1;window.videoId=w;var h=null==e?void 0:e.token;if(h&&!C(h)){ue=JSON.parse(atob(h.split(".")[1])),window.siteId=null===(r=ue)||void 0===r?void 0:r.siteId,window.siteName=null===(l=ue)||void 0===l?void 0:l.site,e.isAnonymousUser=!(null===(a=ue)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=ue)||void 0===s?void 0:s.site)||null,e.userId=(null===(u=ue)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(c=ue)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",h);var g=null==e?void 0:e.playerId,k=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,j=null==e?void 0:e.apiBaseUrl,P=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,I=null==e?void 0:e.errors;I&&(window.customErrors=I),window.customData=null==e?void 0:e.customData,j&&(window.playerEntitlementUrl=j),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!z(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return ve})).then((function(e){e.importIMA()})),!k||null!=e&&e.series||Promise.resolve().then((function(){return ve})).then((function(e){e.importChromecast()})),O&&"Safari"==i()&&Promise.resolve().then((function(){return ve})).then((function(e){e.importAirplay()})),P&&re("https://www.googletagmanager.com/gtag/js?id=".concat(P)).then((function(){return e=P,window.dataLayer=window.dataLayer||[],ae("js",new Date),void ae("config",e);var e})).catch((function(e){}));var T=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(g));if(T&&T.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var S,V=null==e||null===(S=e.series)||void 0===S?void 0:S.id;D(V,h).then((function(n){var i,r,l,a=n.data,s=n.data.seasons;B(s);var u=w||(null==s||null===(i=s[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,o){var t=new Map;v({videoId:e,token:o}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),m(t)})).catch((function(e){return console.log(e)}))}(V,h),E(u,h).then((function(n){var i,r,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,d(n.data),fe(g,{res:null==n?void 0:n.data,sres:a},e,{resolve:o,reject:t})})).catch((function(e){x(e,g,t,w)}))})).catch((function(e){x(e,g,t)}))}else E(w,h).then((function(n){var i,r,l,a;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,d(null==n?void 0:n.data);var s=null==n?void 0:n.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?R(w,h).then((function(n){var i,r,l,a,u,d;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==n?void 0:n.data)),e.watchHistoryResumeTime=(null==n||null===(u=n.data)||void 0===u?void 0:u.watchedTime)||null,e.watchedPercentage=(null==n||null===(d=n.data)||void 0===d?void 0:d.watchedPercentage)||null,fe(g,{res:s},e,{resolve:o,reject:t})})).catch((function(n){var i,r,l,a;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(n)),fe(g,{res:s},e,{resolve:o,reject:t})})):fe(g,{res:s},e,{resolve:o,reject:t})})).catch((function(e){x(e,g,t,w)}))}else t({status:!1,msg:"".concat(h?"Token is expired !":"Missing Authorization Token"),response:{token:h}})}}))},getRenditions:q,skip:f,getPlayer:r,play:w,pause:y,detectBrowser:i,rewind:h,loadVideo:g,seekToTimeStamp:M,isPlayerInitialised:b,load:k,dispose:O,enableCaptions:j,disableCaptions:P,getCaptions:I,playSelectedResolution:U,getSource:T,setVolume:ee,getVolume:oe,disableControls:S,setPlaybackSpeed:N}}export{we as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/regenerator";import n from"video.js";import{d as i,g as r,s as l,c as a,h as s,a as u,b as d,e as c,f as v,i as m,l as p,j as f,p as w,k as y,r as h,m as g,n as b,o as k,q as O,t as j,u as P,v as I,w as T,x as S,y as C,z as D,A as E,B as x,C as R,D as B,E as A,F as V}from"./generic-7c43020f.js";import{o as L,g as H,a as _,s as M,b as N}from"./util-d9f5a7be.js";import{g as q}from"./renditions-97276745.js";import{playSelectedResolution as U}from"./resolution-38cd4f5c.js";import{i as z}from"./skin-665ec17e.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function F(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}var K,X,G=function(e,o){var t=r(e);t&&o&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(o){var t,i,r,l,a,s=this.el(),u=n.dom.getPointerPosition(s,o).x;n.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(r=i.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*u,v.seek()}}))};function W(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}var Q=[],Y=0,Z=null;function $(e,t,n){var i,r,a,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];X=(null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var u=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.profileId,d=Math.floor(e.currentTime()),c=Math.floor(e.duration()),v=null==t||null===(a=t.watchHistory)||void 0===a?void 0:a.xapiKey,m={};"v1"==X?m={videoId:K,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/c*100),siteOwner:t.siteOwner,userId:t.userId,xApiKey:v}:"v2"==X&&(m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}({videoId:K,watchedTime:Math.floor(e.currentTime()),watchedPercentage:s?100:Math.floor(d/c*100),doneWatching:s,profileId:u},Z&&{seriesId:Z})),l(m,t.token,X).then((function(e){})).catch((function(e){})),Y=d+n}var ee=function(e,o,t){var n=r(e);if(n)if(o>=0&&o<=100){n.muted()&&n.muted(!1);var i=parseFloat(o)/100;n.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(o,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},oe=function(e){var o=r(e);return o?parseInt(100*o.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function te(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}var ne=function(e,t,n,i){var l,v,m=i.res,p=i.sres,f=r(e),w=(null==m||null===(l=m.video)||void 0===l||null===(v=l.streamingInfo)||void 0===v?void 0:v.isLiveStream)||!1;d(m),f.on("loadstart",(function(){w&&n.resolve({status:!0,msg:"Video Loaded",response:m})})),f.on("loadeddata",(function(){var i;(null==f||!f.muted())&&ee(e,sessionStorage.getItem("volume")||"100");var l,s,d=u();(a(),n.resolve(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:m}:{response:m})),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&!t.isAnonymousUser)&&function(e,o,t){var n,i;null!=o&&o.series&&(Z=null==o||null===(n=o.series)||void 0===n?void 0:n.id),Q=[],Y=0,K=t;var l=(null==o||null===(i=o.watchHistory)||void 0===i?void 0:i.interval)||30,a=r(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());Q.includes(Y)||(e==Y?(Q.push(e),$(a,o,l)):e>Y&&(Y=e+l))})),a.on("ended",(function(){$(a,o,l,!0)})))}(e,t,null==d||null===(l=d.video)||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.id)})),f.textTracks().on("change",(function(e){var o=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];f.trigger("subtitlechanged",o)})),f.on("subtitlechanged",(function(e,o){var t,n,i,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(n=t.cast)||void 0===n||null===(i=n.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,w=p.getMediaSession(),y=w.media.tracks.filter((function(e){return"TEXT"==e.type}));f=o?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(f)}})),f.on("loadedmetadata",(function(){})),f.one("error",(function(){var o,t;s(e,(null==f||null===(o=f.error())||void 0===o?void 0:o.message)||"Some error occured"),n.reject({status:!1,msg:(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"})})),f.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var o,n,i,r=null===(o=u())||void 0===o||null===(n=o.video)||void 0===n||null===(i=n.gist)||void 0===i?void 0:i.id,l=c().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){f.currentTime(a)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&f.currentTime(null==t?void 0:t.watchHistoryResumeTime)})),f.on("volumechange",(function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},ie=function(e,o){var t=null==o?void 0:o.skin;"live"==t?import("./skin-8b4f4e06.js").then((function(t){t.initialiseSkin(e,o)})):"default"==t?import("./skin-3ede6abf.js").then((function(t){t.initialiseSkin(e,o)})):"carousel"==t?import("./skin-42c2f81d.js").then((function(o){o.initaliseSkin(e)})):"defaultV2"==t?import("./skin-83472515.js").then((function(t){t.initialiseSkin(e,o)})):"multiplayer"==t&&import("./skin-5b828942.js").then((function(t){t.initialiseSkin(e,o)}))},re=function(e){return new Promise((function(o,t){if(le(e))t("".concat(e," is alread initialised"));else{var n=document.createElement("script");n.async=!1,n.src=e,n.onload=function(){o()},n.onerror=function(o){t("Error while loading script ".concat(e," : ").concat(o))},document.head.appendChild(n)}}))},le=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};function ae(){var e,o;null===(e=window)||void 0===e||null===(o=e.dataLayer)||void 0===o||o.push(arguments)}var se=function(e,o){o.controlBar.el_.style.color=e,o.controlBar.el_.querySelector(".vjs-play-progress")&&(o.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),o.controlBar.el_.querySelector(".vjs-volume-level")&&(o.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var ue,de=function(){var o=e(t.mark((function e(){return t.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 o.apply(this,arguments)}}(),ce=function(){var o=e(t.mark((function e(){return t.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 o.apply(this,arguments)}}(),ve=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){re("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(n)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(n)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),re("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:de,loadEMELibrary:ce});function me(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}var fe=function(l,a,u,d){var c,v,m,p,f,w,y,h,b,k,O,j,P,I,C,D,E,x,R,V,L,H,_,M=a.res,N=void 0===M?null:M,q=a.sres,U=void 0===q?null:q,z=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(p=m.CastContext)||void 0===p||null===(f=p.getInstance())||void 0===f?void 0:f.S)||void 0,F=null!=u&&u.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==z&&"NOT_CONNECTED"!==z?["html5","chromecast"]:["chromecast","html5"]:["html5"],K=null==N||null===(w=N.video)||void 0===w||null===(y=w.gist)||void 0===y?void 0:y.videoImageUrl,X=(null==N||null===(h=N.video)||void 0===h||null===(b=h.liveDetails)||void 0===b?void 0:b.isDvrEnabled)||!1,W=function(e){var o,t={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(o=window)&&void 0!==o&&o.cast&&(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"==i()&&(t=J(J({},t),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-6}})),t}(u),Q=(null==N||null===(k=N.video)||void 0===k||null===(O=k.streamingInfo)||void 0===O?void 0:O.isLiveStream)||!1,Y=(null==u?void 0:u.drmLibrary)||!1,Z=(null==N||null===(j=N.ads)||void 0===j||null===(P=j.preRoll)||void 0===P||null===(I=P.adTags)||void 0===I||null===(C=I.web)||void 0===C?void 0:C.active)&&(null==N||null===(D=N.ads)||void 0===D||null===(E=D.preRoll)||void 0===E||null===(x=E.adTags)||void 0===x||null===(R=x.web)||void 0===R?void 0:R.url),$=(_={controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:("default"==u.skin||"defaultV2"==u.skin||"live"==(null==u?void 0:u.skin))&&{inline:!1},fullscreenToggle:"default"==u.skin||"defaultV2"==u.skin,audioTrackButton:!1,pictureInPictureToggle:(u.skin,!1)},muteToggle:"multiplayer"==u.skin,liveui:X},o(_,"autoplay",null==u?void 0:u.autoplay),o(_,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!Z),o(_,"loop",(null==u?void 0:u.loop)||!1),o(_,"html5",pe(pe({vhs:pe(pe({experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==u||null===(V=u.customData)||void 0===V?void 0:V.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==u?void 0:u.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==u?void 0:u.experimentalBufferBasedABR)||!1})},0==(null==u||null===(L=u.customData)||void 0===L?void 0:L.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(H=u.customData)||void 0===H?void 0:H.nativeVideoTracks)&&{nativeVideoTracks:!1})),o(_,"poster",K),o(_,"techOrder",F),o(_,"chromecast",{requestCustomDataFn:function(e){var o=r(l);console.log(o.textTracksJson_);var t=o.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,o,t){var n,i,r,l,a,s,u,d,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var p=o.keySystemOptions&&o.keySystemOptions[0]&&o.keySystemOptions[0].options&&o.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var f=o.keySystemOptions&&o.keySystemOptions[0]&&o.keySystemOptions[0].options&&o.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=f}var w=(null==e||null===(n=e.video)||void 0===n||null===(i=n.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=w;var y=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=y;var h=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=h;var g=null==e||null===(u=e.video)||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return m.mediaImage=g,m.subTitles=t,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}(N,e,t)}}),o(_,"plugins",W),_),ee=n(l,$,function(){var o=e(t.mark((function e(){var o,r,a,c,v,m,p,f,w,y,h,b,k,O,j,P,I;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Q&&d.resolve(pe({status:!0,msg:"Player Initialised"},U?{seriesResponse:U,response:N}:{response:N})),"white"!==window.controlsColor&&se(window.controlsColor,ee),/Android/i.test(navigator.userAgent)&&(n.options.vhs.overrideNative=!0),y=null==N||null===(o=N.video)||void 0===o?void 0:o.drmEnabled,h=null==N||null===(r=N.video)||void 0===r||null===(a=r.liveDetails)||void 0===a?void 0:a.startOverTime,!y&&!Y){e.next=13;break}if("Safari"!==i()){e.next=11;break}return e.next=9,ce();case 9:e.next=13;break;case 11:return e.next=13,Promise.all([ce(),de()]);case 13:X&&G(l,h),!Z||null!=u&&null!==(c=u.customData)&&void 0!==c&&c.disableAds||B(l,Z,N),b=T(N,l),"IN"==u.countryCode&&(n.Vhs.xhr.beforeRequest=function(e){e.uri=e.uri.replace("us-e","a-m")}),b?g(l,b):(d.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:N}),s(l,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==N||null===(v=N.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(p=m.closedCaptions)||void 0===p?void 0:p.length)>0||(null==N||null===(f=N.video)||void 0===f||null===(w=f.closedCaptions)||void 0===w?void 0:w.length)>0)&&(I=(null==N||null===(O=N.video)||void 0===O||null===(j=O.contentDetails)||void 0===j?void 0:j.closedCaptions)||(null==N||null===(P=N.video)||void 0===P?void 0:P.closedCaptions),k=I.filter((function(e){return"VTT"===e.format})),A(l,k)),null!=u&&u.disableControls?S(l):ie(l,pe(pe(pe({},u),$),{},{liveVideo:Q,isDvrEnabled:X,res:N,sres:U})),ne(l,pe(pe(pe({},u),$),{},{liveVideo:Q}),d,{res:N,sres:U});case 21:case"end":return e.stop()}}),e)})));return function(){return o.apply(this,arguments)}}())};function we(){return{loadVideoInstantly:p,onTimeUpdate:L,getVideoDuration:H,onVideoEnded:_,init:function(e){return new Promise((function(o,t){var n,r,l,a,s,u,c,p,f;if(!b(null==e?void 0:e.playerId)){var w=null==e?void 0:e.videoId,y=(null==e||null===(n=e.series)||void 0===n?void 0:n.enable)||!1;window.videoId=w;var h=null==e?void 0:e.token;if(h&&!C(h)){ue=JSON.parse(atob(h.split(".")[1])),window.siteId=null===(r=ue)||void 0===r?void 0:r.siteId,window.siteName=null===(l=ue)||void 0===l?void 0:l.site,e.isAnonymousUser=!(null===(a=ue)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=ue)||void 0===s?void 0:s.site)||null,e.userId=(null===(u=ue)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(c=ue)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",h);var g=null==e?void 0:e.playerId,k=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,j=null==e?void 0:e.apiBaseUrl,P=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,I=null==e?void 0:e.errors;I&&(window.customErrors=I),window.customData=null==e?void 0:e.customData,j&&(window.playerEntitlementUrl=j),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!z(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return ve})).then((function(e){e.importIMA()})),!k||null!=e&&e.series||Promise.resolve().then((function(){return ve})).then((function(e){e.importChromecast()})),O&&"Safari"==i()&&Promise.resolve().then((function(){return ve})).then((function(e){e.importAirplay()})),P&&re("https://www.googletagmanager.com/gtag/js?id=".concat(P)).then((function(){return e=P,window.dataLayer=window.dataLayer||[],ae("js",new Date),void ae("config",e);var e})).catch((function(e){}));var T=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(g));if(T&&T.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var S,B=null==e||null===(S=e.series)||void 0===S?void 0:S.id;D(B,h).then((function(n){var i,r,l,a=n.data,s=n.data.seasons;V(s);var u=w||(null==s||null===(i=s[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,o){var t=new Map;v({videoId:e,token:o}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),m(t)})).catch((function(e){return console.log(e)}))}(B,h),E(u,h).then((function(n){var i,r,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,d(n.data),fe(g,{res:null==n?void 0:n.data,sres:a},e,{resolve:o,reject:t})})).catch((function(e){x(e,g,t,w)}))})).catch((function(e){x(e,g,t)}))}else E(w,h).then((function(n){var i,r,l,a;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,d(null==n?void 0:n.data);var s=null==n?void 0:n.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?R(w,h).then((function(n){var i,r,l,a,u,d;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==n?void 0:n.data)),e.watchHistoryResumeTime=(null==n||null===(u=n.data)||void 0===u?void 0:u.watchedTime)||null,e.watchedPercentage=(null==n||null===(d=n.data)||void 0===d?void 0:d.watchedPercentage)||null,fe(g,{res:s},e,{resolve:o,reject:t})})).catch((function(n){var i,r,l,a;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(n)),fe(g,{res:s},e,{resolve:o,reject:t})})):fe(g,{res:s},e,{resolve:o,reject:t})})).catch((function(e){x(e,g,t,w)}))}else t({status:!1,msg:"".concat(h?"Token is expired !":"Missing Authorization Token"),response:{token:h}})}}))},getRenditions:q,skip:f,getPlayer:r,play:w,pause:y,detectBrowser:i,rewind:h,loadVideo:g,seekToTimeStamp:M,isPlayerInitialised:b,load:k,dispose:O,enableCaptions:j,disableCaptions:P,getCaptions:I,playSelectedResolution:U,getSource:T,setVolume:ee,getVolume:oe,disableControls:S,setPlaybackSpeed:N}}export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,j as r,r as t}from"./generic-
|
|
1
|
+
import{g as e,j as r,r as t}from"./generic-7c43020f.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{o as c,p as u}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{o as c,p as u}from"./generic-7c43020f.js";import"axios";import"js-cookie";import"ua-parser-js";function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,l=n(e);if(t){var r=n(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return o(this,i)}}var m=s.getComponent("Component"),f=function(o){l(f,m);var n=d(f);function f(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,f),l=n.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,s,a,c,u,d,m=window.getComputedStyle(document.getElementById(t),null),f=m.getPropertyValue("height"),p=m.getPropertyValue("width"),v=f.slice(0,-2);p.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(s=r.config)||void 0===s||!s.liveVideo)||null!==(a=i(l))&&void 0!==a&&null!==(c=a.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(d=u.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(v-135,"px"),e.style.height="".concat(v-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(v-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(f,[{key:"createEl",value:function(){return s.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,s=this,a=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==a||null===(n=a.classList)||void 0===n||n.add("".concat(this.config.skin)):null==a||null===(r=a.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(a,this.playerId),window.onresize=function(){s.multicamCssPositioning(a,s.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=s.dom.createEl("div",{className:"tile ".concat(t)});0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),s.dom.appendContent(l,o);var n=sessionStorage.getItem("token");return o.addEventListener("click",(function(t){a(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id,n).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),f}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as s,e as l,h as i}from"./icons-f5378bf3.js";import{g as c,o as d,p as m}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as s,e as l,h as i}from"./icons-f5378bf3.js";import{g as c,o as d,p as m}from"./generic-7c43020f.js";import{a as u}from"./skin-665ec17e.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=o(e);if(t){var s=o(this).constructor;n=Reflect.construct(a,arguments,s)}else n=a.apply(this,arguments);return r(this,n)}}var h=a.getComponent("Component"),f=function(r){n(f,h);var o=p(f);function f(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,f),(n=o.call(this,t,r)).playerId=r.playerId,n.seriesData=r.sres,n.streams=r.streams,n.currentVideoData=r.res,n.initialiseStructure(),n.loadCSS(),n}return t(f,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"stream-container hidden"});a.dom.$(".stream-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(u(),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"),document.getElementById(this.playerId).style.overflow="hidden",a.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),r=a.dom.createEl("div",{className:"stream-selector-head"}),o=a.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),u=a.dom.createEl("div",{className:"stream-selector-content"}),p=a.dom.createEl("div",{className:"stream-tray"}),h=function(e){var n,r=a.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(r.classList.add("selected"),r.style.border="4px solid #D2393B"),r.onclick=function(){for(var n=a.dom.$$(".stream"),o=0;o<n.length;o++)n[o].style.border="none",n[o].classList.remove("selected");r.classList.add("selected"),r.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id,sessionStorage.getItem("token")).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},r.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(n=t.streams[e])||void 0===n?void 0:n.img),o.alt="No Thumbnail Available",r.append(o),a.dom.appendContent(p,r),a.dom.appendContent(u,p)},f=0;f<this.streams.length;f++)h(f);a.dom.appendContent(r,o),a.dom.appendContent(r,s),a.dom.appendContent(e,r),a.dom.appendContent(e,u),c(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")}))}}]),f}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{s}from"./loader-580278fe.js";import{o as i,p as a}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{s}from"./loader-580278fe.js";import{o as i,p as a}from"./generic-7c43020f.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,r=n(e);if(t){var s=n(this).constructor;o=Reflect.construct(r,arguments,s)}else o=r.apply(this,arguments);return l(this,o)}}var d=r.getComponent("Component"),u=function(l){o(u,d);var n=c(u);function u(t){var o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(o=n.call(this,t,l)).playerId=l.playerId,o.config=l.config,o.createUI(null==l?void 0:l.config.streams),o}return t(u,[{key:"createEl",value:function(){return r.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,o,l,n,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)||!(null!=this&&null!==(l=this.config)&&void 0!==l&&l.liveui)&&!(null!=this&&null!==(n=this.config)&&void 0!==n&&n.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var m=r.dom.createEl("div",{className:"broadcast"});m.innerHTML="Broadcasts";var v=r.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==v||null===(a=v.classList)||void 0===a||a.add("dvr"):null==v||null===(c=v.classList)||void 0===c||c.add("nondvr"),v.style.width="".concat(window.innerWidth-50,"px");var p=r.dom.createEl("div",{className:"tilecontainer-potrait"});r.dom.appendContent(d,m),r.dom.appendContent(d,v),r.dom.appendContent(v,p),m.addEventListener("click",(function(){null!=v&&v.classList.contains("hideMWebTray")?(v.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==v||v.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var h=0;h<e.length;h++)this.createTile(e[h],h)}},{key:"createTile",value:function(e,t){var o=this,l=this.el(),n=r.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(n.style.border="2px solid red"),n.style.backgroundImage="url(".concat(e.img,")");var c=r.dom.$(".tilecontainer-potrait",this.contentEl());r.dom.appendContent(c,n);var d=sessionStorage.getItem("token");return n.addEventListener("click",(function(t){s(o.playerId),o.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),i(o.playerId,e.id,d).then((function(e){a(o.playerId)}))})),l}},{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(){import("./mwebPotrait-3c1805d8.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"),o=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),l=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),n=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==o||o.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==n||n.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=o&&o.classList.contains("hide-controls")&&(null==o||o.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),u}();export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as s}from"./icons-f5378bf3.js";import{o as a,b as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as s}from"./icons-f5378bf3.js";import{o as a,b as d}from"./generic-7c43020f.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var s=i(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return o(this,n)}}var c=r.getComponent("Component"),p=function(o){n(a,c);var i=l(a);function a(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),(n=i.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(a,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(s(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),s=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),a}(),u=function(e,t){var n=m(e,t.video.gist.id),o=v(e[n],t.video.gist.id),i=f(e[n],o);h(i.nextEp)},m=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,s=n>1?e.episodes[i]:null;return o===i&&(0===o?s=null:r=null),{prevEp:r,nextEp:s,prevEpIdx:o,nextEpIdx:i}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,o){e.gist.id===t&&(n=o)})),n):null},h=function(e){r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t=sessionStorage.getItem("token");a("my-player",e.gist.id,t).then((function(e){d(e.response)}))},r.dom.$(".next-eps-image").innerHTML="<img src=".concat(e.gist.videoImageUrl,"/>"),r.dom.$(".next-eps-description").innerHTML="<div class='next-eps-title'>".concat(e.title,"</div>\n <div class='next-eps-description-details'>").concat(e.gist.description,"</div>")};export{p as default,u as initaliseFunctionality};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-f5378bf3.js";import{g as c,o as d,J as p}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-f5378bf3.js";import{g as c,o as d,J as p}from"./generic-7c43020f.js";import{a as m}from"./autoNextVideo-1672740e.js";import{a as u}from"./skin-665ec17e.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"./util-d9f5a7be.js";function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return l(this,n)}}var y=a.getComponent("Component"),h=function(l){o(h,y);var i=v(h);function h(e){var n,o,l,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=i.call(this,e,s)).playerId=s.playerId,a.seriesData=s.sres,a.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,a.cb=(null==s||null===(o=s.playlist)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.autoNext)||!1,a.currentVideoData=s.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&m({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.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=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(u(),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"),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,o=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),o.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),m=a.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var o,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.title)||"")}),c=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,c),a.dom.appendContent(i,s),a.dom.appendContent(m,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(m,i),u.onclick=function(e){e.stopPropagation(),p(t+1),d(n.playerId,n.videos[t].id,sessionStorage.getItem("token")).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,o,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(o=s.classList)||void 0===o||o.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,m),c(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),h}();export{h as default};
|