@viewlift/player-backup 2.0.4-backup → 2.0.6-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-1a70d67c.js +1 -0
- package/cjs/bundle.css +6 -2
- package/cjs/{features-97ba7282.js → features-66e55751.js} +1 -1
- package/cjs/generic-68f01105.js +1 -0
- package/cjs/index-9e780f27.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-de9f5b76.js → keyboardShortcuts-0d0c3ff1.js} +1 -1
- package/cjs/{multicamv2-d7ea1140.js → multicamv2-db3448be.js} +1 -1
- package/cjs/{multicamv2-109a4b64.js → multicamv2-e4a760a4.js} +1 -1
- package/cjs/{nextEpisodeButton-3f246bca.js → nextEpisodeButton-3a018fdb.js} +1 -1
- package/cjs/{playlist-f870a27d.js → playlist-601d3222.js} +1 -1
- package/cjs/renditions-b41243b6.js +1 -0
- package/cjs/{series-c035502e.js → series-1f5e46da.js} +1 -1
- package/cjs/{series-v2-abc36093.js → series-v2-5cf287e5.js} +1 -1
- package/cjs/{series-v2-c2383f54.js → series-v2-ae1043d1.js} +1 -1
- package/cjs/{settings-icon-3bb3f6e7.js → settings-icon-429f8165.js} +1 -1
- package/cjs/skin-14a42a87.js +1 -0
- package/cjs/{skin-1f729c89.js → skin-1e4e2ede.js} +1 -1
- package/cjs/{skin-a26298d8.js → skin-3b1d7864.js} +1 -1
- package/cjs/{skin-a2663cb1.js → skin-6d9e7f67.js} +1 -1
- package/cjs/{skin-92f38a7d.js → skin-6f1f7bfc.js} +1 -1
- package/cjs/{skin-9d308127.js → skin-7d10cc61.js} +1 -1
- package/cjs/{videoSelector-68117450.js → videoSelector-76f35ff9.js} +1 -1
- package/cjs/{videoSelector-0ded082d.js → videoSelector-8aee1728.js} +1 -1
- package/cjs/videojs_contrib_dash-1ee985c7.js +1 -0
- package/esm/autoNextVideo-b3f361d9.js +1 -0
- package/esm/bundle.css +6 -2
- package/esm/{features-044462ee.js → features-bf71fd6e.js} +1 -1
- package/esm/generic-35152f51.js +1 -0
- package/esm/{index-fa6c7596.js → index-00f19cbd.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-58f64029.js → keyboardShortcuts-5d743be0.js} +1 -1
- package/esm/{multicamv2-0a33c128.js → multicamv2-0a13cf3a.js} +1 -1
- package/esm/{multicamv2-e0e97964.js → multicamv2-7a6956d7.js} +1 -1
- package/esm/{nextEpisodeButton-b37799de.js → nextEpisodeButton-37c2e0bb.js} +1 -1
- package/esm/{playlist-5659eed0.js → playlist-1f65c63b.js} +1 -1
- package/esm/{renditions-cdeb4051.js → renditions-aa307468.js} +1 -1
- package/esm/{series-723accd0.js → series-9faf3331.js} +1 -1
- package/esm/{series-v2-4b8c9435.js → series-v2-09541c88.js} +1 -1
- package/esm/{series-v2-26f37a86.js → series-v2-979f8264.js} +1 -1
- package/esm/{settings-icon-3fd3f980.js → settings-icon-b8f0ec18.js} +1 -1
- package/esm/{skin-5e3830c6.js → skin-47c2c547.js} +1 -1
- package/esm/{skin-2dfc4d66.js → skin-69595ceb.js} +1 -1
- package/esm/{skin-811c8a35.js → skin-b3918671.js} +1 -1
- package/esm/skin-bb45c480.js +1 -0
- package/esm/{skin-6c8ce0a2.js → skin-e2a48f27.js} +1 -1
- package/esm/{skin-3cd46453.js → skin-f7b309f6.js} +1 -1
- package/esm/{util-623a2db0.js → util-1c8c0f16.js} +1 -1
- package/esm/{videoSelector-5f6d9147.js → videoSelector-82d9f0d3.js} +1 -1
- package/esm/{videoSelector-9e7bdf8c.js → videoSelector-afe232e9.js} +1 -1
- package/esm/videojs_contrib_dash-3e3eb724.js +1 -0
- package/package.json +1 -1
- package/cjs/autoNextVideo-369890b0.js +0 -1
- package/cjs/generic-b7a89bae.js +0 -1
- package/cjs/index-baaa3302.js +0 -1
- package/cjs/renditions-f9e729be.js +0 -1
- package/cjs/skin-fa263582.js +0 -1
- package/esm/autoNextVideo-b1b62b4d.js +0 -1
- package/esm/generic-c6511714.js +0 -1
- package/esm/skin-485a4041.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as o,d as s,e as i}from"./features-
|
|
1
|
+
import{a as e,b as t,c as o,d as s,e as i}from"./features-bf71fd6e.js";import{i as n}from"./keyboardShortcuts-5d743be0.js";import{S as r,M as l,a,N as d,b as m,R as u}from"./icons-3bd3bd8f.js";import{g as p,b as c}from"./skin-b8df984d.js";import{g as b}from"./generic-35152f51.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-aa307468.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";function v(v,f){p(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",u())}(v,f),function(s,i){var n=p(s),l=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-37c2e0bb.js").then((function(e){e.initaliseFunctionality(i.sres.seasons,b())}))})),n.one("loadedmetadata",(function(){var e;l&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))}))}(v,f),function(e,t){var o,s,i,n,r=p(e),m=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(m&&(m.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(c(l(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(c(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(d()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./skin-b8df984d.js";import{f as r,n as t}from"./features-
|
|
1
|
+
import{g as e}from"./skin-b8df984d.js";import{f as r,n as t}from"./features-bf71fd6e.js";import{g as o}from"./renditions-aa307468.js";import{r as i}from"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-35152f51.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./localisation-0bf399a1.js";function s(s,n){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,s){e(t).on("loadeddata",(function(){var e;(null===(e=o(t))||void 0===e?void 0:e.length)>0&&r(t,s),null!=s&&s.disableCaptions&&i(t)}))}(s,n),function(r,o){var i=e(r);i.controls(!1),t(r)}(s)}export{s as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./generic-
|
|
1
|
+
import{B as e,C as t}from"./generic-35152f51.js";import{g as r}from"./skin-b8df984d.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";function o(o){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),n(),function(o){var n=document.getElementById("".concat(o)),i=r(o);n&&n.addEventListener("touchstart",(function(){i.paused()?e(o):t(o)}))}(o)}var n=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,o as n,p as t,q as o}from"./features-bf71fd6e.js";import{g as r,t as a,p as i}from"./skin-b8df984d.js";import{a as l,i as s,b as d}from"./index-00f19cbd.js";import{i as u}from"./browser-d4613b36.js";import"videojs-contrib-quality-menu";import c from"video.js";import{k as p,i as v}from"./keyboardShortcuts-5d743be0.js";import{l as m,R as f,e as y}from"./generic-35152f51.js";import b from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";import g from"@babel/runtime/helpers/defineProperty";import S from"@babel/runtime/helpers/asyncToGenerator";import j from"@babel/runtime/regenerator";import{I as k}from"./icons-3bd3bd8f.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-aa307468.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-b3f361d9.js";import"./util-1c8c0f16.js";import"@babel/runtime/helpers/typeof";import"axios";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";function w(n,t){var o=r(n);o&&(o.on("loadeddata",(function(){var e,o,a,i,d;!function(e){var n=r(e);n&&(null==n||n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable||null!==(o=window)&&void 0!==o&&null!==(a=o.app_data)&&void 0!==a&&null!==(i=a.appcmsMain)&&void 0!==i&&null!==(d=i.features)&&void 0!==d&&d.auto_play)||null!=t&&t.liveVideo||l(n,t),null!=t&&t.liveVideo||u()||s(n)})),o.one("play",(function(){var t,o,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.iframeOverlayUrl&&e(n,null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.iframeOverlayUrl)})))}function I(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return O(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function T(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function x(){return x=S(j.mark((function e(n,t){var o,l,s,d,u,c,v,y,g,w,O,T,x,E,M,A,P,N,U;return j.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U=function(e,t,o){var a=r(n);Math.floor(a.currentTime());var i,l,s,d,u,c,p,v,m,f,y,b,h,g,S=I(t);try{for(S.s();!(i=S.n()).done;)l=void 0,s=void 0,d=void 0,u=void 0,c=void 0,p=void 0,v=void 0,m=void 0,f=void 0,y=void 0,b=void 0,h=void 0,g=void 0,c=i.value,p=c.eventType,v=c.beaconUrls,m=c.startTimeInSeconds,f=c.startTime,y=c.durationInSeconds,b=Math.round(m),h=v[0],g=(null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s||null===(d=s.ads)||void 0===d?void 0:d.adEventHandler)||null,b!=Math.round(a.currentTime())||N.has(f)||(N.set(f,!0),"function"==typeof g&&g({adsData:{eventType:p,startTimeInSeconds:m,startTime:f,durationInSeconds:y,ad:null==e||null===(u=e.ads)||void 0===u?void 0:u[o],adIndex:o}}),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",p,"Fired:".concat(Math.round(a.currentTime())),"AD_POD:",e),fetch(h))}catch(e){S.e(e)}finally{S.f()}},P=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},M=function(e){var n={},t=e.split("?")[1];if(!t)return n;var o,r=I(t.split("&"));try{for(r.s();!(o=r.n()).done;){var a=o.value.split("="),i=h(a,2),l=i[0],s=i[1];n[decodeURIComponent(l)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},u=0,c=Object.entries(n);u<c.length;u++){var p=h(c[u],2),v=p[0],m=p[1];if(v.startsWith("ads."))d[v.replace(/^ads\./,"")]=m;else d[v]=m}return d},o=r(n),l=t.replace("dash","session").replace("master","session"),l=f(l,n,{}),s=M(l),l=l.split("?")[0],e.next=10,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:C({},s)})});case 10:return d=e.sent,e.next=13,d.json();case 13:u=e.sent,c="https://"+new URL(l).hostname,v=u.trackingUrl,y=u.manifestUrl,g=c+v,w=c+y,console.log("%c TRACKING URL","background: #bdf369; color: #000",g),null!=t&&t.includes(".mpd")?(T=(null==o||null===(O=o.currentSource())||void 0===O?void 0:O.keySystemOptions)||null,m(n,{src:w,type:"application/x-mpegURL",keySystemOptions:T})):(E=(null==o||null===(x=o.currentSource())||void 0===x?void 0:x.keySystems)||null,m(n,{src:w,type:"application/x-mpegURL",keySystems:E})),o.one("loadeddata",(function(){A(g)})),A=function(){var e=S(j.mark((function e(t){var o,l,s,d,u,c,v,m,f,y,h,g,S,w,I,O,T;return j.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return l=e.sent,e.next=5,l.json();case 5:s=e.sent,d=s.avails,u=[],c=r(n),v=c.controlBar.progressControl,m=v.seekBar.el(),d.map((function(e){var n;Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&u.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds)})})),u.forEach((function(e){var n=e.markerPositionInSeconds,t=c.duration();if(!(n>t)){var o=n/t*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(o,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(o,"%"),r.style.pointerEvents="none",m.appendChild(r)}})),f=new Map,y=-1,c.on("timeupdate",a((function(){var e=Math.floor(c.currentTime());if(e!==y){y=e;for(var n=!1,t=function(){var t=r[o],a=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,s=Math.floor(a+i);if(e>=a&&e<=s){n=!0,f.set(a,!0),p.disable(),v.el().style.visibility="hidden";for(var d=e-a,u=0,c=0,m=0;m<l.length;m++){var y,g=null==l||null===(y=l[m])||void 0===y?void 0:y.durationInSeconds;if(d<u+g){c=m;break}u+=g}var S=l[c],j=d-u,k=Math.max(0,S.durationInSeconds-j),w=Math.round(k);h.style.display="block",O.textContent="".concat(c+1," of ").concat(l.length," • ").concat(P(w));var I=[];return l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));I.push.apply(I,b(n))})),U(t,I,c),"break"}},o=0,r=u;o<r.length;o++){if("break"===t())break}n||(h.style.display="none",v.el().style.visibility="visible",p.enable())}}),1e3)),c.on("seeked",(function(){for(var e=null,n=0,t=u;n<t.length;n++){var o=t[n],r=null==c?void 0:c.currentTime(),a=o.startTimeInSeconds,i=o.durationInSeconds;r>Math.floor(a+i)&&!f.has(a)&&(e=a,f.set(a,!0))}e&&(c.currentTime(e),console.log("seeking back to",e),e=null)})),(h=document.createElement("div")).className="ssai-ad-container",(g=document.createElement("div")).className="sponsored-adbox",(S=document.createElement("div")).className="sponsored-text",S.textContent="Sponsored Ad",(w=document.createElement("div")).className="ad-info-icon",I=i(k()),w.appendChild(I),g.append(S),g.append(w),(O=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(T=document.createElement("div")).className="ad-visit-advertiser",T.textContent="Visit Advertiser",(null===(o=document.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])&&(T.style.right="8.6rem"),h.append(g),h.append(O),h.append(T),c.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N=new Map;case 24:case"end":return e.stop()}}),e)}))),x.apply(this,arguments)}function E(e,a){r(e).addClass("skin_vlone"),w(e,a),function(e,r){var a,i,l,s,u,c,p=null==r||null===(a=r.res)||void 0===a||null===(i=a.video)||void 0===i?void 0:i.isSSAIEnabled,m=y(null==r?void 0:r.res,e),f=m.src;(null==r||null===(l=r.relatedVideos)||void 0===l||null===(s=l.content)||void 0===s?void 0:s.length)>0&&n(e,null==r?void 0:r.relatedVideos);null!=r&&null!==(u=r.series)&&void 0!==u&&u.enable&&t(e,r);(null==r||null===(c=r.streams)||void 0===c?void 0:c.length)>1&&o(e,null==r?void 0:r.streams);d(e,r),v(e,r),p&&function(e,n){x.apply(this,arguments)}(e,f)}(e,a),M()}var M=function(){var e,n,t,o,r,a,i,l,s,d,u,p,v=c.dom.$(".vjs-play-progress"),m=c.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");m&&(m.style.color="".concat(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(o=t.brand)||void 0===o||null===(r=o.cta)||void 0===r||null===(a=r.primary)||void 0===a?void 0:a.backgroundColor)),v&&(v.style.background="".concat(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(d=s.brand)||void 0===d||null===(u=d.cta)||void 0===u||null===(p=u.primary)||void 0===p?void 0:p.backgroundColor))};export{E as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as l,g as e,h as o,d as i,e as n,i as t,j as a,k as r,l as s,m as d}from"./features-
|
|
1
|
+
import{f as l,g as e,h as o,d as i,e as n,i as t,j as a,k as r,l as s,m as d}from"./features-bf71fd6e.js";import{M as u,a as m,c as v,d as p}from"./icons-3bd3bd8f.js";import{g as c,b as h}from"./skin-b8df984d.js";import{g as f}from"./renditions-aa307468.js";import{g as b}from"./captions-135a6d13.js";import{a as g,i as y,b as j}from"./index-00f19cbd.js";import{i as C,d as V}from"./browser-d4613b36.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./generic-35152f51.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-b3f361d9.js";import"./util-1c8c0f16.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";function w(i,n){var t=c(i);t&&(t.on("loadeddata",(function(){var o,a,r,s,d,u,m;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(a=b(i))||void 0===a?void 0:a.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(s=window)&&void 0!==s&&null!==(d=s.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(m=u.features)&&void 0!==m&&m.auto_play)||null!=n&&n.liveVideo||g(i,n),function(l,e){var o,i=Math.floor(l/60),n=null===(o=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===o?void 0:o[0];n&&(n.style.marginRight=i>60?"56px":"41px");var t=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");e&&t.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",n&&(n.style.marginRight="56px"))}(t.duration(),(null==n?void 0:n.liveVideo)||!1),null!=n&&n.liveVideo||C()||y(i)})),t.one("play",(function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}function k(l,e){c(l).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-e4b35c14.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),w(l,e),function(l,e){var o,i,n,t,a,r,s=c(l);null==s||null===(o=s.controlBar)||void 0===o||null===(i=o.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(h(u(window.controlsColor))),null==s||null===(t=s.controlBar)||void 0===t||null===(a=t.getChild("FullscreenToggle"))||void 0===a||null===(r=a.el())||void 0===r||r.appendChild(h(m(window.controlsColor)));var d=document.getElementsByClassName("vjs-time-control");e.liveVideo&&d[0]&&(d[0].style.display="none")}(l,e),function(l,e){var o,u,m,c,h,f;0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());e.liveVideo||t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&a(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&r(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&s(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&d(l,e)}(l,e),j(l,e)}export{k as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as r,C as e}from"./generic-
|
|
1
|
+
import{B as r,C as e}from"./generic-35152f51.js";import{g as t}from"./skin-b8df984d.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";function o(r){n(r),i(r)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",(function(){i.paused()?r(o):e(o)}))},n=function(r){var e=t(r);e.requestFullscreen=function(){},e.controlBar.hide()};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./skin-b8df984d.js";var n=function(n,a,r){var
|
|
1
|
+
import{g as t}from"./skin-b8df984d.js";var n=function(n,a,r){var e=t(n);e?a>=0&&a<=e.duration()?(r({status:!0,msg:"Successfully seeked to timestamp : ".concat(a)}),e.currentTime(a)):r({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):r("Cannot find player with id: '".concat(n,"'"))},a=function(n,a){var r=t(n);if(!r)return"Cannot find player with id: '".concat(n,"'");try{return r.playbackRate(a),"Playback speed set to ".concat(a,"x")}catch(t){return"Error: ".concat(t)}},r=function(n,a){var r=t(n);r?r.on("timeupdate",(function(){return a(r.currentTime())})):a("Cannot find player with id: '".concat(n,"'"))},e=function(n,a){var r=t(n);r?r.on("ended",(function(){return a(!0)})):a("Cannot find player with id: '".concat(n,"'"))},i=function(n){var a=t(n);return a?a.duration():"Cannot find player with id: '".concat(n,"'")};export{e as a,a as b,i as g,r as o,n as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-35152f51.js";import{e as c,s as m,f as u,j as p,k as v}from"./skin-b8df984d.js";import{a as h}from"./autoNextVideo-b3f361d9.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";import"./util-1c8c0f16.js";function b(e){var t=y();return function(){var o,a=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(a,arguments,r)}else o=a.apply(this,arguments);return n(this,o)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var g=a.getComponent("Component"),C=function(n){o(y,g);var i=b(y);function y(t){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(a=i.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(d(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(y,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),u(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),u=function(e){var o,n,i,r,l,u=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(u,p),a.dom.appendContent(u,f),a.dom.appendContent(m,u),a.dom.appendContent(c,m)},h=0;h<this.videos.length;h++)u(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),p(this.playerId,e)}}]),y}();export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{e as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{e as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-35152f51.js";import{e as c,s as m,f as p,j as u,h as v,i as h}from"./skin-b8df984d.js";import{a as f}from"./autoNextVideo-b3f361d9.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";import"./util-1c8c0f16.js";function y(e){var t=C();return function(){var o,a=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(a,arguments,r)}else o=a.apply(this,arguments);return n(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var g=a.getComponent("Component"),j=function(n){o(C,g);var i=y(C);function C(t){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,C),(a=i.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(d(0),f({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(C,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open")};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,r,l,p,u,f,b=a.dom.createEl("div",{className:"video -".concat(e)}),y=a.dom.createEl("div",{className:"recommended -".concat(e)});y.setAttribute("video-idx",e),y.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var C=document.createElement("img");C.className="related-thumbnail-image",C.src="".concat(h(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||h(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.appcmsMain)||void 0===l||null===(p=l.images)||void 0===p?void 0:p.placeholderCover)),C.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),y.append(C);var g=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(f=t.videos[e])||void 0===f?void 0:f.title)||"")});a.dom.appendContent(b,y),a.dom.appendContent(b,g),a.dom.appendContent(m,b),a.dom.appendContent(c,m)},f=0;f<this.videos.length;f++)p(f);a.dom.appendContent(n,r),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,c),u(this.playerId,e)}}]),C}();export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import a from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import s from"@babel/runtime/helpers/getPrototypeOf";import l from"global/window";import c from"video.js";import d from"dashjs";import u from"global/document";function h(e){var a=p();return function(){var t,r=s(e);if(a){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return i(this,t)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,a){var t=e.dash.mediaPlayer,r=t.getTracksFor("audio"),o=e.audioTracks();function n(e){return"dash-audio-".concat(e)}function i(e,a){return e.find((function(e){return n(e.index)===a.id}))}o.length&&a.clearTracks(["audio"]);var s=t.getCurrentTrackFor("audio");r.forEach((function(a){var t,r;if(Array.isArray(a.labels))for(var i=0;i<a.labels.length;i++)if(a.labels[i].lang&&-1!==e.language().indexOf(a.labels[i].lang.toLowerCase())){t=a.labels[i];break}t?r=t.text:Array.isArray(a.labels)&&1===a.labels.length?r=a.labels[0].text:(r=a.lang,a.roles&&a.roles.length&&(r+=" ("+a.roles.join(", ")+")")),o.addTrack(new c.AudioTrack({enabled:a===s,id:n(a.index),kind:a.kind||"main",label:r,language:a.lang}))}));var l=function(){for(var e=0;e<o.length;e++){var a=o[e];if(a.enabled){var n=i(r,a);t.setCurrentTrack(n)}else;}};o.addEventListener("change",l),e.dash.mediaPlayer.on(d.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,(function(){o.removeEventListener("change",l)}))}function f(e,a){e.dash.mediaPlayer.on(d.MediaPlayer.events.PLAYBACK_METADATA_LOADED,y.bind(null,e,a))}function m(e,a,t){l.VTTCue&&!/\[native code\]/.test(l.VTTCue.toString())&&(l.VTTCue=!1);var r=[];if(a.featuresNativeTextTracks)c.log.error("You must pass {html: {nativeCaptions: false}} in the videojs constructor to use text tracks in videojs-contrib-dash");else{var o=e.dash.mediaPlayer;o.on(d.MediaPlayer.events.TEXT_TRACKS_ADDED,n),o.on(d.MediaPlayer.events.CAN_PLAY,(function(){o.off(d.MediaPlayer.events.TEXT_TRACKS_ADDED,n)}))}function n(a){a.index;var t=a.tracks;o.off(d.MediaPlayer.events.TEXT_TRACKS_ADDED,n),r.forEach(e.removeRemoteTextTrack.bind(e)),r=[],t.length&&(r=function(e,a,t){var r=[],o=t.map((function(a){var t;if(Array.isArray(a.labels))for(var r=0;r<a.labels.length;r++)if(a.labels[r].lang&&-1!==e.language().indexOf(a.labels[r].lang.toLowerCase())){t=a.labels[r];break}return{dashTrack:a,trackConfig:{label:t?t.text:Array.isArray(a.labels)&&1===a.labels.length?a.labels[0].text:a.lang||a.label,language:a.lang,srclang:a.lang,kind:a.kind}}})).map((function(a){var t=a.trackConfig,o=a.dashTrack;if(o.isTTML&&!e.getChild("TTMLTextTrackDisplay"))return null;var n=e.addRemoteTextTrack(t,!1);return r.push({textTrack:n.track,dashTrack:o}),n})).filter((function(e){return null!==e}));function n(){for(var a=e.dash.mediaPlayer,o=e.textTracks(),n=-1,i=function(){var e=o[s];if("showing"===e.mode){var a=function(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return e[t]}(r,(function(a){return a.textTrack===e})),i=a?a.dashTrack:null;i&&(n=t.indexOf(i))}},s=0;s<o.length;s+=1)i();n!==a.getCurrentTextTrackIndex()&&a.setTextTrack(n)}return e.textTracks().on("change",n),e.dash.mediaPlayer.on(d.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,(function(){e.textTracks().off("change",n)})),n(),o}(e,0,t))}}var g=c.getComponent("Component"),v="#222",b="#ccc",T={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function k(e,a,t){try{e.style[a]=t}catch(e){return}}function _(e){for(var a in e.style&&(e.style.left=null,e.style.width="100%"),e.children)_(e.children[a])}function P(e,a){var t;if(4===e.length)t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");t=e.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+a+")"}var x=function(e){n(c,g);var i=h(c);function c(e,t,o){var n;a(this,c),(n=i.call(this,e,t)).ready(o);for(var s=e.getChild("TextTrackSettings").$$("select"),l=0;l<s.length;l++)n.on(s[l],"change",n.updateStyle.bind(r(n)));return e.dash.mediaPlayer.on(d.MediaPlayer.events.CAPTION_RENDERED,n.updateStyle.bind(r(n))),n}return t(c,[{key:"createEl",value:function(){var e=o(s(c.prototype),"createEl",this).call(this,"div",{className:"vjs-text-track-display-ttml"},{"aria-live":"off","aria-atomic":"true"});return e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin="1.5%",e}},{key:"updateStyle",value:function(e){var a=e.captionDiv;if(this.player_.textTrackSettings){var t=this.player_.textTrackSettings.getValues();if(a=a||this.player_.getChild("TTMLTextTrackDisplay").el().firstChild){_(a);for(var r=a.getElementsByTagName("span"),o=0;o<r.length;o++){var n=r[o];if(n.parentNode.style.textAlign="center",t.color&&(n.style.color=t.color),t.textOpacity&&k(n,"color",P(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(n.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&k(n,"backgroundColor",P(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?k(n.parentNode,"backgroundColor",P(t.windowColor,t.windowOpacity)):n.parent.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?n.style.textShadow="2px 2px 3px ".concat(v,", 2px 2px 4px ").concat(v,", 2px 2px 5px ").concat(v):"raised"===t.edgeStyle?n.style.textShadow="1px 1px ".concat(v,", 2px 2px ").concat(v,", 3px 3px ").concat(v):"depressed"===t.edgeStyle?n.style.textShadow="1px 1px ".concat(b,", 0 1px ").concat(b,", -1px -1px ").concat(v,", 0 -1px ").concat(v):"uniform"===t.edgeStyle&&(n.style.textShadow="0 0 4px ".concat(v,", 0 0 4px ").concat(v,", 0 0 4px ").concat(v,", 0 0 4px ").concat(v))),t.fontPercent&&1!==t.fontPercent){var i=l.parseFloat(n.style.fontSize);n.style.fontSize=i*t.fontPercent+"px",n.style.height="auto",n.style.top="auto",n.style.bottom="2px"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?n.style.fontVariant="small-caps":n.style.fontFamily=T[t.fontFamily])}}}}}]),c}();c.registerComponent("TTMLTextTrackDisplay",x);var D=function(){function r(t,o,n){var i=this;if(a(this,r),n=n||o.options_,this.player=c(n.playerId),this.player.dash=this.player.dash||{},this.tech_=o,this.el_=o.el(),this.elParent_=this.el_.parentNode,this.hasFiniteDuration_=!1,t.src){o.isReady_=!1,r.updateSourceData&&(c.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),t=r.updateSourceData(t)),r.hooks("updatesource").forEach((function(e){t=e(t)}));var s=t.src;this.keySystemOptions_=r.buildDashJSProtData(t.keySystemOptions),this.player.dash.mediaPlayer=d.MediaPlayer().create(),this.mediaPlayer_=this.player.dash.mediaPlayer,r.useVideoJSDebug&&(c.log.warn('useVideoJSDebug has been deprecated. Please switch to using hook("beforeinitialize", callback).'),r.useVideoJSDebug(this.mediaPlayer_)),r.beforeInitialize&&(c.log.warn('beforeInitialize has been deprecated. Please switch to using hook("beforeinitialize", callback).'),r.beforeInitialize(this.player,this.mediaPlayer_)),r.hooks("beforeinitialize").forEach((function(e){e(i.player,i.mediaPlayer_)})),this.mediaPlayer_.initialize(),this.retriggerError_=function(e){if("capability"===e.error&&"mediasource"===e.event)i.player.error({code:4,message:"The media cannot be played because it requires a feature that your browser does not support."});else if("manifestError"!==e.error||"createParser"!==e.event.id&&"codec"!==e.event.id&&"nostreams"!==e.event.id&&"nostreamscomposed"!==e.event.id&&"parse"!==e.event.id&&"multiplexedrep"!==e.event.id)if("mediasource"===e.error)e.event.match("MEDIA_ERR_ABORTED")?i.player.error({code:1,message:e.event}):e.event.match("MEDIA_ERR_NETWORK")?i.player.error({code:2,message:e.event}):e.event.match("MEDIA_ERR_DECODE")?i.player.error({code:3,message:e.event}):e.event.match("MEDIA_ERR_SRC_NOT_SUPPORTED")?i.player.error({code:4,message:e.event}):e.event.match("MEDIA_ERR_ENCRYPTED")?i.player.error({code:5,message:e.event}):(e.event.match("UNKNOWN"),i.player.error({code:4,message:e.event}));else if("capability"===e.error&&"encryptedmedia"===e.event)i.player.error({code:5,message:"The media cannot be played because it requires encryption features that your browser does not support."});else if("key_session"===e.error)i.player.error({code:5,message:e.event});else if("download"===e.error)i.player.error({code:2,message:"The media playback was aborted because too many consecutive download errors occurred."});else{if("mssError"!==e.error)return;i.player.error({code:3,message:e.event})}else i.player.error({code:4,message:e.event.message});setTimeout((function(){i.mediaPlayer_.reset()}),10)},this.mediaPlayer_.on(d.MediaPlayer.events.ERROR,this.retriggerError_),this.getDuration_=function(e){var a=e.data.Period_asArray,t=i.hasFiniteDuration_;e.data.mediaPresentationDuration||a[a.length-1].duration?i.hasFiniteDuration_=!0:i.hasFiniteDuration_=!1,i.hasFiniteDuration_!==t&&i.player.trigger("durationchange")},this.mediaPlayer_.on(d.MediaPlayer.events.MANIFEST_LOADED,this.getDuration_),n.dash&&Object.keys(n.dash).forEach((function(a){var t;if("useTTML"!==a){var r="set"+a.charAt(0).toUpperCase()+a.slice(1),o=n.dash[a];i.mediaPlayer_.hasOwnProperty(r)&&(c.log.warn("Using dash options in videojs-contrib-dash without the set prefix "+"has been deprecated. Change '".concat(a,"' to '").concat(r,"'")),a=r),i.mediaPlayer_.hasOwnProperty(a)?(Array.isArray(o)||(o=[o]),(t=i.mediaPlayer_)[a].apply(t,e(o))):c.log.warn("Warning: dash configuration option unrecognized: ".concat(a))}})),this.mediaPlayer_.attachView(this.el_),n.dash&&n.dash.useTTML&&(this.ttmlContainer_=this.player.addChild("TTMLTextTrackDisplay"),this.mediaPlayer_.attachTTMLRenderingDiv(this.ttmlContainer_.el())),this.mediaPlayer_.setAutoPlay(!1),f.call(null,this.player,o),m.call(null,this.player,o,n),this.mediaPlayer_.setProtectionData(this.keySystemOptions_),this.mediaPlayer_.attachSource(s),this.tech_.triggerReady()}}return t(r,[{key:"dispose",value:function(){this.mediaPlayer_&&(this.mediaPlayer_.off(d.MediaPlayer.events.ERROR,this.retriggerError_),this.mediaPlayer_.off(d.MediaPlayer.events.MANIFEST_LOADED,this.getDuration_),this.mediaPlayer_.reset()),this.player.dash&&delete this.player.dash,this.ttmlContainer_&&(this.ttmlContainer_.dispose(),this.player.removeChild("TTMLTextTrackDisplay"))}},{key:"duration",value:function(){return this.mediaPlayer_.isDynamic()&&!this.hasFiniteDuration_?1/0:this.mediaPlayer_.duration()}}],[{key:"buildDashJSProtData",value:function(e){var a={};if(!e||!Array.isArray(e))return null;for(var t=0;t<e.length;t++){var r=e[t],o=c.mergeOptions({},r.options);o.licenseUrl&&(o.serverURL=o.licenseUrl,delete o.licenseUrl),a[r.name]=o}return a}},{key:"hooks",value:function(e,a){return r.hooks_[e]=r.hooks_[e]||[],a&&(r.hooks_[e]=r.hooks_[e].concat(a)),r.hooks_[e]}},{key:"hook",value:function(e,a){r.hooks(e,a)}},{key:"removeHook",value:function(e,a){var t=r.hooks(e).indexOf(a);return-1!==t&&(r.hooks_[e]=r.hooks_[e].slice(),r.hooks_[e].splice(t,1),!0)}}]),r}();D.hooks_={};c.DashSourceHandler=function(){return{canHandleSource:function(e){return function(e){e=JSON.parse(JSON.stringify(e)),D.updateSourceData&&(c.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),e=D.updateSourceData(e)),D.hooks("updatesource").forEach((function(a){e=a(e)}));var a=u.createElement("video");return!(e.keySystemOptions&&!l.navigator.requestMediaKeySystemAccess&&!a.msSetMediaKeys)}(e)?c.DashSourceHandler.canPlayType(e.type)?"probably":/\.mpd/i.test(e.src)?"maybe":"":""},handleSource:function(e,a,t){return new D(e,a,t)},canPlayType:function(e){return c.DashSourceHandler.canPlayType(e)}}},c.DashSourceHandler.canPlayType=function(e){return/^application\/dash\+xml/i.test(e)?"probably":""},l.MediaSource&&c.getTech("Html5").registerSourceHandler(c.DashSourceHandler(),0),c.Html5DashJS=D;export{D as default};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e,i=require("./generic-b7a89bae.js"),t=require("./util-6edeeb8a.js"),n=require("./skin-34fbc337.js"),o=0,d=0,u=function e(t,o,u,l){d=t,t>u.length-1||(i.setVideoIdx(d+1),i.load(o,u[t].id).then((function(e){n.highlightVideo(d,o),d++,r(e,t+1)})).catch((function(i){r(i),setTimeout((function(){n.highlightVideo(d,o),d++,e(d,o,u)}),5e3)})))},r=function(i){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e&&e(i,t)};exports.autoPlayNext=function(l){clearTimeout(o);var c=null==l?void 0:l.content;e=null==l?void 0:l.cb;var h=l.playerId;t.onVideoEnded(h,(function(){var e=n.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>c.length-1||(i.setVideoIdx(d+1),i.load(h,c[d].id).then((function(e){n.highlightVideo(d,h),i.setCurrentVideo(e.response),d++,r(e,idx+1)})).catch((function(e){r(e),n.highlightVideo(d,h),d++,o=setTimeout((function(){i.isPaused(h)&&u(d,h,c)}),5e3)}))))}))},exports.switchToNext=u;
|
package/cjs/generic-b7a89bae.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-34fbc337.js"),a=require("./browser-77c57718.js"),l=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-fbd6fefb.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function c(e,t){s("event",e,t)}var v={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 m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"2.0.16",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=f.version;var w,g=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":y.get()+"".concat(null==v?void 0:v.getVideoDetails),params:p({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},I=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:y.get()+v.getLinearChannelDetails,params:p(p(p(p(p({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},E=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:return i=e.sent,e.abrupt("return",o({url:y.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:p({},t),params:p({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},T=function(e){var t=e.videoId;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},y=(w=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),b=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},_=null;function D(){return{set:function(e){e&&(_=e)},get:function(){return _}}}var O,F,P,S,L,V,R=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().get(),i=y.get(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),W=null,A=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!b(t)){e.next=6;break}return W||(W=R().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&D().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){W=null}))),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){F=e},N=function(){return F},B=function(){return O},j=function(e){P=e},M=function(e){if(S){var t=S.get(e);j(t+1)}},U=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var G=0,z=function(){var e,t,n,i,o,r,a,l=N();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Y(){var e=window.sessionStorage.getItem("uid");return e||(e=q(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=q(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:Y(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,t){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null}),100),c("PLAY",H({pfm:window.platform,uid:Y(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":z(),watchTime:Math.floor(e.currentTime())})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&G<4)G++,c("BUFFERING",H({pfm:window.platform,uid:Y(),vid:z(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:z()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:z()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(G=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(K(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var K=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p,f,w,g,I,E,h,T,y,b;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:return E=e.sent,h=C(E),T=null==h?void 0:h.site,y=null==h?void 0:h.siteId,e.t0=H,e.t1=H,e.t2=H({aid:T,cid:y,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=Y(),e.t5=z(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,X();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(f=p.beacon)||void 0===f?void 0:f.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g||null===(I=g.beacon)||void 0===I?void 0:I.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var Q=function(){var e=U.get();return e>=0?e+1:1},Z=function(){var e,t,n,i=B(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=U.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var te=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ne=function(e){var t=ie(e,"video.tags",[]),n=ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},ie=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},oe=function(){var e,t,n,i,o,a,d,u,s,c,v,m,p,f,w,g,I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,h=arguments.length>2?arguments[2]:void 0,T=(null==h?void 0:h.contentType)||"video",y=null==h||null===(e=h[T])||void 0===e?void 0:e.metadata,b=r.getPlayer(E);if(!I.includes("VIEWLIFT_"))return I;var _=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(_.getPropertyValue("height").slice(0,-2)),O=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===T?null==h||null===(t=h.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==h?void 0:h.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:ie(h,"video.gist.id",""),P=ee(ee({},re(y)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:te(O,D),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ie(h,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(u=b.options_)||void 0===u?void 0:u.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:ne(h),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ie(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+ie(h,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ie(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:ie(null===(m=window)||void 0===m||null===(p=m.app_data)||void 0===p||null===(f=p.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:ie(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ie(h,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ie(h,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Z(),VIEWLIFT_SEASON_NUMBER:Q(),VIEWLIFT_CONTENT_TAGS:ne(h)},null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g?void 0:g.macros);for(var S in P){var L=new RegExp(S,"g");I=I.replace(L,P[S])}return I},re=function(e){var t,n,i,o,r,l,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||c?(a.isMobile()?s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},ae=function(e,t){var n,i,o,r,l,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,h=(null==e||null===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var T=(null==e||null===(m=e[w])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return de(E);if(g){var y=ue(I,t);return y.src=oe(y.src,t,e),y}if("Safari"!==a.detectBrowser()&&T)return le(I);if(h){var b=de(I);return b.src=oe(b.src,t,e),b}if(null!=I&&I.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return _.src=oe(_.src,t,e),_}return null},le=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},de=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ue=function(e,t){var n=e.fairPlay,o=e.widevine,l=e.playReady,d=a.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return se(t),u}var s={src:o.url,type:"application/dash+xml"};return se(t),s.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},s};var se=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ce=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ve=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var me=!1,pe=function(e,t,n){var i=oe(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r.getPlayer(e);if(null!==a.el_){me=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),me&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var we=function(e){return!!i.getPlayer("".concat(e))},ge=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,A();case 3:return a=e.sent,l=r.getPlayer(t),e.abrupt("return",new Promise((function(e,n){I(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=q(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=ae(r,t);x(r),a&&o?(he(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ie=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,s,c,v;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:return s=e.sent,(B()||null)&&M(i),c=0,v=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&h(i,s).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){g(i,s).then((function(i){var o,a,l,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;x(i.data);var h=(null==I||null===(l=I.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);h&&pe(t,h,I);var T=ae(I,t);if(T){var y,b,_,D,O,F,P,S,L,V,R,W,A,C,N=(null==I||null===(y=I.video)||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||(null==I||null===(_=I.video)||void 0===_||null===(D=_.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),he(t,T),B.on("loadstart",(function(){E&&e({status:!0,msg:"Video Loaded",response:I})})),B.on("loadeddata",(function(){ve(),e({status:!0,msg:"Video Loaded",response:I})})),B.one("play",(function(){c&&v<95&&setTimeout((function(){B.currentTime(c)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(F=I.video)||void 0===F||null===(P=F.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==I||null===(L=I.video)||void 0===L||null===(V=L.closedCaptions)||void 0===V?void 0:V.length)>0)R=((null==I||null===(W=I.video)||void 0===W||null===(A=W.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null==I||null===(C=I.video)||void 0===C?void 0:C.closedCaptions)).filter((function(e){return"VTT"===e.format})),u.addCaptions(t,R);else u.removeCaptions(t)}else ce(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Te(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Ee=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()},he=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},Te=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);we(n)&&ce(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=ge,exports.baseUrlManager=y,exports.clearError=ve,exports.createIdxMapping=function(e){S=new Map,e.map((function(e,t){S.set(e.id,t)}))},exports.createSeriesWatchMap=function(e,t){var n=new Map;T({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),L=n})).catch((function(e){return console.log(e)}))},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Ee(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=B,exports.getCurrentVideo=N,exports.getEntitlementData=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=Z,exports.getLinearChannelDetails=I,exports.getSeasonNumber=Q,exports.getSeriesDetails=function(e,t){var n,i,r=C(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:y.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=T,exports.getSeriesWatchMap=function(){return L},exports.getSource=ae,exports.getToken=A,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=Y,exports.getVideoDetails=g,exports.getVideoIdx=function(){return P},exports.getVideoInfo=h,exports.handleError=ce,exports.initialiseAdvertisement=pe,exports.initiateErrorHandling=Te,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=we,exports.isTokenExpired=b,exports.load=Ie,exports.loadVideo=he,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=D,exports.replaceMacros=oe,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=E,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){O=e},exports.setCurrentVideo=x,exports.setVideoIdx=j,exports.setVideoIdxById=M,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
package/cjs/index-baaa3302.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),o=require("./skin-34fbc337.js"),a=require("./generic-b7a89bae.js"),l=require("./autoNextVideo-369890b0.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=o.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();l.switchToNext(i,e,m)}};function h(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function g(e){return x.apply(this,arguments)}function x(){return(x=c(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=v(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)},n.onerror=function(n){var r,i,o,a;e([{duration:t.duration,uri:"".concat(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(a=o.images)||void 0===a?void 0:a.placeholderCover)}])}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",h(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function w(e){return E.apply(this,arguments)}function E(){return(E=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return g(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},p(n,"left","-60px"),p(n,"border","1px solid transparent"),p(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e={0:{src:"example-thumbnail.png"}},t=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===u(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",(function(i){var o,a,l,u,s,c,d,p;function v(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",v),p()}a=t({},e,i),u=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),o.appendChild(l),l.src=a[0].src,l.className="vjs-thumbnail",t(l.style,a[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",(function(e){c=u.duration()})),u.on("loadedmetadata",(function(e){c=u.duration()})),(s=u.controlBar.progressControl).el().appendChild(o),d=function(e){var i,u,d,p,v,m,f,h,g,x;for(u in d=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=r(s.el()).getBoundingClientRect()).width||x.right)+g,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+g,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),a)i>u&&(d=Math.max(d,u));(v=a[d]).src&&l.src!=v.src&&(l.src=v.src),v.style&&l.style!=v.style&&t(l.style,v.style),p+(h=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(l,v.width||a[0].width)/2)>f?p-=p+h-f:p<h&&(p=h),o.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),s.on("pointerdown",(function(e){document.addEventListener("pointermove",d),document.addEventListener("pointerup",v)})),p=function(e){o.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)}));var N=function(){var e=c(d.mark((function e(t,n){var r,i,o,a;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=v(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function C(e){return k.apply(this,arguments)}function k(){return(k=c(d.mark((function e(t){var n,r,i,o,l,u,s,c,p,m,f,h,g,x,y,b,w,E,N,C,k,A,P,L,B,M,S,j,q,O,R,X;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return l=e.sent,e.next=7,l.text();case 7:u=e.sent,s=new DOMParser,c=s.parseFromString(u,"application/xml"),p=null===(r=a.getCurrentVideo())||void 0===r||null===(i=r.video)||void 0===i?void 0:i.runtime,m=(null==c||null===(o=c.querySelector("MPD > BaseURL"))||void 0===o?void 0:o.textContent)||n+"/",f=c.getElementsByTagName("AdaptationSet"),h=0;case 14:if(!(h<f.length)){e.next=42;break}if(("image"!==(g=f[h]).getAttribute("contentType")||"image/png"!==g.getAttribute("mimeType"))&&"image/jpeg"!==g.getAttribute("mimeType")){e.next=39;break}if(x=g.getElementsByTagName("SegmentTemplate")[0],y=g.getElementsByTagName("Representation")[0],b=y.getElementsByTagName("EssentialProperty")[0],w=b.getAttribute("value"),E=null==w?void 0:w.split("x"),N=v(E,2),C=N[0],k=N[1],!x){e.next=39;break}if(x.getAttribute("media"),A=x.getAttribute("duration"),P=x.getAttribute("timescale"),L=(P?A/P:A)/(C*k),B=y.getAttribute("id"),M=Math.round(p/L),S=Math.ceil(M/(C*k)),j=x.getAttribute("media"),q=parseInt(x.getAttribute("startNumber"))||0,!isNaN(parseInt(S))){e.next=35;break}return e.abrupt("return");case 35:for(O=[],R=T(j),h=0;h<S;h++)X=R?I(R,h+q):j,O.push({duration:L,layout:w,uri:m+X.replace("$Number$",h+q).replace("$RepresentationID$",B)});return e.abrupt("return",O);case 39:h++,e.next=14;break;case 42:return console.log("No trickplay segment found."),e.abrupt("return",null);case 46:e.prev=46,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 49:case"end":return e.stop()}}),e,null,[[1,46]])})))).apply(this,arguments)}function T(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function I(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function A(){return(A=c(d.mark((function e(t){var n,r,i,a,l,u,s,c,p,v,m,f,h,g,x,b;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=o.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,y(c);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,N(f,m);case 12:return h=e.sent,e.next=15,w(h);case 15:g=e.sent,u.thumbnails(g);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,C(c);case 22:if(!((null==(x=e.sent)?void 0:x.length)>0)){e.next=28;break}return e.next=26,w(x);case 26:b=e.sent,u.thumbnails(b);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=a.getCurrentSeries();null==l||l.map((function(e){var t;return(t=m).push.apply(t,i(e.episodes))})),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=o.getPlayer(e);c.on("timeupdate",(function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var d,p=m.filter((function(e,t){return t==a.getVideoIdx()}));if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,h,g,x,y,b,w,E,N,C,k,T;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var I=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],A=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],P=null===(x=document.getElementsByClassName("next-ep-content"))||void 0===x?void 0:x[0],L=null===(y=p[0])||void 0===y?void 0:y.title;(null===(b=L)||void 0===b?void 0:b.length)>60&&(L=L.substr(0,60)+"..."),I.textContent="".concat(L),A.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(N=E.imageGist)||void 0===N?void 0:N.r16x9)||(null==p||null===(C=p[0])||void 0===C?void 0:C.img)||(null===(k=window)||void 0===k||null===(T=k.customData)||void 0===T?void 0:T.fallbackImage),P.onclick=function(){return f(e)}}else{var B,M,S,j,q,O,R,X,V=document.createElement("div");V.className="next-ep-preview",V.style.visibility="hidden",document.getElementById(e).append(V);var $=document.createElement("div");$.className="next-ep-header",$.textContent="Next up";var D=null===(B=p[0])||void 0===B?void 0:B.title,F=document.createElement("img");F.className="next-ep-img",F.src=(null===(M=p[0])||void 0===M||null===(S=M.gist)||void 0===S||null===(j=S.imageGist)||void 0===j?void 0:j.r16x9)||(null==p||null===(q=p[0])||void 0===q?void 0:q.img)||(null===(O=window)||void 0===O||null===(R=O.customData)||void 0===R?void 0:R.fallbackImage);var U=document.createElement("div");U.className="next-ep-title",(null===(X=D)||void 0===X?void 0:X.length)>60&&(D=D.substr(0,60)+"..."),U.textContent="".concat(D);var G=document.createElement("div");G.className="next-ep-content",G.append(F),G.append(U),G.onclick=function(){return f(e)},V.append($),V.append(G)}},exports.addTVProviderImage=function(e,t){var n=o.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(r),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}},exports.initiateTrickplay=function(e){return A.apply(this,arguments)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var l=require("./skin-34fbc337.js");exports.getRenditions=function(i){var n,t=l.getPlayer(i),e=[];if((null==t||null===(n=t.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==t||null===(o=t.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(e=null==u?void 0:u.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var v,r,h=null==t||null===(v=t.dash)||void 0===v||null===(r=v.mediaPlayer)||void 0===r?void 0:r.getBitrateInfoListFor("video");(null==h?void 0:h.length)>0&&(e=null==h?void 0:h.sort((function(l,i){return i.height-l.height})))}return e};
|
package/cjs/skin-fa263582.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-97ba7282.js"),r=require("./skin-34fbc337.js"),n=require("./index-baaa3302.js"),t=require("./browser-77c57718.js");require("videojs-contrib-quality-menu");var o=require("video.js"),a=require("./keyboardShortcuts-de9f5b76.js"),i=require("./generic-b7a89bae.js"),l=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/slicedToArray"),d=require("@babel/runtime/helpers/defineProperty"),u=require("@babel/runtime/helpers/asyncToGenerator"),c=require("@babel/runtime/regenerator"),v=require("./icons-1a3febef.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("./renditions-f9e729be.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-369890b0.js"),require("./util-6edeeb8a.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-fbd6fefb.js");function p(o,a){var i=r.getPlayer(o);i&&(i.on("loadeddata",(function(){var e,i,l,s,d;!function(e){var n=r.getPlayer(e);n&&n.qualityMenu({useResolutionLabels:!0})}(o),!(null!=a&&null!==(e=a.series)&&void 0!==e&&e.enable||null!==(i=window)&&void 0!==i&&null!==(l=i.app_data)&&void 0!==l&&null!==(s=l.appcmsMain)&&void 0!==s&&null!==(d=s.features)&&void 0!==d&&d.auto_play)||null!=a&&a.liveVideo||n.addNextEpPreview(o,a),null!=a&&a.liveVideo||t.isMobile()||n.initiateTrickplay(o)})),i.one("play",(function(){var r,n,t,a;null!==(r=window)&&void 0!==r&&null!==(n=r.customData)&&void 0!==n&&n.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(t=window)||void 0===t||null===(a=t.customData)||void 0===a?void 0:a.iframeOverlayUrl)})))}function f(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return m(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var t=0,o=function(){};return{s:o,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function m(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function y(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function b(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?y(Object(n),!0).forEach((function(r){d(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function h(){return h=u(c.mark((function e(n,t){var o,d,p,m,y,h,g,S,j,k,w,q,I,O,T,M,P;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P=function(e,t,o){var a=r.getPlayer(n);Math.floor(a.currentTime());var i,l,s,d,u,c,v,p,m,y,b,h,g,S,j=f(t);try{for(j.s();!(i=j.n()).done;)l=void 0,s=void 0,d=void 0,u=void 0,c=void 0,v=void 0,p=void 0,m=void 0,y=void 0,b=void 0,h=void 0,g=void 0,S=void 0,c=i.value,v=c.eventType,p=c.beaconUrls,m=c.startTimeInSeconds,y=c.startTime,b=c.durationInSeconds,h=Math.round(m),g=p[0],S=(null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s||null===(d=s.ads)||void 0===d?void 0:d.adEventHandler)||null,h!=Math.round(a.currentTime())||M.has(y)||(M.set(y,!0),S({adsData:{eventType:v,startTimeInSeconds:m,startTime:y,durationInSeconds:b,ad:null==e||null===(u=e.ads)||void 0===u?void 0:u[o],adIndex:o}}),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",v,"Fired:".concat(Math.round(a.currentTime())),"AD_POD:",e),fetch(g))}catch(e){j.e(e)}finally{j.f()}},T=function(e){var r=Math.floor(e/60),n=Math.floor(e%60);return"".concat(r,":").concat(n.toString().padStart(2,"0"))},I=function(e){var r={},n=e.split("?")[1];if(!n)return r;var t,o=f(n.split("&"));try{for(o.s();!(t=o.n()).done;){var a=t.value.split("="),i=s(a,2),l=i[0],d=i[1];r[decodeURIComponent(l)]=decodeURIComponent(d||"")}}catch(e){o.e(e)}finally{o.f()}for(var u={},c=0,v=Object.entries(r);c<v.length;c++){var p=s(v[c],2),m=p[0],y=p[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=y;else u[m]=y}return u},o=r.getPlayer(n),d=t.replace("dash","session").replace("master","session"),d=i.replaceMacros(d,n,{}),p=I(d),d=d.split("?")[0],e.next=10,fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:b({},p)})});case 10:return m=e.sent,e.next=13,m.json();case 13:y=e.sent,h="https://"+new URL(d).hostname,g=y.trackingUrl,S=y.manifestUrl,j=h+g,k=h+S,console.log("%c TRACKING URL","background: #bdf369; color: #000",j),null!=t&&t.includes(".mpd")?window.player.attachSource(k):(q=(null==o||null===(w=o.currentSource())||void 0===w?void 0:w.keySystems)||null,i.loadVideo(n,{src:k,type:"application/x-mpegURL",keySystems:q})),o.one("loadeddata",(function(){O(j)})),O=function(){var e=u(c.mark((function e(t){var o,i,s,d,u,p,f,m,y,b,h,g,S,j,k,w,q;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return i=e.sent,e.next=5,i.json();case 5:s=e.sent,d=s.avails,u=[],p=r.getPlayer(n),f=p.controlBar.progressControl,m=f.seekBar.el(),d.map((function(e){var r;Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(r=e.ads)||void 0===r?void 0:r.length)>0&&u.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds)})})),u.forEach((function(e){var r=e.markerPositionInSeconds,n=p.duration();if(!(r>n)){var t=r/n*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",m.appendChild(o)}})),y=new Map,b=-1,p.on("timeupdate",r.throttle((function(){var e=Math.floor(p.currentTime());if(e!==b){b=e;for(var r=!1,n=function(){var n=o[t],i=n.startTimeInSeconds,s=n.durationInSeconds,d=n.ads,u=Math.floor(i+s);if(e>=i&&e<=u){r=!0,y.set(i,!0),a.keyboardManager.disable(),f.el().style.visibility="hidden";for(var c=e-i,v=0,p=0,m=0;m<d.length;m++){var b,g=null==d||null===(b=d[m])||void 0===b?void 0:b.durationInSeconds;if(c<v+g){p=m;break}v+=g}var S=d[p],j=c-v,k=Math.max(0,S.durationInSeconds-j),q=Math.round(k);h.style.display="block",w.textContent="".concat(p+1," of ").concat(d.length," • ").concat(T(q));var I=[];return d.forEach((function(e){var r=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));I.push.apply(I,l(r))})),P(n,I,p),"break"}},t=0,o=u;t<o.length;t++){if("break"===n())break}r||(h.style.display="none",f.el().style.visibility="visible",a.keyboardManager.enable())}}),1e3)),p.on("seeked",(function(){for(var e=null,r=0,n=u;r<n.length;r++){var t=n[r],o=null==p?void 0:p.currentTime(),a=t.startTimeInSeconds,i=t.durationInSeconds;o>Math.floor(a+i)&&!y.has(a)&&(e=a,y.set(a,!0))}e&&(p.currentTime(e),console.log("seeking back to",e),e=null)})),(h=document.createElement("div")).className="ssai-ad-container",(g=document.createElement("div")).className="sponsored-adbox",(S=document.createElement("div")).className="sponsored-text",S.textContent="Sponsored Ad",(j=document.createElement("div")).className="ad-info-icon",k=r.parseSvgString(v.InfoIcon()),j.appendChild(k),g.append(S),g.append(j),(w=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(q=document.createElement("div")).className="ad-visit-advertiser",q.textContent="Visit Advertiser",(null===(o=document.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])&&(q.style.right="8.6rem"),h.append(g),h.append(w),h.append(q),p.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),M=new Map;case 24:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}var g=function(){var e,r,n,t,a,i,l,s,d,u,c,v,p=o.dom.$(".vjs-play-progress"),f=o.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");f&&(f.style.color="".concat(null===(e=window)||void 0===e||null===(r=e.app_data)||void 0===r||null===(n=r.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(a=t.cta)||void 0===a||null===(i=a.primary)||void 0===i?void 0:i.backgroundColor)),p&&(p.style.background="".concat(null===(l=window)||void 0===l||null===(s=l.app_data)||void 0===s||null===(d=s.appcmsMain)||void 0===d||null===(u=d.brand)||void 0===u||null===(c=u.cta)||void 0===c||null===(v=c.primary)||void 0===v?void 0:v.backgroundColor))};exports.initialiseSkin=function(t,o){r.getPlayer(t).addClass("skin_vlone"),p(t,o),function(r,t){var o,l,s,d,u,c,v=null==t||null===(o=t.res)||void 0===o||null===(l=o.video)||void 0===l?void 0:l.isSSAIEnabled,p=i.getSource(null==t?void 0:t.res,r),f=p.src;(null==t||null===(s=t.relatedVideos)||void 0===s||null===(d=s.content)||void 0===d?void 0:d.length)>0&&e.addVideoSelector(r,null==t?void 0:t.relatedVideos);null!=t&&null!==(u=t.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(r,t);(null==t||null===(c=t.streams)||void 0===c?void 0:c.length)>1&&e.addMulticamSelector(r,null==t?void 0:t.streams);n.addTVProviderImage(r,t),a.initialiseKeyboardEvents(r,t),v&&function(e,r){h.apply(this,arguments)}(r,f)}(t,o),g()};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as n,f as t,P as i,O as o,Q as e}from"./generic-c6511714.js";import{a}from"./util-623a2db0.js";import{g as c,h as s}from"./skin-b8df984d.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var v=null==l?void 0:l.content;u=null==l?void 0:l.cb;var h=l.playerId;a(h,(function(){var a=c(h);0!==(null==a?void 0:a.currentTime())&&((f=o())>v.length-1||(e(f+1),n(h,v[f].id).then((function(n){s(f,h),t(n.response),f++,d(n,idx+1)})).catch((function(n){d(n),s(f,h),f++,r=setTimeout((function(){i(h)&&m(f,h,v)}),5e3)}))))}))},m=function t(i,o,a,c){f=i,i>a.length-1||(e(f+1),n(o,a[i].id).then((function(n){s(f,o),f++,d(n,i+1)})).catch((function(n){d(n),setTimeout((function(){s(f,o),f++,t(f,o,a)}),5e3)})))},d=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;u&&u(n,t)};export{l as a,m as s};
|
package/esm/generic-c6511714.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as a}from"./skin-b8df984d.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-135a6d13.js";function m(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,t){m("event",e,t)}var w={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 I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function g(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?I(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var E={name:"@viewlift/player",version:"2.0.16",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=E.version;var T,h=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==w?void 0:w.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:F.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},b=function(e,t){var n,i,r=x(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},_=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return i=e.sent,e.abrupt("return",o({url:F.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},t),params:g({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},O=function(e){var t=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),S=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},P=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},L=null;function R(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var V,W,A,C,N,j,B=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=R().get(),i=F.get(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),M=null,U=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!P(t)){e.next=6;break}return M||(M=B().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&R().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){M=null}))),e.abrupt("return",M);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){W=e},G=function(){return W},z=function(e){V=e},Y=function(){return V},J=function(){return A},K=function(e){A=e},Q=function(){return N},X=function(e){C=new Map,e.map((function(e,t){C.set(e.id,t)}))},q=function(e){if(C){var t=C.get(e);K(t+1)}},Z=(j=0,{set:function(e){e>=0&&(j=e)},get:function(){return j}});function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var te=0,ne=function(){var e,t,n,i,o,r,a,l=G();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,t){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null}),100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":ne(),watchTime:Math.floor(e.currentTime())})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&te<4)te++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ne()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(te=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(le(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var le=function(e,t,n){return e>=t&&e<=n};function de(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}}window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f,p,w,I,g,E,T,h,y,b;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return E=e.sent,T=x(E),h=null==T?void 0:T.site,y=null==T?void 0:T.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:h,cid:y,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=ne(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,re();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(w=window)||void 0===w||null===(I=w.customData)||void 0===I||null===(g=I.beacon)||void 0===g?void 0:g.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ue=function(e,t){var n=new Map;O({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),N=n})).catch((function(e){return console.log(e)}))},se=function(){var e=Z.get();return e>=0?e+1:1},ce=function(){var e,t,n,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=Z.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function me(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=s(navigator.userAgent);var fe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},pe=function(e){var t=we(e,"video.tags",[]),n=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},we=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},Ie=function(){var e,t,n,i,o,a,l,d,s,c,v,m,f,p,w,I,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,T=arguments.length>2?arguments[2]:void 0,h=(null==T?void 0:T.contentType)||"video",y=null==T||null===(e=T[h])||void 0===e?void 0:e.metadata,b=r(E);if(!g.includes("VIEWLIFT_"))return g;var _=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(_.getPropertyValue("height").slice(0,-2)),O=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===h?null==T||null===(t=T.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==T?void 0:T.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:we(T,"video.gist.id",""),S=me(me({},ge(y)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:fe(O,D),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:we(T,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(l=b.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:pe(T),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+we(T,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:we(null===(m=window)||void 0===m||null===(f=m.app_data)||void 0===f||null===(p=f.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:we(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:we(T,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(T,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ce(),VIEWLIFT_SEASON_NUMBER:se(),VIEWLIFT_CONTENT_TAGS:pe(T)},null===(w=window)||void 0===w||null===(I=w.customData)||void 0===I?void 0:I.macros);for(var P in S){var L=new RegExp(P,"g");g=g.replace(L,S[P])}return g},ge=function(e){var t,n,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=me(me({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=me(me({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=l()?me(me({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):me(me({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=me(me({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=l()?me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},Ee=function(e,t){var n,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return he(E);if(I){var y=ye(g,t);return y.src=Ie(y.src,t,e),y}if("Safari"!==d()&&h)return Te(g);if(T){var b=he(g);return b.src=Ie(b.src,t,e),b}if(null!=g&&g.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return _.src=Ie(_.src,t,e),_}return null},Te=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},he=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ye=function(e,t){var n=e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(t),"Safari"===l){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return be(t),u}var s={src:o.url,type:"application/dash+xml"};return be(t),s.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},s};var be=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},_e=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},De=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},Oe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Fe=!1,Se=function(e,t,n){var i=Ie(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r(e);if(null!==a.el_){Fe=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Fe&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Le=function(e){i(e).play()},Re=function(e){i(e).pause()},Ve=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},We=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Ae=function(e){return!!i.getPlayer("".concat(e))},Ce=function(e){return i(e).paused()},Ne=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,U();case 3:return a=e.sent,l=r(t),e.abrupt("return",new Promise((function(e,n){y(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Ee(r,t);H(r),a&&o?(ke(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),je=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,u,s,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return u=e.sent,(Y()||null)&&q(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&D(i,u).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){h(i,u).then((function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==E||null===(l=E.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Se(t,h,E);var y=Ee(E,t);if(y){var b,_,D,O,F,S,P,L,R,V,W,A,C,N,j=(null==E||null===(b=E.video)||void 0===b||null===(_=b.gist)||void 0===_?void 0:_.videoImageUrl)||(null==E||null===(D=E.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),B=r(t);if(B.poster(j),ke(t,y),B.on("loadstart",(function(){T&&e({status:!0,msg:"Video Loaded",response:E})})),B.on("loadeddata",(function(){Oe(),e({status:!0,msg:"Video Loaded",response:E})})),B.one("play",(function(){s&&m<95&&setTimeout((function(){B.currentTime(s)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==E||null===(S=E.video)||void 0===S||null===(P=S.contentDetails)||void 0===P||null===(L=P.closedCaptions)||void 0===L?void 0:L.length)>0||(null==E||null===(R=E.video)||void 0===R||null===(V=R.closedCaptions)||void 0===V?void 0:V.length)>0)W=((null==E||null===(A=E.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==E||null===(N=E.video)||void 0===N?void 0:N.closedCaptions)).filter((function(e){return"VTT"===e.format})),c(t,W);else v(t)}else De(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){xe(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Be=function(e,t,n){var i=r(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},Me=function(e){var t=r(e);if(Ue(),a(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},Ue=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()},ke=function(e,t){var n=r(e);n&&n.src(t)},xe=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Ae(n)&&De(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},He=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{Ve as A,Le as B,Re as C,We as D,Ae as E,je as F,Ne as G,Me as H,S as I,F as J,k as K,R as L,P as M,f as N,J as O,Ce as P,K as Q,Ie as R,O as S,X as T,q as U,oe as a,ce as b,Y as c,se as d,Ee as e,H as f,G as g,Oe as h,De as i,Q as j,de as k,ke as l,Se as m,_e as n,He as o,h as p,D as q,xe as r,_ as s,U as t,y as u,b as v,ue as w,Z as x,z as y,Be as z};
|
package/esm/skin-485a4041.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,o as n,p as t,q as r}from"./features-044462ee.js";import{g as o,t as a,p as i}from"./skin-b8df984d.js";import{a as l,i as s,b as d}from"./index-fa6c7596.js";import{i as c}from"./browser-d4613b36.js";import"videojs-contrib-quality-menu";import u from"video.js";import{k as p,i as v}from"./keyboardShortcuts-58f64029.js";import{l as m,R as f,e as b}from"./generic-c6511714.js";import y from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";import g from"@babel/runtime/helpers/defineProperty";import j from"@babel/runtime/helpers/asyncToGenerator";import S from"@babel/runtime/regenerator";import{I as k}from"./icons-3bd3bd8f.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-cdeb4051.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-b1b62b4d.js";import"./util-623a2db0.js";import"@babel/runtime/helpers/typeof";import"axios";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";function w(n,t){var r=o(n);r&&(r.on("loadeddata",(function(){var e,r,a,i,d;!function(e){var n=o(e);n&&n.qualityMenu({useResolutionLabels:!0})}(n),!(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable||null!==(r=window)&&void 0!==r&&null!==(a=r.app_data)&&void 0!==a&&null!==(i=a.appcmsMain)&&void 0!==i&&null!==(d=i.features)&&void 0!==d&&d.auto_play)||null!=t&&t.liveVideo||l(n,t),null!=t&&t.liveVideo||c()||s(n)})),r.one("play",(function(){var t,r,o,a;null!==(t=window)&&void 0!==t&&null!==(r=t.customData)&&void 0!==r&&r.iframeOverlayUrl&&e(n,null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.iframeOverlayUrl)})))}function I(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return O(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function T(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function x(){return x=j(S.mark((function e(n,t){var r,l,s,d,c,u,v,b,g,w,O,T,x,E,M,A,P;return S.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P=function(e,t,r){var a=o(n);Math.floor(a.currentTime());var i,l,s,d,c,u,p,v,m,f,b,y,h,g,j=I(t);try{for(j.s();!(i=j.n()).done;)l=void 0,s=void 0,d=void 0,c=void 0,u=void 0,p=void 0,v=void 0,m=void 0,f=void 0,b=void 0,y=void 0,h=void 0,g=void 0,u=i.value,p=u.eventType,v=u.beaconUrls,m=u.startTimeInSeconds,f=u.startTime,b=u.durationInSeconds,y=Math.round(m),h=v[0],g=(null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s||null===(d=s.ads)||void 0===d?void 0:d.adEventHandler)||null,y!=Math.round(a.currentTime())||A.has(f)||(A.set(f,!0),g({adsData:{eventType:p,startTimeInSeconds:m,startTime:f,durationInSeconds:b,ad:null==e||null===(c=e.ads)||void 0===c?void 0:c[r],adIndex:r}}),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",p,"Fired:".concat(Math.round(a.currentTime())),"AD_POD:",e),fetch(h))}catch(e){j.e(e)}finally{j.f()}},M=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},x=function(e){var n={},t=e.split("?")[1];if(!t)return n;var r,o=I(t.split("&"));try{for(o.s();!(r=o.n()).done;){var a=r.value.split("="),i=h(a,2),l=i[0],s=i[1];n[decodeURIComponent(l)]=decodeURIComponent(s||"")}}catch(e){o.e(e)}finally{o.f()}for(var d={},c=0,u=Object.entries(n);c<u.length;c++){var p=h(u[c],2),v=p[0],m=p[1];if(v.startsWith("ads."))d[v.replace(/^ads\./,"")]=m;else d[v]=m}return d},r=o(n),l=t.replace("dash","session").replace("master","session"),l=f(l,n,{}),s=x(l),l=l.split("?")[0],e.next=10,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:C({},s)})});case 10:return d=e.sent,e.next=13,d.json();case 13:c=e.sent,u="https://"+new URL(l).hostname,v=c.trackingUrl,b=c.manifestUrl,g=u+v,w=u+b,console.log("%c TRACKING URL","background: #bdf369; color: #000",g),null!=t&&t.includes(".mpd")?window.player.attachSource(w):(T=(null==r||null===(O=r.currentSource())||void 0===O?void 0:O.keySystems)||null,m(n,{src:w,type:"application/x-mpegURL",keySystems:T})),r.one("loadeddata",(function(){E(g)})),E=function(){var e=j(S.mark((function e(t){var r,l,s,d,c,u,v,m,f,b,h,g,j,w,I,O,T;return S.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return l=e.sent,e.next=5,l.json();case 5:s=e.sent,d=s.avails,c=[],u=o(n),v=u.controlBar.progressControl,m=v.seekBar.el(),d.map((function(e){var n;Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&c.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds)})})),c.forEach((function(e){var n=e.markerPositionInSeconds,t=u.duration();if(!(n>t)){var r=n/t*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",m.appendChild(o)}})),f=new Map,b=-1,u.on("timeupdate",a((function(){var e=Math.floor(u.currentTime());if(e!==b){b=e;for(var n=!1,t=function(){var t=o[r],a=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,s=Math.floor(a+i);if(e>=a&&e<=s){n=!0,f.set(a,!0),p.disable(),v.el().style.visibility="hidden";for(var d=e-a,c=0,u=0,m=0;m<l.length;m++){var b,g=null==l||null===(b=l[m])||void 0===b?void 0:b.durationInSeconds;if(d<c+g){u=m;break}c+=g}var j=l[u],S=d-c,k=Math.max(0,j.durationInSeconds-S),w=Math.round(k);h.style.display="block",O.textContent="".concat(u+1," of ").concat(l.length," • ").concat(M(w));var I=[];return l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));I.push.apply(I,y(n))})),P(t,I,u),"break"}},r=0,o=c;r<o.length;r++){if("break"===t())break}n||(h.style.display="none",v.el().style.visibility="visible",p.enable())}}),1e3)),u.on("seeked",(function(){for(var e=null,n=0,t=c;n<t.length;n++){var r=t[n],o=null==u?void 0:u.currentTime(),a=r.startTimeInSeconds,i=r.durationInSeconds;o>Math.floor(a+i)&&!f.has(a)&&(e=a,f.set(a,!0))}e&&(u.currentTime(e),console.log("seeking back to",e),e=null)})),(h=document.createElement("div")).className="ssai-ad-container",(g=document.createElement("div")).className="sponsored-adbox",(j=document.createElement("div")).className="sponsored-text",j.textContent="Sponsored Ad",(w=document.createElement("div")).className="ad-info-icon",I=i(k()),w.appendChild(I),g.append(j),g.append(w),(O=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(T=document.createElement("div")).className="ad-visit-advertiser",T.textContent="Visit Advertiser",(null===(r=document.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])&&(T.style.right="8.6rem"),h.append(g),h.append(O),h.append(T),u.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=new Map;case 24:case"end":return e.stop()}}),e)}))),x.apply(this,arguments)}function E(e,a){o(e).addClass("skin_vlone"),w(e,a),function(e,o){var a,i,l,s,c,u,p=null==o||null===(a=o.res)||void 0===a||null===(i=a.video)||void 0===i?void 0:i.isSSAIEnabled,m=b(null==o?void 0:o.res,e),f=m.src;(null==o||null===(l=o.relatedVideos)||void 0===l||null===(s=l.content)||void 0===s?void 0:s.length)>0&&n(e,null==o?void 0:o.relatedVideos);null!=o&&null!==(c=o.series)&&void 0!==c&&c.enable&&t(e,o);(null==o||null===(u=o.streams)||void 0===u?void 0:u.length)>1&&r(e,null==o?void 0:o.streams);d(e,o),v(e,o),p&&function(e,n){x.apply(this,arguments)}(e,f)}(e,a),M()}var M=function(){var e,n,t,r,o,a,i,l,s,d,c,p,v=u.dom.$(".vjs-play-progress"),m=u.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");m&&(m.style.color="".concat(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(r=t.brand)||void 0===r||null===(o=r.cta)||void 0===o||null===(a=o.primary)||void 0===a?void 0:a.backgroundColor)),v&&(v.style.background="".concat(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(d=s.brand)||void 0===d||null===(c=d.cta)||void 0===c||null===(p=c.primary)||void 0===p?void 0:p.backgroundColor))};export{E as initialiseSkin};
|