@viewlift/player-backup 2.0.286-backup → 2.0.287-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/bundle.css +531 -531
- package/cjs/index-1c0aa450.js +1 -0
- package/cjs/index-63575bc4.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/skin-5d92ab3f.js +1 -0
- package/cjs/skin-7556b856.js +1 -0
- package/cjs/skin-83a765a8.js +1 -0
- package/cjs/skin-a25a2457.js +1 -0
- package/cjs/skin-f26ba21b.js +1 -0
- package/esm/bundle.css +531 -531
- package/esm/index-311464f3.js +1 -0
- package/esm/index-4e64ac09.js +1 -0
- package/esm/index.js +1 -1
- package/esm/skin-0b038d52.js +1 -0
- package/esm/skin-4f5a0ac7.js +1 -0
- package/esm/skin-9921582e.js +1 -0
- package/esm/skin-ab1ca6e2.js +1 -0
- package/esm/skin-dbb8c692.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("./index-63575bc4.js");var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("./skin-e0cf4554.js"),n=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/slicedToArray"),a=require("./generic-9239e4ef.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var s="my-player";function l(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function c(){return(c=e(t.mark(function e(r){var n,a,u,o,s,l,c,p,d,f,m,b,g,h,v,x,y,k,w,E,j,N,T,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return a=e.sent,e.next=11,createImageBitmap(a);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=i(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,f=[],m=0;m<l;m++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,m*d,p,d,0,0,p,d),h=g.toDataURL("image/png"),f.push({uri:h,duration:r.duration}),r._tiles=f;return e.abrupt("return",f);case 20:for(e.prev=20,e.t0=e.catch(2),v=r.layout.split("x").map(Number),x=i(v,2),y=x[0],k=x[1],w=[],E=0;E<y*k;E++)w.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(T=N.appcmsMain)||void 0===T||null===(A=T.images)||void 0===A?void 0:A.placeholderCover,duration:r.duration});return e.abrupt("return",w);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function p(e,t){return d.apply(this,arguments)}function d(){return(d=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",l(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,n){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=r.getPlayer(s);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,l=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),n),p=t[l];p&&!p.loading&&(p.loading=!0,function(e){return c.apply(this,arguments)}(p).then(function(e){var t=e[p.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),p.loading=!1,p.src=t.uri}))}}function m(e){return b.apply(this,arguments)}function b(){return(b=e(t.mark(function e(a){var u,s,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},a.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),a=i(r,2),s=a[0]*a[1],l=e.duration,c=0;c<s;c++){var p,d=Math.round((t*s+c)*l);u[d]=o(o({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},n(p,"left","-60px"),n(p,"border","1px solid transparent"),n(p,"borderRadius","4px"),p)})}}),s=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r.throttle(function(e){return f(e,u,s)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r.throttle(function(e){return f(e,u,s)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var g=function(){var r=e(t.mark(function e(r,n){var a,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return a=e.sent,e.next=5,a.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=i(t,2),n=r[0],a=r[1];n&&a&&(l[n.trim().toLowerCase()]=a.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function v(e,t){return x.apply(this,arguments)}function x(){return(x=e(t.mark(function e(n,u){var o,l,c,p,d,f,m,b,g,v,x,w,E,j,N,T,A,O,I,S,P,M,R,q,$,B,L,D,C,U,X,_,F,W,z,G,V,H,J,K,Q,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,fe,me;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=u,o=r.getPlayer(u),l=n.split("/"),c=l.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?l.slice(0,c+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),w=(null==o?void 0:o.duration())||(null===(d=a.getCurrentVideo())||void 0===d||null===(f=d.video)||void 0===f?void 0:f.runtime),E=(null==x||null===(m=x.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(T=j[N]).getAttribute("contentType")||"image/png"!==T.getAttribute("mimeType"))&&"image/jpeg"!==T.getAttribute("mimeType")){e.next=69;break}if(O=T.getElementsByTagName("SegmentTemplate")[0],I=null===(A=O.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!O||!I){e.next=48;break}if(M=I.getElementsByTagName("S"),R=parseInt(null===(S=M[0])||void 0===S?void 0:S.getAttribute("t")),q=parseInt(null===(P=M[0])||void 0===P?void 0:P.getAttribute("d")),$=T.getElementsByTagName("Representation")[0],B=$.getElementsByTagName("EssentialProperty")[0],L=B.getAttribute("value"),D=null==L?void 0:L.split("x"),C=i(D,2),U=C[0],X=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?q/_:q)/(U*X),W=$.getAttribute("id"),z=Math.round(w/F),G=Math.ceil(z/(U*X)),V=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],N=0;N<G;N++)K="/"==(J=V)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:L,uri:K+J.replace("$Time$",R+N*q).replace("$RepresentationID$",W)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=T.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=i(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=Q.getAttribute("id"),se=Math.round(w/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],fe=y(ce),N=0;N<le;N++)me=fe?k(fe,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+me.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function y(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function w(){return(w=e(t.mark(function e(n){var i,a,u,o,s,l,c,d,f,b,h,x,y,k,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.getPlayer(n),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,p(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return f=(null==d?void 0:d[0])||null,b=f.uri,h=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,g(h,b);case 12:return x=e.sent,e.next=15,m(x);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,v(c,n);case 22:if(!((null==(k=e.sent)?void 0:k.length)>0)){e.next=28;break}return e.next=26,m(k);case 26:w=e.sent,s.thumbnails(w);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.initiateTrickplay=function(e){return w.apply(this,arguments)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,a,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-e0cf4554.js"),r=require("./generic-9239e4ef.js"),o=require("./autoNextVideo-6cab8d20.js"),d=require("./relatedVideosManager-88017db2.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=[],m=!1,v=null,p=!1,f=null,g=null,h=null,x=null,y=null,C=function(){null!=v&&(clearInterval(v),v=null),p=!1},E="next-ep-preview-player-thumb",w=function(e,t){if(e){var n,a,i,l,r;(null==(n=t)||null===(a=n.gist)||void 0===a||null===(i=a.imageGist)||void 0===i?void 0:i.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r||r.fallbackImage;var o=e.getElementsByClassName(E)[0];o||((o=document.createElement("div")).className=E,o.setAttribute("aria-hidden","true"),e.appendChild(o))}},N=function(e,t){if(e){var n=e.getElementsByClassName(E)[0];n&&(n.style.visibility=t?"visible":"hidden")}},b=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="Next up in";var a=document.createElement("span");return a.className="next-ep-duration",a.textContent="10",t.append(n,a),e.append(t),e},A=function(e,t,n,a){var i,r,o,d,u,s=null==e?void 0:e.title,c=(null==e||null===(i=e.gist)||void 0===i?void 0:i.description)||(null==e?void 0:e.description)||"",v=document.createElement("div");v.className="next-ep-content";var p=document.createElement("div");p.className="next-ep-thumb-wrap";var f=document.createElement("img");f.className="next-ep-img",f.alt="",f.src=(null==e||null===(r=e.gist)||void 0===r||null===(o=r.imageGist)||void 0===o?void 0:o.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(u=d.customData)||void 0===u?void 0:u.fallbackImage);var g=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),a=t%60;return"".concat(n,":").concat(String(a).padStart(2,"0"))}(null==e?void 0:e.runtime),h=document.createElement("div");h.className="next-ep-thumb-runtime",h.textContent=g,g||h.classList.add("next-ep-thumb-runtime--empty"),p.appendChild(f),p.appendChild(h);var x=document.createElement("div");x.className="next-ep-meta";var y=document.createElement("div");y.className="next-ep-title",y.textContent="".concat(s||"");var E=document.createElement("div");E.className="next-ep-desc",E.textContent=c||"",String(c||"").trim()||E.classList.add("next-ep-desc--empty");var w=document.createElement("div");w.className="next-ep-meta-row";var N=document.createElement("span");N.className="next-ep-badge";var b=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);N.textContent=b,b||N.classList.add("next-ep-badge--empty");var A=document.createElement("span");A.className="next-ep-episode",A.textContent=function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var I=document.createElement("div");I.className="next-ep-meta-row-left",I.appendChild(N),I.appendChild(A);var B=document.createElement("img");B.className="next-ep-network-logo",B.alt="";var S=function(e){var t,n,a,i=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a?void 0:a.networks;if(e&&i){var l=null==i?void 0:i.find(function(t){if(t.identifier==e)return t});return null==l?void 0:l.badgeImage}}(null==e?void 0:e.network);S?B.src=S:B.classList.add("next-ep-network-logo--empty"),w.appendChild(I),x.appendChild(y),x.appendChild(E),x.appendChild(w);var P=document.createElement("div");return P.className="next-ep-meta-with-logo",P.appendChild(x),P.appendChild(B),v.appendChild(p),v.appendChild(P),v.onclick=l.debounce(function(){C(),null==t||t.remove(),m=!0,L(n)},400),v},L=function(e,t){var n=l.getPlayer(e);if(n){var a=n.duration();if(Number.isFinite(a)&&!(a<=0)){n.pause(e);var i=r.getVideoIdx();o.switchToNext(i,e,c)}}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,a,i,l;for(a in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[a])i.hasOwnProperty(l)&&("object"===u(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},a=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(i){var l,r,o,d,u,s,c,m;function v(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",v),m()}r=t({},e,i),d=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=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),l.appendChild(o),o.src=r[0].src,o.className="vjs-thumbnail",t(o.style,r[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),s=d.duration(),d.on("durationchange",function(e){s=d.duration()}),d.on("loadedmetadata",function(e){s=d.duration()}),(u=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,m,v,p,f,g,h,x;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=a(u.el()).getBoundingClientRect()).width||x.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),m=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m-=a(u.el()).getBoundingClientRect().left+h,i=Math.floor((m-u.el().offsetLeft)/u.width()*s),r)i>d&&(c=Math.max(c,d));(v=r[c]).src&&o.src!=v.src&&(o.src=v.src),v.style&&o.style!=v.style&&t(o.style,v.style),m+(g=function(e,t){var a;return t?parseFloat(t):"auto"!==(a=n(e)("clip"))&&"inherit"!==a&&4===(a=a.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(a[1])-parseFloat(a[3]):0}(o,v.width||r[0].width)/2)>f?m-=m+g-f:m<g&&(m=g),l.style.left=m+"px"},u.on("mousemove",c),u.on("touchmove",c),u.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",v)}),m=function(e){l.style.left="-1000px"},u.on("mouseout",m),u.on("touchcancel",m),u.on("touchend",m),d.on("userinactive",m)}),exports.addNextEpPreview=function e(t,n){var a;if(m=!1,x=t,y=n,h&&(h(),h=null),null!=n&&null!==(a=n.series)&&void 0!==a&&a.enable){var o;c=[];var u=r.getCurrentSeries();null==u||u.map(function(e){var t;return(t=c).push.apply(t,i(e.episodes))}),null==n||null===(o=n.series)||void 0===o||o.cb}else{var s=d.relatedVideosManager.get();c=(null==s?void 0:s.content)||[],null==s||s.cb,h=d.relatedVideosManager.subscribe(function(){h&&(h(),h=null),x&&y&&e(x,y)})}var E=l.getPlayer(t);if(E){!function(e){e&&g&&(e.off("timeupdate",g),g=null)}(l.getPlayer(f)),C(),f=t,g=function(){var e,n;if(!m){var a=E.duration(),i=E.currentTime(),l=Number.isFinite(a)&&a>0?a-i:1/0,o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0],d=document.getElementById(t),u=r.getVideoIdx()<=(null===(n=c)||void 0===n?void 0:n.length)-1;if(l>1){if(null!=v||p){C();var s=null==o?void 0:o.querySelector(".next-ep-header .next-ep-duration");s&&(s.textContent="10")}return o&&(o.style.visibility="hidden"),void N(d,!1)}u?(o&&(o.style.visibility="visible"),N(d,!0),p||null!=v||(E.pause(t),p=!0,function(e){var t;if(null==v){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],a=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(a){var i=10;a.textContent="10",v=setInterval(function(){i--,a.textContent=String(i),0===i&&(clearInterval(v),v=null,p=!1,c.filter(function(e,t){return t==r.getVideoIdx()}),L(e))},1e3)}}}(t))):N(d,!1)}},E.on("timeupdate",g);var I,B=c.filter(function(e,t){return t==r.getVideoIdx()});if((null==B?void 0:B.length)>0)if(null!==(I=document.getElementsByClassName("next-ep-preview"))&&void 0!==I&&I[0]){var S,P,q=null===(S=document.getElementsByClassName("next-ep-preview"))||void 0===S?void 0:S[0];q.style.visibility="hidden",null===(P=q.querySelector(".next-ep-preview-inner"))||void 0===P||P.remove(),Array.from(q.children).forEach(function(e){e.classList.contains("next-ep-content")&&e.remove()});var k=q.querySelector(".next-heading-wrapper");if(k){var j=k.querySelector(".next-ep-header"),M=null==j?void 0:j.querySelector(".next-ep-duration");if(!M&&j){j.textContent="";var V=document.createElement("span");V.className="next-ep-header-text",V.textContent="Next up in",(M=document.createElement("span")).className="next-ep-duration",M.textContent="10",j.append(V,M)}else M&&(M.textContent="10")}else k=b(),q.insertBefore(k,q.firstChild);q.appendChild(A(B[0],q,t));var O=document.getElementById(t);w(O,B[0]),N(O,!1)}else{var T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden";var F=document.getElementById(t);F.append(T);var X=b();T.append(X);var D=A(B[0],T,t);T.append(D),w(F,B[0]),N(F,!1)}}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),a=null==t?void 0:t.tvProviderLogoUrl;if(a){var i=document.createElement("div");i.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(a),r.alt="Provider Image",i.append(r),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"})}};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-9239e4ef.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/regenerator"),o=require("video.js"),l=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./util-9e6f986e.js"),v=require("./captions-d98c49d6.js"),p=require("./renditions-6554142b.js"),f=require("./resolution-4c007d14.js"),m=require("./skin-e0cf4554.js"),g=require("./browser-77c57718.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@babel/runtime/helpers/slicedToArray"),k=require("@viewlift/sse"),S=require("./relatedVideosManager-88017db2.js");function E(e,n,t,i){var o=a(d(1&i?e.prototype:e),n,t);return 2&i&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/assertThisInitialized");var D=o.getComponent("TextTrackSettings"),I=o.dom,C=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],O=C.map(function(e){return e.value}),P="16",j="vlp-caption-font-size-px",x="vlp-caption-font-size-style",R=".vjs-font-percent > select",A=function(e){return-1!==O.indexOf(e)?e:P},L=null;D?(L=function(){u(i,D);var e,n,t=(e=i,n=T(),function(){var t,i=d(e);if(n){var o=d(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return s(this,t)});function i(e,n){var o;return l(this,i),(o=t.call(this,e,n)).customUiReady_=!0,o.applyCustomFontSizeUI_(),o}return r(i,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(R);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);C.forEach(function(n){e.appendChild(I.createEl("option",{value:n.value,textContent:n.label}))}),e.value=P}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(R);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=A(e);if("undefined"!=typeof document){var t=document.getElementById(x);t||((t=document.createElement("style")).id=x,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(j)}catch(e){}var n=A(e),t=this.$(R);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=E(i,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(E(i,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(R);e&&(e.value=P),this.applyFontSize_(P)}}},{key:"saveSettings",value:function(){if(E(i,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(R);if(e)try{window.localStorage.setItem(j,A(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){E(i,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),i}(),o.registerComponent("TextTrackSettings",L)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var N=function(e){return new Promise(function(n,t){if(M(e))t("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}})},M=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},_=function(e,n,t){var i=m.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var o=parseFloat(n)/100;i.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},B=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},V=function(){var e=t(i.mark(function e(n){var t,l,r,a,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,N("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),U=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,i,l,r,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(l=i.framework)||void 0===l||null===(r=l.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var q=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),N("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),F=function(){var n=t(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),H=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=t(i.mark(function e(){var n;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-072614bc.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),K=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){N("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:q,loadEMELibrary:H,loadMuxPlugin:z,loadDvrSeekbar:G,loadContribDash:Y,loadComscorePlugin:F});function W(e){return $.apply(this,arguments)}function $(){return($=t(i.mark(function e(n){var t;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,q();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return K}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function J(e){return X.apply(this,arguments)}function X(){return(X=t(i.mark(function e(n){var t,o,l,r,a,u,s,d,c,v;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,F();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(l=n.comscore)||void 0===l?void 0:l.applicationName)||(null===(r=window)||void 0===r?void 0:r.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Q(e,n){return Z.apply(this,arguments)}function Z(){return(Z=t(i.mark(function e(n,t){var o,l,r,a,u,s,d,c,v,p,f,m,h,y;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",p=null==t||null===(o=t[v])||void 0===o?void 0:o.drmEnabled,null==t||null===(l=t[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,h=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([p?"Safari"==g.detectBrowser()?H():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?Y():H():"Safari"!=g.detectBrowser()&&f?Y():null,m?J(n):null,h?z():null,V(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var te=new Set,ie=null,oe=function(n,t,i,o){var l,r,a,u,s,d,c,v={},p=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(l=n[p])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=ce(n),v[null==i||null===(r=i.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==n||!n.linearchannel),v[null==i||null===(a=i.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==i||null===(u=i.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ue(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(s=n[p])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=n[p])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[i.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=se(n),v["c3.cm.genreList"]=re(n),v["c3.cm.genre"]=le(n),v["c3.cm.channel"]=ae(n,o);var f=fe(e.getCurrentSeries(),n);return v=ne(ne({},v),f)},le=function(e){var n,t,i,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(i=t.primaryCategory)||void 0===i?void 0:i.title)||"Null"},re=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},ae=function(e,n){var t,i,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(i=((null==e||null===(t=e[o])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===i?void 0:i.title)||"NULL"},ue=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},se=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[i])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},de=function(e,n){var t,i,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(i=t.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},ce=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ve,pe,fe=function(n,t){var i,o,l,r,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(i=t.video)||void 0===i||null===(o=i.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(l=n[s-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},me=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},ge=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},he=function(){var n=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,p,f,g,h;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=(null==o?void 0:o.convivaConfig)||{},r=l.trackConvivaPlayerEvent,a=l.paymentHandler,u=l.tveProvider,s=l.enable,d=l.appName,v=(c=o||{}).token,p=c.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(f=m.getPlayer(t),"function"==typeof(g=r)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var i=me(t.keySystem);g("contentInfo",{DRMEnabled:i})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;ie&&ie!==f.currentSrc()&&g("playbackEnded"),g("setPlayer",f),te.clear(),ie=f.currentSrc();var i=ge(f.currentType()),l=e.getCurrentVideo(),r=oe(l,f,h,p);r[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",r[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=de(l,o),r.authToken=v||"NULL",r.streamType=i,r.D2CType=a||"NONE",r.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",r["c3.cm.affiliate"]=u||"NULL",ye.setData(r),g("contentInfo",r)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),f.on("play",function(){te.has(f.currentSrc())||(te.add(f.currentSrc()),g("playbackStarted",null))}),f.on("ended",function(){te.has(f.currentSrc())&&te.delete(f.currentSrc()),g("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==te||te.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),ye=(ve={},{setData:function(e){ve=ne(ne({},ve),e)},getData:function(){return ve}}),be=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-f3a5fe3d.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-0a5108bb.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-cebece82.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-a904ce92.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-dfd8c833.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-71dbfc33.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-47343a57.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-89ad761c.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-56d77491.js")}).then(function(t){t.initialiseSkin(e,n)})};function we(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ke(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?we(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Se=[],Ee=0,Te=null;function De(){pe=null,Se=[],Ee=0,Te=null}function Ie(t,i,o){var l,r,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==i||null===(l=i.watchHistory)||void 0===l||l.apiVersion;var c=null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(t.currentTime()),p=Math.floor(t.duration());null==i||null===(a=i.watchHistory)||void 0===a||a.xapiKey;var f=(null==i||null===(u=i.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==i||null===(s=i.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=d?100:Math.floor(v/p*100),y={};m?function(t,i,o){var l=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),r=Ce(l),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return ke(ke({},e),{},n({},t,s[t]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===pe});c<0?r.push(ke(ke({content:d},t),{},{addedDate:a,updateDate:a})):r[c]=ke(ke(ke({},r[c]),t),{},{updateDate:a});localStorage.setItem("".concat(l),JSON.stringify(r))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,i.siteOwner):(y=ke(ke({videoId:pe,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},Te&&{seriesId:Te}),f&&{originalObjectId:f}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Ee=v+o}function Ce(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Oe(e,n,t){var i=Ce(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return i&&Array.isArray(i)&&(o=i.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var Pe=!1,je=function(n,t){var i,o,l=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(i=n[l])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!Pe){var r=xe(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(r,t);return a&&e.loadVideo(t,a),Pe=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function xe(e,n,t){if(Array.isArray(e))return e.map(function(e){return xe(e,n,t)});if(null!==e&&"object"===y(e)){var i={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?i[o]=e[t]:o===t&&void 0!==e[n]?i[o]=e[n]:i[o]=xe(e[o],n,t)}),i}return e}function Re(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 Ae(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)?Ae(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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 l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Le(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Me=function(n,t,i,o){var l,r,a,u,s,d=o.res,c=o.sres,p=m.getPlayer(n),f=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[f])||void 0===l?void 0:l.drmEnabled)||!1,b=!(null==d||null===(r=d[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===f,w=(null==d||null===(u=d[f])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(d),e.videoReplayTracker.set(d),p&&(p.on("loadstart",function(){b?i.resolve({status:!0,msg:"Video Loaded",response:d}):i.resolve(Ne({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:d}:{response:d}))}),p.on("loadeddata",function(){var i,o,l,r=v.getCaptions(n);if(null==r||r.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var a;null==p||null===(a=p.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&_(n,sessionStorage.getItem("volume")||"100");var u=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var s,c,f=Ne(Ne({},t),d);!function(e,n,t){var i,o,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(Te=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Se=[],Ee=0,pe=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",De),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Se.includes(Ee)||(e!=Ee||e<r?e>Ee&&(Ee=e+r):(Se.push(e),Ie(a,n,r)))}}),a.one("ended",function(){Ie(a,n,r,!0)}))}(n,f,null==u||null===(s=u.video)||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=p&&p.mux){var h,y,b,k,S,E,T=(null===(h=e.getCurrentVideo())||void 0===h?void 0:h.video)||(null==d?void 0:d.video),D=null==T?void 0:T.gist,I={env_key:null==t||null===(y=t.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==D?void 0:D.id,video_title:null==D?void 0:D.title,video_series:null==T||null===(k=T.series)||void 0===k?void 0:k.title,video_stream_type:null!=T&&null!==(S=T.streamingInfo)&&void 0!==S&&S.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};p.mux({debug:!1,data:I})}}),p.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];p.trigger("subtitlechanged",n)}),p.on("subtitlechanged",function(e,n){var t,i,o,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){b&&je(d,n)}),p.on("error",function(){var t,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&b)?je(d,n):(e.handleError(n,(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:d}))}),p.one("play",function(){var n,i,o,l,r;if(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(l=o.adsConfig)||void 0===l||!l.vodAdClientSideTracking){if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){p.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),p.on("volumechange",function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),p.on("chromecastDisconnected",function(){if(b){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var e,n=(null==p||null===(e=p.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),i=(n.language||n.label||"").toUpperCase();return t<i?-1:t>i?1:0}),"object"==y(p.dash)){var t,i,o,l=null==p||null===(t=p.dash)||void 0===t||null===(i=t.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=Re(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=Re(n);try{for(d.s();!(s=d.n()).done;){var c,v,f,m=s.value;if(("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=m&&null!==(f=m.label)&&void 0!==f&&f.includes("5.1"))p.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_e(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Ve={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},Ue=function(l,r,a,u){var s,d,c,p,f,h,y,b,w,k,S,E,T,D,I,C,O,P,j,x,R,A,L,N,M,_,B,V,q,F,H,z,G,Y,K,W,$,J,X=r.res,Z=void 0===X?null:X,ee=r.sres,ne=void 0===ee?null:ee,te=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),i=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:i,dashLogLevel:null!=i&&null!=Ve[i]?Ve[i]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ie=te.playerDebug,oe=te.logLevel,le=te.dashLogLevel;ie&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var re=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(d=Z)||void 0===d||null===(c=d[ae])||void 0===c||null===(p=c.gist)||void 0===p?void 0:p.videoImageUrl)||m.impolicy16x9(null===(f=Z)||void 0===f||null===(h=f[ae])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(w=Z)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=!(null===(E=Z)||void 0===E||null===(T=E[ae])||void 0===T||null===(D=T.streamingInfo)||void 0===D||!D.isLiveStream)||"linearchannel"===ae,ce=(null===(I=Z)||void 0===I||null===(C=I.ads)||void 0===C||null===(O=C.preRoll)||void 0===O||null===(P=O.adTags)||void 0===P||null===(j=P.web)||void 0===j?void 0:j.active)&&(null===(x=Z)||void 0===x||null===(R=x.ads)||void 0===R||null===(A=R.preRoll)||void 0===A||null===(L=A.adTags)||void 0===L||null===(N=L.web)||void 0===N?void 0:N.url);Z=Be(Be({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(M=a.customData)||void 0===M?void 0:M.ads)||{},pe=(null===(_=Z)||void 0===_||null===(B=_[ae])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,fe=!(null===(V=Z)||void 0===V||null===(q=V[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,ge=(null==a?void 0:a.skin_settings)||{},we=($={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:se},n($,"autoplay",null==a?void 0:a.autoplay),n($,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!ce),n($,"loop",(null==a?void 0:a.loop)||!1),n($,"audioPosterMode",null==a?void 0:a.audioPosterMode),n($,"html5",Be(Be({dash:Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Be(Be({},((null==a?void 0:a.debugConfig)&&(null==a||null===(F=a.debugConfig)||void 0===F?void 0:F.enable)||ie)&&{debug:{logLevel:le}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Be(Be(Be(Be({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Be(Be(Be({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(H=a.customData)||void 0===H?void 0:H.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==z&&z},((null==a?void 0:a.debugConfig)&&(null==a||null===(G=a.debugConfig)||void 0===G?void 0:G.enable)||ie)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(Y=a.debugConfig)||void 0===Y?void 0:Y.enable)||ie||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(K=a.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),n($,"poster",ue),n($,"techOrder",re),n($,"chromecast",{requestCustomDataFn:function(n){var t,i,o=m.getPlayer(l),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var i,o,l,r,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,y,b,w,k,S;f.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=T;var D=(null==E?void 0:E.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);f.licenseToken=D}var I=(null==e||null===(i=e[p])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=I;var C=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=C;var O=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=O;var P=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=P,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Z,n,r);return Be(Be({},u),{},{transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Be({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(i=a.convivaConfig)||void 0===i?void 0:i.debug)||!1},ye.getData())})},modifyLoadRequestFn:function(e){var n,t,i,o,r,a=m.getPlayer(l),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(i=t.streamingInfo)||void 0===i||null===(o=i.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!o.getPlayers()[l]){(null!=a&&a.debugConfig&&null!=a&&null!==(J=a.debugConfig)&&void 0!==J&&J.enable||ie)&&o.log.level(oe||"debug");var ke=o(l,we,function(){var n=t(i.mark(function n(){var t,r,s,d,c,p,f,m,g,h,y,b,w,k,S,E,T,D,I,C,O,P;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ke),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,Q(a,Z);case 5:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||ie){try{o.log.level(oe||"debug")}catch(e){}(w=function(){try{var e,n,t;null==ke||null===(e=ke.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:le}})}catch(e){}})(),ke.one("loadedmetadata",w)}if(k=null===(r=Z)||void 0===r||null===(s=r[ae])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.startOverTime,de&&u.resolve(Be({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(l,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),he(l,a),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),se&&U(l,k),!ce||null!=a&&null!==(c=a.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(l,ce,Z),S=e.getSource(Z,l),console.log(S),ie&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",we)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!pe){n.next=23;break}return n.next=20,e.getSGAIEnabledSource(l,Z);case 20:S=n.sent,n.next=27;break;case 23:if(!fe){n.next=27;break}return n.next=26,e.getTransmitEnabledSource(S,Z,l);case 26:S=n.sent;case 27:S?e.loadVideo(l,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(l,"Incompatible / Missing Source")),((null===(p=Z)||void 0===p||null===(f=p[ae])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Z)||void 0===h||null===(y=h[ae])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(P=(null===(T=Z)||void 0===T||null===(D=T[ae])||void 0===D||null===(I=D.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(C=Z)||void 0===C||null===(O=C[ae])||void 0===O?void 0:O.closedCaptions),E=P.filter(function(e){return"VTT"===e.format}),v.addCaptions(l,E)),null!=a&&a.disableControls?e.disableControls(l):be(l,Be(Be(Be({},a),we),{},{liveVideo:de,isDvrEnabled:se,res:Z,sres:ne})),Me(l,Be(Be(Be({},a),we),{},{liveVideo:de}),u,{res:Z,sres:ne});case 31:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):qe(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var He,ze=function(e,n){var t=n.resolve,i=n.reject,o=null==e?void 0:e.playerId,l=Ge(e);Ue(o,{res:l},e,{resolve:t,reject:i})},Ge=function(n){var t,i,o,l,r,a,u,s,d,c,v,p,f,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(i=n.streamingInfo)||void 0===i?void 0:i.isDrmEnabled)||null,y=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.url)||null,w=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,E=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],T=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,D=null==n?void 0:n.token,I=e.getDecodedToken(D);null==I||I.site;var C=null==I?void 0:I.siteId,O=(null==n||null===(p=n.customData)||void 0===p||null===(f=p.comscore)||void 0===f?void 0:f.video)||null,P=Fe(Fe({id:"".concat(C,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Fe(Fe(Fe(Fe(Fe({drmEnabled:h,streamingInfo:Fe(Fe({videoAssets:Fe(Fe({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==O?void 0:O.isLiveStream)&&{isLiveStream:null==O?void 0:O.isLiveStream})},T&&{isSSAIEnabled:T}),{},{metadata:E,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Fe(Fe(Fe({},w&&{videoImageUrl:w}),(null==O?void 0:O.videoId)&&{id:null==O?void 0:O.videoId}),(null==O?void 0:O.videoTitle)&&{title:null==O?void 0:O.videoTitle}),contentDetails:Fe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==O?void 0:O.runtime)&&{runtime:null==O?void 0:O.runtime}),(null==O?void 0:O.publishDate)&&{publishDate:null==O?void 0:O.publishDate}),(null==O?void 0:O.platform)&&{platform:null==O?void 0:O.platform}),(null==O?void 0:O.series)&&{series:null==O?void 0:O.series}),ads:{preRoll:{adTags:{web:Fe(Fe({},y&&{active:!0}),y&&{url:y})}}}});return O&&(null!=O&&O.isDvrEnabled&&(P.video.liveDetails=Fe(Fe({},P.video.liveDetails),{},{isDvrEnabled:null==O?void 0:O.isDvrEnabled})),null!=O&&O.metadata&&(P.video.metadata=[].concat(b(P.video.metadata),b(null==O?void 0:O.metadata)))),P},Ye=null,Ke=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),i=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),o=i>0&&t>4?i:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),i=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(i-=1),i<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&o>0?l:0,o,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},We=function(e){var n,t=w(e,8),i=t[0],o=t[1],l=t[2],r=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=i>=1?" ".concat(i," Year"):o>=1?" ".concat(o," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n)},$e=(He={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return He},set:function(e){He={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function Je(e,n,t,i){if(e){var o=function(){var e,o,r=null===(e=$e.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(o=$e.get())||void 0===o?void 0:o.scheduleEndTimeMs,u=Date.now();if(u-a>0){var s=document.getElementsByClassName("error-message")[0];return s&&(s.textContent=h.getLocalisation("eventEnded")||"Game has ended",i.textContent=""),clearInterval(l),void(null==t||t())}var d=r-u;if(d/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,i]),void(null==t||t());var c=Ke(d,r);null==n||n([].concat(b(c),[i]))};o();var l=setInterval(o,1e3);return l}}var Xe=function(e,n,t){var i,o,l,r,a,u,s,d,c=null==n||null===(i=n.response)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null;$e.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,endDateTime:null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,i){var o,l,r=Date.now(),a=null===(o=$e.get())||void 0===o?void 0:o.scheduleStartTimeMs,u=null===(l=$e.get())||void 0===l?void 0:l.scheduleEndTimeMs,s=function(e,n,t,i){var o;e<0?o=h.getLocalisation("eventNotStarted")||i||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(o=h.getLocalisation("eventEnded")||i||"Game has ended");return o||i}(r-a,r-u,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(s));var c=document.getElementsByClassName("error-timer-message")[0];c&&Je(Math.abs(a),We,i,c)}else{var v=document.getElementById(e).parentElement;if(v){var p=document.createElement("div");p.className="error-container";var f=document.createElement("div");f.className="error-message";var m=document.createElement("div");m.className="error-timer-message",f.textContent="".concat(s),p.appendChild(f),p.appendChild(m),v.append(p),Je(Math.abs(a),We,i,m)}}}(e,c,v,t)};function Qe(n,t){var i=t.scheduleEndDate,o=t.scheduleStartDate;$e.set({startDateTime:o,endDateTime:i}),Ye&&clearInterval(Ye),Ye=setInterval(function(){var t,i=Date.now(),o=null===(t=$e.get())||void 0===t?void 0:t.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",o),o&&i>o){var l;console.log("Game ended");var r=m.getPlayer(n);if(e.isPlayerInitialised(n)&&r){var a;r.dispose(),console.log("Player disposed");var u=null===(a=document.getElementsByClassName("vl-container"))||void 0===a?void 0:a[0],s=document.createElement("video");s.id=n,s.className="video-js",s.style.width="100%",s.style.height="100%",u&&u.appendChild(s)}var d=h.getLocalisation("eventEnded")||"Game has ended",c=null===(l=document.getElementsByClassName("error-container"))||void 0===l?void 0:l[0];if(c){var v=c.querySelector(".error-message");v&&(v.textContent=d)}else{var p=document.getElementById(n),f=null==p?void 0:p.parentElement;if(f){(c=document.createElement("div")).className="error-container";var g=document.createElement("div");g.className="error-message",g.textContent=d,c.appendChild(g),f.append(c)}}clearInterval(Ye)}},1e3)}function Ze(e,n){return en.apply(this,arguments)}function en(){return(en=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,p;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,c=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:v=n.sent,p=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getVideoDetails(s,v,p).then(function(n){var i,o,l,r,p,f,m,g,h,y;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var b=null==n||null===(r=n.data)||void 0===r||null===(p=r.video)||void 0===p||null===(f=p.gist)||void 0===f?void 0:f.scheduleEndDate,w=null==n||null===(m=n.data)||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.scheduleStartDate;Qe(d,{scheduleEndDate:b,scheduleStartDate:w});var k,S=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(y=t.watchHistory)&&void 0!==y&&y.enable&&!c)if((null===(k=t.watchHistory)||void 0===k?void 0:k.saveOffline)||!1){var E,T,D,I=Oe((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(I&&I.length)t.watchHistoryResumeTime=(null===(T=I[0])||void 0===T?void 0:T.watchedTime)||null,t.watchedPercentage=(null===(D=I[0])||void 0===D?void 0:D.watchedPercentage)||null;S.contentType="video",Ue(d,{res:S},t,{resolve:a,reject:u})}else e.getVideoInfo(s,v).then(function(e){var n,i,o,l,r,a;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(o=window)||void 0===o||null===(l=o.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(d,{res:S},t,{resolve:a,reject:u})});else Ue(d,{res:S},t,{resolve:a,reject:u})}).catch(function(n){var i,o,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.showScheduleTimer)||!1,r=(null==t||null===(o=t.event)||void 0===o?void 0:o.onCountdownComplete)||null;l&&Xe(d,n,r),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Ue(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function on(e,n){return ln.apply(this,arguments)}function ln(){return(ln=t(i.mark(function n(t,o){var l,r,a,u,s,d,c;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(l=t.series)||void 0===l?void 0:l.id,e.getSeriesDetails(c,u).then(function(n){var i,o,l,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var p=videoId||(null==v||null===(i=v[0])||void 0===i||null===(o=i.episodes)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(p,u).then(function(n){var i,o,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),Ue(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:r,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var rn,an=function(n){var t=n.site,i=n.sseBaseUrl,o=n.sseEndpoint,l=n.debug,r=void 0!==l&&l;return k.createSSETransport({site:t,sseBaseUrl:i,getToken:e.getToken,sseEndpoint:o,onOpen:function(e){var n=e.userId,t=e.endpoint;r&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,i,o,l,a,u,s,d,c,v;if(r&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(i=t.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id)===(null==n||null===(l=n.payload)||void 0===l?void 0:l.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var p=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),f=1e3*(null==n||null===(d=n.payload)||void 0===d||null===(c=d.states)||void 0===c||null===(v=c.end)||void 0===v?void 0:v.endDateTime);p&&f&&(console.log("Setting schedule timer",p,f),$e.set({startDateTime:p,endDateTime:f}))}},onReconnectAttempt:function(e){r&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;r&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){r&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){r&&console.error("SSE Error:",e,n)},onClose:function(){r&&console.log("SSE Closed")}})},un=function(e){var n=e.enable,t=e.site,i=e.sseBaseUrl,o=e.sseEndpoint,l=e.debug;if(n){var r=an({site:t,sseBaseUrl:i,sseEndpoint:o,debug:void 0!==l&&l});return r._sseBaseUrl=i,r._site=t,r._sseEndpoint=o,r}};function sn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function dn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):sn(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:c.onTimeUpdate,getVideoDuration:c.getVideoDuration,onVideoEnded:c.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(i.mark(function t(o,l){var r,a,u,s,d,c,v,p,f,g,y,b,w,k,E,T,D,I,C,O,P,j,x,R,A,L,M,_,B,V,U,q;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return o({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(C=(null==n?void 0:n.videoSourceUrl)||!1,O=null==n?void 0:n.asat,P=(null==n||null===(r=n.epg)||void 0===r?void 0:r.enable)||!1,j=null==n?void 0:n.videoId,x=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,R=(null==n?void 0:n.streamingInfo)||!1,window.videoId=j,A=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",A),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),A&&!e.isTokenExpired(A)){t.next=17;break}return l({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 17:rn=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(u=rn)||void 0===u?void 0:u.site,window.siteId=null===(s=rn)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(d=rn)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=rn)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=rn)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(p=rn)||void 0===p?void 0:p.userId)||(null===(f=rn)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=n.watchHistory||null,L=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,M=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(_=null==n?void 0:n.errors)&&(window.customErrors=_),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),S.relatedVideosManager.reset(),S.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:M&&N("https://www.googletagmanager.com/gtag/js?id=".concat(M)).then(function(){return e.runGtag(M)}).catch(function(e){}),(B=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&B.addEventListener("contextmenu",function(e){return e.preventDefault()}),(V=un({enable:null==n||null===(k=n.sse)||void 0===k?void 0:k.enable,site:null==n||null===(E=n.sse)||void 0===E?void 0:E.siteName,sseBaseUrl:null==n||null===(T=n.sse)||void 0===T?void 0:T.sseBaseUrl,sseEndpoint:null==n||null===(D=n.sse)||void 0===D?void 0:D.sseEndpoint,debug:null==n||null===(I=n.sse)||void 0===I?void 0:I.debug}))&&!V.isConnectionActive()&&V.connect(),C?(q={directPlaybackUrl:C,id:U="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},O?e.getVideoDetails(U,A).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(L,{res:dn(dn({},t),q)},n,{resolve:o,reject:l})}).catch(function(n){e.initiateErrorHandling(n,L,l,U)}):Ue(L,{res:q},n,{resolve:o,reject:l})):R?ze(n,{resolve:o,reject:l}):x?on(n,{resolve:o,reject:l}):P?nn(n,{resolve:o,reject:l}):Ze(n,{resolve:o,reject:l});case 45:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:p.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:c.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:f.playSelectedResolution,getSource:e.getSource,setVolume:_,getVolume:B,disableControls:e.disableControls,setPlaybackSpeed:c.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:c.playerEvents,onReplay:c.onReplay,relatedVideosManager:S.relatedVideosManager}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-9239e4ef.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/regenerator"),o=require("video.js"),l=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./util-9e6f986e.js"),v=require("./captions-d98c49d6.js"),p=require("./renditions-6554142b.js"),f=require("./resolution-4c007d14.js"),m=require("./skin-e0cf4554.js"),g=require("./browser-77c57718.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@babel/runtime/helpers/slicedToArray"),k=require("@viewlift/sse"),S=require("./relatedVideosManager-88017db2.js");function E(e,n,t,i){var o=a(d(1&i?e.prototype:e),n,t);return 2&i&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/assertThisInitialized");var D=o.getComponent("TextTrackSettings"),I=o.dom,C=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],O=C.map(function(e){return e.value}),P="16",j="vlp-caption-font-size-px",x="vlp-caption-font-size-style",R=".vjs-font-percent > select",A=function(e){return-1!==O.indexOf(e)?e:P},L=null;D?(L=function(){u(i,D);var e,n,t=(e=i,n=T(),function(){var t,i=d(e);if(n){var o=d(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return s(this,t)});function i(e,n){var o;return l(this,i),(o=t.call(this,e,n)).customUiReady_=!0,o.applyCustomFontSizeUI_(),o}return r(i,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(R);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);C.forEach(function(n){e.appendChild(I.createEl("option",{value:n.value,textContent:n.label}))}),e.value=P}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(R);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=A(e);if("undefined"!=typeof document){var t=document.getElementById(x);t||((t=document.createElement("style")).id=x,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(j)}catch(e){}var n=A(e),t=this.$(R);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=E(i,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(E(i,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(R);e&&(e.value=P),this.applyFontSize_(P)}}},{key:"saveSettings",value:function(){if(E(i,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(R);if(e)try{window.localStorage.setItem(j,A(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){E(i,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),i}(),o.registerComponent("TextTrackSettings",L)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var N=function(e){return new Promise(function(n,t){if(M(e))t("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}})},M=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},_=function(e,n,t){var i=m.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var o=parseFloat(n)/100;i.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},B=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},V=function(){var e=t(i.mark(function e(n){var t,l,r,a,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,N("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),U=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,i,l,r,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(l=i.framework)||void 0===l||null===(r=l.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var q=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),N("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),F=function(){var n=t(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),H=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=t(i.mark(function e(){var n;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-072614bc.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),K=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){N("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:q,loadEMELibrary:H,loadMuxPlugin:z,loadDvrSeekbar:G,loadContribDash:Y,loadComscorePlugin:F});function W(e){return $.apply(this,arguments)}function $(){return($=t(i.mark(function e(n){var t;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,q();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return K}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function J(e){return X.apply(this,arguments)}function X(){return(X=t(i.mark(function e(n){var t,o,l,r,a,u,s,d,c,v;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,F();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(l=n.comscore)||void 0===l?void 0:l.applicationName)||(null===(r=window)||void 0===r?void 0:r.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Q(e,n){return Z.apply(this,arguments)}function Z(){return(Z=t(i.mark(function e(n,t){var o,l,r,a,u,s,d,c,v,p,f,m,h,y;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",p=null==t||null===(o=t[v])||void 0===o?void 0:o.drmEnabled,null==t||null===(l=t[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,h=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([p?"Safari"==g.detectBrowser()?H():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?Y():H():"Safari"!=g.detectBrowser()&&f?Y():null,m?J(n):null,h?z():null,V(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var te=new Set,ie=null,oe=function(n,t,i,o){var l,r,a,u,s,d,c,v={},p=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(l=n[p])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=ce(n),v[null==i||null===(r=i.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==n||!n.linearchannel),v[null==i||null===(a=i.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==i||null===(u=i.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ue(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(s=n[p])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=n[p])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[i.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=se(n),v["c3.cm.genreList"]=re(n),v["c3.cm.genre"]=le(n),v["c3.cm.channel"]=ae(n,o);var f=fe(e.getCurrentSeries(),n);return v=ne(ne({},v),f)},le=function(e){var n,t,i,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(i=t.primaryCategory)||void 0===i?void 0:i.title)||"Null"},re=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},ae=function(e,n){var t,i,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(i=((null==e||null===(t=e[o])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===i?void 0:i.title)||"NULL"},ue=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},se=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[i])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},de=function(e,n){var t,i,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(i=t.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},ce=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ve,pe,fe=function(n,t){var i,o,l,r,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(i=t.video)||void 0===i||null===(o=i.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(l=n[s-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},me=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},ge=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},he=function(){var n=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,p,f,g,h;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=(null==o?void 0:o.convivaConfig)||{},r=l.trackConvivaPlayerEvent,a=l.paymentHandler,u=l.tveProvider,s=l.enable,d=l.appName,v=(c=o||{}).token,p=c.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(f=m.getPlayer(t),"function"==typeof(g=r)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var i=me(t.keySystem);g("contentInfo",{DRMEnabled:i})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;ie&&ie!==f.currentSrc()&&g("playbackEnded"),g("setPlayer",f),te.clear(),ie=f.currentSrc();var i=ge(f.currentType()),l=e.getCurrentVideo(),r=oe(l,f,h,p);r[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",r[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=de(l,o),r.authToken=v||"NULL",r.streamType=i,r.D2CType=a||"NONE",r.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",r["c3.cm.affiliate"]=u||"NULL",ye.setData(r),g("contentInfo",r)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),f.on("play",function(){te.has(f.currentSrc())||(te.add(f.currentSrc()),g("playbackStarted",null))}),f.on("ended",function(){te.has(f.currentSrc())&&te.delete(f.currentSrc()),g("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==te||te.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),ye=(ve={},{setData:function(e){ve=ne(ne({},ve),e)},getData:function(){return ve}}),be=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-f3a5fe3d.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-0a5108bb.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-83a765a8.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-a904ce92.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-dfd8c833.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-a25a2457.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-f26ba21b.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-5d92ab3f.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-7556b856.js")}).then(function(t){t.initialiseSkin(e,n)})};function we(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ke(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?we(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Se=[],Ee=0,Te=null;function De(){pe=null,Se=[],Ee=0,Te=null}function Ie(t,i,o){var l,r,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==i||null===(l=i.watchHistory)||void 0===l||l.apiVersion;var c=null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(t.currentTime()),p=Math.floor(t.duration());null==i||null===(a=i.watchHistory)||void 0===a||a.xapiKey;var f=(null==i||null===(u=i.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==i||null===(s=i.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=d?100:Math.floor(v/p*100),y={};m?function(t,i,o){var l=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),r=Ce(l),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return ke(ke({},e),{},n({},t,s[t]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===pe});c<0?r.push(ke(ke({content:d},t),{},{addedDate:a,updateDate:a})):r[c]=ke(ke(ke({},r[c]),t),{},{updateDate:a});localStorage.setItem("".concat(l),JSON.stringify(r))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,i.siteOwner):(y=ke(ke({videoId:pe,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},Te&&{seriesId:Te}),f&&{originalObjectId:f}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Ee=v+o}function Ce(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Oe(e,n,t){var i=Ce(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return i&&Array.isArray(i)&&(o=i.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var Pe=!1,je=function(n,t){var i,o,l=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(i=n[l])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!Pe){var r=xe(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(r,t);return a&&e.loadVideo(t,a),Pe=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function xe(e,n,t){if(Array.isArray(e))return e.map(function(e){return xe(e,n,t)});if(null!==e&&"object"===y(e)){var i={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?i[o]=e[t]:o===t&&void 0!==e[n]?i[o]=e[n]:i[o]=xe(e[o],n,t)}),i}return e}function Re(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 Ae(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)?Ae(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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 l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Le(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Me=function(n,t,i,o){var l,r,a,u,s,d=o.res,c=o.sres,p=m.getPlayer(n),f=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[f])||void 0===l?void 0:l.drmEnabled)||!1,b=!(null==d||null===(r=d[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===f,w=(null==d||null===(u=d[f])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(d),e.videoReplayTracker.set(d),p&&(p.on("loadstart",function(){b?i.resolve({status:!0,msg:"Video Loaded",response:d}):i.resolve(Ne({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:d}:{response:d}))}),p.on("loadeddata",function(){var i,o,l,r=v.getCaptions(n);if(null==r||r.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var a;null==p||null===(a=p.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&_(n,sessionStorage.getItem("volume")||"100");var u=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var s,c,f=Ne(Ne({},t),d);!function(e,n,t){var i,o,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(Te=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Se=[],Ee=0,pe=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",De),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Se.includes(Ee)||(e!=Ee||e<r?e>Ee&&(Ee=e+r):(Se.push(e),Ie(a,n,r)))}}),a.one("ended",function(){Ie(a,n,r,!0)}))}(n,f,null==u||null===(s=u.video)||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=p&&p.mux){var h,y,b,k,S,E,T=(null===(h=e.getCurrentVideo())||void 0===h?void 0:h.video)||(null==d?void 0:d.video),D=null==T?void 0:T.gist,I={env_key:null==t||null===(y=t.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==D?void 0:D.id,video_title:null==D?void 0:D.title,video_series:null==T||null===(k=T.series)||void 0===k?void 0:k.title,video_stream_type:null!=T&&null!==(S=T.streamingInfo)&&void 0!==S&&S.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};p.mux({debug:!1,data:I})}}),p.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];p.trigger("subtitlechanged",n)}),p.on("subtitlechanged",function(e,n){var t,i,o,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){b&&je(d,n)}),p.on("error",function(){var t,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&b)?je(d,n):(e.handleError(n,(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:d}))}),p.one("play",function(){var n,i,o,l,r;if(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(l=o.adsConfig)||void 0===l||!l.vodAdClientSideTracking){if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){p.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),p.on("volumechange",function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),p.on("chromecastDisconnected",function(){if(b){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var e,n=(null==p||null===(e=p.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),i=(n.language||n.label||"").toUpperCase();return t<i?-1:t>i?1:0}),"object"==y(p.dash)){var t,i,o,l=null==p||null===(t=p.dash)||void 0===t||null===(i=t.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=Re(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=Re(n);try{for(d.s();!(s=d.n()).done;){var c,v,f,m=s.value;if(("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=m&&null!==(f=m.label)&&void 0!==f&&f.includes("5.1"))p.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_e(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Ve={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},Ue=function(l,r,a,u){var s,d,c,p,f,h,y,b,w,k,S,E,T,D,I,C,O,P,j,x,R,A,L,N,M,_,B,V,q,F,H,z,G,Y,K,W,$,J,X=r.res,Z=void 0===X?null:X,ee=r.sres,ne=void 0===ee?null:ee,te=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),i=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:i,dashLogLevel:null!=i&&null!=Ve[i]?Ve[i]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ie=te.playerDebug,oe=te.logLevel,le=te.dashLogLevel;ie&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var re=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(d=Z)||void 0===d||null===(c=d[ae])||void 0===c||null===(p=c.gist)||void 0===p?void 0:p.videoImageUrl)||m.impolicy16x9(null===(f=Z)||void 0===f||null===(h=f[ae])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(w=Z)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=!(null===(E=Z)||void 0===E||null===(T=E[ae])||void 0===T||null===(D=T.streamingInfo)||void 0===D||!D.isLiveStream)||"linearchannel"===ae,ce=(null===(I=Z)||void 0===I||null===(C=I.ads)||void 0===C||null===(O=C.preRoll)||void 0===O||null===(P=O.adTags)||void 0===P||null===(j=P.web)||void 0===j?void 0:j.active)&&(null===(x=Z)||void 0===x||null===(R=x.ads)||void 0===R||null===(A=R.preRoll)||void 0===A||null===(L=A.adTags)||void 0===L||null===(N=L.web)||void 0===N?void 0:N.url);Z=Be(Be({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(M=a.customData)||void 0===M?void 0:M.ads)||{},pe=(null===(_=Z)||void 0===_||null===(B=_[ae])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,fe=!(null===(V=Z)||void 0===V||null===(q=V[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,ge=(null==a?void 0:a.skin_settings)||{},we=($={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:se},n($,"autoplay",null==a?void 0:a.autoplay),n($,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!ce),n($,"loop",(null==a?void 0:a.loop)||!1),n($,"audioPosterMode",null==a?void 0:a.audioPosterMode),n($,"html5",Be(Be({dash:Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Be(Be({},((null==a?void 0:a.debugConfig)&&(null==a||null===(F=a.debugConfig)||void 0===F?void 0:F.enable)||ie)&&{debug:{logLevel:le}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Be(Be(Be(Be({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Be(Be(Be({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(H=a.customData)||void 0===H?void 0:H.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==z&&z},((null==a?void 0:a.debugConfig)&&(null==a||null===(G=a.debugConfig)||void 0===G?void 0:G.enable)||ie)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(Y=a.debugConfig)||void 0===Y?void 0:Y.enable)||ie||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(K=a.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),n($,"poster",ue),n($,"techOrder",re),n($,"chromecast",{requestCustomDataFn:function(n){var t,i,o=m.getPlayer(l),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var i,o,l,r,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,y,b,w,k,S;f.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=T;var D=(null==E?void 0:E.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);f.licenseToken=D}var I=(null==e||null===(i=e[p])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=I;var C=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=C;var O=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=O;var P=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=P,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Z,n,r);return Be(Be({},u),{},{transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Be({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(i=a.convivaConfig)||void 0===i?void 0:i.debug)||!1},ye.getData())})},modifyLoadRequestFn:function(e){var n,t,i,o,r,a=m.getPlayer(l),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(i=t.streamingInfo)||void 0===i||null===(o=i.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!o.getPlayers()[l]){(null!=a&&a.debugConfig&&null!=a&&null!==(J=a.debugConfig)&&void 0!==J&&J.enable||ie)&&o.log.level(oe||"debug");var ke=o(l,we,function(){var n=t(i.mark(function n(){var t,r,s,d,c,p,f,m,g,h,y,b,w,k,S,E,T,D,I,C,O,P;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ke),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,Q(a,Z);case 5:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||ie){try{o.log.level(oe||"debug")}catch(e){}(w=function(){try{var e,n,t;null==ke||null===(e=ke.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:le}})}catch(e){}})(),ke.one("loadedmetadata",w)}if(k=null===(r=Z)||void 0===r||null===(s=r[ae])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.startOverTime,de&&u.resolve(Be({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(l,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),he(l,a),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),se&&U(l,k),!ce||null!=a&&null!==(c=a.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(l,ce,Z),S=e.getSource(Z,l),console.log(S),ie&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",we)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!pe){n.next=23;break}return n.next=20,e.getSGAIEnabledSource(l,Z);case 20:S=n.sent,n.next=27;break;case 23:if(!fe){n.next=27;break}return n.next=26,e.getTransmitEnabledSource(S,Z,l);case 26:S=n.sent;case 27:S?e.loadVideo(l,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(l,"Incompatible / Missing Source")),((null===(p=Z)||void 0===p||null===(f=p[ae])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Z)||void 0===h||null===(y=h[ae])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(P=(null===(T=Z)||void 0===T||null===(D=T[ae])||void 0===D||null===(I=D.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(C=Z)||void 0===C||null===(O=C[ae])||void 0===O?void 0:O.closedCaptions),E=P.filter(function(e){return"VTT"===e.format}),v.addCaptions(l,E)),null!=a&&a.disableControls?e.disableControls(l):be(l,Be(Be(Be({},a),we),{},{liveVideo:de,isDvrEnabled:se,res:Z,sres:ne})),Me(l,Be(Be(Be({},a),we),{},{liveVideo:de}),u,{res:Z,sres:ne});case 31:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):qe(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var He,ze=function(e,n){var t=n.resolve,i=n.reject,o=null==e?void 0:e.playerId,l=Ge(e);Ue(o,{res:l},e,{resolve:t,reject:i})},Ge=function(n){var t,i,o,l,r,a,u,s,d,c,v,p,f,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(i=n.streamingInfo)||void 0===i?void 0:i.isDrmEnabled)||null,y=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.url)||null,w=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,E=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],T=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,D=null==n?void 0:n.token,I=e.getDecodedToken(D);null==I||I.site;var C=null==I?void 0:I.siteId,O=(null==n||null===(p=n.customData)||void 0===p||null===(f=p.comscore)||void 0===f?void 0:f.video)||null,P=Fe(Fe({id:"".concat(C,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Fe(Fe(Fe(Fe(Fe({drmEnabled:h,streamingInfo:Fe(Fe({videoAssets:Fe(Fe({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==O?void 0:O.isLiveStream)&&{isLiveStream:null==O?void 0:O.isLiveStream})},T&&{isSSAIEnabled:T}),{},{metadata:E,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Fe(Fe(Fe({},w&&{videoImageUrl:w}),(null==O?void 0:O.videoId)&&{id:null==O?void 0:O.videoId}),(null==O?void 0:O.videoTitle)&&{title:null==O?void 0:O.videoTitle}),contentDetails:Fe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==O?void 0:O.runtime)&&{runtime:null==O?void 0:O.runtime}),(null==O?void 0:O.publishDate)&&{publishDate:null==O?void 0:O.publishDate}),(null==O?void 0:O.platform)&&{platform:null==O?void 0:O.platform}),(null==O?void 0:O.series)&&{series:null==O?void 0:O.series}),ads:{preRoll:{adTags:{web:Fe(Fe({},y&&{active:!0}),y&&{url:y})}}}});return O&&(null!=O&&O.isDvrEnabled&&(P.video.liveDetails=Fe(Fe({},P.video.liveDetails),{},{isDvrEnabled:null==O?void 0:O.isDvrEnabled})),null!=O&&O.metadata&&(P.video.metadata=[].concat(b(P.video.metadata),b(null==O?void 0:O.metadata)))),P},Ye=null,Ke=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),i=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),o=i>0&&t>4?i:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),i=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(i-=1),i<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&o>0?l:0,o,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},We=function(e){var n,t=w(e,8),i=t[0],o=t[1],l=t[2],r=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=i>=1?" ".concat(i," Year"):o>=1?" ".concat(o," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n)},$e=(He={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return He},set:function(e){He={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function Je(e,n,t,i){if(e){var o=function(){var e,o,r=null===(e=$e.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(o=$e.get())||void 0===o?void 0:o.scheduleEndTimeMs,u=Date.now();if(u-a>0){var s=document.getElementsByClassName("error-message")[0];return s&&(s.textContent=h.getLocalisation("eventEnded")||"Game has ended",i.textContent=""),clearInterval(l),void(null==t||t())}var d=r-u;if(d/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,i]),void(null==t||t());var c=Ke(d,r);null==n||n([].concat(b(c),[i]))};o();var l=setInterval(o,1e3);return l}}var Xe=function(e,n,t){var i,o,l,r,a,u,s,d,c=null==n||null===(i=n.response)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null;$e.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,endDateTime:null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,i){var o,l,r=Date.now(),a=null===(o=$e.get())||void 0===o?void 0:o.scheduleStartTimeMs,u=null===(l=$e.get())||void 0===l?void 0:l.scheduleEndTimeMs,s=function(e,n,t,i){var o;e<0?o=h.getLocalisation("eventNotStarted")||i||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(o=h.getLocalisation("eventEnded")||i||"Game has ended");return o||i}(r-a,r-u,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(s));var c=document.getElementsByClassName("error-timer-message")[0];c&&Je(Math.abs(a),We,i,c)}else{var v=document.getElementById(e).parentElement;if(v){var p=document.createElement("div");p.className="error-container";var f=document.createElement("div");f.className="error-message";var m=document.createElement("div");m.className="error-timer-message",f.textContent="".concat(s),p.appendChild(f),p.appendChild(m),v.append(p),Je(Math.abs(a),We,i,m)}}}(e,c,v,t)};function Qe(n,t){var i=t.scheduleEndDate,o=t.scheduleStartDate;$e.set({startDateTime:o,endDateTime:i}),Ye&&clearInterval(Ye),Ye=setInterval(function(){var t,i=Date.now(),o=null===(t=$e.get())||void 0===t?void 0:t.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",o),o&&i>o){var l;console.log("Game ended");var r=m.getPlayer(n);if(e.isPlayerInitialised(n)&&r){var a;r.dispose(),console.log("Player disposed");var u=null===(a=document.getElementsByClassName("vl-container"))||void 0===a?void 0:a[0],s=document.createElement("video");s.id=n,s.className="video-js",s.style.width="100%",s.style.height="100%",u&&u.appendChild(s)}var d=h.getLocalisation("eventEnded")||"Game has ended",c=null===(l=document.getElementsByClassName("error-container"))||void 0===l?void 0:l[0];if(c){var v=c.querySelector(".error-message");v&&(v.textContent=d)}else{var p=document.getElementById(n),f=null==p?void 0:p.parentElement;if(f){(c=document.createElement("div")).className="error-container";var g=document.createElement("div");g.className="error-message",g.textContent=d,c.appendChild(g),f.append(c)}}clearInterval(Ye)}},1e3)}function Ze(e,n){return en.apply(this,arguments)}function en(){return(en=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,p;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,c=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:v=n.sent,p=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getVideoDetails(s,v,p).then(function(n){var i,o,l,r,p,f,m,g,h,y;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var b=null==n||null===(r=n.data)||void 0===r||null===(p=r.video)||void 0===p||null===(f=p.gist)||void 0===f?void 0:f.scheduleEndDate,w=null==n||null===(m=n.data)||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.scheduleStartDate;Qe(d,{scheduleEndDate:b,scheduleStartDate:w});var k,S=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(y=t.watchHistory)&&void 0!==y&&y.enable&&!c)if((null===(k=t.watchHistory)||void 0===k?void 0:k.saveOffline)||!1){var E,T,D,I=Oe((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(I&&I.length)t.watchHistoryResumeTime=(null===(T=I[0])||void 0===T?void 0:T.watchedTime)||null,t.watchedPercentage=(null===(D=I[0])||void 0===D?void 0:D.watchedPercentage)||null;S.contentType="video",Ue(d,{res:S},t,{resolve:a,reject:u})}else e.getVideoInfo(s,v).then(function(e){var n,i,o,l,r,a;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(o=window)||void 0===o||null===(l=o.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(d,{res:S},t,{resolve:a,reject:u})});else Ue(d,{res:S},t,{resolve:a,reject:u})}).catch(function(n){var i,o,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.showScheduleTimer)||!1,r=(null==t||null===(o=t.event)||void 0===o?void 0:o.onCountdownComplete)||null;l&&Xe(d,n,r),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Ue(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function on(e,n){return ln.apply(this,arguments)}function ln(){return(ln=t(i.mark(function n(t,o){var l,r,a,u,s,d,c;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(l=t.series)||void 0===l?void 0:l.id,e.getSeriesDetails(c,u).then(function(n){var i,o,l,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var p=videoId||(null==v||null===(i=v[0])||void 0===i||null===(o=i.episodes)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(p,u).then(function(n){var i,o,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),Ue(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:r,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var rn,an=function(n){var t=n.site,i=n.sseBaseUrl,o=n.sseEndpoint,l=n.debug,r=void 0!==l&&l;return k.createSSETransport({site:t,sseBaseUrl:i,getToken:e.getToken,sseEndpoint:o,onOpen:function(e){var n=e.userId,t=e.endpoint;r&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,i,o,l,a,u,s,d,c,v;if(r&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(i=t.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id)===(null==n||null===(l=n.payload)||void 0===l?void 0:l.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var p=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),f=1e3*(null==n||null===(d=n.payload)||void 0===d||null===(c=d.states)||void 0===c||null===(v=c.end)||void 0===v?void 0:v.endDateTime);p&&f&&(console.log("Setting schedule timer",p,f),$e.set({startDateTime:p,endDateTime:f}))}},onReconnectAttempt:function(e){r&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;r&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){r&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){r&&console.error("SSE Error:",e,n)},onClose:function(){r&&console.log("SSE Closed")}})},un=function(e){var n=e.enable,t=e.site,i=e.sseBaseUrl,o=e.sseEndpoint,l=e.debug;if(n){var r=an({site:t,sseBaseUrl:i,sseEndpoint:o,debug:void 0!==l&&l});return r._sseBaseUrl=i,r._site=t,r._sseEndpoint=o,r}};function sn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function dn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):sn(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:c.onTimeUpdate,getVideoDuration:c.getVideoDuration,onVideoEnded:c.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(i.mark(function t(o,l){var r,a,u,s,d,c,v,p,f,g,y,b,w,k,E,T,D,I,C,O,P,j,x,R,A,L,M,_,B,V,U,q;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return o({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(C=(null==n?void 0:n.videoSourceUrl)||!1,O=null==n?void 0:n.asat,P=(null==n||null===(r=n.epg)||void 0===r?void 0:r.enable)||!1,j=null==n?void 0:n.videoId,x=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,R=(null==n?void 0:n.streamingInfo)||!1,window.videoId=j,A=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",A),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),A&&!e.isTokenExpired(A)){t.next=17;break}return l({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 17:rn=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(u=rn)||void 0===u?void 0:u.site,window.siteId=null===(s=rn)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(d=rn)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=rn)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=rn)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(p=rn)||void 0===p?void 0:p.userId)||(null===(f=rn)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=n.watchHistory||null,L=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,M=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(_=null==n?void 0:n.errors)&&(window.customErrors=_),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),S.relatedVideosManager.reset(),S.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:M&&N("https://www.googletagmanager.com/gtag/js?id=".concat(M)).then(function(){return e.runGtag(M)}).catch(function(e){}),(B=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&B.addEventListener("contextmenu",function(e){return e.preventDefault()}),(V=un({enable:null==n||null===(k=n.sse)||void 0===k?void 0:k.enable,site:null==n||null===(E=n.sse)||void 0===E?void 0:E.siteName,sseBaseUrl:null==n||null===(T=n.sse)||void 0===T?void 0:T.sseBaseUrl,sseEndpoint:null==n||null===(D=n.sse)||void 0===D?void 0:D.sseEndpoint,debug:null==n||null===(I=n.sse)||void 0===I?void 0:I.debug}))&&!V.isConnectionActive()&&V.connect(),C?(q={directPlaybackUrl:C,id:U="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},O?e.getVideoDetails(U,A).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(L,{res:dn(dn({},t),q)},n,{resolve:o,reject:l})}).catch(function(n){e.initiateErrorHandling(n,L,l,U)}):Ue(L,{res:q},n,{resolve:o,reject:l})):R?ze(n,{resolve:o,reject:l}):x?on(n,{resolve:o,reject:l}):P?nn(n,{resolve:o,reject:l}):Ze(n,{resolve:o,reject:l});case 45:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:p.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:c.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:f.playSelectedResolution,getSource:e.getSource,setVolume:_,getVolume:B,disableControls:e.disableControls,setPlaybackSpeed:c.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:c.playerEvents,onReplay:c.onReplay,relatedVideosManager:S.relatedVideosManager}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-d42cd8c1.js"),l=require("./icons-eb807ef0.js"),i=require("./skin-e0cf4554.js"),n=require("./renditions-6554142b.js"),t=require("./index-63575bc4.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray");var o=require("./relatedVideosManager-88017db2.js"),r=require("./generic-9239e4ef.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("video.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-6cab8d20.js"),require("./util-9e6f986e.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@viewlift/comscore/index.js"),exports.initialiseSkin=function(d,u){i.getPlayer(d).addClass("skin_news_live"),function(l,r){var d=i.getPlayer(l);d&&d.on("loadeddata",function(){var i,d,u,s,a,v,c,C,h,p;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&0!=(null==r||null===(d=r.skin_settings)||void 0===d?void 0:d.settingsToggle)&&e.addSettingsButtonV2(l,r);var f=(null===(u=o.relatedVideosManager.get())||void 0===u||null===(s=u.content)||void 0===s?void 0:s.length)>0;if(!(null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(C=c.appcmsMain)&&void 0!==C&&null!==(h=C.features)&&void 0!==h&&h.auto_play||f)||null!=r&&r.liveVideo){if(!(null!=r&&r.liveVideo||null!=r&&null!==(p=r.series)&&void 0!==p&&p.enable)){var g;g=o.relatedVideosManager.subscribe(function(e){var i;(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(t.addNextEpPreview(l,r),g&&g())})}}else t.addNextEpPreview(l,r)})}(d,u),function(e,l){var n,t,o,r,d,u,s,a,v,c,C,h,p,f,g,m,L,b,B,y,V,j,w,E,S,M,x,T,k,q,P=i.getPlayer(e);null===(n=P.controlBar)||void 0===n||n.removeChild("PlayToggle");var A=null==P||null===(t=P.controlBar)||void 0===t||null===(o=t.el())||void 0===o||null===(r=o.children)||void 0===r?void 0:r[2],_=document.createElement("div");_.className="vjs-play-toggle-container",_.append(null==P||null===(d=P.controlBar)||void 0===d||null===(u=d.addChild("PlayToggle"))||void 0===u?void 0:u.el()),null==P||null===(s=P.controlBar)||void 0===s||null===(a=s.el())||void 0===a||a.insertBefore(_,A),null==P||null===(v=P.controlBar)||void 0===v||v.removeChild("VolumePanel"),null==P||null===(c=P.controlBar)||void 0===c||c.addChild("VolumePanel",{inline:!0},1);var Z=null==P||null===(C=P.controlBar)||void 0===C?void 0:C.getChild("ProgressControl");null===(h=P.controlBar)||void 0===h||h.removeChild("SeekToLive"),null===(p=P.controlBar)||void 0===p||p.addChild("SeekToLive",{inline:!1},2);var N=null===(f=P.controlBar)||void 0===f||null===(g=f.getChild("SeekToLive"))||void 0===g?void 0:g.el();N&&(N.onclick=function(){if(P.paused())try{P.play()}catch(e){console.log(e)}});var H=document.createElement("div");H.className="custom-spaced-progress-bar",Z&&H.append(Z.el());null===(m=P.controlBar)||void 0===m||null===(L=m.el())||void 0===L||L.append(H);var D='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';P.el().insertBefore(i.parseSvgString(D),null!==(b=P.el().firstChild)&&void 0!==b?b:null);var F=(null==P||null===(B=P.controlBar)||void 0===B||null===(y=B.getChild("PlayToggle"))||void 0===y||null===(V=y.el())||void 0===V?void 0:V.firstChild)||null;if(F){F.style.height="18px",F.style.width="18px";var G=i.injectSVG(F,P.paused()?"#vjs-icon-play":"#vjs-icon-pause");P.on("pause",function(){return G.setAttributeNS(null,"href","#vjs-icon-play")}),P.on("play",function(){return G.setAttributeNS(null,"href","#vjs-icon-pause")})}var R=(null==P||null===(j=P.controlBar)||void 0===j||null===(w=j.getChild("FullscreenToggle"))||void 0===w||null===(E=w.el())||void 0===E?void 0:E.firstChild)||null;if(R){R.style.height="24px",R.style.width="24px";var I=i.injectSVG(R,"#vjs-icon-fullscreen");P.on("fullscreenchange",function(){var e=P.isFullscreen_;null==I||I.setAttributeNS(null,"href",e?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var O=(null==P||null===(S=P.controlBar)||void 0===S||null===(M=S.getChild("VolumePanel"))||void 0===M?void 0:M.el())||null;if(O){var U=O.querySelector(".vjs-mute-control .vjs-icon-placeholder");U.classList.add("vjs-svg-icon"),U.style.height="24px",U.style.width="24px";var z=i.injectSVG(U,P.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");P.on("volumechange",function(e){var l=P.volume();console.log(l,P.muted()),0==l||P.muted()?z.setAttributeNS(null,"href","#vjs-icon-mute"):l>0&&l<=.3?z.setAttributeNS(null,"href","#vjs-icon-volume1"):l>=.3&&l<=.7?z.setAttributeNS(null,"href","#vjs-icon-volume2"):z.setAttributeNS(null,"href","#vjs-icon-volume3")})}var W=(null==P||null===(x=P.controlBar)||void 0===x||null===(T=x.getChild("PictureInPictureToggle"))||void 0===T?void 0:T.el())||null;if(W){var J=null==W?void 0:W.querySelector(".vjs-icon-placeholder");J.style.height="25px",J.style.width="25px";var K=i.injectSVG(J,"#vjs-icon-pip");P.on("enterpictureinpicture",function(){K.setAttributeNS(null,"href","#vjs-icon-pip")})}var Q=(null==P||null===(k=P.controlBar)||void 0===k||null===(q=k.getChild("SubsCapsButton"))||void 0===q?void 0:q.el())||null;if(Q){var X=Q.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");X.classList.add("vjs-svg-icon"),X.style.height="29px",X.style.width="29px";var Y=i.injectSVG(X,"#vjs-icon-caps");Y.setAttributeNS(null,"href","#vjs-icon-captions-off"),P.textTracks().on("change",function(e){for(var l=P.textTracks(),i=!1,n=0;n<l.length;n++){var t=l[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?Y.setAttributeNS(null,"href","#vjs-icon-captions"):Y.setAttributeNS(null,"href","#vjs-icon-captions-off")})}P&&null!=l&&l.liveVideo&&null!=l&&l.liveui&&(P.liveTracker.on("liveedgechange",function(){le(P)}),P.on("timeupdate",function(){le(P)}));function $(e){var l=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60),t=function(e){return String(e).padStart(2,"0")};return 0===l?"".concat(t(i),":").concat(t(n)):"".concat(t(l),":").concat(t(i),":").concat(t(n))}function ee(e){var l=e.seekable();if(l&&l.length>0){var i=l.end(0);return Math.max(0,i-e.currentTime())}return 0}function le(e){var l,i,n=e.liveTracker.atLiveEdge(),t=ee(e),o=null==e||null===(l=e.controlBar)||void 0===l||null===(i=l.remainingTimeDisplay)||void 0===i?void 0:i.el();if(o){var r=o.querySelector(".vjs-remaining-time-display");n?o.style.display="none":(o.style.display="flex",r&&(r.innerText=$(t)))}}}(d,u),function(n,t){var d,u,s,a,v,c,C,h,p,f=(null==t?void 0:t.liveVideo)||!1,g=(null==t||null===(d=t.res)||void 0===d?void 0:d.contentType)||"video",m=(null==t||null===(u=t.res)||void 0===u||null===(s=u[g])||void 0===s?void 0:s.isSSAIEnabled)||!1,L=(null==t?void 0:t.skin_settings)||{};null==L||L.slowMoBtn;var b=(null==t||null===(a=t.customData)||void 0===a?void 0:a.ads)||{};e.addBigMuteButton(n),null!=L&&L.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&e.addSkipButton(n,"VL_ONE",SkipSvgV2());null!=L&&L.rewindBtn&&(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&e.addRewindButton(n,"VL_ONE",l.RewindSvgV3());var B,y=o.relatedVideosManager.get();(null==y||null===(v=y.content)||void 0===v?void 0:v.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(n,y);B=o.relatedVideosManager.subscribe(function(l){var t,o,r=i.getPlayer(n);(null==r||null===(t=r.controlBar)||void 0===t||!t.getChild("videoSelector"))&&(null==l||null===(o=l.content)||void 0===o?void 0:o.length)>0&&(e.addVideoSelector_DEFAULTV2_TEMP(n,l),B&&B())}),(null==t||null===(c=t.streams)||void 0===c?void 0:c.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(n,null==t?void 0:t.streams);(null==t||null===(C=t.playlist)||void 0===C||null===(h=C.content)||void 0===h?void 0:h.length)>0&&e.addPlaylistSelector(n,null==t?void 0:t.playlist);null!=t&&null!==(p=t.series)&&void 0!==p&&p.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(n,t);if(m&&f&&"TRANSMIT"==(null==b?void 0:b.liveAdSticherProvider)&&null!=b&&b.liveAdClientSideTracking)r.initializeTransmit(n,t);else if("MEDIA_TAILOR"==(null==b?void 0:b.vodAdSticherProvider)&&null!=b&&b.vodAdClientSideTracking&&m)if(f)r.setupAdvertisementMarkersForLinear(n);else{var V,j=null;if(null!=t&&null!==(V=t.series)&&void 0!==V&&V.enable){var w,E,S,M,x,T=null===(w=r.getCurrentVideo())||void 0===w||null===(E=w.video)||void 0===E||null===(S=E.gist)||void 0===S?void 0:S.id,k=r.getSeriesWatchMap(),q=(null==k?void 0:k.get(T))||{t:0,p:0},P=q.t,A=q.p;"function"==typeof(null===(M=window)||void 0===M||null===(x=M.watchHistory)||void 0===x?void 0:x.cb)&&window.watchHistory.cb({watchedTime:P}),A<95&&(j=P)}else{var _=t.watchHistoryResumeTime;t.watchedPercentage<95&&(j=_)}r.setupAdvertisementMarkers(n,j)}}(d,u),t.addTVProviderImage(d,u)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-d42cd8c1.js"),l=require("./icons-eb807ef0.js"),i=require("./skin-e0cf4554.js"),n=require("./renditions-6554142b.js"),t=require("./index-63575bc4.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray");var o=require("./relatedVideosManager-88017db2.js"),r=require("./generic-9239e4ef.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("video.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-6cab8d20.js"),require("./util-9e6f986e.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@viewlift/comscore/index.js"),exports.initialiseSkin=function(s,u){i.getPlayer(s).addClass("skin_mini"),function(l,r){var s=i.getPlayer(l);s&&s.on("loadeddata",function(){var i,s,u,d,a,v,C,c,h,p;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&0!=(null==r||null===(s=r.skin_settings)||void 0===s?void 0:s.settingsToggle)&&e.addSettingsButtonV2(l,r);var f=(null===(u=o.relatedVideosManager.get())||void 0===u||null===(d=u.content)||void 0===d?void 0:d.length)>0;if(!(null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable||null!==(v=window)&&void 0!==v&&null!==(C=v.app_data)&&void 0!==C&&null!==(c=C.appcmsMain)&&void 0!==c&&null!==(h=c.features)&&void 0!==h&&h.auto_play||f)||null!=r&&r.liveVideo){if(!(null!=r&&r.liveVideo||null!=r&&null!==(p=r.series)&&void 0!==p&&p.enable)){var g;g=o.relatedVideosManager.subscribe(function(e){var i;(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(t.addNextEpPreview(l,r),g&&g())})}}else t.addNextEpPreview(l,r)})}(s,u),function(e,l){var n,t,o,r,s,u,d,a,v,C,c,h,p,f,g,m,b,B,y=i.getPlayer(e);null===(n=y.controlBar)||void 0===n||n.removeChild("VolumePanel"),null===(t=y.controlBar)||void 0===t||t.addChild("VolumePanel",{inline:!1},1);var L=null===(o=y.controlBar)||void 0===o?void 0:o.getChild("ProgressControl"),V=document.createElement("div");V.className="custom-spaced-progress-bar",L&&V.append(L.el());null===(r=y.controlBar)||void 0===r||null===(s=r.el())||void 0===s||s.append(V);var j='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>';y.el().insertBefore(i.parseSvgString(j),null!==(u=y.el().firstChild)&&void 0!==u?u:null);var E=(null==y||null===(d=y.controlBar)||void 0===d||null===(a=d.getChild("PlayToggle"))||void 0===a||null===(v=a.el())||void 0===v?void 0:v.firstChild)||null;if(E){E.style.height="16px",E.style.width="16px";var w=i.injectSVG(E,y.paused()?"#vjs-icon-play":"#vjs-icon-pause");y.on("pause",function(){return w.setAttributeNS(null,"href","#vjs-icon-play")}),y.on("play",function(){return w.setAttributeNS(null,"href","#vjs-icon-pause")})}var S=(null==y||null===(C=y.controlBar)||void 0===C||null===(c=C.getChild("FullscreenToggle"))||void 0===c||null===(h=c.el())||void 0===h?void 0:h.firstChild)||null;if(S){S.style.height="24px",S.style.width="24px";var x=i.injectSVG(S,"#vjs-icon-fullscreen");y.on("fullscreenchange",function(){var e=y.isFullscreen_;null==x||x.setAttributeNS(null,"href",e?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var M=(null==y||null===(p=y.controlBar)||void 0===p||null===(f=p.getChild("VolumePanel"))||void 0===f?void 0:f.el())||null;if(M){var q=M.querySelector(".vjs-mute-control .vjs-icon-placeholder");q.classList.add("vjs-svg-icon"),q.style.height="24px",q.style.width="24px";var k=i.injectSVG(q,y.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");y.on("volumechange",function(e){var l=y.volume();0==l||y.muted()?k.setAttributeNS(null,"href","#vjs-icon-mute"):l>0&&l<=.3?k.setAttributeNS(null,"href","#vjs-icon-volume1"):l>=.3&&l<=.7?k.setAttributeNS(null,"href","#vjs-icon-volume2"):k.setAttributeNS(null,"href","#vjs-icon-volume3")})}var P=(null==y||null===(g=y.controlBar)||void 0===g||null===(m=g.getChild("PictureInPictureToggle"))||void 0===m?void 0:m.el())||null;if(P){var T=null==P?void 0:P.querySelector(".vjs-icon-placeholder");T.style.height="25px",T.style.width="25px";var A=i.injectSVG(T,"#vjs-icon-pip");y.on("enterpictureinpicture",function(){A.setAttributeNS(null,"href","#vjs-icon-pip")})}var Z=(null==y||null===(b=y.controlBar)||void 0===b||null===(B=b.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(Z){var _=Z.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");_.classList.add("vjs-svg-icon"),_.style.height="29px",_.style.width="29px";var N=i.injectSVG(_,"#vjs-icon-caps");N.setAttributeNS(null,"href","#vjs-icon-captions-off"),y.textTracks().on("change",function(e){for(var l=y.textTracks(),i=!1,n=0;n<l.length;n++){var t=l[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?N.setAttributeNS(null,"href","#vjs-icon-captions"):N.setAttributeNS(null,"href","#vjs-icon-captions-off")})}y&&null!=l&&l.liveVideo&&null!=l&&l.liveui&&(y.liveTracker.on("liveedgechange",function(){G(y)}),y.on("timeupdate",function(){G(y)}));function H(e){var l=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60),t=function(e){return String(e).padStart(2,"0")};return 0===l?"".concat(t(i),":").concat(t(n)):"".concat(t(l),":").concat(t(i),":").concat(t(n))}function D(e){var l=e.seekable();if(l&&l.length>0){var i=l.end(0);return Math.max(0,i-e.currentTime())}return 0}function G(e){var l,i,n=e.liveTracker.atLiveEdge(),t=D(e),o=null==e||null===(l=e.controlBar)||void 0===l||null===(i=l.remainingTimeDisplay)||void 0===i?void 0:i.el();if(o){var r=o.querySelector(".vjs-remaining-time-display");n?o.style.display="none":(o.style.display="flex",r&&(r.innerText=H(t)))}}}(s,u),function(n,t){var s,u,d,a,v,C,c,h,p=(null==t||null===(s=t.res)||void 0===s||null===(u=s.video)||void 0===u?void 0:u.isSSAIEnabled)||!1,f=(null==t?void 0:t.skin_settings)||{};null==f||f.slowMoBtn;var g=(null==t||null===(d=t.customData)||void 0===d?void 0:d.ads)||{};null!=f&&f.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&e.addSkipButton(n,"VL_ONE",SkipSvgV2());null!=f&&f.rewindBtn&&(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&e.addRewindButton(n,"VL_ONE",l.RewindSvgV3());var m,b=o.relatedVideosManager.get();(null==b||null===(a=b.content)||void 0===a?void 0:a.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(n,b);m=o.relatedVideosManager.subscribe(function(l){var t,o,r=i.getPlayer(n);(null==r||null===(t=r.controlBar)||void 0===t||!t.getChild("videoSelector"))&&(null==l||null===(o=l.content)||void 0===o?void 0:o.length)>0&&(e.addVideoSelector_DEFAULTV2_TEMP(n,l),m&&m())}),(null==t||null===(v=t.streams)||void 0===v?void 0:v.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(n,null==t?void 0:t.streams);(null==t||null===(C=t.playlist)||void 0===C||null===(c=C.content)||void 0===c?void 0:c.length)>0&&e.addPlaylistSelector(n,null==t?void 0:t.playlist);null!=t&&null!==(h=t.series)&&void 0!==h&&h.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(n,t);if("MEDIA_TAILOR"==(null==g?void 0:g.vodAdSticherProvider)&&null!=g&&g.vodAdClientSideTracking&&p){var B,y=null;if(null!=t&&null!==(B=t.series)&&void 0!==B&&B.enable){var L,V,j,E=null===(L=r.getCurrentVideo())||void 0===L||null===(V=L.video)||void 0===V||null===(j=V.gist)||void 0===j?void 0:j.id,w=r.getSeriesWatchMap(),S=(null==w?void 0:w.get(E))||{t:0,p:0},x=S.t;S.p<95&&(y=x)}else{var M=t.watchHistoryResumeTime;t.watchedPercentage<95&&(y=M)}r.setupAdvertisementMarkers(n,y)}}(s,u),t.addTVProviderImage(s,u)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-d42cd8c1.js"),l=require("./icons-eb807ef0.js"),i=require("./skin-e0cf4554.js"),n=require("./renditions-6554142b.js"),r=require("./captions-d98c49d6.js"),o=require("./index-63575bc4.js"),t=require("./index-1c0aa450.js"),d=require("./browser-77c57718.js"),a=require("./relatedVideosManager-88017db2.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./generic-9239e4ef.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-6cab8d20.js"),require("./util-9e6f986e.js"),exports.initialiseSkin=function(u,s){i.getPlayer(u).addClass("skin_defaultv2"),function(){"Chrome"==d.detectBrowser()&&Promise.resolve().then(function(){return require("./chromett-f925fb6c.js")}).then(function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)});Promise.resolve().then(function(){return require("./skin-4bc06df1.js")}).then(function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})}(),function(l,u){var s=i.getPlayer(l);s&&(s.on("loadeddata",function(){var i,s,v,c,p,m,g,h,b,q;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,u),(null===(s=r.getCaptions(l))||void 0===s?void 0:s.length)>0&&e.addCaptionButton(l,u);var f=(null===(v=a.relatedVideosManager.get())||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0;if(!(null!=u&&null!==(p=u.series)&&void 0!==p&&p.enable||null!==(m=window)&&void 0!==m&&null!==(g=m.app_data)&&void 0!==g&&null!==(h=g.appcmsMain)&&void 0!==h&&null!==(b=h.features)&&void 0!==b&&b.auto_play||f)||null!=u&&u.liveVideo){if(!(null!=u&&u.liveVideo||null!=u&&null!==(q=u.series)&&void 0!==q&&q.enable)){var V;V=a.relatedVideosManager.subscribe(function(e){var i;(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(o.addNextEpPreview(l,u),V&&V())})}}else o.addNextEpPreview(l,u);null!=u&&u.liveVideo||d.isMobile()||t.initiateTrickplay(l)}),s.one("play",function(){var i,n,r,o;null!==(i=window)&&void 0!==i&&null!==(n=i.customData)&&void 0!==n&&n.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}(u,s),function(e,n){var r,o,t,d,a,u,s,v,c,p,m,g,h,b=i.getPlayer(e);null===(r=b.controlBar)||void 0===r||r.removeChild("VolumePanel"),null===(o=b.controlBar)||void 0===o||o.addChild("VolumePanel",{inline:!1},1);var q=null===(t=b.controlBar)||void 0===t?void 0:t.getChild("ProgressControl"),f=null===(d=b.controlBar)||void 0===d?void 0:d.getChild("CurrentTimeDisplay"),V=null===(a=b.controlBar)||void 0===a?void 0:a.getChild("SeekToLive"),C=document.createElement("div");C.className="custom-spaced-progress-bar",q&&f&&V&&C.append(q.el(),f.el(),V.el());null===(u=b.controlBar)||void 0===u||null===(s=u.el())||void 0===s||s.append(C),null==b||null===(v=b.controlBar)||void 0===v||null===(c=v.getChild("FullscreenToggle"))||void 0===c||null===(p=c.el())||void 0===p||p.appendChild(i.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==b||null===(m=b.controlBar)||void 0===m||null===(g=m.getChild("FullscreenToggle"))||void 0===g||null===(h=g.el())||void 0===h||h.appendChild(i.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var y=document.getElementsByClassName("vjs-time-control");n.liveVideo&&y[0]&&(y[0].style.display="none")}(u,s),function(n,r){var o,t,d,u,s,v=(null==r?void 0:r.skin_settings)||{},c=0!=(null==v?void 0:v.slowMoBtn);0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(n,"defaultV2",l.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(n,"defaultV2",l.RewindSvgV2());!r.liveVideo&&c&&e.addSlowMotion(n);var p,m=a.relatedVideosManager.get();(null==m||null===(o=m.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(n,m);p=a.relatedVideosManager.subscribe(function(l){var r,o,t=i.getPlayer(n);(null==t||null===(r=t.controlBar)||void 0===r||!r.getChild("videoSelector"))&&(null==l||null===(o=l.content)||void 0===o?void 0:o.length)>0&&(e.addVideoSelector_DEFAULTV2_TEMP(n,l),p&&p())}),(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(n,null==r?void 0:r.streams);(null==r||null===(d=r.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(n,null==r?void 0:r.playlist);null!=r&&null!==(s=r.series)&&void 0!==s&&s.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(n,r)}(u,s),o.addTVProviderImage(u,s)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-d42cd8c1.js"),l=require("./skin-e0cf4554.js"),i=require("./index-63575bc4.js"),r=require("./index-1c0aa450.js"),n=require("./browser-77c57718.js");require("videojs-contrib-quality-menu");var o=require("./relatedVideosManager-88017db2.js"),u=require("video.js"),d=require("./generic-9239e4ef.js"),a=require("./icons-eb807ef0.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./renditions-6554142b.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-6cab8d20.js"),require("./util-9e6f986e.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@viewlift/comscore/index.js");function t(u,d){var a,t=l.getPlayer(u),s=(null==d||null===(a=d.res)||void 0===a?void 0:a.siteId)||"";t&&(t.on("loadeddata",function(){var e,a,t,v,c,p,b,g;!function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(u);var y=(null===(e=o.relatedVideosManager.get())||void 0===e||null===(a=e.content)||void 0===a?void 0:a.length)>0;if(!(null!=d&&null!==(t=d.series)&&void 0!==t&&t.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(b=p.features)&&void 0!==b&&b.auto_play||y)||null!=d&&d.liveVideo){if(!(null!=d&&d.liveVideo||null!=d&&null!==(g=d.series)&&void 0!==g&&g.enable)){var m;m=o.relatedVideosManager.subscribe(function(e){var l;(null==e||null===(l=e.content)||void 0===l?void 0:l.length)>0&&(i.addNextEpPreview(u,d),m&&m())})}}else i.addNextEpPreview(u,d);null!=d&&d.liveVideo||n.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===s||r.initiateTrickplay(u)}),t.one("play",function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(u,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var s=function(e,i){var r,n,o,d,a,t,s,v,c,p,b,g,y=l.getPlayer(e),m=(null==i?void 0:i.theme)||{},q=u.dom.$(".vjs-play-progress"),h=u.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(r=window)||void 0===r||null===(n=r.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(d=o.brand)||void 0===d||null===(a=d.cta)||void 0===a||null===(t=a.primary)||void 0===t?void 0:t.backgroundColor)),q&&(q.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(b=p.cta)||void 0===b||null===(g=b.primary)||void 0===g?void 0:g.backgroundColor));var f=y.getChild("BigPlayButton")||null;(null==m?void 0:m.progressBarColor)&&q&&(q.style.background=m.progressBarColor),(null==m?void 0:m.playButtonBackgroundColor)&&f&&(f.el().style.background=m.playButtonBackgroundColor),(null==m?void 0:m.playButtonColor)&&h&&(h.style.color=m.playButtonColor),(null==m?void 0:m.playButtonType)&&("square"==(null==m?void 0:m.playButtonType)?f.el().style.borderRadius=".3em":f.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(r,n){l.getPlayer(r).addClass("skin_vlone"),t(r,n),function(r,n){var u,t,s,v,c,p,b,g=l.getPlayer(r),y=(null==n?void 0:n.liveVideo)||!1,m=(null==n||null===(u=n.res)||void 0===u?void 0:u.contentType)||"video",q=(null==n||null===(t=n.res)||void 0===t||null===(s=t[m])||void 0===s?void 0:s.isSSAIEnabled)||!1,h=d.getSource(null==n?void 0:n.res,r)||{};h.src;var f=(null==n?void 0:n.skin_settings)||{},k=(null==n||null===(v=n.customData)||void 0===v?void 0:v.ads)||{};if(y&&(null==n||!n.liveui)){var w,j,C=(null==g||null===(w=g.controlBar)||void 0===w||null===(j=w.getChild("LiveDisplay"))||void 0===j?void 0:j.el())||null;C&&(C.onclick=function(){try{var e;null==g||null===(e=g.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}})}null!=f&&f.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(r,"VL_ONE",a.SkipSvgV2());(null!=f&&f.rewindBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(r,"VL_ONE",a.RewindSvgV2());var V,S=o.relatedVideosManager.get();(null==S||null===(c=S.content)||void 0===c?void 0:c.length)>0&&e.addVideoSelector(r,S);V=o.relatedVideosManager.subscribe(function(i){var n,o,u=l.getPlayer(r);(null==u||null===(n=u.controlBar)||void 0===n||!n.getChild("videoSelector"))&&(null==i||null===(o=i.content)||void 0===o?void 0:o.length)>0&&(e.addVideoSelector(r,i),V&&V())}),null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable&&e.addSeriesSelectorV2(r,n);(null==n||null===(b=n.streams)||void 0===b?void 0:b.length)>1&&e.addMulticamSelector(r,null==n?void 0:n.streams);if(i.addTVProviderImage(r,n),d.initialiseKeyboardEvents(r,n),q&&y&&"TRANSMIT"==(null==k?void 0:k.liveAdSticherProvider)&&!(null==k||!k.liveAdClientSideTracking))d.initializeTransmit(r,n);else if("MEDIA_TAILOR"==(null==k?void 0:k.vodAdSticherProvider)&&null!=k&&k.vodAdClientSideTracking&&q)if(y)d.setupAdvertisementMarkersForLinear(r);else{var B,M=null;if(null!=n&&null!==(B=n.series)&&void 0!==B&&B.enable){var T,P,A,E,R,_=null===(T=d.getCurrentVideo())||void 0===T||null===(P=T.video)||void 0===P||null===(A=P.gist)||void 0===A?void 0:A.id,x=d.getSeriesWatchMap(),L=(null==x?void 0:x.get(_))||{t:0,p:0},O=L.t,I=L.p;"function"==typeof(null===(E=window)||void 0===E||null===(R=E.watchHistory)||void 0===R?void 0:R.cb)&&window.watchHistory.cb({watchedTime:O}),I<95&&(M=O)}else{var N=n.watchHistoryResumeTime;n.watchedPercentage<95&&(M=N)}d.setupAdvertisementMarkers(r,M)}}(r,n),s(r,n)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-d42cd8c1.js"),l=require("./icons-eb807ef0.js"),i=require("./skin-e0cf4554.js"),n=require("./renditions-6554142b.js"),t=require("./index-63575bc4.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray");var o=require("./relatedVideosManager-88017db2.js"),r=require("./generic-9239e4ef.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("video.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-6cab8d20.js"),require("./util-9e6f986e.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@viewlift/comscore/index.js"),exports.initialiseSkin=function(s,d){i.getPlayer(s).addClass("skin_news"),function(l,r){var s=i.getPlayer(l);s&&s.on("loadeddata",function(){var i,s,d,u,a,v,c,C,h,p;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&0!=(null==r||null===(s=r.skin_settings)||void 0===s?void 0:s.settingsToggle)&&e.addSettingsButtonV2(l,r);var f=(null===(d=o.relatedVideosManager.get())||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0;if(!(null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(C=c.appcmsMain)&&void 0!==C&&null!==(h=C.features)&&void 0!==h&&h.auto_play||f)||null!=r&&r.liveVideo){if(!(null!=r&&r.liveVideo||null!=r&&null!==(p=r.series)&&void 0!==p&&p.enable)){var g;g=o.relatedVideosManager.subscribe(function(e){var i;(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(t.addNextEpPreview(l,r),g&&g())})}}else t.addNextEpPreview(l,r)})}(s,d),function(e,l){var n,t,o,r,s,d,u,a,v,c,C,h,p,f,g,y,m,b,L=i.getPlayer(e);if(null!=l&&l.liveVideo){var B,V,j,w,E,S,M=null===(B=L.controlBar)||void 0===B||null===(V=B.getChild("TimeDivider"))||void 0===V?void 0:V.el(),x=null===(j=L.controlBar)||void 0===j||null===(w=j.getChild("CurrentTimeDisplay"))||void 0===w?void 0:w.el(),T=null===(E=L.controlBar)||void 0===E||null===(S=E.getChild("DurationDisplay"))||void 0===S?void 0:S.el();M&&(M.style.display="none"),x&&(x.style.display="none"),T&&(T.style.display="none")}var k=null===(n=L.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),q=null===(t=L.controlBar)||void 0===t||null===(o=t.getChild("SeekToLive"))||void 0===o?void 0:o.el();q&&(q.onclick=function(){if(L.paused())try{L.play()}catch(e){console.log(e)}});var A=document.createElement("div");A.className="custom-spaced-progress-bar",k&&A.append(k.el());null===(r=L.controlBar)||void 0===r||null===(s=r.el())||void 0===s||s.append(A);var P='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';L.el().insertBefore(i.parseSvgString(P),null!==(d=L.el().firstChild)&&void 0!==d?d:null);var _=(null==L||null===(u=L.controlBar)||void 0===u||null===(a=u.getChild("PlayToggle"))||void 0===a||null===(v=a.el())||void 0===v?void 0:v.firstChild)||null;if(_){_.style.height="18px",_.style.width="18px";var Z=i.injectSVG(_,L.paused()?"#vjs-icon-play":"#vjs-icon-pause");L.on("pause",function(){return Z.setAttributeNS(null,"href","#vjs-icon-play")}),L.on("play",function(){return Z.setAttributeNS(null,"href","#vjs-icon-pause")})}var N=(null==L||null===(c=L.controlBar)||void 0===c||null===(C=c.getChild("FullscreenToggle"))||void 0===C||null===(h=C.el())||void 0===h?void 0:h.firstChild)||null;if(N){N.style.height="24px",N.style.width="24px";var H=i.injectSVG(N,"#vjs-icon-fullscreen");L.on("fullscreenchange",function(){var e=L.isFullscreen_;null==H||H.setAttributeNS(null,"href",e?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var D=(null==L||null===(p=L.controlBar)||void 0===p||null===(f=p.getChild("VolumePanel"))||void 0===f?void 0:f.el())||null;if(D){var F=D.querySelector(".vjs-mute-control .vjs-icon-placeholder");F.classList.add("vjs-svg-icon"),F.style.height="24px",F.style.width="24px";var G=i.injectSVG(F,L.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");L.on("volumechange",function(e){var l=L.volume();console.log(l,L.muted()),0==l||L.muted()?G.setAttributeNS(null,"href","#vjs-icon-mute"):l>0&&l<=.3?G.setAttributeNS(null,"href","#vjs-icon-volume1"):l>=.3&&l<=.7?G.setAttributeNS(null,"href","#vjs-icon-volume2"):G.setAttributeNS(null,"href","#vjs-icon-volume3")})}var R=(null==L||null===(g=L.controlBar)||void 0===g||null===(y=g.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(R){var I=null==R?void 0:R.querySelector(".vjs-icon-placeholder");I.style.height="25px",I.style.width="25px";var O=i.injectSVG(I,"#vjs-icon-pip");L.on("enterpictureinpicture",function(){O.setAttributeNS(null,"href","#vjs-icon-pip")})}var U=(null==L||null===(m=L.controlBar)||void 0===m||null===(b=m.getChild("SubsCapsButton"))||void 0===b?void 0:b.el())||null;if(U){var z=U.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");z.classList.add("vjs-svg-icon"),z.style.height="29px",z.style.width="29px";var W=i.injectSVG(z,"#vjs-icon-caps");W.setAttributeNS(null,"href","#vjs-icon-captions-off"),L.textTracks().on("change",function(e){for(var l=L.textTracks(),i=!1,n=0;n<l.length;n++){var t=l[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?W.setAttributeNS(null,"href","#vjs-icon-captions"):W.setAttributeNS(null,"href","#vjs-icon-captions-off")})}L&&null!=l&&l.liveVideo&&null!=l&&l.liveui&&(L.liveTracker.on("liveedgechange",function(){Q(L)}),L.on("timeupdate",function(){Q(L)}));function J(e){var l=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60),t=function(e){return String(e).padStart(2,"0")};return 0===l?"".concat(t(i),":").concat(t(n)):"".concat(t(l),":").concat(t(i),":").concat(t(n))}function K(e){var l=e.seekable();if(l&&l.length>0){var i=l.end(0);return Math.max(0,i-e.currentTime())}return 0}function Q(e){var l,i,n=e.liveTracker.atLiveEdge(),t=K(e),o=null==e||null===(l=e.controlBar)||void 0===l||null===(i=l.remainingTimeDisplay)||void 0===i?void 0:i.el();if(o){var r=o.querySelector(".vjs-remaining-time-display");n?o.style.display="none":(o.style.display="flex",r&&(r.innerText=J(t)))}}}(s,d),function(n,t){var s,d,u,a,v,c,C,h,p,f=(null==t?void 0:t.liveVideo)||!1,g=(null==t||null===(s=t.res)||void 0===s?void 0:s.contentType)||"video",y=(null==t||null===(d=t.res)||void 0===d||null===(u=d[g])||void 0===u?void 0:u.isSSAIEnabled)||!1,m=(null==t?void 0:t.skin_settings)||{};null==m||m.slowMoBtn;var b=(null==t||null===(a=t.customData)||void 0===a?void 0:a.ads)||{};e.addBigMuteButton(n),null!=m&&m.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&e.addSkipButton(n,"VL_ONE",SkipSvgV2());null!=m&&m.rewindBtn&&(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&e.addRewindButton(n,"VL_ONE",l.RewindSvgV3());var L,B=o.relatedVideosManager.get();(null==B||null===(v=B.content)||void 0===v?void 0:v.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(n,B);L=o.relatedVideosManager.subscribe(function(l){var t,o,r=i.getPlayer(n);(null==r||null===(t=r.controlBar)||void 0===t||!t.getChild("videoSelector"))&&(null==l||null===(o=l.content)||void 0===o?void 0:o.length)>0&&(e.addVideoSelector_DEFAULTV2_TEMP(n,l),L&&L())}),(null==t||null===(c=t.streams)||void 0===c?void 0:c.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(n,null==t?void 0:t.streams);(null==t||null===(C=t.playlist)||void 0===C||null===(h=C.content)||void 0===h?void 0:h.length)>0&&e.addPlaylistSelector(n,null==t?void 0:t.playlist);null!=t&&null!==(p=t.series)&&void 0!==p&&p.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(n,t);if(y&&f&&"TRANSMIT"==(null==b?void 0:b.liveAdSticherProvider)&&null!=b&&b.liveAdClientSideTracking)r.initializeTransmit(n,t);else if("MEDIA_TAILOR"==(null==b?void 0:b.vodAdSticherProvider)&&null!=b&&b.vodAdClientSideTracking&&y)if(f)r.setupAdvertisementMarkersForLinear(n);else{var V,j=null;if(null!=t&&null!==(V=t.series)&&void 0!==V&&V.enable){var w,E,S,M,x,T=null===(w=r.getCurrentVideo())||void 0===w||null===(E=w.video)||void 0===E||null===(S=E.gist)||void 0===S?void 0:S.id,k=r.getSeriesWatchMap(),q=(null==k?void 0:k.get(T))||{t:0,p:0},A=q.t,P=q.p;"function"==typeof(null===(M=window)||void 0===M||null===(x=M.watchHistory)||void 0===x?void 0:x.cb)&&window.watchHistory.cb({watchedTime:A}),P<95&&(j=A)}else{var _=t.watchHistoryResumeTime;t.watchedPercentage<95&&(j=_)}r.setupAdvertisementMarkers(n,j)}}(s,d),t.addTVProviderImage(s,d)};
|