@viewlift/player-backup 1.0.31-backup → 1.0.32-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-58c44667.js → autoNextVideo-41442369.js} +1 -1
- package/cjs/bundle.css +1 -1
- package/cjs/caption-settings-542265aa.js +1 -0
- package/cjs/{features-16eb5297.js → features-5f183b20.js} +1 -1
- package/cjs/{generic-dd639011.js → generic-33f3034e.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-3897f12b.js → keyboardShortcuts-367df548.js} +1 -1
- package/cjs/multicam-6e6fba47.js +1 -0
- package/cjs/multicamv2-0659adcc.js +1 -0
- package/cjs/mwebPotraitTray-2408f011.js +1 -0
- package/cjs/nextEpisodeButton-36c16d35.js +1 -0
- package/cjs/playlist-6b2f0584.js +1 -0
- package/cjs/{renditions-ff535c5a.js → renditions-71a7872f.js} +1 -1
- package/cjs/resolution-6994d29b.js +1 -0
- package/cjs/series-4d441409.js +1 -0
- package/cjs/series-v2-c4eca4eb.js +1 -0
- package/cjs/settings-icon-081dfd95.js +1 -0
- package/cjs/{skin-c763fa81.js → skin-58f73b11.js} +1 -1
- package/cjs/{skin-bdbbdaf3.js → skin-6c6ef965.js} +1 -1
- package/cjs/{skin-62ee109a.js → skin-76904400.js} +1 -1
- package/cjs/{skin-26c82689.js → skin-cfd11faf.js} +1 -1
- package/cjs/{skin-fe12ed34.js → skin-fc60b839.js} +1 -1
- package/cjs/{util-e9a861b6.js → util-b52b44e1.js} +1 -1
- package/cjs/videoSelector-1cf1f638.js +1 -0
- package/esm/{autoNextVideo-267f6295.js → autoNextVideo-64a5e9de.js} +1 -1
- package/esm/bundle.css +1 -1
- package/esm/caption-settings-17087ebe.js +1 -0
- package/esm/{features-ab564b88.js → features-97d6ec37.js} +1 -1
- package/esm/generic-b8c4777e.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-5f18e44b.js → keyboardShortcuts-4e937151.js} +1 -1
- package/esm/multicam-dce39e98.js +1 -0
- package/esm/multicamv2-64338e29.js +1 -0
- package/esm/mwebPotraitTray-1bf17b68.js +1 -0
- package/esm/nextEpisodeButton-6ef285c2.js +1 -0
- package/esm/playlist-f31503e9.js +1 -0
- package/esm/{renditions-3f7cf2ce.js → renditions-7cca1606.js} +1 -1
- package/esm/resolution-ccdedf9e.js +1 -0
- package/esm/series-9c32b6f5.js +1 -0
- package/esm/series-v2-3908201f.js +1 -0
- package/esm/settings-icon-c55c6653.js +1 -0
- package/esm/{skin-41776702.js → skin-03423c6a.js} +1 -1
- package/esm/skin-34b05d63.js +1 -0
- package/esm/{skin-f910c054.js → skin-55d85903.js} +1 -1
- package/esm/{skin-56c66f8e.js → skin-836913c6.js} +1 -1
- package/esm/{skin-c503aada.js → skin-9fff1dd0.js} +1 -1
- package/esm/{util-720e50bf.js → util-ee6ff224.js} +1 -1
- package/esm/videoSelector-1038a165.js +1 -0
- package/package.json +1 -1
- package/cjs/caption-settings-787b644e.js +0 -1
- package/cjs/multicam-882a2fc3.js +0 -1
- package/cjs/multicamv2-d7948d03.js +0 -1
- package/cjs/mwebPotraitTray-31e534f0.js +0 -1
- package/cjs/nextEpisodeButton-bca8af7c.js +0 -1
- package/cjs/playlist-6e9a1a66.js +0 -1
- package/cjs/resolution-42e0262f.js +0 -1
- package/cjs/series-f4216910.js +0 -1
- package/cjs/series-v2-22d1cba6.js +0 -1
- package/cjs/settings-icon-9ba286ff.js +0 -1
- package/cjs/videoSelector-d69cbf69.js +0 -1
- package/esm/caption-settings-3fac8977.js +0 -1
- package/esm/generic-9123f288.js +0 -1
- package/esm/multicam-0f2ca050.js +0 -1
- package/esm/multicamv2-69bbad7b.js +0 -1
- package/esm/mwebPotraitTray-3dab2b61.js +0 -1
- package/esm/nextEpisodeButton-d2e4798b.js +0 -1
- package/esm/playlist-a37172c2.js +0 -1
- package/esm/resolution-451faba2.js +0 -1
- package/esm/series-938f07a7.js +0 -1
- package/esm/series-v2-91273710.js +0 -1
- package/esm/settings-icon-34f77e29.js +0 -1
- package/esm/skin-03d9e393.js +0 -1
- package/esm/videoSelector-8495442f.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=require("./features-
|
|
1
|
+
"use strict";var e,t=require("./features-5f183b20.js"),n=require("./icons-0f7b3404.js"),r=require("./generic-33f3034e.js"),s=require("./skin-71220bed.js"),o=require("@babel/runtime/helpers/defineProperty"),i=require("./keyboardShortcuts-367df548.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(){window.endFirstFrame(a),"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-71a7872f.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){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("./features-
|
|
1
|
+
"use strict";var e=require("./features-5f183b20.js"),t=require("./icons-0f7b3404.js"),l=require("./generic-33f3034e.js"),i=require("./skin-71220bed.js"),n=require("./renditions-71a7872f.js"),o=require("@babel/runtime/helpers/toConsumableArray"),r=require("./autoNextVideo-41442369.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-b52b44e1.js");var a=l.getCurrentSeries(),d=[];null==a||a.map((function(e){return d.push.apply(d,o(e.episodes))}));var u=function(e,t){var i;null==t||null===(i=t.series)||void 0===i||i.cb;var n=l.getPlayer(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),i=n.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-t<=10&&l.getVideoIdx()<=(null==d?void 0:d.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=d.filter((function(e,t){return t==l.getVideoIdx()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var a,u,v,c,m,p,g,h,f,y,C;(null===(a=document.getElementsByClassName("next-ep-preview"))||void 0===a?void 0:a[0]).style.visibility="hidden";var b=null===(u=document.getElementsByClassName("next-ep-title"))||void 0===u?void 0:u[0],x=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],j=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],w=null===(m=r[0])||void 0===m?void 0:m.title;(null===(p=w)||void 0===p?void 0:p.length)>60&&(w=w.substr(0,60)+"..."),b.textContent="".concat(w),x.src=(null===(g=r[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(C=y.customData)||void 0===C?void 0:C.fallbackImage),j.onclick=function(){return s(e)}}else{var q,E,N,B,V,S,k,P=document.createElement("div");P.className="next-ep-preview",P.style.visibility="hidden",document.getElementById(e).append(P);var I=document.createElement("div");I.className="next-ep-header",I.textContent="Next up";var M=null===(q=r[0])||void 0===q?void 0:q.title,R=document.createElement("img");R.className="next-ep-img",R.src=(null===(E=r[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(S=V.customData)||void 0===S?void 0:S.fallbackImage);var O=document.createElement("div");O.className="next-ep-title",(null===(k=M)||void 0===k?void 0:k.length)>60&&(M=M.substr(0,60)+"..."),O.textContent="".concat(M);var T=document.createElement("div");T.className="next-ep-content",T.append(R),T.append(O),T.onclick=function(){return s(e)},P.append(I),P.append(T)}},s=function(e,t){var i=l.getPlayer(e),n=Math.floor(i.currentTime());if(Math.floor(i.duration())!=n){i.pause(e);var o=l.getVideoIdx();r.switchToNext(o,e,d,sessionStorage.getItem("token"))}};function v(t,i){var o=l.getPlayer(t);o.on("loadeddata",(function(){var r,a,d;(null===(r=n.getRenditions(t))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(t,i),(null===(a=l.getCaptions(t))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(t,i),null!=i&&null!==(d=i.series)&&void 0!==d&&d.enable&&u(t,i),function(e,t){var l,i=Math.floor(e/60),n=null===(l=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===l?void 0:l[0];n&&(n.style.marginRight=i>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");t&&o.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",n&&(n.style.marginRight="56px"))}(o.duration(),(null==i?void 0:i.liveVideo)||!1)})),o.one("play",(function(){var l,i,n,o;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}exports.initialiseSkin=function(n,o){!function(){"Chrome"==l.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));Promise.resolve().then((function(){return require("./skin-921d35a8.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),v(n,o),function(e,n){var o=l.getPlayer(e);o.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MinimizeSvg(window.controlsColor))),o.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var r=document.getElementsByClassName("vjs-time-control");n.liveVideo&&(r[0].style.display="none")}(n,o),function(l,i){var n,o,r,a,d,u;0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)&&e.addSkipButton(l,"defaultV2",t.SkipSvgV2());(0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)||1==(null==i?void 0:i.liveui))&&e.addRewindButton(l,"defaultV2",t.RewindSvgV2());i.liveVideo||e.addSlowMotion(l);(null==i||null===(n=i.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector(l,null==i?void 0:i.relatedVideos);(null==i||null===(r=i.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector(l,null==i?void 0:i.streams);(null==i||null===(a=i.playlist)||void 0===a||null===(d=a.content)||void 0===d?void 0:d.length)>0&&e.addPlaylistSelector(l,null==i?void 0:i.playlist);null!=i&&null!==(u=i.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(l,i)}(n,o),function(e,t){var i=l.getPlayer(e),n=null==t?void 0:t.tvProviderLogoUrl;if(!n)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(n),r.alt="Provider Image",o.append(r),i.el().appendChild(o),i.on("useractive",(function(){o.classList.remove("vjs-fade")})),i.on("userinactive",(function(){i.paused()||o.classList.add("vjs-fade")})),i.on("fullscreenchange",(function(){i.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(n,o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-33f3034e.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("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-33f3034e.js"),r=require("./renditions-71a7872f.js"),i=require("./features-5f183b20.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"),require("./skin-71220bed.js"),require("@babel/runtime/helpers/toConsumableArray"),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=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-5f183b20.js"),r=require("./keyboardShortcuts-367df548.js"),t=require("./icons-0f7b3404.js"),i=require("./generic-33f3034e.js"),n=require("./skin-71220bed.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-71a7872f.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-36c16d35.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 t=require("./generic-
|
|
1
|
+
"use strict";var t=require("./generic-33f3034e.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),l=require("./icons-0f7b3404.js"),a=require("./generic-33f3034e.js"),d=require("./skin-71220bed.js"),c=require("./autoNextVideo-41442369.js");function s(e){var t=u();return function(){var n,r=i(e);if(t){var l=i(this).constructor;n=Reflect.construct(r,arguments,l)}else n=r.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-b52b44e1.js");var v=r.getComponent("Component"),m=function(){n(i,v);var o=s(i);function i(t){var n,r,l,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,i),(l=o.call(this,t,d)).playerId=d.playerId,l.seriesData=d.sres,l.videos=d.related.content,l.cb=(null==d||null===(n=d.related)||void 0===n?void 0:n.cb)||null,l.autoNext=(null==d||null===(r=d.related)||void 0===r?void 0:r.autoNext)||!1,l.currentVideoData=d.res,l.initialiseStructure(),l.loadCSS(),l.autoNext&&(a.setVideoIdx(0),c.autoPlayNext({playerId:l.playerId,content:l.videos,cb:l.cb})),l}return t(i,[{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(l.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")?(d.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"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(l.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var c=r.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),s=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),v=function(e){var n,o,i,l,c,v=r.dom.createEl("div",{className:"video -".concat(e)}),m=r.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){a.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";d.highlightVideo(e),a.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 p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||(null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(c=t.videos[e])||void 0===c?void 0:c.title)||"")});r.dom.appendContent(v,m),r.dom.appendContent(v,h),r.dom.appendContent(u,v),r.dom.appendContent(s,u)},m=0;m<this.videos.length;m++)v(m);r.dom.appendContent(o,i),r.dom.appendContent(o,c),r.dom.appendContent(e,o),r.dom.appendContent(e,s),a.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")}))}}]),i}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as n,o as t,b as o,J as e,I as i,K as a}from"./generic-
|
|
1
|
+
import{g as n,o as t,b as o,J as e,I as i,K as a}from"./generic-b8c4777e.js";import{a as s}from"./util-ee6ff224.js";import{h as c}from"./skin-793f68b7.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};
|
package/esm/bundle.css
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
|
|
18
19
|
.widget-selection{
|
|
19
20
|
display: flex;
|
|
20
21
|
align-items: center;
|
|
@@ -135,7 +136,6 @@
|
|
|
135
136
|
.widget-selector-content #sr-widget{
|
|
136
137
|
padding: 0 18px;
|
|
137
138
|
}
|
|
138
|
-
|
|
139
139
|
.vjs-poster {
|
|
140
140
|
display: inline-block;
|
|
141
141
|
vertical-align: middle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-c2efba97.js";import{v as l,u as s,g as d,t as p}from"./generic-b8c4777e.js";import{d as m}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(e){var t=v();return function(){var n,i=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return a(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var f=i.getComponent("Component"),h=function(){n(o,f);var a=u(o);function o(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,o),(n=a.call(this,t,i)).playerId=i.playerId,n.seriesData=i.sres,n.currentVideoData=i.res,n.initialiseStructure(),n.loadCSS(),n}return t(o,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-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=l(this.playerId);null==t||t.map((function(t){return s(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var e;null!==(e=a.classList)&&void 0!==e&&e.contains("hidden")?(m(),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(c())});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"}),l=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),p=this.createLanguageContanier();i.dom.appendContent(s,p);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,l),i.dom.appendContent(l,s),d(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){l(e.playerId).map((function(t){return s(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),d=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){p(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},m=0;m<c.length;m++)d(m);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),o}();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-b8c4777e.js";import{g as d}from"./renditions-7cca1606.js";import{p as u}from"./skin-793f68b7.js";function m(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 p(t){var e=h();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)}}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}var f=function(t){var o=function(t){r(i,t);var o=p(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)},g=function(t,o,l){var a=function(o){r(a,o);var i=p(a);function a(t,n){var r;e(this,a);var o=(r=i.call(this,t,n)).el_;o.classList.add("vjs-rewind-button");var s=u(l);return o.append(s),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)},v=function(t,o,l){var a=function(o){r(a,o);var i=p(a);function a(t,n){var r;e(this,a);var o=(r=i.call(this,t,n)).el_;o.classList.add("vjs-skip-button");var s=u(l);return o.append(s),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)},y=function(t,e){import("./multicam-dce39e98.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")},C=function(t,e,n){import("./resolution-ccdedf9e.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))}))},B=function(t,e,n){import("./nextEpisodeButton-6ef285c2.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)}))},b=function(t,e){import("./mwebPotraitTray-1bf17b68.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)}))},j=function(t,e,n){import("./series-9c32b6f5.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)}))},k=function(t,e){import("./videoSelector-1038a165.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)}))},O=function(t,e){import("./caption-settings-17087ebe.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)}))},S=function(t,e){import("./settings-icon-c55c6653.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)}))},E=function(t,e){import("./playlist-f31503e9.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)}))},I=function(e,n){import("./series-v2-3908201f.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?m(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(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-64338e29.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)}))},P=function(t,e){var n=a(t).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(e,"></iframe>")});n.append(r)};export{y as a,C as b,b as c,f as d,j as e,B as f,v as g,g as h,S as i,O as j,P as k,k as l,M as m,E as n,I as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"video.js";import t 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",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var l={name:"@viewlift/player-backup",version:"1.0.32-backup",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.0","videojs-ima":"^2.1.0"}},d=function(e,n){var o,i,r,d;return null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):t({url:y(),params:a({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(d=r.customData)||void 0===d?void 0:d.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":l.version},withCredentials:!0})},s=function(e,n){var o,r;return t({url:w()+i.getLinearChannelDetails,params:a(a(a(a(a({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubtype)&&{programSubtype:null==e?void 0:e.programSubtype}),null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r?void 0:r.entitlement),method:"GET",headers:{Authorization:n}})},u=function(e,n){var o,i,r=JSON.parse(atob(n.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,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):t({url:w()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},c=function(e,n,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 t({url:E(),method:"POST",headers:{Authorization:n,"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 t({url:T(),method:"POST",headers:{Authorization:n},data:r,params:a({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},v=function(e,n){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(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:g(e),params:{site:s},headers:{Authorization:n,"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(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:f(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},m=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:p(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:I(i),headers:{Authorization:e.token}})},I=function(e){return w()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV2,"/").concat(e)},p=function(){return w()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV1)},g=function(e){return w()+"".concat(null==i?void 0:i.getVideoInfoV1,"/").concat(e)},f=function(e,n){return w()+"".concat(null==i?void 0:i.getVideoInfoV2,"/").concat(n,"/").concat(e)},E=function(){return w()+"".concat(null==i?void 0:i.saveWatchHistoryV1)},T=function(){return w()+"".concat(null==i?void 0:i.saveWatchHistoryV2)},y=function(){return w()+"".concat(null==i?void 0:i.getVideoDetails)},w=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==i?void 0:i.apiBaseUrl)},h=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},_=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},O=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var b=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function V(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?D(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):D(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=o(navigator.userAgent);var L,S,W,C,A,F=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},R=function(e){var n=P(e,"video.tags",[]),t=P(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},P=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},N=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},k=function(){var e,n,t,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=ve(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=P(I,"video.gist.id",""),w=V(V({},j(p)),{},{VIEWLIFT_WIDTH:T,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:F(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===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:P(I,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:P(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:P(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==g||null===(t=g.options_)||void 0===t?void 0:t.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:R(I),VIEWLIFT_MEDIA_ID:y,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(P(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:y,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+P(I,"video.gist.permalink","")),VIEWLIFT_COPPA:P(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:P(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*P(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:P(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:y,VIEWLIFT_CONTENT_TITLE:P(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:P(I,"video.series[0].gist.title",P(I,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:P(I,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:P(I,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:P(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 h in w){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,w[h])}return v},j=function(e){var n,t,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===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.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?(N()?s?l=V(V({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=V(V({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=V(V({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=V(V({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=V(V({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=V(V({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=N()?V(V({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):V(V({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=V(V({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=N()?V(V({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):V(V({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},B=function(e,n){var t,o,i,r,a,l,d,s,u,c,v,m,I,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,f=null==e||null===(o=e[p])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[p])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[p])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var y=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(I=m.videoAssets)||void 0===I?void 0:I.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return x(E);if(g){var w=M(f,n);return w.src=k(w.src,n,e),w}if("Safari"!==b()&&y)return U(f);if(T){var h=x(f);return h.src=k(h.src,n,e),h}if(null!=f&&f.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(f);return _.src=k(_.src,n,e),_}return null},U=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},x=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},M=function(e,t){var o=e.fairPlay,i=e.widevine,r=e.playReady,a=b(),l=ve(t);if("Safari"===a){var d=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(i,(function(e,n,t){console.log(e),e&&o(e),o(null,new Uint8Array(t))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(t,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}};n.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(o);try{l.eme()}catch(e){console.log("EME ERROR :",e)}return d}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.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s};var H=function(e){S=e},z=function(){return S},G=function(e){L=e},Y=function(){return L},J=function(){return W},K=function(e){W=e},q=function(e){A=e},X=function(){return A},Z=function(e){C=new Map,e.map((function(e,n){C.set(e.id,n)}))},Q=function(e){if(C){var n=C.get(e);K(n+1)}},$=function(e,n){for(var t=ve(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=n||(i.mode="showing")}},ee=function(e,n){for(var t=ve(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},ne=function(e){var n,t=ve(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},te=function(e,n){var t=ve(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},oe=!1,ie=function(e,n,t){var o=k(n,e,t),i=ve(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=ve(e);if(null!==r.el_){oe=!0;var a={id:e,adTagUrl:"".concat(n,"&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(),oe&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var 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===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){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 re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var ae=function(e){n(e).play()},le=function(e){n(e).pause()},de=function(e,t){var o=n(e),i=o.currentTime()+t;o.currentTime(i)},se=function(e,t){var o=n(e),i=o.currentTime(),r=i<=t?0:i-t;o.currentTime(r)},ue=function(e){return!!n.getPlayer("".concat(e))},ce=function(e){return n(e).paused()},ve=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},me=function(e,n,t){var o,i,r;Q(n);var a=0,l=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&&v(n,t).then((function(e){var n,t,o,i,r,d;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,l=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){d(n,t).then((function(n){var t,r,d,s,u,c,v,m,I,p,g=null==n?void 0:n.data,f=(null==g||null===(t=g.video)||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;H(n.data);var E=(null==g||null===(d=g.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==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&&ie(e,E,g);var T=B(g,e);if(T){var y,w,h,b,D,V,L,S,W,C,A,F,R,P,N=(null==g||null===(y=g.video)||void 0===y||null===(w=y.gist)||void 0===w?void 0:w.videoImageUrl)||(null==g||null===(h=g.video)||void 0===h||null===(b=h.gist)||void 0===b||null===(D=b.imageGist)||void 0===D?void 0:D.r16x9),k=ve(e);if(k.poster(N),fe(e,T),k.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:g})})),k.on("loadeddata",(function(){O(),o({status:!0,msg:"Video Loaded",response:g})})),k.one("play",(function(){a&&l<95&&setTimeout((function(){k.currentTime(a)}),0)})),k.one("error",(function(){var e;i({status:!1,msg:(null==k||null===(e=k.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(V=g.video)||void 0===V||null===(L=V.contentDetails)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0||(null==g||null===(W=g.video)||void 0===W||null===(C=W.closedCaptions)||void 0===C?void 0:C.length)>0)A=((null==g||null===(F=g.video)||void 0===F||null===(R=F.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==g||null===(P=g.video)||void 0===P?void 0:P.closedCaptions)).filter((function(e){return"VTT"===e.format})),te(e,A);else!function(e){var n=ve(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))}(e)}else _(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){Ee(t,e,i,n)}))}))},Ie=function(e,n,t){var o=ve(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},pe=function(e){var n=ve(e);if(ge(),window.onresize=null,window.onfocus=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ge=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},fe=function(e,n){ve(e).src(n)},Ee=function(n,t,o,i){var r,a,l,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);ue(t)&&_(t,(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(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?re(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):re(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Te=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{d as A,Ee as B,s as C,v as D,ie as E,te as F,G,Y as H,J as I,ce as J,K,Z as L,Q as M,z as a,H as b,O as c,b as d,X as e,m as f,ve as g,_ as h,q as i,de as j,le as k,Ie as l,fe as m,ue as n,me as o,ae as p,pe as q,se as r,c as s,$ as t,ee as u,ne as v,B as w,Te as x,h as y,u as z};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import o from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/regenerator";import n from"video.js";import{d as r,g as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as O,q as P,t as k,u as I,v as j,w as E,x as S,y as D,z as A,A as R,B as F,C,D as B,E as M,F as _,G as x}from"./generic-9123f288.js";import{o as H,g as N,a as L,s as V,b as U}from"./util-720e50bf.js";import{g as W}from"./renditions-3f7cf2ce.js";import{playSelectedResolution as q}from"./resolution-451faba2.js";import{i as z,a as G}from"./skin-793f68b7.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function J(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function K(e,t){J("event",e,t)}function Q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function Y(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Q(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function X(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Z(){var e=window.sessionStorage.getItem("uid");return e||(e=X(),window.sessionStorage.setItem("uid",e),e)}function $(){var e=sessionStorage.getItem("token"),t=JSON.parse(atob(e.split(".")[1]));return null!=t&&t.anonymousId?"guest-user":null==t?void 0:t.userId}window.initialise=function(e){window.sid=X(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var o,i,n,r=Math.floor(e.currentTime());K(r?"FAILED_TO_START":"DROPPED_STREAM",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,o,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),K("PLAY",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var o,i;if(t.el_){var n,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(o=t.el_)&&void 0!==o&&null!==(i=o.className)&&void 0!==i&&i.includes("vjs-waiting"))K("BUFFERING",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,o,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,K("FIRST_FRAME",Y({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,o,i,n,r,l;K("AD_REQUEST",Y({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),K("AD_IMPRESSION",Y({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var o=Math.floor(e.currentTime());o>=30&&o%30==0&&!t.includes(o)&&(t.push(o),fireEvent({eventName:"PING",videoPosition:o,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),o=e.duration(),i=e.buffered(),n=0;n<i.length;n++){var r=i.start(n),l=i.end(n);if(ee(t,r,l)){var a=Math.round(o-l);if(isFinite(a))return a}}}))()};var ee=function(e,t,o){return e>=t&&e<=o};function te(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function oe(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?te(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window.fireEvent=function(e){var o,i,n,r,l,a,s,d,u,c,v=[Y(Y(Y({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.params),{},{uid:Z(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:$(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];t({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ie,ne,re=function(e,t){var o=l(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(t){var o,i,r,l,a,s=this.el(),d=n.dom.getPointerPosition(s,t).x;n.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(o=window)||void 0===o||null===(i=o.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(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function le(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var ae=[],se=0,de=null;function ue(t,o,i){var n,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ne=(null==o||null===(n=o.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1";var d=null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==ne?m={videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:o.siteOwner,userId:o.userId,xApiKey:v}:"v2"==ne&&(m=function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?le(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):le(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},de&&{seriesId:de})),a(m,o.token,ne).then((function(e){})).catch((function(e){})),se=u+i}var ce=function(e,t,o){var i=l(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var n=parseFloat(t)/100;i.volume(n),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ve=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function me(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var fe=function(t,o,i,n){var r,a,m=n.res,f=n.sres,w=l(t),p=(null==m||null===(r=m.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;c(m),w.on("loadstart",(function(){p&&i.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var n;(null==w||!w.muted())&&ce(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),i.resolve(function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?me(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=o&&o.watchHistory&&null!=o&&null!==(n=o.watchHistory)&&void 0!==n&&n.enable&&!o.isAnonymousUser)&&function(e,t,o){var i,n;null!=t&&t.series&&(de=null==t||null===(i=t.series)||void 0===i?void 0:i.id),ae=[],se=0,ie=o;var r=(null==t||null===(n=t.watchHistory)||void 0===n?void 0:n.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ae.includes(se)||(e==se?(ae.push(e),ue(a,t,r)):e>se&&(se=e+r))})),a.on("ended",(function(){ue(a,t,r,!0)})))}(t,o,null==d||null===(r=d.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),p&&(window.onfocus=function(){try{var e;null==w||null===(e=w.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}}),w.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];w.trigger("subtitlechanged",t)})),w.on("subtitlechanged",(function(e,t){var o,i,n,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(n=i.framework)||void 0===n||null===(r=n.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),w.on("loadedmetadata",(function(){window.endFirstFrame(w)})),w.one("error",(function(){var e,o;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),i.reject({status:!1,msg:(null==w||null===(o=w.error())||void 0===o?void 0:o.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable){var t,i,n,r=null===(t=u())||void 0===t||null===(i=t.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){w.currentTime(a)}),0)}else null!=o&&o.watchHistoryResumeTime&&(null==o?void 0:o.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==o?void 0:o.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},we=function(e,t){var o=null==t?void 0:t.skin;"live"==o?import("./skin-03d9e393.js").then((function(o){o.initialiseSkin(e,t)})):"default"==o?import("./skin-c503aada.js").then((function(o){o.initialiseSkin(e,t)})):"carousel"==o?import("./skin-41776702.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==o?import("./skin-f910c054.js").then((function(o){o.initialiseSkin(e,t)})):"multiplayer"==o&&import("./skin-56c66f8e.js").then((function(o){o.initialiseSkin(e,t)}))},pe=function(e){return new Promise((function(t,o){if(he(e))o("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!1,i.src=e,i.onload=function(){t()},i.onerror=function(t){o("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},he=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ge=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var ye,be=function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){pe("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"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:be,loadEMELibrary:Te});function Pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function ke(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Pe(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Ie=function(t,a,s,u){var c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C,B,x,H,N,L,V,U,W,q,z,J,K,Q=a.res,Y=void 0===Q?null:Q,X=a.sres,Z=void 0===X?null:X,$=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,ee=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==$&&"NOT_CONNECTED"!==$?["html5","chromecast"]:["chromecast","html5"]:["html5"],te=G(null===(p=Y)||void 0===p||null===(h=p.video)||void 0===h||null===(g=h.gist)||void 0===g?void 0:g.videoImageUrl)||G(null===(y=Y)||void 0===y||null===(T=y.video)||void 0===T||null===(O=T.gist)||void 0===O||null===(P=O.imageGist)||void 0===P?void 0:P.r16x9),ie=(null===(k=Y)||void 0===k||null===(I=k.video)||void 0===I||null===(j=I.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,ne=function(e){var t,o={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(o={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==r()&&(o=oe(oe({},o),{},{airPlay:{addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}})),o}(s),le=(null===(D=Y)||void 0===D||null===(A=D.video)||void 0===A||null===(R=A.streamingInfo)||void 0===R?void 0:R.isLiveStream)||!1,ae=(null==s?void 0:s.drmLibrary)||!1,se=(null===(F=Y)||void 0===F||null===(C=F.ads)||void 0===C||null===(B=C.preRoll)||void 0===B||null===(x=B.adTags)||void 0===x||null===(H=x.web)||void 0===H?void 0:H.active)&&(null===(N=Y)||void 0===N||null===(L=N.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(U=V.adTags)||void 0===U||null===(W=U.web)||void 0===W?void 0:W.url);Y=ke(ke({},Y),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var de=(K={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:ie},e(K,"autoplay",null==s?void 0:s.autoplay),e(K,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!se),e(K,"loop",(null==s?void 0:s.loop)||!1),e(K,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(K,"html5",ke(ke({dash:ke(ke({},!n.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||3},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:ke(ke({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(q=s.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(z=s.customData)||void 0===z?void 0:z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(K,"poster",te),e(K,"techOrder",ee),e(K,"chromecast",{requestCustomDataFn:function(e){var o=l(t);console.log(o.textTracksJson_);var i=o.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,o){var i,n,r,l,a,s,d,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(i=e.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=o,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(Y,e,i)}}),e(K,"plugins",ne),K),ue=n(t,de,function(){var e=o(i.mark((function e(){var o,l,a,c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(le&&u.resolve(ke({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),window.initialise(ue),window.firstFrame(ue),"white"!==window.controlsColor&&ge(window.controlsColor,ue),/Android/i.test(navigator.userAgent)&&(n.options.vhs.overrideNative=!0),O=null===(o=Y)||void 0===o||null===(l=o.video)||void 0===l?void 0:l.drmEnabled,P=null===(a=Y)||void 0===a||null===(c=a.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!O&&!ae){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,Te();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([Te(),be()]);case 15:ie&&re(t,P),!se||null!=s&&null!==(m=s.customData)&&void 0!==m&&m.disableAds||M(t,se,Y),(k=E(Y,t))?b(t,k):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(f=Y)||void 0===f||null===(w=f.video)||void 0===w||null===(p=w.contentDetails)||void 0===p||null===(h=p.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=Y)||void 0===g||null===(y=g.video)||void 0===y||null===(T=y.closedCaptions)||void 0===T?void 0:T.length)>0)&&(C=(null===(j=Y)||void 0===j||null===(D=j.video)||void 0===D||null===(A=D.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(R=Y)||void 0===R||null===(F=R.video)||void 0===F?void 0:F.closedCaptions),I=C.filter((function(e){return"VTT"===e.format})),_(t,I)),null!=s&&s.disableControls?S(t):we(t,ke(ke(ke({},s),de),{},{liveVideo:le,isDvrEnabled:ie,res:Y,sres:Z})),fe(t,ke(ke(ke({},s),de),{},{liveVideo:le}),u,{res:Y,sres:Z});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function je(){return{loadVideoInstantly:w,onTimeUpdate:H,getVideoDuration:N,onVideoEnded:L,init:function(e){return new Promise((function(t,o){var i,n,l,a,s,d,u,v,w,p;if(!T(null==e?void 0:e.playerId)){var h=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,g=null==e?void 0:e.videoId,y=(null==e||null===(n=e.series)||void 0===n?void 0:n.enable)||!1;window.videoId=g;var b=null==e?void 0:e.token;if(b&&!D(b)){ye=JSON.parse(atob(b.split(".")[1])),window.siteId=null===(l=ye)||void 0===l?void 0:l.siteId,window.siteName=null===(a=ye)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=ye)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=ye)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=ye)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=ye)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",b);var O=null==e?void 0:e.playerId,P=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,k=null==e?void 0:e.airplay,I=null==e?void 0:e.apiBaseUrl,j=(null==e||null===(w=e.analytics)||void 0===w?void 0:w.gaId)||null,E=null==e?void 0:e.errors;E&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,I&&(window.playerEntitlementUrl=I),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!z(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Oe})).then((function(e){e.importIMA()})),!P||null!=e&&e.series||Promise.resolve().then((function(){return Oe})).then((function(e){e.importChromecast()})),k&&"Safari"==r()&&Promise.resolve().then((function(){return Oe})).then((function(e){e.importAirplay()})),j&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then((function(){return e=j,window.dataLayer=window.dataLayer||[],J("js",new Date),void J("config",e);var e})).catch((function(e){}));var S=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(O));if(S&&S.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var M,_=null==e||null===(M=e.series)||void 0===M?void 0:M.id;A(_,b).then((function(i){var n,r,l,a=i.data,s=i.data.seasons;x(s);var d=g||(null==s||null===(n=s[0])||void 0===n||null===(r=n.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var o=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){o.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(o)})).catch((function(e){return console.log(e)}))}(_,b),R(d,b).then((function(i){var n,r,l;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),Ie(O,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))})).catch((function(e){F(e,O,o)}))}else if(h){var H=null==e?void 0:e.epg;C(H,b).then((function(i){var n=null==i?void 0:i.data;n.contentType="linearchannel",Ie(O,{res:n},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else R(g,b).then((function(i){var n,r,l,a;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s=null==i?void 0:i.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?B(g,b).then((function(i){var n,r,l,a,d,u;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(i){var n,r,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Ie(O,{res:s},e,{resolve:t,reject:o})})):Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else o({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}})}}))},getRenditions:W,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:V,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:k,disableCaptions:I,getCaptions:j,playSelectedResolution:q,getSource:E,setVolume:ce,getVolume:ve,disableControls:S,setPlaybackSpeed:U}}export{je as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import o from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/regenerator";import n from"video.js";import{d as r,g as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as O,q as P,t as k,u as I,v as j,w as E,x as S,y as D,z as A,A as R,B as F,C,D as B,E as M,F as _,G as x}from"./generic-b8c4777e.js";import{o as H,g as N,a as L,s as V,b as U}from"./util-ee6ff224.js";import{g as W}from"./renditions-7cca1606.js";import{playSelectedResolution as q}from"./resolution-ccdedf9e.js";import{i as z,a as G}from"./skin-793f68b7.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function J(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function K(e,t){J("event",e,t)}function Q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function Y(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Q(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function X(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Z(){var e=window.sessionStorage.getItem("uid");return e||(e=X(),window.sessionStorage.setItem("uid",e),e)}function $(){var e=sessionStorage.getItem("token"),t=JSON.parse(atob(e.split(".")[1]));return null!=t&&t.anonymousId?"guest-user":null==t?void 0:t.userId}window.initialise=function(e){window.sid=X(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var o,i,n,r=Math.floor(e.currentTime());K(r?"FAILED_TO_START":"DROPPED_STREAM",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,o,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),K("PLAY",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var o,i;if(t.el_){var n,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(o=t.el_)&&void 0!==o&&null!==(i=o.className)&&void 0!==i&&i.includes("vjs-waiting"))K("BUFFERING",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,o,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,K("FIRST_FRAME",Y({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,o,i,n,r,l;K("AD_REQUEST",Y({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),K("AD_IMPRESSION",Y({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var o=Math.floor(e.currentTime());o>=30&&o%30==0&&!t.includes(o)&&(t.push(o),fireEvent({eventName:"PING",videoPosition:o,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),o=e.duration(),i=e.buffered(),n=0;n<i.length;n++){var r=i.start(n),l=i.end(n);if(ee(t,r,l)){var a=Math.round(o-l);if(isFinite(a))return a}}}))()};var ee=function(e,t,o){return e>=t&&e<=o};function te(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function oe(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?te(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window.fireEvent=function(e){var o,i,n,r,l,a,s,d,u,c,v=[Y(Y(Y({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.params),{},{uid:Z(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:$(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];t({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ie,ne,re=function(e,t){var o=l(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(t){var o,i,r,l,a,s=this.el(),d=n.dom.getPointerPosition(s,t).x;n.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(o=window)||void 0===o||null===(i=o.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(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function le(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var ae=[],se=0,de=null;function ue(t,o,i){var n,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ne=(null==o||null===(n=o.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1";var d=null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==ne?m={videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:o.siteOwner,userId:o.userId,xApiKey:v}:"v2"==ne&&(m=function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?le(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):le(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},de&&{seriesId:de})),a(m,o.token,ne).then((function(e){})).catch((function(e){})),se=u+i}var ce=function(e,t,o){var i=l(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var n=parseFloat(t)/100;i.volume(n),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ve=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function me(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var fe=function(t,o,i,n){var r,a,m=n.res,f=n.sres,w=l(t),p=(null==m||null===(r=m.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;c(m),w.on("loadstart",(function(){p&&i.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var n;(null==w||!w.muted())&&ce(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),i.resolve(function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?me(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=o&&o.watchHistory&&null!=o&&null!==(n=o.watchHistory)&&void 0!==n&&n.enable&&!o.isAnonymousUser)&&function(e,t,o){var i,n;null!=t&&t.series&&(de=null==t||null===(i=t.series)||void 0===i?void 0:i.id),ae=[],se=0,ie=o;var r=(null==t||null===(n=t.watchHistory)||void 0===n?void 0:n.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ae.includes(se)||(e==se?(ae.push(e),ue(a,t,r)):e>se&&(se=e+r))})),a.on("ended",(function(){ue(a,t,r,!0)})))}(t,o,null==d||null===(r=d.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),p&&(window.onfocus=function(){try{var e;null==w||null===(e=w.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}}),w.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];w.trigger("subtitlechanged",t)})),w.on("subtitlechanged",(function(e,t){var o,i,n,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(n=i.framework)||void 0===n||null===(r=n.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),w.on("loadedmetadata",(function(){window.endFirstFrame(w)})),w.one("error",(function(){var e,o;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),i.reject({status:!1,msg:(null==w||null===(o=w.error())||void 0===o?void 0:o.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable){var t,i,n,r=null===(t=u())||void 0===t||null===(i=t.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){w.currentTime(a)}),0)}else null!=o&&o.watchHistoryResumeTime&&(null==o?void 0:o.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==o?void 0:o.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},we=function(e,t){var o=null==t?void 0:t.skin;"live"==o?import("./skin-34b05d63.js").then((function(o){o.initialiseSkin(e,t)})):"default"==o?import("./skin-9fff1dd0.js").then((function(o){o.initialiseSkin(e,t)})):"carousel"==o?import("./skin-03423c6a.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==o?import("./skin-55d85903.js").then((function(o){o.initialiseSkin(e,t)})):"multiplayer"==o&&import("./skin-836913c6.js").then((function(o){o.initialiseSkin(e,t)}))},pe=function(e){return new Promise((function(t,o){if(he(e))o("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!1,i.src=e,i.onload=function(){t()},i.onerror=function(t){o("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},he=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ge=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var ye,be=function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){pe("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"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:be,loadEMELibrary:Te});function Pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function ke(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Pe(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Ie=function(t,a,s,u){var c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C,B,x,H,N,L,V,U,W,q,z,J,K,Q=a.res,Y=void 0===Q?null:Q,X=a.sres,Z=void 0===X?null:X,$=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,ee=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==$&&"NOT_CONNECTED"!==$?["html5","chromecast"]:["chromecast","html5"]:["html5"],te=G(null===(p=Y)||void 0===p||null===(h=p.video)||void 0===h||null===(g=h.gist)||void 0===g?void 0:g.videoImageUrl)||G(null===(y=Y)||void 0===y||null===(T=y.video)||void 0===T||null===(O=T.gist)||void 0===O||null===(P=O.imageGist)||void 0===P?void 0:P.r16x9),ie=(null===(k=Y)||void 0===k||null===(I=k.video)||void 0===I||null===(j=I.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,ne=function(e){var t,o={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(o={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==r()&&(o=oe(oe({},o),{},{airPlay:{addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}})),o}(s),le=(null===(D=Y)||void 0===D||null===(A=D.video)||void 0===A||null===(R=A.streamingInfo)||void 0===R?void 0:R.isLiveStream)||!1,ae=(null==s?void 0:s.drmLibrary)||!1,se=(null===(F=Y)||void 0===F||null===(C=F.ads)||void 0===C||null===(B=C.preRoll)||void 0===B||null===(x=B.adTags)||void 0===x||null===(H=x.web)||void 0===H?void 0:H.active)&&(null===(N=Y)||void 0===N||null===(L=N.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(U=V.adTags)||void 0===U||null===(W=U.web)||void 0===W?void 0:W.url);Y=ke(ke({},Y),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var de=(K={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:ie},e(K,"autoplay",null==s?void 0:s.autoplay),e(K,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!se),e(K,"loop",(null==s?void 0:s.loop)||!1),e(K,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(K,"html5",ke(ke({dash:ke(ke({},!n.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||3},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:ke(ke({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(q=s.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(z=s.customData)||void 0===z?void 0:z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(K,"poster",te),e(K,"techOrder",ee),e(K,"chromecast",{requestCustomDataFn:function(e){var o=l(t);console.log(o.textTracksJson_);var i=o.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,o){var i,n,r,l,a,s,d,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(i=e.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=o,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(Y,e,i)}}),e(K,"plugins",ne),K),ue=n(t,de,function(){var e=o(i.mark((function e(){var o,l,a,c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(le&&u.resolve(ke({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),window.initialise(ue),window.firstFrame(ue),"white"!==window.controlsColor&&ge(window.controlsColor,ue),/Android/i.test(navigator.userAgent)&&(n.options.vhs.overrideNative=!0),O=null===(o=Y)||void 0===o||null===(l=o.video)||void 0===l?void 0:l.drmEnabled,P=null===(a=Y)||void 0===a||null===(c=a.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!O&&!ae){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,Te();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([Te(),be()]);case 15:ie&&re(t,P),!se||null!=s&&null!==(m=s.customData)&&void 0!==m&&m.disableAds||M(t,se,Y),(k=E(Y,t))?b(t,k):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(f=Y)||void 0===f||null===(w=f.video)||void 0===w||null===(p=w.contentDetails)||void 0===p||null===(h=p.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=Y)||void 0===g||null===(y=g.video)||void 0===y||null===(T=y.closedCaptions)||void 0===T?void 0:T.length)>0)&&(C=(null===(j=Y)||void 0===j||null===(D=j.video)||void 0===D||null===(A=D.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(R=Y)||void 0===R||null===(F=R.video)||void 0===F?void 0:F.closedCaptions),I=C.filter((function(e){return"VTT"===e.format})),_(t,I)),null!=s&&s.disableControls?S(t):we(t,ke(ke(ke({},s),de),{},{liveVideo:le,isDvrEnabled:ie,res:Y,sres:Z})),fe(t,ke(ke(ke({},s),de),{},{liveVideo:le}),u,{res:Y,sres:Z});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function je(){return{loadVideoInstantly:w,onTimeUpdate:H,getVideoDuration:N,onVideoEnded:L,init:function(e){return new Promise((function(t,o){var i,n,l,a,s,d,u,v,w,p;if(!T(null==e?void 0:e.playerId)){var h=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,g=null==e?void 0:e.videoId,y=(null==e||null===(n=e.series)||void 0===n?void 0:n.enable)||!1;window.videoId=g;var b=null==e?void 0:e.token;if(b&&!D(b)){ye=JSON.parse(atob(b.split(".")[1])),window.siteId=null===(l=ye)||void 0===l?void 0:l.siteId,window.siteName=null===(a=ye)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=ye)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=ye)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=ye)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=ye)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",b);var O=null==e?void 0:e.playerId,P=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,k=null==e?void 0:e.airplay,I=null==e?void 0:e.apiBaseUrl,j=(null==e||null===(w=e.analytics)||void 0===w?void 0:w.gaId)||null,E=null==e?void 0:e.errors;E&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,I&&(window.playerEntitlementUrl=I),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!z(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Oe})).then((function(e){e.importIMA()})),!P||null!=e&&e.series||Promise.resolve().then((function(){return Oe})).then((function(e){e.importChromecast()})),k&&"Safari"==r()&&Promise.resolve().then((function(){return Oe})).then((function(e){e.importAirplay()})),j&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then((function(){return e=j,window.dataLayer=window.dataLayer||[],J("js",new Date),void J("config",e);var e})).catch((function(e){}));var S=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(O));if(S&&S.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var M,_=null==e||null===(M=e.series)||void 0===M?void 0:M.id;A(_,b).then((function(i){var n,r,l,a=i.data,s=i.data.seasons;x(s);var d=g||(null==s||null===(n=s[0])||void 0===n||null===(r=n.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var o=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){o.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(o)})).catch((function(e){return console.log(e)}))}(_,b),R(d,b).then((function(i){var n,r,l;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),Ie(O,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))})).catch((function(e){F(e,O,o)}))}else if(h){var H=null==e?void 0:e.epg;C(H,b).then((function(i){var n=null==i?void 0:i.data;n.contentType="linearchannel",Ie(O,{res:n},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else R(g,b).then((function(i){var n,r,l,a;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s=null==i?void 0:i.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?B(g,b).then((function(i){var n,r,l,a,d,u;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(i){var n,r,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Ie(O,{res:s},e,{resolve:t,reject:o})})):Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else o({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}})}}))},getRenditions:W,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:V,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:k,disableCaptions:I,getCaptions:j,playSelectedResolution:q,getSource:E,setVolume:ce,getVolume:ve,disableControls:S,setPlaybackSpeed:U}}export{je 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-b8c4777e.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{o as c,p as u}from"./generic-b8c4777e.js";import"axios";import"js-cookie";import"ua-parser-js";function d(e){var t=m();return function(){var i,l=n(e);if(t){var r=n(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return o(this,i)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var p=s.getComponent("Component"),v=function(){l(n,p);var o=d(n);function n(t){var l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,n),l=o.call(this,t,s),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,s,a,c,u,d,m=window.getComputedStyle(document.getElementById(t),null),p=m.getPropertyValue("height"),v=m.getPropertyValue("width"),f=p.slice(0,-2);v.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(f-135,"px"),e.style.height="".concat(f-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(f-105,"px"))})),l.playerId=s.playerId,l.streams=null==s?void 0:s.streams,l.config=null==s?void 0:s.config,l.createUI(null==s?void 0:s.streams),l}return t(n,[{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)}))}}]),n}();export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as s,e as l,h as i}from"./icons-c2efba97.js";import{g as c,o as d,p as m}from"./generic-b8c4777e.js";import{d as p}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(e){var t=h();return function(){var a,r=o(e);if(t){var s=o(this).constructor;a=Reflect.construct(r,arguments,s)}else a=r.apply(this,arguments);return n(this,a)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=r.getComponent("Component"),f=function(){a(o,v);var n=u(o);function o(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,o),(a=n.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.streams=r.streams,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a}return t(o,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return r.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=r.dom.createEl("div",{className:"stream-container hidden"});r.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(p(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var a=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),document.getElementById(this.playerId).style.overflow="hidden",r.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),n=r.dom.createEl("div",{className:"stream-selector-head"}),o=r.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),p=r.dom.createEl("div",{className:"stream-selector-content"}),u=r.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,n=r.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var a=r.dom.$$(".stream"),o=0;o<a.length;o++)a[o].style.border="none",a[o].classList.remove("selected");n.classList.add("selected"),n.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)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),o.alt="No Thumbnail Available",n.append(o),r.dom.appendContent(u,n),r.dom.appendContent(p,u)},v=0;v<this.streams.length;v++)h(v);r.dom.appendContent(n,o),r.dom.appendContent(n,s),r.dom.appendContent(e,n),r.dom.appendContent(e,p),c(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),o}();export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o 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-b8c4777e.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";function c(e){var t=d();return function(){var l,r=n(e);if(t){var s=n(this).constructor;l=Reflect.construct(r,arguments,s)}else l=r.apply(this,arguments);return o(this,l)}}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}var u=r.getComponent("Component"),m=function(){l(n,u);var o=c(n);function n(t){var l,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,n),(l=o.call(this,t,r)).playerId=r.playerId,l.config=r.config,l.createUI(null==r?void 0:r.config.streams),l}return t(n,[{key:"createEl",value:function(){return r.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,o,n,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(o=this.config)&&void 0!==o&&o.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 l=this,o=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(l.playerId),l.removeSelectedTile();var o=document.getElementsByClassName("".concat(t.srcElement.className))[0];o&&(o.style.border="2px solid red"),i(l.playerId,e.id,d).then((function(e){a(l.playerId)}))})),o}},{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"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),o=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),n=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==o||o.classList.add("hide-controls"),null==n||n.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=o&&o.classList.contains("hide-controls")&&(null==o||o.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),n}();export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-c2efba97.js";import{o as s,b as a}from"./generic-b8c4777e.js";import{b as d}from"./skin-793f68b7.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=u();return function(){var n,r=i(e);if(t){var l=i(this).constructor;n=Reflect.construct(r,arguments,l)}else n=r.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var c=r.getComponent("Component"),m=function(){n(i,c);var o=p(i);function i(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,i),(n=o.call(this,t,r)).playerId=r.playerId,n.seriesData=r.sres,n.currentVideoData=r.res,n.initialiseStructure(),n.loadCSS(),n}return t(i,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(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"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),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")}))}}]),i}(),v=function(e,t){var n=f(e,t.video.gist.id),o=x(e[n],t.video.gist.id),i=h(e[n],o);g(i.nextEp)},f=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},h=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,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},x=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},g=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t,n=sessionStorage.getItem("token");s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id,n).then((function(e){a(e.response)}))};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),u=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{m as default,v as initaliseFunctionality};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o 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-c2efba97.js";import{g as d,o as c,K as p}from"./generic-b8c4777e.js";import{a as m}from"./autoNextVideo-64a5e9de.js";import{d as u}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"./util-ee6ff224.js";function v(e){var t=y();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return o(this,n)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var h=a.getComponent("Component"),f=function(){l(i,h);var o=v(i);function i(e){var n,l,a,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,i),(s=o.call(this,e,r)).playerId=r.playerId,s.seriesData=r.sres,s.videos=null==r||null===(n=r.playlist)||void 0===n?void 0:n.content,s.cb=(null==r||null===(l=r.playlist)||void 0===l?void 0:l.cb)||null,s.autoNext=(null==r||null===(a=r.playlist)||void 0===a?void 0:a.autoNext)||!1,s.currentVideoData=r.res,s.initialiseStructure(),s.loadCSS(),s.autoNext&&m({playerId:s.playerId,content:s.videos,cb:s.cb}),s}return n(i,[{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,l=this.el(),o=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"),l.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 l,o,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===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=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,d),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===(o=n.videos[t])||void 0===o?void 0:o.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),c(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,l,o,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===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(o=s.classList)||void 0===o||o.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(o,i),a.dom.appendContent(o,s),a.dom.appendContent(t,o),a.dom.appendContent(t,m),d(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")}))}}]),i}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l}from"./generic-
|
|
1
|
+
import{g as l}from"./generic-b8c4777e.js";var i=function(i){var n,o=l(i),t=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var e,d,v=null==o||null===(e=o.tech_)||void 0===e||null===(d=e.vhs)||void 0===d?void 0:d.representations();(null==v?void 0:v.length)>0&&(t=null==v?void 0:v.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getBitrateInfoListFor("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort((function(l,i){return i.height-l.height})))}return t};export{i as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import r from"video.js";import{g as s,d as c}from"./generic-b8c4777e.js";import{p as u}from"./skin-793f68b7.js";import"axios";import"js-cookie";import"ua-parser-js";function h(e){var t=m();return function(){var n,i=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var p=r.getComponent("Component"),v=function(){o(d,p);var a=h(d);function d(n){var o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),o=a.call(this,n,s),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map((function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;o.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(o),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),o.playerId=null==s?void 0:s.playerId,o.skin=null==s?void 0:s.skin,o.icon=null==s?void 0:s.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(s.renditions),window.height=null,o}return n(d,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),o=u(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=r.dom.createEl("div",{className:"content hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),s=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(s,l),this.toggleContentOnHover(n,d);var h=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,o,a=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(a,s),r.dom.appendContent(h,a),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,g(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",h),"Safari"!=c()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),o=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(o,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=r.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(h,i),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,g(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",h)),r.dom.appendContent(s,h),r.dom.appendContent(d,s),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",(function(){var t,n,o=e.activeCues[0];if(console.log((null==o||null===(t=o.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),o&&document.querySelector(".auto.selected")){var a,d,l,r,s,c,u,h;if(null!=o&&null!==(a=o.value)&&void 0!==a&&null!==(d=a.resolution)&&void 0!==d&&d.height&&i!==(null==o||null===(l=o.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==o||null===(u=o.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==o||null===(s=o.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,o,a,d,l=null===(i=this.player_)||void 0===i||null===(o=i.tech_)||void 0===o?void 0:o.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(d=a.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,g(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),m=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,g(n.playerId,null,!0)})),r.dom.appendContent(h,m),r.dom.appendContent(t,h)}}}]),d}(),g=function(e,t,n){var i,o=s(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var m,p,v,g;null==o||null===(m=o.dash)||void 0===m||null===(p=m.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==o||null===(v=o.dash)||void 0===v||null===(g=v.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(f)}),100);var w=r.dom.$(".content");w&&r.dom.addClass(w,"hidden")}}};export{v as default,g as playSelectedResolution};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{f as d,k as p,o as u,b as v,p as m}from"./generic-b8c4777e.js";import{s as f}from"./loader-580278fe.js";import{E as h}from"./icons-c2efba97.js";import{b as g}from"./skin-793f68b7.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(e){var t=y();return function(){var i,n=o(e);if(t){var s=o(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return r(this,i)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var C,w=c.getComponent("Component"),L=function(){s(r,w);var e=b(r);function r(i){var s,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,r),s=e.call(this,i,o),a(n(s),"seriesData",[]),s.seriesData=o.seriesData,C=o.playerId,S(s.el(),s.seriesData),s.loadCSS(),s}return i(r,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),r}();function k(){return(k=e(l.mark((function e(t,i,n,s){var r;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=sessionStorage.getItem("token"),p(C),f(C),u(C,i,r).then((function(e){v(e.response),m(C)}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=g(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var h=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return k.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)h(b)}function S(e,t){for(var i='<div class="hover-div"></div>\n '.concat(h(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=g(i);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{S as customSeasonList,E as handleSeasonChange,L as seriesModule};
|