@castlabs/prestoplay 6.25.2-beta.7 → 6.25.2
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/CHANGELOG.md +4 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +105 -105
- package/cjs/cl.conviva.js +31 -31
- package/cjs/cl.core.js +329 -329
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +88 -88
- package/cjs/cl.externs.js +31 -31
- package/cjs/cl.freewheel.js +24 -24
- package/cjs/cl.hls.js +77 -77
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +24 -24
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +291 -289
- package/cjs/cl.muxdata.js +9 -9
- package/cjs/cl.persistent.js +10 -10
- package/cjs/cl.playlist.js +4 -4
- package/cjs/cl.sessions.js +8 -8
- package/cjs/cl.simid.js +4 -4
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +11 -11
- package/cjs/cl.tizen.js +69 -69
- package/cjs/cl.ttml.js +3 -3
- package/cjs/cl.verimatrix.js +2 -2
- package/cjs/cl.vimond.js +8 -8
- package/cjs/cl.vr.js +7 -7
- package/cjs/cl.vtt.js +2 -2
- package/cjs/cl.yospace.js +2 -2
- package/cjs/cl.youbora.js +17 -17
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +84 -84
- package/cl.conviva.js +26 -26
- package/cl.core.js +178 -178
- package/cl.crypto.js +8 -8
- package/cl.dash.js +82 -82
- package/cl.externs.js +31 -31
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +80 -80
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -18
- package/cl.mediatailor.js +3 -3
- package/cl.mse.js +243 -243
- package/cl.muxdata.js +6 -6
- package/cl.persistent.js +2 -2
- package/cl.playlist.js +4 -4
- package/cl.sessions.js +2 -2
- package/cl.simid.js +1 -1
- package/cl.smooth.js +60 -60
- package/cl.thumbnails.js +9 -9
- package/cl.tizen.js +54 -54
- package/cl.ttml.js +2 -2
- package/cl.verimatrix.js +1 -1
- package/cl.vimond.js +3 -3
- package/cl.vr.js +2 -2
- package/cl.vtt.js +2 -2
- package/cl.yospace.js +2 -2
- package/cl.youbora.js +12 -12
- package/package.json +1 -1
- package/typings.d.ts +9 -0
package/cl.core.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,na,sa,ta,wa,xa,ya,za,Aa,Ba,Fa,Ga,Ha,Ia,Ja,La,Ma,Ra,Ta,Ua,Va,Wa,Xa,Ya,$a,ab,eb,ib,ob,pb,sb,ub,xb,yb,Ab,Db,Eb,Hb,Ib,Qb,Xb,Yb,Zb,uc,zc,Gc,Oc,Pc,Vc,Wc,Xc,Zc,$c,ad,bd,ed,hd,id,jd,kd,ld,qd,sd,xd,Dd,Ed,Fd,Gd,Id,Jd,Kd,Nd,Od,Qd,
|
|
1
|
+
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,na,sa,ta,wa,xa,ya,za,Aa,Ba,Fa,Ga,Ha,Ia,Ja,La,Ma,Ra,Ta,Ua,Va,Wa,Xa,Ya,$a,ab,eb,ib,ob,pb,sb,ub,xb,yb,Ab,Db,Eb,Hb,Ib,Qb,Xb,Yb,Zb,uc,zc,Gc,Oc,Pc,Vc,Wc,Xc,Zc,$c,ad,bd,ed,hd,id,jd,kd,ld,qd,sd,xd,Dd,Ed,Fd,Gd,Id,Jd,Kd,Nd,Od,Qd,Xd,de,fe,ge,ne,Je,Qe,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,ef,ff,gf,hf,jf,kf,mf,qf,tf,If,Lf,Rf,cg,fg,lg,wg,Ag,Bg,Cg,Dg,Eg,Gg,Hg,Ig,Og,Pg,Sg,Tg,Yg,Vg,fh,gh,ih,lh,nh,vh,wh,xh,Ah,Bh,zh,yh,Eh,Ch,Gh,Hh,Lh,Fh,Mh,Kh,Nh,Oh,Ih,Jh,Rh,Yh,Zh,Sh,Xh,Wh,Th,ai,ci,bi,ei,fi,gi,hi,ki,
|
|
2
2
|
li,ni,oi,si,ui,wi,qi,yi,Di,Ki,Mi,Li,Ni,Oi,Pi,Si,Ti,Wi,jj,kj,nj,oj,pj,rj,sj,tj,uj,wj,xj,yj,zj,Aj,Bj,Gj,Jj,Oj,Sj,Uj,Pj,Rj,Tj,Vj,Wj,Xj,Zj,ak,hk,sk,xk,wk,Jk,Ck,Bk,Uk,Vk,Xk,Yk,Zk,$k,al,bl,el,dl,fl,gl,hl,il,jl,Wk,ll,nl,pl,sl,ul,zl,Al,Bl,Cl,Dl,El,Fl,Gl,Ol,Pl,Vl,dm,fm,lm,pm,rm,ym,Im,um,Dm,Rm,Sm,Tm,Vm,Wm,Xm,$m,Ym,Zm,an,cn,dn,gn,pn,qn,yn,Bn,Cn,En,Gn,Hn,Jn,zn,Fn,Kn,Ln,Mn,Nn,Wn,Pn,Xn,On,Qn,Rn,Yn,co,fo,ho,go,jo,ao,ro,oo,qo,po,eo,so,to,uo,vo,wo,xo,yo,zo,Fo,Go,Ho,No,Oo,Qo,Ko,Jo,Xo,Yo,bp,dp,ep,fp,ap,hp,ip,jp,np,
|
|
3
3
|
sp,tp,up,vp,wp,xp,zp,Ap,Bp,Cp,Qp,Lp,Sp,Tp,Up,Wp,Xp,Vp,$p,aq,bq,Zp,Dp,Ep,Hp,Ip,Jp,Kp,Mp,Np,Op,Pp,hq,iq,Rp,Yp,jq,eq,gq,cq,mq,nq,oq,qq,rq,tq,uq,vq,yq,zq,wq,Hq,Iq,Jq,Gq,Qq,xq,Kq,Lq,Mq,Nq,Oq,Pq,Sq,Bq,Rq,Cq,Aq,Dq,Tq,Wq,Eq,Fq,Xq,Zq,cr,dr,br,er,ar,$q,gr,ir,kr,mr,nr,or,pr,qr,rr,sr,tr,ur,vr,wr,Ar,Er,Br,Gr,Kr,Mr,Or,Qr,Rr,Sr,Tr,Vr,ds,Wr,Xr,Yr,Zr,fs,bs,gs,js,ks,ls,hs,is,ms,ns,qs,us,vs,ys,As,Bs,zs,ws,ps,ts,rs,ss,Hs,Is,Js,Ks,Ls,Ms,Ns,Os,Qs,Rs,Ss,Us,Ws,at,bt,ct,et,ft,gt,it,jt,ht,kt,nt,mt,lt,rt,qt,wt,Qg,Rg;_.aa=" is registered.";
|
|
4
|
-
ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.25.2
|
|
4
|
+
ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.25.2";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";_.ma="BASIC";na="CHECKSUM";_.oa="CODECS";_.pa="Cannot retrieve buffer information due to platform limitations";_.qa="CastlabsPlayer";_.ra="Configuration is valid";sa="Content-Length";
|
|
5
5
|
ta="Content-Type";_.va="Could not find configured DRM environment.";wa="DRM licenses loaded";xa="DRMtoday";ya="DRMtodayOnboard";za="Destroying player";Aa="Error while decoding string!";Ba="Error while fetching certificate!";_.Ca="FairPlay Certificate URL is not defined";_.Da="FairPlay License URL is not defined";_.Ea="GROUP-ID";Fa="HW_SECURE_ALL";Ga="HW_SECURE_CRYPTO";Ha="HW_SECURE_DECODE";Ia="HeaderDrm";Ja="InvalidStateError";_.Ka="LANGUAGE";La="License verification failed: ";Ma="Load interrupted while a player release is pending";
|
|
6
6
|
_.Oa="Loading player with configuration";_.Pa="MaxHeight";_.Qa="MaxWidth";Ra="Missing media element";_.Sa="NAME";Ta="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ua="No event provided!";Va="No items in the playlist";Wa="No sources provided!";Xa="No track data attached to the event, unable to add track!";Ya="Not a persistent session.";_.Za="Not supported";$a="NotAllowedError";ab="NotSupportedError";_.bb="PLAYLIST";_.cb="POST";_.db="PlayReady License URL is not defined";
|
|
7
7
|
eb="Player not ready yet.";_.fb="Player sources";_.gb="Please make sure ";ib="Preloading is not supported by this player.";_.jb="QualityLevel";_.kb="RESOLUTION";_.lb="Representation";_.mb="SW_SECURE_CRYPTO";_.nb="SW_SECURE_DECODE";ob="Session is closed";pb="Skipping Session creation. License for init data was already requested in ";_.qb="SmoothStreamingMedia";_.rb="TYPE";sb="The index is not in the allowed range.";_.tb="URI";ub="Unable to translate ";_.vb="Unhandled/ignored event";_.wb="Unregistering listeners";
|
|
8
8
|
xb="Unsupported keySystem";yb="Updating playout limit for interstitial";Ab="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Bb="VIDEO";_.Cb="VOD";Db="Wait for preloading to finish";Eb="WebkitEmeManager.MediaKeySession.load";_.Fb="Widevine License URL is not defined";Hb="Will create EME Manager: ";Ib="X-AD-CREATIVE-SIGNALING";_.Jb="X-ASSET-LIST";_.Kb="X-ASSET-URI";_.Lb="X-PLAYOUT-LIMIT";_.Mb="X-RESTRICT";_.Nb="X-RESUME-OFFSET";Qb="X-TIMELINE-OCCUPIES";_.Rb="ad-break-started";_.Sb="ad-break-stopped";
|
|
9
|
-
_.Tb="ad-buffering";_.Ub="ad-clicked";_.Vb="ad-completed";_.Wb="ad-first-quartile";Xb="ad-hls-asset-list-request";Yb="ad-hls-asset-list-response";Zb="ad-hls-resoled";_.$b="ad-impression";_.ac="ad-loaded";_.bc="ad-midpoint";_.cc="ad-paused";_.dc="ad-progress";_.ec="ad-resumed";_.
|
|
10
|
-
_.tc="application/dash+xml";uc="application/mp4";_.vc='application/mp4; codecs\x3d"stpp"';_.wc='application/mp4; codecs\x3d"wvtt"';_.xc="application/ttml+xml";_.yc="application/vnd.ms-sstr+xml";zc="application/x-www-form-urlencoded";_.p="audio";_.
|
|
9
|
+
_.Tb="ad-buffering";_.Ub="ad-clicked";_.Vb="ad-completed";_.Wb="ad-first-quartile";Xb="ad-hls-asset-list-request";Yb="ad-hls-asset-list-response";Zb="ad-hls-resoled";_.$b="ad-impression";_.ac="ad-loaded";_.bc="ad-midpoint";_.cc="ad-paused";_.dc="ad-progress";_.ec="ad-resumed";_.fc="ad-skipped";_.jc="ad-started";_.lc="ad-stopped";_.mc="ad-third-quartile";_.nc="addtrack";_.oc="ads-timeline-changed";_.pc="airplay-casting-ended";_.qc="airplay-casting-started";_.rc="airplay-status-changed";_.sc="application/cea-608";
|
|
10
|
+
_.tc="application/dash+xml";uc="application/mp4";_.vc='application/mp4; codecs\x3d"stpp"';_.wc='application/mp4; codecs\x3d"wvtt"';_.xc="application/ttml+xml";_.yc="application/vnd.ms-sstr+xml";zc="application/x-www-form-urlencoded";_.p="audio";_.Ac="audio/aac";_.Dc="audio/ac3";_.Ec="audio/eac3";_.Fc="audio/mp4";Gc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Hc="audiobufferchanged";_.Ic="audiotrackchanged";_.Jc="autoplaynotallowed";_.Kc="bitratechanged";_.Lc="boolean";_.Mc="bufferingended";_.Nc="bufferingstarted";
|
|
11
11
|
Oc="canplay";Pc="canplaythrough";_.Qc="castingstarted";_.Rc="caststatuschanged";_.Sc="cdn-switch-success";_.Tc="cenc";_.Uc="center";Vc="certificate-request";Wc="change";Xc="chrome";_.Yc="clpp-fill";Zc="clpp-hidden";$c="clpp-mc-playlist";ad="clpp-visible";bd="clpp.PlayerFleet";_.dd="clpp.cast.CastSender";ed="clpp.drm.HeaderDrm";hd="clpp.drm.eme.AppleEmeManager";id="clpp.drm.eme.EmeFactory";jd="clpp.native.Player";kd="clpp.plist.McPlaylist";ld="clpp.utils.Platform";_.md="codecs";_.nd="column-reverse";
|
|
12
12
|
_.od="com.adobe.primetime";_.pd="com.apple.fps";qd="com.apple.quicktime.HLS";_.rd="com.microsoft.playready";sd="com.microsoft.playready.recommendation";_.td="com.widevine.alpha";_.ud="config.drm.customData is not defined";_.vd="content-steering-change";_.wd="content-steering-location-ban-update";xd="controls";_.yd="cuechange";_.zd="decoder";_.Ad="destroy()";_.Bd="disabled";_.Cd="div";Dd="drm.mediaKeys.end";Ed="drm.mediaKeys.start";Fd="drm.onPlay.end";Gd="drm.onPlay.start";_.Hd="drmexpirationupdate";
|
|
13
|
-
Id="drmlicenserequested";Jd="drmrenewalstarted";Kd="drmsessioncreated";_.Ld="drmsessionpersisted";_.Md="drmsessionupdate";Nd="drmtoday";Od="durationchange";_.Pd="ec-3";Qd="encrypted";_.Rd="end";_.Sd="ended";_.q="error";_.Td="estimatedThroughputKbps";_.Ud="forced";
|
|
13
|
+
Id="drmlicenserequested";Jd="drmrenewalstarted";Kd="drmsessioncreated";_.Ld="drmsessionpersisted";_.Md="drmsessionupdate";Nd="drmtoday";Od="durationchange";_.Pd="ec-3";Qd="encrypted";_.Rd="end";_.Sd="ended";_.q="error";_.Td="estimatedThroughputKbps";_.Ud="forced";Xd="fullscreenElement";_.Yd="function";_.Zd="height";_.$d="hidden";_.ae="html";_.be="image";_.ce="internal-error";de="keystatuseschange";_.ee="left";fe="license-renewal";ge="license-request";_.he="line-left";_.ie="line-right";_.je="live-turned-static";
|
|
14
14
|
_.ke="load";_.le="loadeddata";_.me="loadedmetadata";ne="loadstart";_.oe="main";_.pe="mdat";_.qe="mdia";_.re="message";_.se="metadata";_.te="mimeType";_.xe="minf";_.ye="moov";_.ze="mpd-type-changed";_.Ae="mpeg-dash-callback-event";_.Be="none";_.t="number";_.Ce="object";_.De="onBitrateChanged()";_.Ee="onContentLoaded";_.Fe="onPlayerError()";_.Ge="onPlayerWillDestroy";_.He="onPlayerWillRelease";_.Ie="onStateChanged()";Je="online-status-changed";_.Ke="optional";_.Le="org.w3.clearkey";_.Me="output-restricted";
|
|
15
15
|
_.Ne="pause";_.Oe="persistent";_.Pe="persistent-license";Qe="picture-in-picture";_.Re="play";Se="player.afterLoad.end";Te="player.afterLoad.start";Ue="player.appendLoad.end";Ve="player.appendLoad.start";We="player.beforeLoad.end";Xe="player.beforeLoad.start";Ye="player.load.end";Ze="player.load.start";$e="player.setupPlaylist.end";af="player.setupPlaylist.start";_.bf="playing";_.cf="playlist-item-changed";_.df="playlist-modified";ef="playlist.next.end";ff="playlist.next.start";gf="preload-aborted";
|
|
16
16
|
hf="preload-failed";jf="preloaded";kf="preloading";_.lf="prevent";mf="primary-content";_.nf="progress";_.of="px";_.pf="ratechange";qf="released";_.sf="releasing";tf="removetrack";_.uf="required";_.vf="resize";_.wf="right";_.xf="sc-playlist-ended";_.yf="sc-playlist-item-changed";_.zf="sc-playlist-live-turned-static";_.Af="sc-playlist-timeline-changed";_.Bf="seeked";_.Cf="seeking";_.Df="showing";_.Ef="simid-creative-started";_.Ff="simid-creative-stopped";_.Gf="sinf";_.Hf="smooth";If="stalled";
|
|
@@ -25,20 +25,20 @@ _.eh=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)retu
|
|
|
25
25
|
fh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};gh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.hh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};ih=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};lh=function(a){return a&&0<=jh[a]?jh[a]:kh};
|
|
26
26
|
nh=function(a){if(!a)return _.C("clpp.log",ub+a+ca),-1;const b=mh[a.toUpperCase()];return void 0===b?(_.C("clpp.log",ub+a+ca),-1):b};_.ph=function(a){oh.info.apply(oh,arguments)};_.qh=function(a){oh.debug.apply(oh,arguments)};_.C=function(a){oh.warn.apply(oh,arguments)};_.rh=function(a){oh.error.apply(oh,arguments)};_.uh=function(a){if(a){var b=a.a();b in _.sh?_.th.warn("Player-Factory '"+b+"' already registered"):(_.sh[b]=a,_.th.info("Registered Player-Factory: '"+b+"'"))}};
|
|
27
27
|
vh=function(a){return Object.values(_.sh).find(a)||null};wh=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};xh=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Ah=function(a,b){return _.x(function*(){yield yh(a,()=>Promise.all(zh(a).map(b)))})};Bh=function(a,b){_.x(function*(){yield yh(a,()=>Promise.all(a.f.filter(c=>null!=c.getLoadedSource()).map(b)))})};
|
|
28
|
-
zh=function(a){return[a.
|
|
29
|
-
Gh=function(a){return Fh(a).filter(b=>b.type===qd&&!b.
|
|
30
|
-
Mh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.
|
|
28
|
+
zh=function(a){return[a.zc,...a.f].filter(b=>null!=b)};yh=function(a,b){return _.x(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};_.Dh=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Ch(b[c]);a.a.clear()};Eh=function(a,b,c){var d=[Qd,"msneedkey",Eg,"needkey"];const e=f=>{for(const g of d)a.off(b,g,e);c(f)};for(const f of d)a.on(b,f,e)};Ch=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
|
|
29
|
+
Gh=function(a){return Fh(a).filter(b=>b.type===qd&&!b.We)};Hh=function(a){a.forEach(b=>{b.We=!0})};Lh=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,hg:!1}));a=Ih(a);b&&(a=Jh(a));return new Set(Kh(a))};Fh=function(a){const b=[];for(const c of a)b.push(c);return b};
|
|
30
|
+
Mh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Qf||a.startTime,f=b.Qf||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};Kh=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Nh(c,a):(a=Oh(c),b.push(a));return b};
|
|
31
31
|
Nh=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.hg,b.type=_.Ph};Oh=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.Qh,eventElement:null};Nh(a,b);return b};
|
|
32
|
-
Ih=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Rh));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Rh(d))||(d.
|
|
32
|
+
Ih=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Rh));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Rh(d))||(d.hg=!0)});return Array.from(b.values())};Jh=function(a){a.forEach(b=>{b.hg&&(b.endTime=b.startTime,b.startTime=0)});return a};Rh=function(a){return`${a.startTime}-${a.endTime}`};
|
|
33
33
|
Yh=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.$d;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Gh(d);Hh(c);a.a=Lh(c,a.l);0<a.a.size&&(Sh(a,a.a),a.m.trigger(new _.F(_.Yf)));a.j.on(b,_.yd,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.F(_.Wf,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.F(_.Xf,
|
|
34
34
|
{detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.F(_.Wf,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);Th(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;Wh(a,b);f=Gh(d);var k=Lh(f,a.l);g=new Set;h=!1;for(l of k)(k=Xh(a,l))?(l.customAttributes&&(k.customAttributes=_.Wg(k.customAttributes||{},l.customAttributes)||
|
|
35
|
-
void 0),h=!0):(a.a.add(l),g.add(l));var l={
|
|
36
|
-
Wh=function(a,b){if(b.cues){var c=Fh(b.cues).filter(f=>f.type===qd),d=c.filter(f=>f.
|
|
37
|
-
ci=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return bi(a,b)&&bi(b,a)};bi=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.di=function(a,b={}){if(b.
|
|
35
|
+
void 0),h=!0):(a.a.add(l),g.add(l));var l={$h:g,Zg:0<g.size||h};const {$h:m,Zg:n}=l;Hh(f);(e||n)&&a.m.trigger(new _.F(_.Yf));Sh(a,m)},6E3))}};Zh=function(a,b){a.j.on(b,_.nc,c=>{c=c.track;c.kind===_.se&&Yh(a,c)})};Sh=function(a,b){for(const c of b)a.m.trigger(new _.F(_.Vf,{detail:c}))};Xh=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
|
|
36
|
+
Wh=function(a,b){if(b.cues){var c=Fh(b.cues).filter(f=>f.type===qd),d=c.filter(f=>f.We);c=c.filter(f=>!f.We);var e=[];for(const f of c)for(const g of d)Mh(f,g)&&(e.push(f),g.Qf=f.startTime);Th(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Th=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.$h=function(a){return Array.isArray(a)?a:[a]};ai=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
|
|
37
|
+
ci=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return bi(a,b)&&bi(b,a)};bi=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.di=function(a,b={}){if(b.Of){const c=[];for(const d of a)c.some(e=>b.Of(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};ei=function(a,b){const c=new Set(a),d=new Set(b);return{ni:a.filter(e=>!d.has(e)),kj:a.filter(e=>d.has(e)),Wg:b.filter(e=>!c.has(e))}};
|
|
38
38
|
fi=function(a,b){b=b.track;b.kind!==_.se&&(b.mode===_.Df&&(b.mode=_.$d),a.a.on(b,_.yd,c=>{c=c.target||c.srcElement;c.mode=_.$d;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};gi=function(a,b,c,d){a=`${a===_.G?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.ch(d))a+=": "+d;else if(null!=d)if(null!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};
|
|
39
39
|
hi=function(a,b){const c=b||ai;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.ii=function(a){return null!=a};ki=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.ji("No non-null, non-undefined value found");};li=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
|
|
40
|
-
_.mi=function(a){var b;a instanceof _.mi?(ni(this,a.
|
|
41
|
-
oi=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.
|
|
40
|
+
_.mi=function(a){var b;a instanceof _.mi?(ni(this,a.xb),this.Dc=a.Dc,this.Xa=a.Xa,oi(this,a.Xc),this.Fa=a.Fa,_.pi(this,qi(a.a)),this.tc=a.tc):a&&(b=String(a).match(ri))?(ni(this,b[1]||"",!0),this.Dc=si(b[2]||""),this.Xa=si(b[3]||"",!0),oi(this,b[4]),this.Fa=si(b[5]||"",!0),_.pi(this,b[6]||"",!0),this.tc=si(b[7]||"")):this.a=new _.ti(null)};ni=function(a,b,c){a.xb=c?si(b,!0):b;a.xb&&(a.xb=a.xb.replace(/:$/,""))};
|
|
41
|
+
oi=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Xc=b}else a.Xc=null};_.pi=function(a,b,c){b instanceof _.ti?a.a=b:(c||(b=ui(b,vi)),a.a=new _.ti(b))};si=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};ui=function(a,b,c){return typeof a===_.Nf?(a=encodeURI(a).replace(b,wi),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};wi=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.ti=function(a){this.f=a||null};
|
|
42
42
|
qi=function(a){var b=new _.ti;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.h=a.h}return b};yi=function(a,b){const c=xi[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.H?"":null};_.J=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.I(_.G,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.zi=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};
|
|
43
43
|
_.Bi=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ai.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Ci=function(a,b){a=_.Bi(a);b=_.Bi(b);return a.split("-")[0]===b.split("-")[0]};Di=function(a){return a.reduce((b,c)=>b+c,0)};_.Ei=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
|
|
44
44
|
_.Ii=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.I(_.G,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.Fi(d);var f;(f=_.Ei(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Ei(d,g);)c.push(new _.Gi(f[1],f[2]||f[3]||""))}return new _.Hi(a,b,c,e)};_.Ji=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Ki=function*(a){for(let b=0;b<a;b++)yield b};
|
|
@@ -58,15 +58,15 @@ _.qj=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,re
|
|
|
58
58
|
pj=function(a){a=oj(a);try{var b=_.Xi(a.data,!0)}catch(d){b=null}_.qh("HTTP error text:",b);const c=a.request;return new _.I(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.G:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};rj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};sj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
|
|
59
59
|
tj=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};uj=function(a,b){a.T.then(()=>b(!0),()=>b(!1));return a};_.vj=function(a,b){a.a.push(uj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};wj=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.Ui(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
|
|
60
60
|
xj=function(a,b){return _.x(function*(){const c=yield wj(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ce)throw Error("Not an object");return d}catch(d){throw new _.ji("Failed to parse JSON response","json-failed");}})};yj=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};
|
|
61
|
-
zj=function(a,b){const c=new _.mi(b.uris[b.uriIndex]);let d=c.
|
|
61
|
+
zj=function(a,b){const c=new _.mi(b.uris[b.uriIndex]);let d=c.xb;d||(d=location.protocol,d=d.slice(0,-1),ni(c,d),b.uris[b.uriIndex]=c.toString());const e=a.a[d];if(!e)throw new _.I(_.G,1,1E3,{url:c.toString()});return f=>e(f)};Aj=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.mj(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).T}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
|
|
62
62
|
Bj=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Cj=function(a){return a&&a!==_.dg?a:null};
|
|
63
|
-
Gj=function(a){if(!a)throw new _.I(_.G,3,3101,`Invalid track type: ${a}`);if(!_.ch(a))throw new _.I(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case
|
|
64
|
-
Jj=function(a,b){a=Gj(a);const c=_.Cj(b.kind);let d=b.id;d||(d=String(_.Hj++));a=new _.Ij(d,c===_.se?
|
|
63
|
+
Gj=function(a){if(!a)throw new _.I(_.G,3,3101,`Invalid track type: ${a}`);if(!_.ch(a))throw new _.I(_.G,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case Fj:return Fj}throw new _.I(_.G,3,3101,`Unknown track type: ${a}.`);};
|
|
64
|
+
Jj=function(a,b){a=Gj(a);const c=_.Cj(b.kind);let d=b.id;d||(d=String(_.Hj++));a=new _.Ij(d,c===_.se?Fj:a);a.kind=c;a.label=_.Cj(b.label);a.language=_.Cj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Kj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
|
|
65
65
|
_.Lj=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};_.Mj=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};
|
|
66
|
-
_.Nj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Oj=function(a,b){return _.x(function*(){const c=_.mj(b);return yield wj(a.f,c)})};Sj=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Pj(a,b,c),f=new _.Ij("dummy",_.N),g=e.map((h,k)=>{k=new _.Qj(`R${k}`,f);k.bandwidth=h.bandwidth;k.
|
|
66
|
+
_.Nj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Oj=function(a,b){return _.x(function*(){const c=_.mj(b);return yield wj(a.f,c)})};Sj=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Pj(a,b,c),f=new _.Ij("dummy",_.N),g=e.map((h,k)=>{k=new _.Qj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Zc=h.Zc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Rj(g);return{renditions:g,mimeType:d||void 0}})};
|
|
67
67
|
Uj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Tj(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};Pj=function(a,b,c){return _.x(function*(){const d=Vj(b),e=Wj(b,c);return{mimeType:yield Xj(a,e,d[0]?d[0].codec:null),renditions:d}})};
|
|
68
|
-
Rj=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};Tj=function(a){const b=_.Ii(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.rb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.Ka),
|
|
69
|
-
Vj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Ii(0,b);if(c.getAttribute(_.Bb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.kb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.la);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.oa);c=_.Yj(_.w,c?c.split(","):[]);return b={bandwidth:e,
|
|
68
|
+
Rj=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};Tj=function(a){const b=_.Ii(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.rb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.Ka),Vi:a("AUTOSELECT"),default:a("DEFAULT"),cj:a("FORCED"),Nf:a("CHARACTERISTICS"),uri:a(_.tb)}};
|
|
69
|
+
Vj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Ii(0,b);if(c.getAttribute(_.Bb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.kb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.la);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.oa);c=_.Yj(_.w,c?c.split(","):[]);return b={bandwidth:e,Zc:f,codec:c,width:b,height:d,mimeType:null}})};
|
|
70
70
|
Wj=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Nj(a,b):null};Xj=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield Oj(a,b);d=[Zj(d,b),ak(d,b)].filter(Boolean);return _.bk(d,_.w,c)})};Zj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Nj(a,b):null};ak=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.Ii(0,a),_.tb))?_.Nj(a,b):null:null};
|
|
71
71
|
_.dk=function(a,b,c){for(const d of _.ck)if(d.probe(b,c))return d.create(a);return null};_.ek=function(a){a=_.ck.indexOf(a);0<=a&&_.ck.splice(a,1)};hk=function(a,b){var c=fk;gk.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.lk=function(a,b){var c=[ik,jk,kk,fk];for(const d of c)if(c=gk.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
|
|
72
72
|
_.mk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.nk=function(a){return a.split(";")[0]};_.ok=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};sk=function(){if(pk)return pk;qk||(qk=new _.rk(()=>{pk=null}));(pk=document.querySelector(_.w)||document.querySelector(_.p))||(pk=document.createElement(_.w));qk.ka(1);return pk};_.tk=function(){return!!navigator.userAgent.match(/Edge?\//)};
|
|
@@ -77,18 +77,18 @@ Ck=function(){const a=Bk();if(!a)return Kk;var b=a.match(/^.+?(?=\))/);if(!b)ret
|
|
|
77
77
|
_.Tk=function(){var a=Ck();var b=Ck();var c=Dk[b];if(c){c=Bk().match(c.os_version)[1];c=xk(c);if(b===Ok)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=xk("");a:{c=Bk();const e=["ie","edge","opera","firefox","safari",Xc];var d=Ck();d=Dk[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=Sk}return{os:a,osVersion:b,browser:c,browserVersion:_.zk()}};
|
|
78
78
|
Uk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.eh(a,{kind:_.Cj(b.kind),language:_.Cj(b.language),label:_.Cj(b.label)},["kind","language","label"])};Vk=function(a){return a.enabled||a.selected||a.mode===_.Df||a.mode===_.$d};Xk=function(a,b,c){return Wk(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
|
|
79
79
|
Yk=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};Zk=function(a,b,c){return Wk(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
|
|
80
|
-
$k=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.
|
|
80
|
+
$k=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Bc&&(d=d.Bc.get(`${b.type}:${b.label}`))&&d.Nf&&(b.accessibility=d.Nf.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};al=function(a,b){return a.h.filter(c=>c.type===b)};bl=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};el=function(a,b){if(a=dl(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.se));return a};
|
|
81
81
|
dl=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.M:return a.audioTracks;case _.N:return a.videoTracks;case _.L:return a.textTracks;default:return null}};fl=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};gl=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
|
|
82
82
|
hl=function(a,b,c){const d=el(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.L:f="mode";e=_.Df;g=_.Bd;break;case _.M:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=Uk(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
|
|
83
83
|
d&&b===_.L){for(e of d)e.mode=_.Bd;a.a.set(b,null)}b===_.M?a.m.trigger(new _.F(_.Ic)):b===_.L&&a.m.trigger(new _.F(_.Uf))};il=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.dj(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
|
|
84
84
|
jl=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.dk(c,b.mimeType,_.Sf);if(d){c=_.mj(b.url);var e=yield a.m.getNetworkEngine().fetch(c).T;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.K(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Sf},il(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};Wk=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.kl&&!a.url.endsWith(".m3u8"))&&_.Fk()};
|
|
85
85
|
ll=function(a,b,c){c=_.$h(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=al(a,b);c.some(e=>{const f=_.Bi(e);return(e=d.find(g=>{g=_.Bi(g.language||"");return _.Ci(f,g)}))?(a.g.info("Will select track with id",e.id),hl(a,b,e),!0):!1})};nl=function(a){return a.name===$a&&ml.some(b=>a.message.startsWith(b))};
|
|
86
86
|
_.rl=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Gk()&&(a=360);const b=_.ij();b.maxAttempts=3;a={source:"",license:ol,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.ij(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
|
|
87
|
-
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:pl(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.ij()},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.oe,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,
|
|
88
|
-
xmlParser:_.ql,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,
|
|
89
|
-
enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.lf},restrictions:pl(),tizen:{sideStreamText:_.vk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.zd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",
|
|
90
|
-
cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1};if(_.vk()||_.yk())a.ads.hls.enable=!1;if(_.uk("Edge/")||_.vk())a.streaming.gapDetectionThreshold=.5;_.yk()&&(a.streaming.stallEnabled=!1);_.Ak()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.vk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,
|
|
91
|
-
fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};pl=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
|
|
87
|
+
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:pl(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.ij()},drm:null,cmcd:{enabled:!1},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.oe,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,
|
|
88
|
+
forceWaitForTracks:!1,xmlParser:_.ql,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,
|
|
89
|
+
overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.lf},restrictions:pl(),tizen:{sideStreamText:_.vk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.zd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",
|
|
90
|
+
content:_.Cb,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1};if(_.vk()||_.yk())a.ads.hls.enable=!1;if(_.uk("Edge/")||_.vk())a.streaming.gapDetectionThreshold=.5;_.yk()&&(a.streaming.stallEnabled=!1);_.Ak()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.vk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,
|
|
91
|
+
attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};pl=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
|
|
92
92
|
_.tl=function(...a){if(!a)return _.rl();var b=[_.rl()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.ch(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),c=!0),b.push(d),null!=d.suggestedPresentationDelay&&b.push({manifest:{suggestedPresentationDelay:d.suggestedPresentationDelay}}));
|
|
93
93
|
a=_.Wg.apply(null,b);_.ch(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.B(a.volume)&&(!_.dh(a.volume)||fh(a.volume)))throw new _.I(_.G,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.ch(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.I(_.G,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.ch(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.I(_.G,
|
|
94
94
|
7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_.ch(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.I(_.G,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.ch(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.I(_.G,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.ch(a.drm.env))throw new _.I(_.G,7,
|
|
@@ -101,7 +101,7 @@ _.yl=function(a){_.vl.get(a.id())?xl.warn("Component already in use."):_.vl.set(
|
|
|
101
101
|
Gl=function(a){if(a=zl(a))a.a(),_.vl.delete(a.id()),xl.info("Uninstalled component:",a.id())};_.Il=function(a,b=!0){a=_.Hl(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Hl=function(a){a=Ti(_.K(a));return btoa(a)};_.Jl=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};
|
|
102
102
|
_.Kl=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.Ll=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};_.Ml=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};
|
|
103
103
|
_.Nl=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};Ol=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Gg]=a.f),a.a&&(b.headers[Hg]=a.a))};
|
|
104
|
-
Pl=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Gg],a.a=b.headers[Hg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.Ui(_.Jl(b))),{delay:a.renewalPeriod,
|
|
104
|
+
Pl=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Gg],a.a=b.headers[Hg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.Ui(_.Jl(b))),{delay:a.renewalPeriod,Ri:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Rl=function(a){_.Ql[a.I]=a};
|
|
105
105
|
_.Tl=function(a){const b={attemptParameters:_.ij(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ia:{},widevineVersion:_.td};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
|
|
106
106
|
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Nf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.Ql[a.env]||null;if(!c)throw _.qh(_.va,_.gb+a.env+_.aa),new _.I(_.G,6,6015,`DRM environment '${a.env}' is missing.`);b.Ia=_.Sl(c,a.customData)||{};_.aj(a.env.toLowerCase(),Nd)&&(b.enforceSingleSession=!0)}return b};
|
|
107
107
|
Vl=function(a){a=Ul[a];if(!a)return null;const b=_.Tk();return b.os===Mk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
|
|
@@ -109,8 +109,8 @@ _.Sl=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.wid
|
|
|
109
109
|
{licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.pd])&&(c[_.pd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.rd])&&(c[_.rd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
|
|
110
110
|
modifiers:g.modifiers});return c};_.Wl=function(){throw new _.I(_.G,3,3E3);};_.Xl=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.K(a.f.buffer);b=_.K(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Wl()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Wl()}};_.Yl=function(a){return a.a<a.f.byteLength};_.Zl=function(){throw new _.I(_.G,3,3E3,"Buffer read out of bounds.");};_.$l=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Zl()}};
|
|
111
111
|
_.am=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Zl()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Zl()}};_.bm=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Zl()}};_.cm=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Zl()}if(2097151<c)throw new _.I(_.G,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
|
|
112
|
-
dm=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.$l(a);return c};_.em=function(a,b){a.a+b>a.f.byteLength&&_.Zl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.K(c)};fm=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.gm=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.hm=function(a){for(;_.Yl(a.reader)&&!a.parser.a;)a.parser.
|
|
113
|
-
_.im=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.
|
|
112
|
+
dm=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.$l(a);return c};_.em=function(a,b){a.a+b>a.f.byteLength&&_.Zl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.K(c)};fm=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.gm=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.hm=function(a){for(;_.Yl(a.reader)&&!a.parser.a;)a.parser.je(a.start+a.headerSize,a.reader,a.partialOkay)};
|
|
113
|
+
_.im=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.je(a.start+a.headerSize,a.reader,a.partialOkay)};_.jm=function(a){return b=>{const c=b.reader.Na()-b.reader.getPosition();a(_.em(b.reader,c))}};_.km=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};lm=function(a){let b="";try{b=_.Xi(a)}catch(c){}return b};_.nm=function(a){a=lm(a);let b="";a.length&&(b=(new _.mm(a)).a);return b};
|
|
114
114
|
pm=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ui(a)),d=_.Jl(c.sinf[0]);(new _.om).N(_.Gf,_.hm).N("schi",_.hm).N("tenc",e=>{e.reader.skip(6);_.$l(e.reader)&&(e.reader.skip(1),b=_.Ll(_.em(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
|
|
115
115
|
rm=function(a,b,c){if(!c||!c.byteLength)throw new _.I(_.G,6,6102);let d;typeof b===_.Nf?d=_.Zi(b,!0):d=b;a=_.Zi(lm(a),!0);b=new _.qm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.Xl(b,_.K(a));_.O(b,d.byteLength);_.Xl(b,_.K(d));_.O(b,c.byteLength);_.Xl(b,_.K(c));return _.K(b.buffer)};_.sm=function(a){var b=_.K(a.body);b=_.Il(b);a.headers[ta]=zc;a.body=_.Yi("spc\x3d"+b).buffer};
|
|
116
116
|
_.tm=function(a){let b;try{b=_.Ui(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=Si(_.Jl(b))};ym=function(a,b){b=um(b);if(a===_.td)return b+vm;if(a===_.rd)return b+wm;if(a===_.pd)return b+xm;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
|
|
@@ -134,17 +134,17 @@ gn=function(a,b){var c=en;if(a){var d=c.find(e=>e.a()===a);if(d)return fn.info(H
|
|
|
134
134
|
_.mn=function(a){const b=new _.ln(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.gm(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.em(b,16);f=_.Ll(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.$l(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.$l(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.Yl(b))throw Error("not enough data to skip!");while(_.$l(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
|
|
135
135
|
break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.Yl(b);){var n=h(),r=n&7;n>>>=3;if(2===r){r=h();if(0>r)throw Error(`unable to read length of field ${n}`);r=dm(b,r);2===n?l.push(r):4===n&&(m=r)}else k(r)}_.qh("Parsed WV PSSH Box","size",a,"name",c,lg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Hl(m):"","keyIds",l.map(u=>_.Ll(u)));return 0<l.length?_.kn(_.Ll(l[0])):null};
|
|
136
136
|
_.nn=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.K(a);a.set(b,0);return a};
|
|
137
|
-
_.tn=function(a){var b=_.on;a:{var c=new _.ln(new DataView(a.buffer),!0);_.P(c);for(_.am(c);_.Yl(c);)if(1===_.am(c)){var d=_.am(c);c=_.em(c,d);break a}c=null}c||(c=a);a=Wi(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(lg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.on;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,na);f=g?f.f(g):null;e={value:e,
|
|
138
|
-
d,b,c,a,k)};pn=function(a){var b=_.on;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(na);c=c.getAttribute("ALGID");return{value:b,
|
|
139
|
-
qn=function(a){var b=_.on;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(na),e=c.getAttribute("ALGID");b.push({value:a,
|
|
137
|
+
_.tn=function(a){var b=_.on;a:{var c=new _.ln(new DataView(a.buffer),!0);_.P(c);for(_.am(c);_.Yl(c);)if(1===_.am(c)){var d=_.am(c);c=_.em(c,d);break a}c=null}c||(c=a);a=Wi(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(lg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.on;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,na);f=g?f.f(g):null;e={value:e,ye:f}}else e=null;else e=null;d=e?[e]:(e=pn(d))?[e]:(d=qn(d))?d:null;const {value:h="",ye:k}=d&&d[0]||{};d=_.Jl(h);d=_.nn(d);d=_.Ll(d);return new _.rn(_.sn,
|
|
138
|
+
d,b,c,a,k)};pn=function(a){var b=_.on;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(na);c=c.getAttribute("ALGID");return{value:b,ye:a,Xg:c}};
|
|
139
|
+
qn=function(a){var b=_.on;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(na),e=c.getAttribute("ALGID");b.push({value:a,ye:d,Xg:e})}return b.length?b:null};_.vn=function(a){un&&performance.mark(a)};_.xn=function(a,b,c){un&&(b=performance.measure(a,b,c),null!=b&&wn.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};
|
|
140
140
|
yn=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.rk(c)).ka(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.An=function(a){return zn(a)?_.rd:a};Bn=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
|
|
141
141
|
Cn=function(a,b){b=b[_.An(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
|
|
142
142
|
_.Dn=function(a,b){b=_.mk(a.mimeType,b||a.codecs);if(_.lk(b,a.type)){a=a.type;var c=_.lk(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};En=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Gn=function(a){return(a.audioCapabilities||[]).some(Fn)||(a.videoCapabilities||[]).some(Fn)};
|
|
143
143
|
Hn=function(a,b){a=_.nm(b);_.qh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
|
|
144
144
|
Jn=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===In){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.ah(k)||(k=Hn);let l="";try{l=k(b,c,g)}catch(m){throw new _.I(_.G,6,6103);}if(!l.length)throw new _.I(_.G,6,6101,"Content ID is an empty string");c=rm(c,l,a)}return c};zn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
|
|
145
145
|
Fn=function(a){return null!=a.robustness&&""!==a.robustness};Kn=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Ml(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId===g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
|
|
146
|
-
Ln=function(a){var b=a.o;const c=a.ba;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.I(_.G,6,6014));a.D.
|
|
147
|
-
Nn=function(a){return _.x(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.da.stop();a.da=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.
|
|
146
|
+
Ln=function(a){var b=a.o;const c=a.ba;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.I(_.G,6,6014));a.D.Se(_.hh(c));a.A||a.g.info(wa);a.A=!0;a.F=!1};Mn=function(a){a.h.forEach((b,c)=>{const d=b.Ne;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Re(c.sessionId,e),b.Ne=e)})};
|
|
147
|
+
Nn=function(a){return _.x(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.da.stop();a.da=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Lc&&c.Lc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield yn(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
|
|
148
148
|
c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.P=null})};_.Tn=function(a,b){const c=On(a,b),d=Pn(b);for(const e of d)Qn(a,e,a.f.Ia);b=Rn(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.vn(Ed);a=_.Sn(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.vn(Dd);_.xn("DRM queryMediaKeys_()",Ed,Dd)})};
|
|
149
149
|
_.Vn=function(a,b,c){c=void 0===c?[]:c;a.K=Un;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.Tn(a,b)};
|
|
150
150
|
_.Sn=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.I(_.G,6,6E3));null===a.l&&(a.l=gn(a.f.emeApi,a.bb));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.bn;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.j)return null;if(l===_.rd){if(_.tk()&&!a.f.Ia[l].useLegacySystem)return k.label=sd,a.l.a(sd,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
|
|
@@ -155,43 +155,43 @@ a.g.warn("Will try to recover by removing the robustness attribute of videoCapab
|
|
|
155
155
|
return h.createMediaKeys()}).then(h=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=h,a.S=!0)}).catch(h=>{if(!a.j){a.a=null;a.J.clear();if(h instanceof _.I)throw h;throw new _.I(_.G,6,6002,{browserError:h.message});}});c.reject();return d};
|
|
156
156
|
Wn=function(a){a=gh(a.f.Ia[_.Le]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Kl(f);e=_.Kl(e);e={kty:"oct",kid:_.Il(f,!1),k:_.Il(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Yi(d),initDataType:"keyids"}];return{keySystem:_.Le,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
|
|
157
157
|
keyIds:[],periodId:null}};Pn=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};Xn=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ia[c.keySystem]||(a.f.Ia[c.keySystem]={licenseUrl:""})};
|
|
158
|
-
On=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=gh(a.f.Ia);Bn(b,d)}d=a.f.Ia[_.pd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.pd));if(!1!==a.f.
|
|
158
|
+
On=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=gh(a.f.Ia);Bn(b,d)}d=a.f.Ia[_.pd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.pd));if(!1!==a.f.Ui&&_.Fk()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.pd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=Wn(a))for(const g of b)g.drmInfos=[f];b=Pn(b);Xn(a,b);for(const g of b)Cn(g,
|
|
159
159
|
a.f.Ia);return c};Qn=function(a,b,c){const d=_.An(b.keySystem);c=c[d];d===_.Le&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
|
|
160
160
|
Rn=function(a,b){var c=new Set(Pn(b));const d=a.G?_.uf:_.Ke,e=a.G?[_.Pe]:[Rf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Tc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ke,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Dn(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.vk()&&(h=_.Dn(b,_.Pd));const k=c?_.Dn(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.vk()&&(l=_.Dn(c,_.Pd));
|
|
161
161
|
for(const m of f.drmInfos){const n=a.get(m.keySystem);n.drmInfos.push(m);m.initData&&m.initData.length&&(n.initDataTypes=[...new Set(m.initData.map(r=>r.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.uf);m.persistentStateRequired&&(n.persistentState=_.uf);b&&_.$h(m.audioRobustness).forEach(r=>{const u={robustness:r||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:r||
|
|
162
162
|
"",contentType:h})});c&&_.$h(m.videoRobustness).forEach(r=>{const u={robustness:r||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:r||"",contentType:l})})}}return a};Yn=function(a){return _.x(function*(){if(!a.l.o())if(a.P)yield a.P;else try{a.P=a.l.h(a.I),yield a.P}catch(b){a.j||a.w(new _.I(_.G,6,6003,b.message,b))}})};
|
|
163
163
|
_.bo=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==Un)){var e=a.keySystem();if(!e.startsWith(_.pd)&&b===_.Tc){const f=new Zn(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
|
|
164
164
|
_.vk(2)||a.keySystem().startsWith(_.pd)||!_.$n(a,d,c,!0))&&ao(a,d,null,b,c)}};co=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield Yn(a);b.initData&&_.bo(a,b.initDataType,_.K(b.initData))})};fo=function(a){return _.x(function*(){_.vn(Gd);const b=a.X.map(c=>eo(a,c));a.ia=!0;a.X=[];yield Promise.all(b);_.vn(Fd);_.xn("drm.onPlay",Gd,Fd)})};
|
|
165
|
-
ho=function(a){const b=a.keySystem(),c=a.f.Ia[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return go(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.mj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Vc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.
|
|
165
|
+
ho=function(a){const b=a.keySystem(),c=a.f.Ia[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return go(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.mj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Vc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.vb.fetch(f).T}).then(f=>{a.a.serverCertificate=_.K(f.data)}).catch(f=>{var g=
|
|
166
166
|
f.data.headers;g=Object.assign({message:Ba,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Rm(g));throw new _.I(_.G,6,6100,g,f);})};
|
|
167
167
|
_.io=function(a){return _.x(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.I(_.G,6,6004,{browserError:b.message});}})};
|
|
168
|
-
_.lo=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.vk(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.pd)){const e=a.h.values();for(const f of e)_.Ml(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),jo(c.initData,f)||(f.
|
|
168
|
+
_.lo=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.vk(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.pd)){const e=a.h.values();for(const f of e)_.Ml(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),jo(c.initData,f)||(f.Pd.push(c.initData),c.keyId&&!f.lb.includes(c.keyId)&&
|
|
169
169
|
f.lb.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Lf)),d=!1)}!d||a.G&&a.K===Un||(_.$n(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),ao(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.ko(a,c);b.length||a.L.length||(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return a.H};
|
|
170
170
|
_.no=function(a,b){if(!a.I)return Eh(a.B,b,()=>{a.w(new _.I(_.G,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Re,()=>fo(a));a.B.on(a.C,_.zg,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==mo||a.L.length)d=Yn(a);c=Promise.resolve();_.yk()&&38===_.zk().major||(a.a&&a.a.keySystem!==_.Le&&!a.a.serverCertificate&&(c=ho(a)),c=c.then(()=>_.io(a)));return Promise.all([d,
|
|
171
171
|
c]).then(()=>{a.j||(_.lo(a),a.B.on(a.C,Qd,e=>co(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.td&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.I(1,6,6004)),a.a.serverCertificate=null,a.R++,_.no(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
|
|
172
|
-
go=function(a,b){return _.x(function*(){const c=a.D.
|
|
173
|
-
_.ko=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Pe)}catch(e){const f=new _.I(_.G,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.re,a.Ua.bind(a));a.B.on(c,de,a.Ja.bind(a));const d={initData:null,loaded:!1,
|
|
174
|
-
a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.I(_.G,6,6013)),null;d.loaded=!0;oo(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.I(_.G,6,6005,{browserError:e.message})))})};jo=function(a,b){if(!a)return!1;for(let c=0;c<b.
|
|
172
|
+
go=function(a,b){return _.x(function*(){const c=a.D.Qc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
|
|
173
|
+
_.ko=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Pe)}catch(e){const f=new _.I(_.G,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.re,a.Ua.bind(a));a.B.on(c,de,a.Ja.bind(a));const d={initData:null,loaded:!1,Ne:Infinity,ic:null,hb:new _.bn,periodId:null,Pd:[],keyId:null,lb:[],initDataType:null,qc:null,sessionContext:{ldlDelay:0,customData:{}}};d.hb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
|
|
174
|
+
a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.I(_.G,6,6013)),null;d.loaded=!0;oo(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.I(_.G,6,6005,{browserError:e.message})))})};jo=function(a,b){if(!a)return!1;for(let c=0;c<b.Pd.length;c++)if(_.Ml(a,b.Pd[c]))return!0;return!1};
|
|
175
175
|
_.$n=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.Ml(c,f.initData))return b?f.lb.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.lb.push(b),a.o.get(b)||a.o.set(b,Lf),d&&a.g.info(pb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(pb+`Session: '${e.sessionId}'`),!0;if(jo(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
|
|
176
176
|
!0}return!1};
|
|
177
177
|
ao=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.x(function*(){if(e.length){var h=b;if(!h)try{h=po(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&qo(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
|
|
178
178
|
if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.Pe:Rf;var r=a.I.createSession(n);a.D.onEvent(new _.F(Kd,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.I(_.G,6,6005,{browserError:u.message}));return}a.B.on(r,_.re,a.Ua.bind(a));a.B.on(r,de,a.Ja.bind(a));
|
|
179
|
-
k={
|
|
179
|
+
k={qc:f,Pd:[],initData:e,initDataType:d,keyId:h,lb:h?[h]:[],loaded:!1,Ne:Infinity,periodId:c,ic:null,hb:new _.bn,sessionContext:{ldlDelay:0,customData:{}}};k.hb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(r,k);h&&!a.o.get(h)&&a.o.set(h,Lf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.lb.includes(m.keyId)&&_.Ml(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.lb.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Lf));l=a.D.getConfiguration();m=a.keySystem();
|
|
180
180
|
m=a.f.Ia[m];n=(n=m.modifiers)&&n.transformInitData;_.ah(n)||(n=Jn);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.I||(h=new _.I(_.G,6,6016,u));k.hb&&k.hb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);r.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
|
|
181
181
|
a.w(new _.I(_.G,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};ro=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};oo=function(a){a=a.h.values();return _.Ji(a,b=>b.loaded)};qo=function(a,b,c,d){if(!b&&c!==_.Gf)return!1;d=b||pm(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.lb.includes(b)||c===_.Gf&&(e.keyId||pm(e.initData))===d)return!0;return!1};
|
|
182
182
|
po=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Ia[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.ah(g)||(g=Hn);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Gf)return pm(c)||"";if(b===_.Tc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
|
|
183
183
|
_.mn(c);if(m)return m.a}else if(zn(l)){{f=new _.ln(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.gm(m);const n=_.P(f);c=n>>>24;k=n&16777215;const r=_.em(f,16),u=_.Ll(r);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.em(f,v),A=_.tn(y);_.qh("Parsed PR PSSH Box","size",g,"name",h,lg,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
|
|
184
|
-
eo=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(so(a,b))yield to(a,e,b,c,d);else{var f=a.za;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield xh(f),a.j))return;var g=a.keySystem(),h=a.f.Ia[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.mj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.cb;k.licenseRequestType=b.messageType===ge&&d.
|
|
185
|
-
k.sessionId=c.sessionId;if(k.licenseRequestType===fe)a.D.onEvent(new _.F(Jd));zn(a.a.keySystem)&&uo(a,k);Ol(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield vo(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Pl(a.M,f),yield wo(a,c,f.data,d,h))h=ro(a),a.D.onEvent(new _.F(_.Md,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.
|
|
186
|
-
(h=a.h.get(d.
|
|
184
|
+
eo=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(so(a,b))yield to(a,e,b,c,d);else{var f=a.za;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield xh(f),a.j))return;var g=a.keySystem(),h=a.f.Ia[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.mj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.cb;k.licenseRequestType=b.messageType===ge&&d.qc?fe:b.messageType;
|
|
185
|
+
k.sessionId=c.sessionId;if(k.licenseRequestType===fe)a.D.onEvent(new _.F(Jd));zn(a.a.keySystem)&&uo(a,k);Ol(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield vo(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Pl(a.M,f),yield wo(a,c,f.data,d,h))h=ro(a),a.D.onEvent(new _.F(_.Md,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.ic&&d.ic.resolve(),d.qc&&(h=d.qc,a.g.info(`Closing expired session '${h.sessionId}'`),yn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
|
|
186
|
+
(h=a.h.get(d.qc))&&h.Lc&&h.Lc.stop(),a.h.delete(d.qc),d.qc=null),(new _.rk(()=>{a.j||(d.loaded=!0,d.hb&&d.hb.resolve(),oo(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve()))})).ka(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.aj(g,_.pd)||_.aj(g,_.rd)))&&(h=new _.rk(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),zn(g)?ao(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.pd)&&c.update(_.Yi("renew")))}),d.Lc=h,h.ka(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
|
|
187
187
|
so=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};to=function(a,b,c,d,e){return _.x(function*(){var f=_.mj([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.cb;f.licenseRequestType=Vc;f.sessionId=d.sessionId;(f=yield xo(a,f,e,b,d.sessionId,c.messageType))&&(yield wo(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
|
|
188
188
|
uo=function(a,b){var c=Wi(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.kg).textContent;b.body=_.Jl(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
|
|
189
|
-
vo=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield yo(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.F(Id,{delay:h}));var k=Date.now();_.vn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.
|
|
189
|
+
vo=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield yo(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.F(Id,{delay:h}));var k=Date.now();_.vn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.vb.fetch(b).T}catch(r){if(a.j)return null;l=r.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:r.data.url,status:r.data.status,response:r.data.response},
|
|
190
190
|
l?{headers:l}:{},Rm(l));l=new _.I(_.G,6,6007,l,r);zo(a,l,c);return null}_.vn(`drm.license.req.${d}.end`);_.xn(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=Sm(l.headers);m&&(a.za=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
|
|
191
191
|
wo=function(a,b,c,d,e){return _.x(function*(){_.vn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===ob)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.G,6,6008,{browserError:f.message});zo(a,g,d);return!1}_.vn(`drm.sess.update.${e}.end`);_.xn(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
|
|
192
|
-
xo=function(a,b,c,d,e,f){return _.x(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield yo(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.
|
|
192
|
+
xo=function(a,b,c,d,e,f){return _.x(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield yo(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.vb.fetch(b).T}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Ba,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},Rm(h));h=new _.I(_.G,6,6100,h,m);zo(a,h,c);return null}g=Date.now()-g;const k=Sm(h.headers);
|
|
193
193
|
let l="";k&&k.requestId&&(l=` RID:${k.requestId}`);a.g.info("WV Server certificate response for "+`SID:'${e}' `+`${h.data.byteLength} bytes `+`in ${g}ms${l}`);return a.j?null:h})};
|
|
194
|
-
yo=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield go(a,d);const e=a.keySystem();var f=a.f.Ia[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.pd)&&b.requestModifiers.push(k=>_.sm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.pd)&&b.responseModifiers.push(k=>_.tm(k))})};zo=function(a,b,c){a.j||(a.w(b),c.
|
|
194
|
+
yo=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield go(a,d);const e=a.keySystem();var f=a.f.Ia[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.pd)&&b.requestModifiers.push(k=>_.sm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.pd)&&b.responseModifiers.push(k=>_.tm(k))})};zo=function(a,b,c){a.j||(a.w(b),c.ic&&c.ic.reject(b),c.hb&&c.hb.reject(b))};
|
|
195
195
|
_.Co=function(a,b){a&&b&&(_.Ao.set(a,b),_.Bo.info(`Registered TextDisplayerFactory: '${a}'`))};_.Do=function(a,b){b=b.find(c=>(c=_.Ao.get(c))?c.a(a):!1);if(null==b)return _.Bo.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Bo.info(`Chosen the text displayer: ${b}`);return _.Ao.get(b)};
|
|
196
196
|
_.Eo=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};Fo=function(a,b){let c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(const d of a.f)c+=d.state===b?d.duration:0;return c};Go=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};
|
|
197
197
|
Ho=function(a){return a.a.map(b=>_.Xg(b))};_.Io=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};
|
|
@@ -201,82 +201,82 @@ Ko=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Po;a.w=a.f
|
|
|
201
201
|
Jo=function(a,b){if(a.f===_.Mo)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.Z||(a.h=!1,Ko(a,_.Lo));else if(b!==_.Zf){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Wa(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.I=a.m.getPlaybackRate()||1;e=typeof a.j===_.t&&2>a.j&&2===e.networkState;var f=typeof a.j===_.t&&0>=a.F&&a.f===_.To,g=typeof a.j===_.t&&2>=a.j&&a.h;e=a.Z||
|
|
202
202
|
f||e||g;!a.K||a.m.isLive()||a.f!==_.Po||e||(f=b===_.Bf&&4===a.j,(g=a.w===_.Uo)&&!a.B?e=!0:g||a.B||f||(e=!0));f=!1;e?f=Ko(a,_.Po):c?f=Ko(a,_.Vo):a.C&&(f=Ko(a,_.Wo));f&&(a.B=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.Z+", waiting: "+a.h+", playing: "+a.C+", paused: "+c+", readyState: "+a.j+", rate: "+a.I+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+Oo(a.f,_.So))}}};
|
|
203
203
|
Xo=function(a){a=(new _.mi(a)).Fa;if(!a)return null;a=a.toUpperCase();return _.bj(a,".MPD")?_.tc:_.bj(a,".M3U8")?_.kl:_.bj(a,".MP4")?_.pg:_.bj(a,".MP3")?"audio/mp3":_.bj(a,"MANIFEST")||_.bj(a,".ISM")?_.yc:null};_.Zo=function(a){let b;ul(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Nf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Yo(b[c]);d&&a.push(d)}return a};
|
|
204
|
-
Yo=function(a){let b=null;_.ch(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Lc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Lc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Nf||(b.name=a.name),_.B(a.
|
|
204
|
+
Yo=function(a){let b=null;_.ch(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Lc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Lc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Nf||(b.name=a.name),_.B(a.Zb)||typeof a.Zb!==_.Nf||(b.Zb=a.Zb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.Nf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Xo(a.url),b.type?$o.debug("Detect media type "+
|
|
205
205
|
b.type+" for "+a.url):$o.warn("Unable to detect media type for "+a.url));return b};bp=function(a,b){if(a.w)throw new _.I(_.G,7,7E3);a.a||(a.h.on(b,_.q,()=>{{const c=ap(a);if(c)a.onError(c)}}),a.h.on(b,_.vf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.F(_.Kc,{detail:{width:c,height:d}}))}),a.a=b)};dp=function(a){const b=_.Fk()?In:void 0;return new _.cp(a,b)};
|
|
206
|
-
ep=function(a){return _.x(function*(){if(a.w)return Promise.reject(new _.I(_.G,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Tl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=dp({
|
|
207
|
-
a.log.debug(_.vb,d.type)},getConfiguration:()=>a.getConfiguration(),
|
|
208
|
-
|
|
209
|
-
ap=function(a){if(null===a.ga||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.I(_.G,3,3016,{code:b
|
|
206
|
+
ep=function(a){return _.x(function*(){if(a.w)return Promise.reject(new _.I(_.G,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Tl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=dp({vb:c,onError:d=>a.onError(d),Se:()=>{},Re:(d,e)=>{a.trigger(new _.F(_.Hd,{expirationTime:e}))},onEvent:d=>{d instanceof _.F?a.dispatchEvent(d):
|
|
207
|
+
a.log.debug(_.vb,d.type)},getConfiguration:()=>a.getConfiguration(),Qc:()=>a.Qc()});a.o.f=b;yield _.Vn(a.o,[{id:0,language:_.dg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,Ca:0,mimeType:_.pg,codecs:"",encrypted:!0,keyId:null,language:_.dg,originalLanguage:_.dg,label:null,type:_.w,primary:!1,frameRate:void 0,
|
|
208
|
+
gj:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Si:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.no(a.o,a.a)})};fp=function(a,b){Vm(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.Mo&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
|
|
209
|
+
ap=function(a){if(null===a.ga||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.I(_.G,3,3016,{code:b,bj:c,message:a.a.error.message})};
|
|
210
210
|
hp=function(a){if(a.w)return new _.gp(Promise.reject(new _.I(_.G,7,7E3)),()=>{});const b=a.ga[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&fp(a,c);if(d.preload!==_.Be)a.h.one(d,_.me,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.vk()||_.yk())&&d.load();const f=new _.bn;a.h.one(d,If,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.rk(()=>{f.reject(new _.I(_.G,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
|
|
211
211
|
uri:b.url},d.error))})).ka(g))});Vm(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(ap(a)):d.preload===_.Be&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.q,()=>{f.reject(ap(a))});return new _.gp(f,
|
|
212
212
|
()=>{const g=new _.I(_.G,7,7001);f.reject(g);return Promise.resolve()})};ip=function(a,b){Vm(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.Mo){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
|
|
213
213
|
jp=function(a,b){let c=!1;a.h.on(b,_.Cf,()=>{c=b.paused});a.h.on(b,_.Bf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.mp=function(a){0<=kp.indexOf(a)?lp.warn(`Factory '${a.name()}' is already registered`):(kp.push(a),lp.info(`Factory '${a.name()}' has been registered.`))};np=function(a,b){const c=kp.find(d=>d.a(a,b))||null;c&&lp.info(`Chosen ads manager: ${c.name()}`);return c};
|
|
214
214
|
_.op=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.pp=function(a,b){a.classList.add(b)};_.qp=function(a,b){if(a&&typeof b===_.Ce)for(const c in b)a.style[c]=b[c]};_.rp=function(a){return document.createElement(a)};
|
|
215
215
|
sp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());bi(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};tp=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
|
|
216
|
-
up=function(a,b,c){(_.yk()&&53===_.zk().major||_.yk()&&68===_.zk().major||_.Ak())&&!b.hasAttribute(xd)&&(b.style.opacity="0",b.setAttribute(xd,""),a.j.one(b,Od,()=>{b.removeAttribute(xd);b.style.opacity="1";c&&(c.style.opacity="1")}))};vp=function(a){if(a.Va){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Va.h=b}a.
|
|
217
|
-
xp=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.
|
|
216
|
+
up=function(a,b,c){(_.yk()&&53===_.zk().major||_.yk()&&68===_.zk().major||_.Ak())&&!b.hasAttribute(xd)&&(b.style.opacity="0",b.setAttribute(xd,""),a.j.one(b,Od,()=>{b.removeAttribute(xd);b.style.opacity="1";c&&(c.style.opacity="1")}))};vp=function(a){if(a.Va){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Va.h=b}a.he&&a.he()};wp=function(a,b){return _.x(function*(){yield a.release();yield a.load(b)})};
|
|
217
|
+
xp=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.xg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
|
|
218
218
|
zp=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.w);b.appendChild(f);d=a.ja.cb.create();f=new yp(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};Ap=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
|
|
219
219
|
Bp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(ad),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(ad),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};Cp=function(a){return a.h.find(b=>!!b.primary)||null};
|
|
220
220
|
Qp=function(a,b,c){return _.x(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Dp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?Ep(a,e,Fp):e.player.pause():e.player.pause()),e.primary?Ep(a,e,Fp):Ep(a,e,Gp));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Re?(e&&d.primary?yield Hp(a,d):f?yield Ip(a,d):yield Jp(a,d),vp(d)):f?a.g.error("Loading preloaded items is not supported"):yield Kp(a,d);Lp(a,d);d.primary?Ep(a,d,
|
|
221
|
-
Gp):Ep(a,d,Fp);d.Va&&Mp(a,d,d.Va);if(d.Aa)d.player.one(_.Sd,d.Aa);d.
|
|
222
|
-
Lp=function(a,b){const c=b.transition;if(c&&!c.
|
|
221
|
+
Gp):Ep(a,d,Fp);d.Va&&Mp(a,d,d.Va);if(d.Aa)d.player.one(_.Sd,d.Aa);d.rg&&d.rg(d.player.getDuration());e&&Np(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=Cp(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield Hp(a,h))}finally{a.w=!1,Op(a),Pp(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
|
|
222
|
+
Lp=function(a,b){const c=b.transition;if(c&&!c.Bg){if(c.Aa){const d=c.Aa,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Sd,e);b.disposers.push(()=>{b.player.off(_.Sd,e)})}c.fe&&Rp(a,b,()=>{const d=a.f.Va;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.F(_.lc,{ad:d})),a.a.trigger(new _.F(_.Vb,{ad:d})),a.a.trigger(new _.F(_.Sb,{id:b.Lb})))});c.Bg=!0}};
|
|
223
223
|
Sp=function(a,b){return _.x(function*(){a.g.info("Crop ads by playout limit",b);var c=Cp(a),d=a.getCurrentItem();if(c&&d&&d.Va&&null!=c.W){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.nb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.nb-d.duration),h=e.sort((l,m)=>m.nb-l.nb)[0],k=c.W;b<=g?(c.W-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.W.toFixed(1)} instead of `+`${k.toFixed(1)}`),
|
|
224
|
-
yield Qp(a,c.id,_.Re),h.Aa&&h.Aa(),c=d.Va,a.a.trigger(new _.F(_.lc,{ad:c})),a.a.trigger(new _.F(_.Vb,{ad:c})),a.a.trigger(new _.F(_.Sb,{id:d.
|
|
225
|
-
Tp=function(a){return _.x(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.
|
|
224
|
+
yield Qp(a,c.id,_.Re),h.Aa&&h.Aa(),c=d.Va,a.a.trigger(new _.F(_.lc,{ad:c})),a.a.trigger(new _.F(_.Vb,{ad:c})),a.a.trigger(new _.F(_.Sb,{id:d.Lb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.nb&&b>=l.nb-l.duration))?(e=b-(d.nb-d.duration),d.Va.h=e,c.W-=f-b,a.g.info("Last ad is now ",d.Va.sb(),"with cropped duration",e,"and primary will resume at",c.W.toFixed(1),"instead of",k.toFixed(1)),h.Aa&&(d.Aa=h.Aa),d.transition={fe:{position:e,itemId:c.id,W:c.W}},Lp(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
|
|
225
|
+
Tp=function(a){return _.x(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Tc),yield b.player.play(),b.state=_.bf,vp(b))})};Up=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),Tc:Promise.resolve()})))};
|
|
226
226
|
Wp=function(a,b){return _.x(function*(){a.g.info("Remove items",b);const c=[],d=[];for(const e of a.h)b.includes(e.id)?d.push(e):c.push(e);a.h=c;yield Promise.all(d.map(e=>{e.disposers.forEach(f=>f());e.disposers=[];return Vp(a,e.id)}))})};Xp=function(a){return _.x(function*(){yield Wp(a,a.h.map(b=>b.id))})};Vp=function(a,b){return _.x(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield Yp(a,c.player)),a.j.delete(b))})};
|
|
227
|
-
$p=function(a){const b=Cp(a);b&&(b.transition=void 0,b.next=[],Zp(a))};aq=function(a){return _.x(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);$p(a);yield Wp(a,b)})};bq=function(a){_.x(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&($p(a),yield a.play(c))})};Zp=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.
|
|
228
|
-
Ep=function(a,b,c){const d=b?b.
|
|
227
|
+
$p=function(a){const b=Cp(a);b&&(b.transition=void 0,b.next=[],Zp(a))};aq=function(a){return _.x(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);$p(a);yield Wp(a,b)})};bq=function(a){_.x(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&($p(a),yield a.play(c))})};Zp=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Bg=!1),Lp(a,a.f))};Dp=function(a,b){return a.h.find(c=>c.id===b)||null};
|
|
228
|
+
Ep=function(a,b,c){const d=b?b.Lb||null:null;a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),cq(a,!0)):(b.audio&&(c=b.audio),a.ja.onAudioDecision&&(c=a.ja.onAudioDecision(d)),c===Gp?(a.a.setMuted(!1),cq(a,!0)):c===Fp?(a.a.setMuted(!0),cq(a,!1)):a.g.warn("Audio decision not supported",c))};
|
|
229
229
|
Hp=function(a,b){return _.x(function*(){if(b.player){a.G();if(b.state===kf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.Z=!1;b.W&&(yield b.player.seek(b.W,!0));a.f=b;b.role=dq;Bp(a,b.player,!0);b.state="loading";a.o?(Ep(a,b,Gp),b.player.isPaused()&&(yield b.player.play())):yield b.player.play();b.state=_.bf}})};
|
|
230
230
|
Ip=function(a,b){return _.x(function*(){const c=b.player;if(c){if(b.state===kf){a.g.info(Db);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=dq;Bp(a,c,!0);b.state===jf?yield c.play():b.state===hf&&(yield wp(c,b.config));b.state=_.bf}})};Jp=function(a,b){return _.x(function*(){yield Kp(a,b);yield b.player.play();b.state=_.bf})};
|
|
231
|
-
Kp=function(a,b){return _.x(function*(){const c=yield eq(a,!!b.primary);a.f=b;b.role=dq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Bp(a,c,!0);b.state="loading";b.
|
|
231
|
+
Kp=function(a,b){return _.x(function*(){const c=yield eq(a,!!b.primary);a.f=b;b.role=dq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Bp(a,c,!0);b.state="loading";b.Tc=wp(c,b.config);yield b.Tc;b.state="loaded"})};
|
|
232
232
|
Mp=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.F(_.dc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.F(_.Wb,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.F(_.bc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.F(_.mc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.F(_.cc,{ad:c}))},g=()=>{a.a.trigger(new _.F(_.ec,{ad:c}))},h=()=>{a.a.trigger(new _.F(_.Tb,{ad:c}))},k=()=>{a.a.trigger(new _.F(_.lc,{ad:c}));a.a.trigger(new _.F(_.Vb,
|
|
233
|
-
{ad:c}));c.f===c.a&&a.a.trigger(new _.F(_.Sb,{id:b.
|
|
234
|
-
Np=function(a,b){return _.x(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||Bp(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=fq,b
|
|
233
|
+
{ad:c}));c.f===c.a&&a.a.trigger(new _.F(_.Sb,{id:b.Lb}))};d.on(_.Zf,e);d.on(_.Ne,f);d.on(_.bf,g);d.on(_.Nc,h);d.one(_.Sd,k);b.disposers.push(()=>{d.off(_.Zf,e);d.off(_.Ne,f);d.off(_.bf,g);d.off(_.Nc,h);d.off(_.Sd,k)});1===c.f&&a.a.trigger(new _.F(_.Rb,{id:b.Lb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.F(_.$b,{ad:c}));a.a.trigger(new _.F(_.jc,{ad:c}))};
|
|
234
|
+
Np=function(a,b){return _.x(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||Bp(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=fq,b.$e?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.$e} ms.`),yield new Promise(d=>{setTimeout(()=>_.x(function*(){yield Yp(a,c);Bp(a,c,!1);a.a.trigger(new _.F("ad-hls-released"));d()}),b.$e)})):(yield Yp(a,c),Bp(a,c,!1)))})};
|
|
235
235
|
Op=function(a){Promise.all(Array.from(a.j.keys()).map(b=>Vp(a,b)))};Pp=function(a,b){_.x(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>gq(a,d)))}})};hq=function(a,b,c){c=void 0===c?!1:c;if(!a.Z){var d=Cp(a);d?(d.W=b,c&&(a.Z=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};iq=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];Bp(a,a.a,!0)};
|
|
236
|
-
Rp=function(a,b,c){const d=b.transition.
|
|
236
|
+
Rp=function(a,b,c){const d=b.transition.fe;let e=null;d.W&&hq(a,d.W);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(a.g.info("Start RAF polling"),h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{a.g.info("Stop timeupdate polling");b.player.off(_.Zf,f)};
|
|
237
237
|
a.g.info("Start timeupdate polling");b.player.on(_.Zf,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};Yp=function(a,b){return _.x(function*(){b!==a.a&&(yield a.l.release(b))})};jq=function(a){return _.x(function*(){a.f&&(yield Np(a,a.f),Bp(a,a.a,!0))})};eq=function(a,b){return _.x(function*(){if(b)return a.a;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
|
|
238
238
|
gq=function(a,b){return _.x(function*(){if(b.primary){b.state=kf;a.j.set(b.id,b);if(b.W&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.W);Ep(a,b,Fp);yield c.seek(b.W,!0)}b.state=jf}else{c=b.id;var d=yield eq(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=fq;b.state=kf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1);const e=a.a.getBandwidthEstimate();e&&(b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=
|
|
239
|
-
e);b.preloadPromise=wp(d,b.config);yield b.preloadPromise;b.state=jf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=gf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=hf)}}})};cq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};mq=function(a){return a.
|
|
240
|
-
oq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Nf&&typeof b.DURATION===_.t):!1};qq=function(a){return a.a.find(b=>b.state===pq)||null};rq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.
|
|
241
|
-
vq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.
|
|
242
|
-
zq=function(a,b,c){_.x(function*(){a.Z=!0;try{const d=tq(a);d&&(yield wq(a,d));a.g.info("Play jumped interstitial",b.ca,"resume at",c.toFixed(2));yield xq(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.ca,d),b.
|
|
243
|
-
Hq=function(a,b){const c=()=>_.x(function*(){if(!a.Z&&!a.
|
|
244
|
-
c)});const d=()=>{Gq(a,!1,!0,!0)};b.on(_.Yf,d);a.h.push(()=>{b.off(_.Yf,d)});const e=()=>{a.
|
|
245
|
-
Gq=function(a,b,c,d){const e=Kq(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=ei(a.a.map(m=>m.ca),e.map(m=>m.id));Lq(a,f.
|
|
239
|
+
e);b.preloadPromise=wp(d,b.config);yield b.preloadPromise;b.state=jf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=gf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=hf)}}})};cq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};mq=function(a){return a.tf&&!(a.once&&a.Cg)&&[kq,lq].includes(a.state)};nq=function(a){const b={URI:a.va[0].URI,DURATION:a.va[0].DURATION};a.Dg&&(b[Ib]=a.Dg);return{ASSETS:[b]}};
|
|
240
|
+
oq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Nf&&typeof b.DURATION===_.t):!1};qq=function(a){return a.a.find(b=>b.state===pq)||null};rq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.Wc&&!d.once&&d.ng&&d.startTime>b).forEach(d=>{d.tf=!0})};tq=function(a){return a.a.find(b=>b.state===sq)||null};uq=function(a,b){return a.a.find(c=>mq(c)&&!c.Qh&&1===c.Wc&&b>c.startTime&&b<c.endTime)||null};
|
|
241
|
+
vq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.Wc&&!d.Lf).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};yq=function(a,b,c){_.x(function*(){a.Z=!0;try{const d=tq(a);d&&(yield wq(a,d));a.g.info("Seek into interstitial",b.ca);yield xq(a,b)}catch(d){yield a.f.seek(c)}finally{a.Z=!1}})};
|
|
242
|
+
zq=function(a,b,c){_.x(function*(){a.Z=!0;try{const d=tq(a);d&&(yield wq(a,d));a.g.info("Play jumped interstitial",b.ca,"resume at",c.toFixed(2));yield xq(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.ca,d),b.nh=new Date,yield a.f.seek(c)}finally{a.Z=!1}})};wq=function(a,b){return _.x(function*(){a.g.info("Unschedule interstitial",b.ca);yield aq(a.Y);b.state=kq})};
|
|
243
|
+
Hq=function(a,b){const c=()=>_.x(function*(){if(!a.Z&&!a.se){var g=b.getPosition(),h=Aq(a,g);h&&(yield Bq(a,h))&&Cq(a,h,b);if((h=Dq(a))&&h.state===kq&&b.getDuration()-g<a.ja.resolutionOffsetSec&&(yield Bq(a,h)))if(h.va&&0!==h.va.length){if(g=a.Y.getCurrentItem()){var k=Eq(a,h,2);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={Aa:l};a.g.info(`Schedule postroll interstitial ${h.ca}`);Fq(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.Zf,c);a.h.push(()=>{b.off(_.Zf,
|
|
244
|
+
c)});const d=()=>{Gq(a,!1,!0,!0)};b.on(_.Yf,d);a.h.push(()=>{b.off(_.Yf,d)});const e=()=>{a.se=!0};b.on(_.Rb,e);a.h.push(()=>{b.off(_.Rb,e)});const f=()=>{a.se=!1};b.on(_.Sb,f);a.h.push(()=>{b.off(_.Sb,f)})};Iq=function(a){a.h.forEach(b=>b());a.h=[]};Jq=function(a){return(a=a.Y.getCurrentItem())&&!a.primary?a.player:null};
|
|
245
|
+
Gq=function(a,b,c,d){const e=Kq(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=ei(a.a.map(m=>m.ca),e.map(m=>m.id));Lq(a,f.ni);const l=new Set(f.Wg);f=e.filter(m=>l.has(m.id))}if(!Mq(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.cb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ja.hi?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&Nq(a,g[0],b);
|
|
246
246
|
k.forEach(l=>Oq(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&Oq(a,h[0],2);Pq(a,e);return 0<g.length};
|
|
247
|
-
Qq=function(a){_.x(function*(){var b=a.Y;Up(b,[{id:mf,primary:!0,config:b.a.getConfiguration(),next:[],nb:0,duration:0,
|
|
247
|
+
Qq=function(a){_.x(function*(){var b=a.Y;Up(b,[{id:mf,primary:!0,config:b.a.getConfiguration(),next:[],nb:0,duration:0,Lb:null}]);var c=Cp(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=dq;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();Bp(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Gq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.Y,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||Bp(b,b.a,!1),Bp(b,c,!0)}else c.autoplay&&(yield Tp(a.Y))})};
|
|
248
248
|
xq=function(a,b,c){return _.x(function*(){if(!(yield Bq(a,b)))throw Error("Failed to bind");yield Rq(a,b,1,!1,c)})};Kq=function(a){return a.f.getTimelineCues().filter(b=>_.zi(b.schemeIdUri)&&b.customAttributes)};Lq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ca)&&!mq(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ca))};
|
|
249
249
|
Mq=function(a,b){var c=b.sort((h,k)=>h.startTime-k.startTime);const d=a.ja.resolutionOffsetSec;let e=Infinity;const f=[];for(let h=0;h<c.length-1;h++){const k=c[h],l=c[h+1];l&&(e=Math.min(e,l.startTime-k.endTime));l&&l.startTime<=k.endTime&&f.push(`Interstitials ${k.id} and ${l.id} `+"overlap.")}e<d&&(c=e/2,a.ja.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${d} s) auto-reconfiguring to `+`${c} s.`));const g=[];b.forEach(h=>{const k=h.customAttributes[_.Kb];
|
|
250
250
|
h.customAttributes[_.Jb]||k||g.push(`Interstitial cue ${h.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<g.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${g.join(" ")}`):0<f.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${f.join(" ")}`);return 0===g.length};
|
|
251
251
|
Nq=function(a,b,c){_.x(function*(){var d=Oq(a,b,0);const e=yield Bq(a,d),f=d.va?d.va.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.ca}`),yield Rq(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=Cp(a.Y))&&(yield a.Y.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),yield jq(a.Y),c||(yield Tp(a.Y))})};
|
|
252
252
|
Oq=function(a,b,c){{const u=b.customAttributes[_.Kb],v=b.customAttributes[_.Jb],y=b.customAttributes[_.Nb],A=b.customAttributes[_.Lb];var d=b.customAttributes[_.Mb]||[];b.customAttributes[Qb]||(b.customAttributes[Qb]=null==y||0<y?"RANGE":"POINT");var e=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];e="CONTENT"===e?Gp:"AD"===e?Fp:void 0;var f=b.id,g=b.startTime,h=b.endTime,k=kq,l=null==y?null:Math.max(0,b.startTime+y),m="POINT"===b.customAttributes[Qb],n=!d.includes("SKIP");d=!d.includes("JUMP");{const D=
|
|
253
|
-
b.customAttributes[Ib];if(D)try{var r=JSON.parse(atob(D))}catch(E){r=null}else r=null}b={ca:f,startTime:g,endTime:h,state:k,
|
|
254
|
-
Pq=function(a,b){_.x(function*(){const c=a.Y.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ca);if(h){const k=h.customAttributes[_.Lb];null==g.
|
|
253
|
+
b.customAttributes[Ib];if(D)try{var r=JSON.parse(atob(D))}catch(E){r=null}else r=null}b={ca:f,startTime:g,endTime:h,state:k,Bf:v,Cf:u,va:null,W:l,pi:y,cc:A,Wc:c,Qh:m,eh:n,Lf:d,Dg:r,ng:null!=y&&0>y,once:(b.customAttributes.CUE||[]).includes("ONCE"),Cg:!1,tf:!0,customAttributes:b.customAttributes,audio:e}}a.a.push(b);return b};
|
|
254
|
+
Pq=function(a,b){_.x(function*(){const c=a.Y.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ca);if(h){const k=h.customAttributes[_.Lb];null==g.cc&&null!=k&&(a.g.info(yb,h.id,"Playout limit",k),g.cc=k,1===g.Wc&&g.state===sq&&Sq(a,g))}});else{var d=b.find(g=>g.id===c.Lb);if(d){var e=d.customAttributes[_.Lb];if(null!=e){var f=a.a.find(g=>g.ca===d.id);f&&null==f.cc&&(a.g.info(yb,d.id,"Playout limit",e),f.cc=e,yield Sp(a.Y,e))}}}})};
|
|
255
255
|
Sq=function(a,b){_.x(function*(){yield wq(a,b);yield Cq(a,b,a.f)})};
|
|
256
|
-
Bq=function(a,b){return _.x(function*(){b.state=pq;if(b.
|
|
257
|
-
[{URI:b.
|
|
258
|
-
Cq=function(a,b,c){if(b.va)if(0===b.va.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ca}`):null!=b.W&&0!==b.
|
|
259
|
-
W:b.W}};a.g.info(`Schedule interstitial ${b.ca} for `+`${b.startTime} s`);Fq(a,b,e)}}}};Aq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.
|
|
260
|
-
Tq=function(a,b){return _.x(function*(){var c=a.Y.
|
|
261
|
-
Eq=function(a,b,c){let d=0,e=b.va.map((h,k)=>{const l=`${b.ca}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:Wq(a,h.URI),type:_.kl}},duration:h.DURATION,nb:d,
|
|
262
|
-
h.
|
|
256
|
+
Bq=function(a,b){return _.x(function*(){b.state=pq;if(b.Bf)try{a.g.info(`Load X-ASSET-LIST for ${b.ca}`);a.Ta(new _.F(Xb));const c=yield Tq(a,b.Bf);b.va=c.ASSETS;b.va&&0!==b.va.length||a.g.info(`Interstitial ${b.ca} has no assets, `+"will be smoothly skipped");if(null==b.W){const d=Di(b.va.map(e=>e.DURATION));b.W=b.startTime+(null==b.cc?d:Math.min(b.cc,d))}b.state=Uq;a.Ta(new _.F(Yb));a.Ta(new _.F(Zb,{id:b.ca,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=Vq}else b.Cf?(b.va=
|
|
257
|
+
[{URI:b.Cf,DURATION:b.endTime-b.startTime}],a.Ta(new _.F(Zb,{id:b.ca,detail:nq(b)})),b.state=Uq):b.state=Vq;return b.state===Uq})};Rq=function(a,b,c,d,e){return _.x(function*(){if(0!==b.va.length&&a.Y.getCurrentItem()){var f=Eq(a,b,c);0!==f.length&&(Fq(a,b,f),0===c&&a.f.isLive()||(null!=e?hq(a.Y,e,!0):null!=b.W&&hq(a.Y,b.W)),d?yield a.Y.load(f[0].id):yield a.Y.play(f[0].id))}})};
|
|
258
|
+
Cq=function(a,b,c){if(b.va)if(0===b.va.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ca}`):null!=b.W&&0!==b.pi?c.seek(b.W):a.g.info(`Empty VOD interstitial ${b.ca}, `+"continuing to next segment")};c.one(_.Wf,g);a.h.push(()=>{c.off(_.Wf,g)});a.g.info(`Schedule interstitial ${b.ca} to `+"be skipped")}else{var d=a.Y.getCurrentItem();if(d){var e=Eq(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.W&&hq(a.Y,b.W);d.next=[f];d.transition={fe:{position:b.startTime,itemId:f,
|
|
259
|
+
W:b.W}};a.g.info(`Schedule interstitial ${b.ca} for `+`${b.startTime} s`);Fq(a,b,e)}}}};Aq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Wc&&mq(c)&&0<d&&d<=a.ja.resolutionOffsetSec})||null};Dq=function(a){return a.a.find(b=>2===b.Wc)||null};
|
|
260
|
+
Tq=function(a,b){return _.x(function*(){var c=a.Y.Rd();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.mj(Wq(a,b));c=yield xj(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!oq(c))throw new _.ji("Invalid X-ASSET-LIST list response");return c})};Wq=function(a,b){return(a=a.ja.gi)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
|
|
261
|
+
Eq=function(a,b,c){let d=0,e=b.va.map((h,k)=>{const l=`${b.ca}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:Wq(a,h.URI),type:_.kl}},duration:h.DURATION,nb:d,Lb:b.ca,next:[],Va:new Q(c,k+1,b.va.length,h.DURATION,b.ca,b.eh,b.customAttributes||null),audio:b.audio}});e.forEach((h,k)=>{const l=k===e.length-1;l&&2===c||(l?(h.next=[mf],h.transition={Aa:mf}):(k=l?mf:`${h.Lb}-${k+1}`,h.next=[k],h.transition={Aa:k}))});e.forEach(h=>{h.he=()=>{var k=h.Va;a.g.info(`Playing ad ${`${k.f}/${k.a}`} of interstitial `+
|
|
262
|
+
h.Lb)}});if(null!=b.cc&&(e=Xq(a,b,e),0===e.length))return[];const f=e[0].he;e[0].he=()=>{b.Cg=!0;b.ng&&(b.tf=!1);a.g.info(`Playing interstitial ${b.ca} with `+`${b.va.length} assets and will resume primary `+`content ${b.W?`at ${b.W.toFixed(1)} s`:"after interstitial ended"}.`);f()};e[0].rg=h=>{null==b.W&&(b.W=b.startTime+h,hq(a.Y,b.W),a.g.info("Primary content will resume at",b.W.toFixed(1),"s"));b.state=Yq};const g=e[e.length-1];g.Aa=()=>{b.state=lq;Wp(a.Y,e.map(h=>h.id));2===c&&jq(a.Y)};g.$e=a.ja.adReleaseDelayMs;
|
|
263
263
|
return e};Fq=function(a,b,c){Up(a.Y,c);c=a.Y;Zp(c);c.f&&(c.f.Va&&Mp(c,c.f,c.f.Va),Op(c),Pp(c,c.f.next));b.state=sq;a.Ta(new _.F(_.ac,{detail:null}))};
|
|
264
|
-
Xq=function(a,b,c){const d=b.
|
|
264
|
+
Xq=function(a,b,c){const d=b.cc;a.g.info(`Playout limit for ${b.ca} is `+`${d} s`);b=c[c.length-1].nb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.nb-f.duration<=d);e.forEach(f=>{f.Va.a=e.length});a=e[e.length-1];c=d-(a.nb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Aa=mf:a.transition.fe={position:c,itemId:mf,W:null};a.maxDuration=c;return e};
|
|
265
265
|
Zq=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
|
|
266
266
|
cr=function(a){a.a.on(window,"offline",()=>{$q(a,!1)});a.a.on(window,"online",()=>{a.f||ar(a)});a.a.on(a.m,If,()=>br(a));a.a.on(a.m,"suspend",()=>br(a));a.a.on(a.m,_.yg,()=>br(a));a.a.on(a.m,_.bf,()=>{a.f||ar(a)});a.a.on(a.m,_.nf,()=>{a.f||ar(a)});a.a.on(a.m,_.Kf,()=>{switch(a.m.getState()){case _.Po:br(a);break;default:br(a)}})};dr=function(a){a.h&&(a.h.stop(),a.h=null)};br=function(a){a.f&&ar(a)};
|
|
267
|
-
er=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Aj(a.j,b.url,b.attemptParameters,b.method),$q(a,b))})};ar=function(a){a.m.getConfiguration().connectivityCheck&&(dr(a),a.h=(new _.rk(()=>er(a))).ka(5))};$q=function(a,b){dr(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.F(Je,{online:a.f})))};gr=function(){for(let a=0;a<fr.length;++a)fr[a].
|
|
268
|
-
_.hr=function(a){var b=b||0;a={priority:b,
|
|
267
|
+
er=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Aj(a.j,b.url,b.attemptParameters,b.method),$q(a,b))})};ar=function(a){a.m.getConfiguration().connectivityCheck&&(dr(a),a.h=(new _.rk(()=>er(a))).ka(5))};$q=function(a,b){dr(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.F(Je,{online:a.f})))};gr=function(){for(let a=0;a<fr.length;++a)fr[a].Hc()};
|
|
268
|
+
_.hr=function(a){var b=b||0;a={priority:b,Hc:a};for(let c=0;c<fr.length;c++)if(fr[c].priority<b){fr.splice(c,0,a);return}fr.push(a)};ir=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
|
|
269
269
|
kr=function(a){var b=jr;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.Yi(d),n=_.Jl(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.ji("Signature Verification failed",cg))}).catch(g)}else f()})};
|
|
270
|
-
mr=function(a){if(!a.a){var b=a.f.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new lr(b[0],b[1],b[2]);a.a=b}return a.a};nr=function(a){return _.x(function*(){var b=mr(a);try{yield kr(b)}catch(c){if(c&&c.code===cg)throw c;{b=window.location.href;const d=new _.mi(b);b=d.
|
|
270
|
+
mr=function(a){if(!a.a){var b=a.f.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new lr(b[0],b[1],b[2]);a.a=b}return a.a};nr=function(a){return _.x(function*(){var b=mr(a);try{yield kr(b)}catch(c){if(c&&c.code===cg)throw c;{b=window.location.href;const d=new _.mi(b);b=d.xb||d.Xa?d:new _.mi("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Xa))throw c;}})};
|
|
271
271
|
or=function(a){switch((a.ga[0]||{src:"",type:""}).type){case _.tc:a="dash";break;case _.yc:a="ss";break;case _.kl:a="hls";break;case _.pg:a="mp4";break;default:a=""}return a};pr=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};qr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
|
|
272
272
|
rr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};sr=function(a){a=a.drmInfo;return(new _.mi(a&&a.licenseServerUri||"")).Xa};tr=function(a){const b=a.configuration;let c="no";b.drm&&!_.eh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Nd)||sr(a).endsWith("drmtoday.com"))&&(c=Nd);return c};ur=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.td:b="wv";break;case _.rd:b="pr";break;case _.pd:b="fps"}return b};
|
|
273
273
|
vr=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};wr=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ha:case Fa:b="L1";break;case Ga:b="L2";break;case _.nb:case _.mb:b="L3"}return b};
|
|
274
|
-
Ar=function(a,b){const c="ie"===_.Tk().browser;var d=b.configuration;const e=[...Array.from(_.vl.keys()),...b.
|
|
274
|
+
Ar=function(a,b){const c="ie"===_.Tk().browser;var d=b.configuration;const e=[...Array.from(_.vl.keys()),...b.wg];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":pr(d),"CL-ASSET-ID":qr(d),"CL-SESSION-ID":rr(d),"CL-PLAYBACK-TYPE":b.isLive?xr:yr,"CL-CONTENT-TYPE":or(b),"CL-PLUGINS":e.join(" "),"CL-DRM":tr(b),"CL-DRM-CDM":ur(b),"CL-DRM-SEC-LEVEL":wr(b),"CL-DRM-OFFLINE":vr(b),"CL-DRM-IP":sr(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.mj(["https://downloads.castlabs.com/r/register/"]);
|
|
275
275
|
d.method="GET";d.headers=b;return(new _.zr).fetch(d).T.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=mr(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="Castlabs Player license is invalid";if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";
|
|
276
276
|
break;default:g=Promise.resolve();break a}a.g.error(La+k);g=Promise.reject(new _.I(_.G,7,g,k))}}return g})};Er=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=Br(c[e]);Object.keys(Cr).includes(f)&&(d[Cr[f]]=g)}return d}).filter(c=>_.Zg(c));return 0<b.length?b:null}catch(b){return Dr.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
|
|
277
277
|
Br=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.ji("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.ji(`Parsing CMSD, not recognized value type of ${a}`);};
|
|
278
|
-
Gr=function(a){return b=>{{var c=b.headers;let e=b=null;var d=ih(c,"cmsd-dynamic");c=ih(c,"cmsd-static");d&&(b=Er(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Br(f[c]);Object.keys(Fr).includes(g)&&(d[Fr[g]]=h)}e=_.Zg(d)?d:null}catch(f){Dr.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.F("cmsd-event",{
|
|
279
|
-
Kr=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.zi(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new Jr;a.h.
|
|
278
|
+
Gr=function(a){return b=>{{var c=b.headers;let e=b=null;var d=ih(c,"cmsd-dynamic");c=ih(c,"cmsd-static");d&&(b=Er(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Br(f[c]);Object.keys(Fr).includes(g)&&(d[Fr[g]]=h)}e=_.Zg(d)?d:null}catch(f){Dr.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.F("cmsd-event",{aj:b,mj:e}))}}};_.Ir=function(a){a&&(0<=Hr.indexOf(a)||Hr.push(a))};
|
|
279
|
+
Kr=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.zi(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new Jr;a.h.o(a.a,a.A,b)}};Mr=function(a,b){a.F=new Lr(b);nr(a.F).catch(c=>{setTimeout(()=>{a.g.error(La+c);a.trigger(new _.F(_.q,{detail:new _.I(_.G,7,7101)}));a.destroy()},1E3)})};Or=function(a,b){a.X=b;for(const c of a.X)(b=c.id())&&(a.K[b]=c);_.Nr(a,"onPlayerCreated")};
|
|
280
280
|
_.Pr=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
|
|
281
281
|
Qr=function(a,b){_.x(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new Lr(a.f.license));try{a.g.debug("Verifying license remotely"),yield Ar(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(ir,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Nr=function(a,b,...c){if(!a.ba)return Promise.resolve();const d=a.X.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
|
|
282
282
|
Rr=function(a){return _.x(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.da.off(document,wg);a.trigger(new _.F(_.sf));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Kf,d=>{b=d});return _.Nr(a,_.He).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
|
|
@@ -285,20 +285,20 @@ Vr=function(a,b,c){if(a.M===_.bb)b=Tr(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):
|
|
|
285
285
|
null;if(!b)throw new _.I(_.G,7,7003,"No player factory compatible with given sources found!");c=b.cb;a=c.create();b={cb:c,player:a,sourceIndex:b.sourceIndex}}else b={cb:a.A,player:a.a,sourceIndex:0};return b};
|
|
286
286
|
_.$r=function(a,b,c){return _.x(function*(){if(a.P)throw new _.I(_.G,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.G,7,7E3,"No surface associated with this player!");_.vn(Xe);yield a.release();var d=c||_.Zo(b);if(!b||0===d.length)throw new _.I(_.G,7,7003,Wa);a.fa=d;a.f=_.tl(a.C,b,{source:d});a.R=!1;d=Vr(a,d,a.f);_.Pr(a,d.player,d.cb);Wr(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);Xr(a);a.a&&a.a.setCdnErrorCallback(a.L);Yr(a,a.f);Zr(a);if(a.f.pauseWhenInBackground)a.da.on(document,
|
|
287
287
|
wg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Cl(a);yield _.Nr(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.vn(We);_.xn("player.beforeLoad",Xe,We)})};_.as=function(a){return _.x(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.F(ne));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
|
|
288
|
-
_.cs=function(a){return _.x(function*(){_.vn(Te);Qr(a,{configuration:a.getConfiguration(),ga:a
|
|
289
|
-
Wr=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=Zq()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};Xr=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.
|
|
288
|
+
_.cs=function(a){return _.x(function*(){_.vn(Te);Qr(a,{configuration:a.getConfiguration(),ga:a.cg(),drmInfo:a.getDrmInfo(),wg:Object.keys(a.K),isLive:a.isLive()});bs(a);Dl();yield _.Nr(a,_.Ee);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.vn(Se);_.xn("player.afterLoad",Te,Se)})};ds=function(a){return _.x(function*(){if(a.a){var b=a.a;b.Ig?(a.trigger(new _.F(ne)),yield b.Ig(),yield _.cs(a)):a.g.warn(ib)}else a.g.warn(eb)})};
|
|
289
|
+
Wr=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=Zq()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};Xr=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.He&&a.Nc&&(yield a.Nc(b))}))};Yr=function(a,b){if(b=np(a,b))a.h=b.create(a)};Zr=function(a){a.f.cmsd.enabled&&(a.B=new es(a),a.a.setCmsdManager(a.B))};
|
|
290
290
|
fs=function(a){const b=_.$h(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ma().filter(f=>c?f.kind===_.Ud:f.kind!==_.Ud);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().qa();e&&e.language?(e=_.Bi(e.language||""),b.push(e)):(e=a.getTrackManager().Ea())&&e.language&&(e=_.Bi(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
|
|
291
291
|
{const g=_.Bi(f);if(f=d.find(h=>{h=_.Bi(h.language||"");return _.Ci(h,g)}))return a.getTrackManager().Sa(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};bs=function(a){_.x(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);fs(a)})};gs=function(a){a.J.forEach(b=>b());a.J=[]};
|
|
292
292
|
js=function(a,b){return _.x(function*(){try{_.vn(af);a.M=_.bb;a.ba=!1;const c=b.slice(1).map(d=>({config:d,ga:_.Zo(d)}));yield _.$r(a,b[0]);c.forEach(d=>{hs(a,d.config,d.ga)});a.trigger(new _.F(ne));yield a.a.setupPlaylist(b);yield _.cs(a);c.forEach(d=>{is(a,d.config,d.ga)});_.vn($e);_.xn("player.setupPlaylist",af,$e)}catch(c){if(a.l)throw a.g.info(Ma),new _.I(_.G,7,7E3);throw c;}})};
|
|
293
293
|
ks=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.yf,c);a.J.push(()=>{a.removeEventListener(_.yf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.Zf,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.F(_.xf)),a.pause())};a.addEventListener(_.Zf,e);a.J.push(()=>{a.removeEventListener(_.Zf,e)})}};
|
|
294
294
|
ls=function(a,b){return _.x(function*(){try{_.vn(Ve);const c=_.Zo(b);hs(a,b,c);yield a.a.appendLoad(b);is(a,b,c);_.vn(Ue);_.xn("player.appendLoad",Ve,Ue)}catch(c){if(a.l)throw a.g.info(Ma),new _.I(_.G,7,7E3,{id:b.id});throw c;}})};
|
|
295
|
-
hs=function(a,b,c){if(0===c.length)throw new _.I(_.G,7,7003,{message:Wa,id:b.id});if(1<c.length)throw new _.I(_.G,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.I(_.G,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};is=function(a,b,c){Qr(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),
|
|
295
|
+
hs=function(a,b,c){if(0===c.length)throw new _.I(_.G,7,7003,{message:Wa,id:b.id});if(1<c.length)throw new _.I(_.G,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.I(_.G,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};is=function(a,b,c){Qr(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),wg:Object.keys(a.K),isLive:c[0].isLive})};
|
|
296
296
|
ms=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add($c);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Cd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
|
|
297
297
|
ns=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(ad)):(a.g.info(`Hide video element .${b}`),d.classList.remove(ad)),a.w&&a.w(d,c))};qs=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=os;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();ns(a,c,!0);yield c.load(b.config);ps(a,b);b.config.autoplay||(yield c.play())})};
|
|
298
298
|
us=function(a){_.x(function*(){if(0===a.a)yield rs(a);else if(a.a===a.h.length-1)yield ss(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>ts(a,c)))}})};
|
|
299
299
|
vs=function(a,b){return _.x(function*(){if(b.player){if(b.state===kf){a.g.info(Db);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=os;ns(a,b.player,!0);b.state===jf?(_.vn(ff),a.ja.preloadMedia?yield b.player.play():yield ds(b.player),_.vn(ef),_.xn("playlist.next",ff,ef)):b.state===hf&&(yield b.player.load(b.config));ps(a,b);b.config.autoplay||(yield b.player.play())}})};
|
|
300
300
|
ys=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();ns(a,b.player,!1);yield ws(a,b);b.player=null;b.videoEl=null;b.role=xs})};As=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>zs(a,b)))};Bs=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.ja.anchorId);b&&(b.classList.remove($c),b.innerHTML="")})};
|
|
301
|
-
zs=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield ws(a,c)),a.l.delete(b))})};ws=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};ps=function(a,b){if(a.ja.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.
|
|
301
|
+
zs=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield ws(a,c)),a.l.delete(b))})};ws=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};ps=function(a,b){if(a.ja.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.ug()};b.player.on(_.Sd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Sd,c)})}};
|
|
302
302
|
ts=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=xs;d.state=kf;a.trigger(new _.F(fg));try{a.l.set(b,d),a.ja.preloadMedia?(d.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=jf,a.trigger(new _.F(fg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=gf):
|
|
303
303
|
(a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.F(_.q,{detail:e})),d.state=hf),a.trigger(new _.F(fg))}})};rs=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield ts(a,b)})};ss=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield ts(a,b)})};
|
|
304
304
|
_.Ds=function(a){if(Cs.has(a))return Cs.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Cs.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Cs.set(a,b),b):!1};Hs=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.w,_.p));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
|
|
@@ -320,9 +320,9 @@ ht=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=kt(a);if(a.a+
|
|
|
320
320
|
kt=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
|
|
321
321
|
nt=function(a){a.h=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=lt(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*lt(e.request.fuzzFactor,.5));a.f*=lt(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;mt(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.I(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
|
|
322
322
|
let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.T}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.I){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return nt(a);g&&e.a(_.G);a.w.reject(e)}else a.w.reject(e)})};mt=function(a,b,c){a.o=setTimeout(b,c)};lt=function(a,b){return null===a||void 0===a?b:a};
|
|
323
|
-
rt=function(a){var b=new ot;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new pt,d={
|
|
324
|
-
qt=function(a,b,c,d){return _.x(function*(){const e=new Ts,f=Us(e);try{const g=yield st(a,c),h=kj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Ss(f),request:b};if(!nj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Ss(e),pj(k);const l=g.headers.get(sa);rj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),r=new tt(m,!b.disableMergedFragments);k.data=yield jt(r,n,(u,v)=>{if(d
|
|
325
|
-
v&&v.data&&(sj(b,v.data.byteLength,Ss(f)),f.a=Rs());return b.onFragment&&v?b.rateLimitBps?tj(b.rateLimitBps,Ss(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),r=yield ct(new ut(m),n,b);b.rateLimitBps&&(yield tj(b.rateLimitBps,Ss(e),r.byteLength));k.data=r}if(d
|
|
323
|
+
rt=function(a){var b=new ot;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new pt,d={bd:!1,Gg:!1};b={T:qt(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.bd||(d.bd=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Gg=!0;c.abort()},a);b.T=b.T.finally(()=>{window.clearTimeout(e)})}return b};
|
|
324
|
+
qt=function(a,b,c,d){return _.x(function*(){const e=new Ts,f=Us(e);try{const g=yield st(a,c),h=kj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Ss(f),request:b};if(!nj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Ss(e),pj(k);const l=g.headers.get(sa);rj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),r=new tt(m,!b.disableMergedFragments);k.data=yield jt(r,n,(u,v)=>{if(d.bd)return null;
|
|
325
|
+
v&&v.data&&(sj(b,v.data.byteLength,Ss(f)),f.a=Rs());return b.onFragment&&v?b.rateLimitBps?tj(b.rateLimitBps,Ss(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),r=yield ct(new ut(m),n,b);b.rateLimitBps&&(yield tj(b.rateLimitBps,Ss(e),r.byteLength));k.data=r}if(d.bd)throw Error("Request was aborted");k.timeMs=Ss(e);return oj(k)}catch(g){if(d.bd)throw new _.I(1,1,7001,{url:a,request:b});if(d.Gg)throw new _.I(1,1,1003,{url:a,request:b});if(g&&
|
|
326
326
|
1001===g.code)throw g;_.rh("Error while fetching data:",g);throw new _.I(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};wt=function(a){try{const b=a.uris[a.uriIndex],c=_.vt(b);return{T:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{T:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
|
|
327
327
|
_.vt=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.rh("Bad data URI, failed to parse scheme"),new _.I(_.G,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.rh("Bad data URI, failed to extract encoding and MIME type"),new _.I(_.G,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.Jl(a).buffer:_.Yi(a).buffer,contentType:c}};
|
|
328
328
|
_.yt=function(a,b){a=_.mk(_.nk(a),_.ok(a));_.xt[a]=b};_.zt=function(a){a=_.mk(_.nk(a),_.ok(a));return _.xt[a]||null};_.At=function(a){a=_.mk(_.nk(a),_.ok(a));delete _.xt[a]};_.Ft=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Bt:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Ct:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Dt:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Et:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Be}};_.Mg=[];
|
|
@@ -330,24 +330,24 @@ Qg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&nu
|
|
|
330
330
|
Sg("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=Qg.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
|
|
331
331
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Ce:var h=null!=g;break a;case _.Yd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
332
332
|
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Yd?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
|
|
333
|
-
g.
|
|
334
|
-
l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Pg(g),m=l.next();!m.done;m=l.next())d(m.value).
|
|
333
|
+
g.Ld(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(r,u){return typeof r==_.Yd?function(v){try{l(r(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(r,u){l=r;m=u});this.Ld(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Ld=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
|
|
334
|
+
l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Pg(g),m=l.next();!m.done;m=l.next())d(m.value).Ld(h,k)})};b.all=function(g){var h=Pg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){r[v]=y;u--;0==u&&l(r)}}var r=[],u=0;do r.push(void 0),u++,d(k.value).Ld(n(r.length-1),m),k=h.next();while(!k.done)})};return b});var Ug=this||self;
|
|
335
335
|
Ug.a=!0;_.z("clpp.utils.obj.cloneItem",_.Xg);_.z("clpp.utils.obj.merge",_.Wg);var mh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",mh);var kh=0,jh={},Gt=[];_.z("clpp.log.getLoggers",function(){return _.Xg(jh)});_.z("clpp.log.addInterceptor",function(a){a&&Gt.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=Gt.indexOf(a),0<=a&&Gt.splice(a,1))});_.z("clpp.log.getTagLevel",lh);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=jh[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.ch(b)&&(b=nh(b)),jh[a]=b)});
|
|
336
336
|
_.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.ch(a)&&(a=nh(a));kh=a});_.z("clpp.log.getLogLevel",function(){return kh});
|
|
337
337
|
_.S=class{constructor(a){(this.tag=a)&&void 0===jh[a]&&(jh[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=lh(this.tag);if(0<=d){if(d<c)return}else if(kh<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
|
|
338
|
-
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Gt)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}
|
|
339
|
-
this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.z("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.
|
|
338
|
+
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Gt)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}jh(a){return a?
|
|
339
|
+
this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.z("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.jh;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var oh=new _.S("clpp");_.z("clpp.log.info",_.ph);_.z("clpp.log.debug",_.qh);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.rh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Ur;Ur=class{constructor(a,b){this.cb=a;this.sourceIndex=b}};_.th=new _.S("clpp.players");_.sh={};_.z("clpp.events.ERROR",_.q);_.z("clpp.events.LOADEDMETADATA",_.me);_.z("clpp.events.BUFFERING_ENDED",_.Mc);_.z("clpp.events.BUFFERING_STARTED",_.Nc);_.z("clpp.events.STATE_CHANGED",_.Kf);_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Ic);_.z("clpp.events.TEXT_TRACK_CHANGED",_.Uf);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.rg);_.z("clpp.events.BITRATE_CHANGED",_.Kc);_.z("clpp.events.TRACKS_ADDED",_.$f);_.z("clpp.events.LOAD_START",ne);_.z("clpp.events.RELEASING",_.sf);_.z("clpp.events.RELEASED",qf);
|
|
340
340
|
_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.qg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Hc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_CREATED",Kd);_.z("clpp.events.DRM_SESSION_UPDATE",_.Md);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Ld);_.z("clpp.events.DRM_RENEWAL_STARTED",Jd);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Hd);_.z("clpp.events.DRM_LICENSE_REQUESTED",Id);
|
|
341
|
-
_.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Jc);_.z("clpp.events.PLAY",_.Re);_.z("clpp.events.SEEKING",_.Cf);_.z("clpp.events.SEEKED",_.Bf);_.z("clpp.events.USER_SEEKING",_.jg);_.z("clpp.events.USER_SEEKED",_.ig);_.Ro={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Ro);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.oc);_.z("clpp.events.AD_LOADED",_.ac);_.z("clpp.events.AD_BREAK_STARTED",_.Rb);_.z("clpp.events.AD_STARTED",_.
|
|
342
|
-
_.z("clpp.events.AD_FIRST_QUARTILE",_.Wb);_.z("clpp.events.AD_MIDPOINT",_.bc);_.z("clpp.events.AD_THIRD_QUARTILE",_.mc);_.z("clpp.events.AD_PAUSED",_.cc);_.z("clpp.events.AD_RESUMED",_.ec);_.z("clpp.events.AD_SKIPPED",_.
|
|
341
|
+
_.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Jc);_.z("clpp.events.PLAY",_.Re);_.z("clpp.events.SEEKING",_.Cf);_.z("clpp.events.SEEKED",_.Bf);_.z("clpp.events.USER_SEEKING",_.jg);_.z("clpp.events.USER_SEEKED",_.ig);_.Ro={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Ro);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.oc);_.z("clpp.events.AD_LOADED",_.ac);_.z("clpp.events.AD_BREAK_STARTED",_.Rb);_.z("clpp.events.AD_STARTED",_.jc);_.z("clpp.events.AD_BUFFERING",_.Tb);_.z("clpp.events.AD_PROGRESS",_.dc);
|
|
342
|
+
_.z("clpp.events.AD_FIRST_QUARTILE",_.Wb);_.z("clpp.events.AD_MIDPOINT",_.bc);_.z("clpp.events.AD_THIRD_QUARTILE",_.mc);_.z("clpp.events.AD_PAUSED",_.cc);_.z("clpp.events.AD_RESUMED",_.ec);_.z("clpp.events.AD_SKIPPED",_.fc);_.z("clpp.events.AD_CLICKED",_.Ub);_.z("clpp.events.AD_IMPRESSION",_.$b);_.z("clpp.events.AD_COMPLETED",_.Vb);_.z("clpp.events.AD_STOPPED",_.lc);_.z("clpp.events.AD_BREAK_STOPPED",_.Sb);_.z("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Xb);
|
|
343
343
|
_.z("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Yb);_.z("clpp.events.AD_HLS_RESOLVED",Zb);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Ef);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Ff);_.z("clpp.events.CASTING_STARTED",_.Qc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Rc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.rc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.qc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.pc);_.z("clpp.events.TIMELINE_CUE_ADDED",_.Vf);
|
|
344
344
|
_.z("clpp.events.TIMELINE_CUE_ENTER",_.Wf);_.z("clpp.events.TIMELINE_CUE_EXIT",_.Xf);_.z("clpp.events.TIMELINE_CUES_CHANGED",_.Yf);_.z("clpp.events.MPD_TYPE_CHANGED",_.ze);_.z("clpp.events.LIVE_TURNED_STATIC",_.je);_.z("clpp.events.VIMOND_RESPONSE",_.vg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.cf);_.z("clpp.events.PLAYLIST_MODIFIED",_.df);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Af);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.yf);_.z("clpp.events.SC_PLAYLIST_ENDED",_.xf);
|
|
345
|
-
_.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.zf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Sc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Je);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.Kg);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Jg);_.z("clpp.events.CONTENT_STEERING_CHANGE",_.vd);_.z("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.wd);_.Ht=class{constructor(a){this.f=a;this.a=null}ka(a){return wh(this,a,!1)}
|
|
346
|
-
{a.off(_.Kf,b);a.off(_.Zf,c);a.on(_.Sd,d)})}}clear(){this.
|
|
347
|
-
Math.round(c.
|
|
348
|
-
(1===g?b.Ra.info("Secondary caught up."):1>g?b.Ra.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Ra.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.z(bd,It);It.prototype.clear=It.prototype.clear;It.prototype.addMainPlayer=It.prototype.
|
|
345
|
+
_.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.zf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Sc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Je);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.Kg);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Jg);_.z("clpp.events.CONTENT_STEERING_CHANGE",_.vd);_.z("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.wd);_.Ht=class{constructor(a){this.f=a;this.a=null}ka(a){return wh(this,a,!1)}Bb(a){return wh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.rk=class{constructor(a){this.f=a;this.a=null}kf(){this.stop();this.f();return this}ka(a){this.stop();this.a=(new _.Ht(()=>{this.f()})).ka(a);return this}Bb(a){this.stop();this.a=(new _.Ht(()=>{this.f()})).Bb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.rk);_.rk.prototype.stop=_.rk.prototype.stop;_.rk.prototype.tickEvery=_.rk.prototype.Bb;_.rk.prototype.tickAfter=_.rk.prototype.ka;_.rk.prototype.tickNow=_.rk.prototype.kf;var It=class{constructor(){this.zc=null;this.f=[];this.h=[];this.Ra=new _.S(bd);this.a=null;this.j=!1}load(a){const b=this;return _.x(function*(){b.zc?yield Ah(b,c=>_.x(function*(){yield c.load(a)})):b.Ra.warn("No main player, cannot load.")})}zi(a){this.j=a;this.Ra.info("Looping set to",a)}Vg(a){this.f.push(a)}Ug(a){if(this.zc)this.Ra.warn("Main player already set.");else{this.zc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Kf,b);a.on(_.Zf,c);a.on(_.Sd,d);this.h.push(()=>
|
|
346
|
+
{a.off(_.Kf,b);a.off(_.Zf,c);a.on(_.Sd,d)})}}clear(){this.zc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.x(function*(){a.j&&(a.Ra.info("Looping playback."),yield Ah(a,b=>_.x(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,a===_.Wo?(this.Ra.info("Mirroring playing."),Bh(this,b=>_.x(function*(){yield b.play()}))):[_.Vo,_.Po,_.Mo].includes(a)&&(this.Ra.info("Mirroring paused/buffering/error."),Bh(this,b=>{const c=this;return _.x(function*(){var d=
|
|
347
|
+
Math.round(c.zc.getPosition())-.1;yield b.seek(d);yield xh(.2);d=b.getState();if(d===_.Wo||d===_.Po)yield b.pause()})})))}w(){this.a||Bh(this,a=>{const b=this;return _.x(function*(){a.isPaused()&&(yield a.play());const c=b.zc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();if(!(a.getState()!==_.Wo||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Ra.info(`Delta ${d.toFixed(1)} s.`):
|
|
348
|
+
(1===g?b.Ra.info("Secondary caught up."):1>g?b.Ra.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Ra.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.z(bd,It);It.prototype.clear=It.prototype.clear;It.prototype.addMainPlayer=It.prototype.Ug;It.prototype.addSecondaryPlayer=It.prototype.Vg;It.prototype.setLoop=It.prototype.zi;It.prototype.load=It.prototype.load;_.Jt=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var Kt,Lt;Kt=class{constructor(a,b,c,d){this.f=a;this.Hc=b;this.a=c;this.mi=!!d}Ta(a){try{this.Hc.handleEvent?this.Hc.handleEvent(a):this.Hc.call(this.a,a)}catch(b){_.rh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
|
|
349
349
|
_.F=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
|
|
350
|
-
Lt=class{constructor(a){this.a=new _.Jt;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Ta(a),b[c].
|
|
350
|
+
Lt=class{constructor(a){this.a=new _.Jt;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Ta(a),b[c].mi&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Kt(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Kt(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].Hc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Mt;_.Nt=class{constructor(){this.a=new _.Jt}release(){_.Dh(this)}on(a,b,c,d=!1){a=new Mt(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!==a||c!==f.a&&c||(Ch(f),this.a.remove(b,f))}}};Mt=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var Ot=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Nt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.x(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.Vt=class{constructor(a,b,c,d){d=void 0===d?_.Pt:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Qt;this.writingMode=_.Rt;this.lineInterpretation=_.St;this.line=null;this.lineAlign=_.Tt;this.direction=Ut;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Oc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
|
|
351
351
|
a.payloadType}};_.z("clpp.text.Cue",_.Vt);_.Vt.positionAlign={LEFT:_.he,RIGHT:_.ie,CENTER:_.Uc,AUTO:"auto"};_.Pt="text";_.Vt.payloadType={TEXT:_.Pt,VTT_XML:_.xg,TTML_XML:_.bg};_.Qt=_.Uc;_.Wt={LEFT:_.ee,RIGHT:_.wf,CENTER:_.Qt,START:_.Jf,END:_.Rd};_.Vt.textAlign=_.Wt;var Ut="ltr";_.Vt.direction={HORIZONTAL_LEFT_TO_RIGHT:Ut,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Rt="horizontal-tb";_.Vt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Rt,VERTICAL_LEFT_TO_RIGHT:_.mg,VERTICAL_RIGHT_TO_LEFT:_.ng};_.St=0;
|
|
352
352
|
_.Vt.lineInterpretation={LINE_NUMBER:_.St,PERCENTAGE:1};_.Tt=_.Jf;_.Xt={CENTER:_.Uc,START:_.Tt,END:_.Rd};_.Vt.lineAlign=_.Xt;_.$t=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Yt;this.scroll=Zt;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.$t);_.Yt=1;_.$t.units={PX:0,PERCENTAGE:_.Yt,LINES:2};var Zt="";
|
|
353
353
|
_.$t.scrollMode={NONE:Zt,UP:"up"};_.$t.displayAlign={BEFORE:"flex-end",CENTER:_.Uc,AFTER:"flex-start"};_.$t.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.nd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var au=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Nt;this.j=!1;this.g=new _.S("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.nc,b=>fi(this,b)),this.a.on(this.f,Wc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Df&&(d.mode=
|
|
@@ -363,11 +363,11 @@ HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEAT
|
|
|
363
363
|
NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,
|
|
364
364
|
INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,
|
|
365
365
|
YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,
|
|
366
|
-
SESSIONS_INVALID_CONFIGURATION:15E3};_.ji=class extends Error{constructor(a,b){super(a);this.code=b}};var ri=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;_.Lg=_.mi.prototype;_.Lg.
|
|
367
|
-
_.Lg.resolve=function(a){var b=new _.mi(this);"data"===b.
|
|
368
|
-
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Fa=d:c=""!==a.a.toString();c?_.pi(b,qi(a.a)):c=!!a.
|
|
366
|
+
SESSIONS_INVALID_CONFIGURATION:15E3};_.ji=class extends Error{constructor(a,b){super(a);this.code=b}};var ri=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;_.Lg=_.mi.prototype;_.Lg.xb="";_.Lg.Dc="";_.Lg.Xa="";_.Lg.Xc=null;_.Lg.Fa="";_.Lg.tc="";_.Lg.toString=function(){var a=[],b=this.xb;b&&a.push(ui(b,bu,!0),":");if(b=this.Xa){a.push("//");var c=this.Dc;c&&a.push(ui(c,bu,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Xc;null!=b&&a.push(":",String(b))}if(b=this.Fa)this.Xa&&"/"!=b.charAt(0)&&a.push("/"),a.push(ui(b,"/"==b.charAt(0)?cu:du,!0));(b=this.a.toString())&&a.push("?",b);(b=this.tc)&&a.push("#",ui(b,eu));return a.join("")};
|
|
367
|
+
_.Lg.resolve=function(a){var b=new _.mi(this);"data"===b.xb&&(b=new _.mi);var c=!!a.xb;c?ni(b,a.xb):c=!!a.Dc;c?b.Dc=a.Dc:c=!!a.Xa;c?b.Xa=a.Xa:c=null!=a.Xc;var d=a.Fa;if(c)oi(b,a.Xc);else if(c=!!a.Fa){if("/"!=d.charAt(0))if(this.Xa&&!this.Fa)d="/"+d;else{var e=b.Fa.lastIndexOf("/");-1!=e&&(d=b.Fa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
|
|
368
|
+
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Fa=d:c=""!==a.a.toString();c?_.pi(b,qi(a.a)):c=!!a.tc;c&&(b.tc=a.tc);return b};var bu=/[#\/\?@]/g,du=/[#\?:]/g,cu=/[#\?]/g,vi=/[#\?@]/g,eu=/#/g;_.ti.prototype.a=null;_.ti.prototype.h=null;
|
|
369
369
|
_.ti.prototype.add=function(a,b){if(!this.a&&(this.a={},this.h=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.h&&this.h++;return this};
|
|
370
|
-
_.ti.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var xi;_.H="text";_.fu=1/15;xi={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};xi[_.H]=[/^vtt$/,/^wvtt/,/^stpp/];var gu;gu={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Yj=(a,b)=>{const c=gu[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.H?"":null};_.hu={text:{mp4:uc,m4s:uc,m4i:uc,cmft:uc,vtt:_.Sf,ttml:_.xc},video:{mp4:_.pg,m4s:_.pg,m4f:_.pg,m4i:_.pg,m4v:_.pg,cmfv:_.pg,ts:_.og},audio:{mp4:_.Fc,m4s:_.Fc,m4f:_.Fc,m4i:_.Fc,m4a:_.Fc,cmfa:_.Fc,ts:_.og,aac:_.
|
|
370
|
+
_.ti.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var xi;_.H="text";_.fu=1/15;xi={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};xi[_.H]=[/^vtt$/,/^wvtt/,/^stpp/];var gu;gu={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Yj=(a,b)=>{const c=gu[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.H?"":null};_.hu={text:{mp4:uc,m4s:uc,m4i:uc,cmft:uc,vtt:_.Sf,ttml:_.xc},video:{mp4:_.pg,m4s:_.pg,m4f:_.pg,m4i:_.pg,m4v:_.pg,cmfv:_.pg,ts:_.og},audio:{mp4:_.Fc,m4s:_.Fc,m4f:_.Fc,m4i:_.Fc,m4a:_.Fc,cmfa:_.Fc,ts:_.og,aac:_.Ac,ec3:_.Ec,ac3:_.Dc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.bk=(a,b,c)=>a.map(d=>{d=_.iu(d)||"";return d=(d=_.hu[b][d])?d:b===_.H?c&&"vtt"!==c?uc:_.Sf:null}).filter(Boolean)[0]||null;
|
|
371
371
|
_.iu=a=>{a=(new _.mi(a)).Fa.split(".");return 1>=a.length?null:a.pop()};_.Hi=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
|
|
372
372
|
_.Gi=class{constructor(a,b){this.name=a;this.value=b}};var Ai=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
373
373
|
"cs"],["dan","da"],["deu","de"],[_.Cd,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
@@ -376,46 +376,46 @@ _.Gi=class{constructor(a,b){this.name=a;this.value=b}};var Ai=new Map([["aar","a
|
|
|
376
376
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
377
377
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.ju=new _.S("clpp.hls.Utils");_.Fi=class{constructor(a){this.f=a;this.a=0}};var ku=class{};_.z("clpp.utils.BufferUtils",ku);ku.toArrayBuffer=Si;ku.toDataView=_.Ri;ku.toInt32Array=_.Qi;ku.toUint32Array=Pi;ku.toUint16Array=Oi;ku.toUint8Array=_.K;ku.equal=Mi;var Vi=new _.S("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Ui);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Xi);_.z("clpp.utils.strings.toUtf8",_.Yi);_.z("clpp.utils.strings.toUtf16",_.Zi);_.z("clpp.utils.strings.toByteArray",_.$i);_.z("clpp.utils.strings.startsWith",_.aj);_.z("clpp.utils.strings.endsWith",_.bj);_.z("clpp.utils.strings.bitrateToString",_.ej);
|
|
378
378
|
_.z("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
|
|
379
|
-
_.z("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var fj=document.createElement("span");var hj=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",hj);_.z("clpp.net.makeRequest",_.mj);_.lj=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.lj,CONTENT_STEERING:7});_.bn=class{constructor(){this.
|
|
380
|
-
this.f.filter(b=>b!==a)}
|
|
379
|
+
_.z("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var fj=document.createElement("span");var hj=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",hj);_.z("clpp.net.makeRequest",_.mj);_.lj=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.lj,CONTENT_STEERING:7});_.bn=class{constructor(){this.yg=this.ne=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.ne=!0;this.value=f;d(f)};b=function(f){this.done=this.yg=!0;this.error=f;e(f)}});c.ne=!1;c.done=!1;c.yg=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.gp=class{constructor(a,b){this.T=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.lu=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.T.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.zr=class{constructor(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.lu;this.a={};this.headers=new Map;this.l=0;this.a.data=wt;!window.fetch||!window.AbortController||_.vk(6)||_.yk()&&68<_.Tk().browserVersion.major?(this.a.http=et,this.a.https=et):(this.a.http=rt,this.a.https=rt)}Bi(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.l=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.f=[];this.h=[];return this.o.destroy()}Jd(a){this.f.push(a)}Gc(a){this.h.push(a)}me(a){this.f=
|
|
380
|
+
this.f.filter(b=>b!==a)}xd(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.w)return new mu(Promise.reject(new _.I(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;yj(this,a);b=[];for(var c of this.h)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.bn;try{for(const f of a.requestModifiers)d=
|
|
381
381
|
d.then(g=>{if(e.a)throw new _.I(_.G,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.G,1,1006,null,g);});d=d.then(f=>({request:f,plugin:zj(this,f)}));e=new mu(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.I(_.G,1,7001,g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.I&&g.data&&g.data.response){const h=f(g.data.response);
|
|
382
382
|
if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.G,1,1007,null,g);});for(const f of this.j)e.catch(g=>{g instanceof _.I&&g.data&&g.data.response||f({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.G,1,1007,null,g);});_.vj(this.o,e);c.resolve(a);return e}catch(f){return new mu(Promise.reject(f))}}};
|
|
383
|
-
_.z("clpp.net.NetworkEngine",_.zr);_.zr.prototype.fetch=_.zr.prototype.fetch;_.zr.prototype.removeResponseModifier=_.zr.prototype.
|
|
384
|
-
_.Ij=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}
|
|
383
|
+
_.z("clpp.net.NetworkEngine",_.zr);_.zr.prototype.fetch=_.zr.prototype.fetch;_.zr.prototype.removeResponseModifier=_.zr.prototype.xd;_.zr.prototype.removeRequestModifier=_.zr.prototype.me;_.zr.prototype.addResponseModifier=_.zr.prototype.Gc;_.zr.prototype.addRequestModifier=_.zr.prototype.Jd;_.zr.prototype.setRateLimit=_.zr.prototype.Bi;var Fj;
|
|
384
|
+
_.Ij=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}Oc(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&ci(this.roles,
|
|
385
385
|
a.roles)&&ci(this.accessibility,a.accessibility,Bj)}toString(){return`Track type: ${this.type} id: ${this.id}
|
|
386
|
-
renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Ij);_.Ij.prototype.toString=_.Ij.prototype.toString;_.Qj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.
|
|
386
|
+
renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Ij);_.Ij.prototype.toString=_.Ij.prototype.toString;_.Qj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Zc=this.bandwidth=this.height=this.width=null;this.a=!1}};_.z("clpp.Rendition",_.Qj);_.Hj=1;_.N=_.w;_.M=_.p;_.L="text";Fj=_.se;_.nu={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:Fj};_.Ij.Type=_.nu;_.mm=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
|
|
387
387
|
_.aj(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.z("clpp.utils.url.queryString",_.Lj);var ou=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=hi(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield Oj(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield Sj(c,d,
|
|
388
|
-
a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Uj(d);e.
|
|
389
|
-
_.z("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.ta;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.
|
|
390
|
-
_.T.prototype.setVideoRendition=_.T.prototype.jb;_.T.prototype.setTextTrack=_.T.prototype.Sa;_.T.prototype.setAudioTrack=_.T.prototype.xa;_.T.prototype.setVideoTrack=_.T.prototype.
|
|
391
|
-
_.T.prototype.getTextRendition=_.T.prototype.Qa;_.T.prototype.getAudioRendition=_.T.prototype.Ma;_.T.prototype.getVideoRendition=_.T.prototype.na;_.T.prototype.getTextTracks=_.T.prototype.ma;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.
|
|
388
|
+
a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Uj(d);e.Bc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.ck=[];_.T=class{xe(){return!0}th(a){return this.getVideoTracks().find(b=>_.eh(b,a,a&&Object.keys(a)))}ph(a){return this.getAudioTracks().find(b=>_.eh(b,a,a&&Object.keys(a)))}rh(a){return this.ma().find(b=>_.eh(b,a,a&&Object.keys(a)))}sh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.eh(b,a,a&&Object.keys(a)))}oh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.eh(b,a,a&&Object.keys(a)))}qh(a){return this.ma().flatMap(b=>b.renditions).find(b=>_.eh(b,a,a&&Object.keys(a)))}};
|
|
389
|
+
_.z("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.ta;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.qh;_.T.prototype.findAudioRendition=_.T.prototype.oh;_.T.prototype.findVideoRendition=_.T.prototype.sh;_.T.prototype.findTextTrack=_.T.prototype.rh;_.T.prototype.findAudioTrack=_.T.prototype.ph;_.T.prototype.findVideoTrack=_.T.prototype.th;_.T.prototype.setTextRendition=_.T.prototype.zb;_.T.prototype.setAudioRendition=_.T.prototype.yb;
|
|
390
|
+
_.T.prototype.setVideoRendition=_.T.prototype.jb;_.T.prototype.setTextTrack=_.T.prototype.Sa;_.T.prototype.setAudioTrack=_.T.prototype.xa;_.T.prototype.setVideoTrack=_.T.prototype.Ab;_.T.prototype.getTextTrack=_.T.prototype.wa;_.T.prototype.getAudioTrack=_.T.prototype.qa;_.T.prototype.getVideoTrack=_.T.prototype.Ea;_.T.prototype.getLoadingTextRendition=_.T.prototype.Gb;_.T.prototype.getLoadingAudioRendition=_.T.prototype.Fb;_.T.prototype.getLoadingVideoRendition=_.T.prototype.rb;
|
|
391
|
+
_.T.prototype.getTextRendition=_.T.prototype.Qa;_.T.prototype.getAudioRendition=_.T.prototype.Ma;_.T.prototype.getVideoRendition=_.T.prototype.na;_.T.prototype.getTextTracks=_.T.prototype.ma;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.xe;var gk=new Map,fk=1,kk=2,jk=3,ik=4;_.pu=(new Map).set(_.md,_.md).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Fg,_.Fg).set(_.Zd,_.Zd).set("channelsCount","channels");var qu=class{};_.z(ld,qu);qu.getInfo=_.Tk;
|
|
392
392
|
var qk=null,pk=null,Ik=new _.S(ld),Mk="android",Lk="ios",Rk="linux",Nk="osx",Ok="windows",Pk="tizen",Qk="webos",Kk=_.eg,Sk=_.eg,Dk={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
|
|
393
393
|
chrome:/macintosh.+?chrome\/([\d._]+)/i,firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{ie:/.+?trident\/([\d.]+)/i,edge:/.+?edge?\/([\d.]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,chrome:/.+?chrome\/([\d._]+)/i,firefox:/.+?firefox\/([\d._]+)/i,opera:/.+?opr\/([\d._]+)/i},android:{os_version:/android.+?([\d._]+)/i,chrome:/android.+?chrome\/([\d._]+)/i,firefox:/android.+?firefox\/([\d._]+)/i,opera:/android.+?opr\/([\d._]+)/i},ios:{os_version:/(?:iPad|iPhone).+?([\d._]+)/i,
|
|
394
394
|
chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,opera:/.+?opr\/([\d._]+)/i},linux:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},tizen:{os_version:/tizen.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},
|
|
395
|
-
webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Nt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.L);this.R=this.F.bind(this,_.L);this.P=this.C.bind(this,_.L);this.S=this.B.bind(this,_.N);this.X=this.F.bind(this,_.N);this.V=this.C.bind(this,_.N);this.J=this.B.bind(this,_.M);this.L=this.F.bind(this,_.M);this.K=this.C.bind(this,_.M);this.j=null}
|
|
395
|
+
webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Nt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.L);this.R=this.F.bind(this,_.L);this.P=this.C.bind(this,_.L);this.S=this.B.bind(this,_.N);this.X=this.F.bind(this,_.N);this.V=this.C.bind(this,_.N);this.J=this.B.bind(this,_.M);this.L=this.F.bind(this,_.M);this.K=this.C.bind(this,_.M);this.j=null}xe(){return!_.Fk()}B(a,
|
|
396
396
|
b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.L,g=a===_.M||e,h=b.target,k=c.h.find(n=>Uk(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Jj(a,d),m=Vk(d);if(f){if(d.kind===_.se)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(r=>Uk(l,r,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.sc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.eh(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
|
|
397
397
|
c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.Qj(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Xk(c,a,n)?yield Yk(c,l,n):Zk(c,a,n)&&(yield $k(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.F(_.$f));const r=al(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${r}`,d);c.a.set(a,l)};m?f():1===r&&
|
|
398
398
|
g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(Xa)}else c.g.warn(Ua)})}F(a,b){if(b){var c=b.track;c?a===_.L&&c.kind!==_.se&&(b=this.h.find(d=>Uk(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),bl(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(Xa)}else this.g.warn(Ua)}C(a,b){this.g.debug(a+" Track changed",b);a===_.L&&bl(this);const c=el(this,a);if(c)for(let d=0;d<c.length;++d)if(Vk(c[d])){if(b=
|
|
399
399
|
this.h.find(e=>Uk(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.M?this.m.trigger(new _.F(_.Ic)):a===_.L&&this.m.trigger(new _.F(_.Uf));break}}initialize(a){this.m=a;this.j=new ou(a.getNetworkEngine())}load(){this.A=!1;var a=dl(this,_.L);a&&(this.f.on(a,_.nc,this.M),this.f.on(a,tf,this.R),this.f.on(a,Wc,this.P));if(a=dl(this,_.M))this.f.on(a,_.nc,this.J),this.f.on(a,tf,this.L),this.f.on(a,Wc,this.K);if(a=dl(this,_.N))this.f.on(a,
|
|
400
400
|
_.nc,this.S),this.f.on(a,tf,this.X),this.f.on(a,Wc,this.V);this.f.one(this.m,Pc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return al(this,_.N)}getAudioTracks(){return al(this,_.M)}ma(){return al(this,_.L)}na(){const a=this.a.get(_.N)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
|
|
401
|
-
null}Ma(){return fl(this,_.M)}Qa(){return fl(this,_.L)}rb(){return gl(this,_.N)}
|
|
402
|
-
b.o[c]=a;il(b,a,c)}else yield jl(b,a)})}ta(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();ll(a,_.M,b.preferredAudioLanguage);if(!el(a,_.L).some(c=>Vk(c))){const c=dl(a,_.L);yield new Promise(d=>{a.f.one(c,Wc,d);(new _.rk(d)).ka(1)})}a.A||ll(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ta;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.
|
|
403
|
-
U.prototype.setAudioRendition=U.prototype.
|
|
404
|
-
U.prototype.getTextRendition=U.prototype.Qa;U.prototype.getAudioRendition=U.prototype.Ma;U.prototype.getVideoRendition=U.prototype.na;U.prototype.getTextTracks=U.prototype.ma;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.
|
|
405
|
-
1)}
|
|
406
|
-
"";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.ru);_.ru.prototype.bufferedAheadOf=_.ru.prototype.Wa;_.ru.prototype.isBuffered=_.ru.prototype.
|
|
407
|
-
_.su.prototype.off=_.su.prototype.off;_.su.prototype.one=_.su.prototype.one;_.su.prototype.on=_.su.prototype.on;_.su.prototype.removeEventListener=_.su.prototype.removeEventListener;_.su.prototype.addEventListener=_.su.prototype.addEventListener;var ml=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];_.z("clpp.version",_.ea);_.z("clpp.name",_.qa);_.kl="application/x-mpegurl";_.z("clpp.Type",{DASH:_.tc,HLS:_.kl,SMOOTH_STREAMING:_.yc,MP4:_.pg,MP3:"audio/mp3"});_.Ph="scte35";_.Qh="hls-daterange";_.z("clpp.TimelineCueType",{SCTE35:_.Ph,DASH_CALLBACK:_.Ae,HLS_DATERANGE:_.Qh,UNKNOWN:_.eg});_.z("clpp.SpeedUpMode",{DECODER:_.zd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.lf,SMOOTH:_.Hf});var tu=class{};_.z("clpp.utils.PlayerConfiguration",tu);tu.create=_.tl;var uu=["abort",Oc,Pc,Od,"emptied",Qd,_.Sd,_.q,"interruptbegin","interruptend",_.le,_.me,ne,"mozaudioavailable",_.Ne,_.Re,_.bf,_.nf,_.pf,_.Bf,_.Cf,If,"suspend",_.Zf,"volumechange",_.yg,_.zg,_.vf,Eg,Dg,Bg,Cg];_.vu=class extends _.su{constructor(a){super();this.log=new _.S(a);this.configuration=this.ia=_.rl();this.ga=this.F=null;this.
|
|
408
|
-
c!==_.q);this.
|
|
401
|
+
null}Ma(){return fl(this,_.M)}Qa(){return fl(this,_.L)}rb(){return gl(this,_.N)}Fb(){return gl(this,_.M)}Gb(){return gl(this,_.L)}Ea(){return this.a.get(_.N)||null}qa(){return this.a.get(_.M)||null}wa(){return this.a.get(_.L)||null}Ab(a){hl(this,_.N,a)}xa(a){hl(this,_.M,a)}Sa(a){hl(this,_.L,a)}jb(a){hl(this,_.N,a&&a.track)}yb(a){hl(this,_.M,a&&a.track)}zb(a){hl(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
|
|
402
|
+
b.o[c]=a;il(b,a,c)}else yield jl(b,a)})}ta(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();ll(a,_.M,b.preferredAudioLanguage);if(!el(a,_.L).some(c=>Vk(c))){const c=dl(a,_.L);yield new Promise(d=>{a.f.one(c,Wc,d);(new _.rk(d)).ka(1)})}a.A||ll(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ta;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.zb;
|
|
403
|
+
U.prototype.setAudioRendition=U.prototype.yb;U.prototype.setVideoRendition=U.prototype.jb;U.prototype.setTextTrack=U.prototype.Sa;U.prototype.setAudioTrack=U.prototype.xa;U.prototype.setVideoTrack=U.prototype.Ab;U.prototype.getTextTrack=U.prototype.wa;U.prototype.getAudioTrack=U.prototype.qa;U.prototype.getVideoTrack=U.prototype.Ea;U.prototype.getLoadingTextRendition=U.prototype.Gb;U.prototype.getLoadingAudioRendition=U.prototype.Fb;U.prototype.getLoadingVideoRendition=U.prototype.rb;
|
|
404
|
+
U.prototype.getTextRendition=U.prototype.Qa;U.prototype.getAudioRendition=U.prototype.Ma;U.prototype.getVideoRendition=U.prototype.na;U.prototype.getTextTracks=U.prototype.ma;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.xe;_.ru=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(sb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(sb);}Ob(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}La(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
|
|
405
|
+
1)}yc(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Wa(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.La(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
|
|
406
|
+
"";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.ru);_.ru.prototype.bufferedAheadOf=_.ru.prototype.Wa;_.ru.prototype.isBuffered=_.ru.prototype.yc;_.ru.prototype.bufferEnd=_.ru.prototype.La;_.ru.prototype.bufferStart=_.ru.prototype.Ob;_.ru.prototype.end=_.ru.prototype.end;_.ru.prototype.start=_.ru.prototype.start;_.su=class{constructor(){this.fd=new Lt(this);this.dd=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.fd.on(a,b,c)}one(a,b,c){return this.fd.one(a,b,c)}off(a,b){return this.fd.off(a,b)}forwardEventsTo(a){a&&(0<=this.dd.indexOf(a)||this.dd.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.dd.indexOf(a),0<=a&&this.dd.splice(a,1))}trigger(a){this.fd.trigger(a);for(const b of this.dd)b.dispatchEvent(a)}};
|
|
407
|
+
_.su.prototype.off=_.su.prototype.off;_.su.prototype.one=_.su.prototype.one;_.su.prototype.on=_.su.prototype.on;_.su.prototype.removeEventListener=_.su.prototype.removeEventListener;_.su.prototype.addEventListener=_.su.prototype.addEventListener;var ml=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];_.z("clpp.version",_.ea);_.z("clpp.name",_.qa);_.kl="application/x-mpegurl";_.z("clpp.Type",{DASH:_.tc,HLS:_.kl,SMOOTH_STREAMING:_.yc,MP4:_.pg,MP3:"audio/mp3"});_.Ph="scte35";_.Qh="hls-daterange";_.z("clpp.TimelineCueType",{SCTE35:_.Ph,DASH_CALLBACK:_.Ae,HLS_DATERANGE:_.Qh,UNKNOWN:_.eg});_.z("clpp.SpeedUpMode",{DECODER:_.zd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.lf,SMOOTH:_.Hf});var tu=class{};_.z("clpp.utils.PlayerConfiguration",tu);tu.create=_.tl;var uu=["abort",Oc,Pc,Od,"emptied",Qd,_.Sd,_.q,"interruptbegin","interruptend",_.le,_.me,ne,"mozaudioavailable",_.Ne,_.Re,_.bf,_.nf,_.pf,_.Bf,_.Cf,If,"suspend",_.Zf,"volumechange",_.yg,_.zg,_.vf,Eg,Dg,Bg,Cg];_.vu=class extends _.su{constructor(a){super();this.log=new _.S(a);this.configuration=this.ia=_.rl();this.ga=this.F=null;this.md=this.Ye=!1;this.Af=new _.S("clpp.video.events");this.jc=null;this.Ud=-1;this.Sg=this.Pg.bind(this);this.Xe=new _.zr;this.M=new _.Nt;this.Te=this.Ic=this.Nc=this.P=null}init(a,b){this.configuration=this.ia=b;this.F=a;this.log.info("Initializing Player surface");a=this.F.getMedia();this.log.info("Attaching media element listeners");for(const c of uu)this.M.on(a,c,this.Sg,
|
|
408
|
+
c!==_.q);this.jc||(this.jc=this.Jg());this.jc.initialize(this);this.F.showMediaElement()}release(){this.P&&(this.P.destroy(),this.P=null);return Promise.resolve()}destroy(){this.M.release();return this.Xe.release()}canPlay(a,b){return _.sh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.Za)}appendLoad(){return Promise.reject(_.Za)}seekWith(){return Promise.reject(_.Za)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ga)return Promise.reject("No sources specified yet. You need to load content before calling play.");
|
|
409
409
|
const a=this.F.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};nl(c)?(this.trigger(new _.F(_.Jc)),this.log.warn(_.ja)):c.name===$a&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ga?new Promise((a,b)=>{const c=this.getState();if(c!==_.Po&&c!==_.Lo&&c!==_.Wo&&c!==_.Vo)b(new _.I(_.G,7,3201,"The player state does not allow pause."));
|
|
410
|
-
else if(this.F.getMedia().pause(),this.getState()===_.Wo)this.M.one(this,_.Kf,()=>{a()});else a()}):Promise.reject(new _.I(_.G,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.F.getMedia().paused}isEnded(){return this.F.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.
|
|
410
|
+
else if(this.F.getMedia().pause(),this.getState()===_.Wo)this.M.one(this,_.Kf,()=>{a()});else a()}):Promise.reject(new _.I(_.G,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.F.getMedia().paused}isEnded(){return this.F.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Nc=a}setCdnErrorCallback(a){this.Ic=a}Qc(){return this.Nc}getSurface(){return this.F}getBufferInfo(a){const b=this.getSurface().getMedia();
|
|
411
411
|
return new _.ru(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.F.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.t||a===b)return Promise.resolve();const c=this.F.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),Promise.reject();const d=a-b;return.1>=Math.abs(d)?
|
|
412
|
-
(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.jg));this.M.on(c,_.Bf,h);this.M.on(c,_.Zf,h);this.M.on(c,_.nf,h);this.log.info("Seeking to "+a+". Delta "+d);this.
|
|
413
|
-
l.type+" event. Seek completed:",r,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);r?(this.
|
|
412
|
+
(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.F(_.jg));this.M.on(c,_.Bf,h);this.M.on(c,_.Zf,h);this.M.on(c,_.nf,h);this.log.info("Seeking to "+a+". Delta "+d);this.md=this.Ye=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var r=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Bf,y=l.type===_.nf,A=l.type===_.Zf,D=y&&u;r=v||n&&D||A&&r;this.log.debug("Checking seeking state after "+
|
|
413
|
+
l.type+" event. Seek completed:",r,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);r?(this.md=this.Ye=!1,this.M.off(c,_.Bf,h),this.M.off(c,_.Zf,h),this.M.off(c,_.nf,h),this.zf(),this.trigger(new _.F(_.ig)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.M.one(c,_.me,g)};this.getState()===_.To?
|
|
414
414
|
(this.log.debug("Player is in IDLE state. Postpone seek."),this.M.one(this,_.Kf,()=>{switch(this.getState()){case _.Po:case _.Wo:case _.Vo:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.F.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.F.getMedia();b?_.dh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
|
|
415
|
-
Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.F.getMedia().muted}setMuted(a){const b=this.F.getMedia();typeof a===_.Lc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ga?this.F.getMedia().duration:-1}getTrackManager(){return this.
|
|
416
|
-
1}setPlaybackRate(a){const b=this.F.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.
|
|
417
|
-
a.type+"' with playhead at: "+c;if(a.type===_.Zf||a.type===_.nf)this.
|
|
418
|
-
break;case _.vf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.
|
|
415
|
+
Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.F.getMedia().muted}setMuted(a){const b=this.F.getMedia();typeof a===_.Lc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ga?this.F.getMedia().duration:-1}getTrackManager(){return this.jc}getPlaybackRate(){const a=this.F.getMedia();return a&&a.playbackRate||
|
|
416
|
+
1}setPlaybackRate(a){const b=this.F.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Ud=a}getSourceIndex(){return this.Ud}getLoadedSource(){return this.ga&&-1!==this.Ud?this.ga[this.Ud]:null}getPeriods(){return[]}getNetworkEngine(){return this.Xe}setNetworkEngine(a){this.Xe=a}setCmsdManager(a){this.Te=a}getTextDisplayer(){return this.P}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}Pg(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
|
|
417
|
+
a.type+"' with playhead at: "+c;if(a.type===_.Zf||a.type===_.nf)this.Af.debug(d);else{let e="";switch(a.type){case _.pf:e=`Rate: ${this.getPlaybackRate()}`;break;case Od:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Re:case _.bf:case "suspend":case _.yg:case If:case _.Cf:case _.Bf:case _.Zf:case _.nf:case Oc:case Pc:b=this.getBufferInfo().Wa(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
|
|
418
|
+
break;case _.vf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Af.info(d)}a.type!==_.q&&this.trigger(new _.F(a.type,{detail:a}))}zf(){}};var xl;xl=new _.S("clpp.Components");_.vl=new Map;_.z("clpp.install",function(a){Fl(a)});_.z("clpp.uninstall",function(a){Gl(a)});var wu=class{};_.z("clpp.utils.Uint8ArrayUtils",wu);wu.toStandardBase64=_.Hl;wu.concat=_.Nl;wu.equal=_.Ml;wu.toHex=_.Ll;wu.fromHex=_.Kl;wu.fromBase64=_.Jl;wu.toBase64Url=_.Il;var xu=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.mb,SW_SECURE_DECODE:_.nb,HW_SECURE_CRYPTO:Ga,HW_SECURE_DECODE:Ha,HW_SECURE_ALL:Fa});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Be,CLEAR_KEY:_.Le,WIDEVINE:_.td,PLAYREADY:_.rd,FAIRPLAY:_.pd,PRIMETIME:_.od});_.Ql={};_.z("clpp.drm.registerDrmEnvironment",_.Rl);var Ul={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
|
|
419
419
|
96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
|
|
420
420
|
134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
|
|
421
421
|
185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
|
|
@@ -430,9 +430,9 @@ break;case _.vf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=".
|
|
|
430
430
|
136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
|
|
431
431
|
143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
|
|
432
432
|
26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.yu=class{constructor(a){this.I=a;this.f={}}$a(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.yu);_.yu.prototype.setDrmSystem=_.yu.prototype.$a;_.qm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.dh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Na(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Wl();this.a=a}};_.ln=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Na(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Zl();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Zl();this.a=a}};
|
|
433
|
-
_.z("clpp.utils.dataview.DataViewReader",_.ln);_.om=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=fm(a);this.h[a]=zu;this.f[a]=b;return this}ea(a,b){a=fm(a);this.h[a]=Au;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.ln(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Yl(a)&&!this.a;)this.
|
|
433
|
+
_.z("clpp.utils.dataview.DataViewReader",_.ln);_.om=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=fm(a);this.h[a]=zu;this.f[a]=b;return this}ea(a,b){a=fm(a);this.h[a]=Au;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.ln(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Yl(a)&&!this.a;)this.je(0,a,b)}je(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.gm(f));switch(e){case 0:e=b.Na()-d;break;case 1:e=_.cm(b),g=!0}const h=
|
|
434
434
|
this.f[f];if(h){let m=null;var k=null;this.h[f]===Au&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Na()&&(l=b.Na());l-=b.getPosition();b=0<l?_.em(b,l):new Uint8Array(0);b=new _.ln(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Na()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.om);_.om.typeToString=_.gm;
|
|
435
|
-
_.om.allData=_.jm;_.om.sampleDescription=_.im;_.om.children=_.hm;_.om.prototype.parseNext=_.om.prototype.
|
|
435
|
+
_.om.allData=_.jm;_.om.sampleDescription=_.im;_.om.children=_.hm;_.om.prototype.parseNext=_.om.prototype.je;_.om.prototype.parse=_.om.prototype.parse;_.om.prototype.stop=_.om.prototype.stop;_.om.prototype.fullBox=_.om.prototype.ea;_.om.prototype.box=_.om.prototype.N;_.om.headerSize=_.km;var zu=0,Au=1;var Bu=class{};_.z("clpp.utils.FairplayUtils",Bu);Bu.parseFairPlayResponse=_.tm;Bu.formatFairPlayRequest=_.sm;Bu.createFairplayPayload=rm;Bu.extractContentId=_.nm;Bu.extractExtXKeyUri=lm;var zm=new _.S("clpp.drm.DrmToday"),Jm="PRODUCTION",Km="STAGING",Om="DEMO",Pm="TEST",Cu={PRODUCTION:Jm,STAGING:Km,DEMO:Om,TEST:Pm};_.z("clpp.drm.DrmToday.Environment",Cu);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
|
|
436
436
|
var vm="/license-proxy-widevine/cenc/",wm="/license-proxy-headerauth/drmtoday/RightsManager.asmx",xm="/license-server-fairplay/",Qm={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
|
|
437
437
|
42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},Du=[Fa,Ha,Ga,_.nb,_.mb],Eu=[Fa,Ha,
|
|
438
438
|
Ga,_.nb,_.mb],Fu=["3000","2000","150"],Gu=["2000","150"];
|
|
@@ -451,67 +451,67 @@ new Ru(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)
|
|
|
451
451
|
Rf){if(a!==Rf&&a!==_.Pe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ja,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Vu(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Vu=class extends _.su{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.bn;this.keyStatuses=
|
|
452
452
|
new Ju}ready(){_.qh("WebkitEmeManager.MediaKeySession.ready");Zm(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.qh("WebkitEmeManager.MediaKeySession.generateRequest");return cn(this,b,null)}load(a){_.qh(Eb);return this.l===_.Pe?cn(this,null,a):Promise.reject(Error(Ya))}update(a){_.qh(Eb);const b=new _.bn;dn(this,b,a);return b}close(){_.qh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Pe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
|
|
453
453
|
this.closed;const a=an(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.qh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Pe?Promise.reject(Error(Ya)):this.close()}},Wu=class{a(){return Su}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Tu}};var Yu=class{l(){}h(a){_.qh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.qh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return Xu}},Zu=class{a(){return Xu}f(){return!0}create(){return new Yu}};var $u=class{};_.z(id,$u);var fn=new _.S(id),en=[];en=[new Qu,new Ou,new Wu,new Zu].filter(a=>a.f());var mo="STANDARD",In="APPLE",Su="WEBKIT",Xu="NOP";$u.Apis={STANDARD:mo,APPLE:In,WEBKIT:Su,NOP:Xu};_.av=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.Tf)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
|
|
454
|
-
b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Lg=_.av.prototype;_.Lg.
|
|
454
|
+
b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Lg=_.av.prototype;_.Lg.Dd=_.Ng(19);_.Lg.le=_.Ng(17);_.Lg.$d=_.Ng(15);_.Lg.ae=_.Ng(13);_.Lg.ke=_.Ng(11);_.Lg.Jc=_.Ng(9);_.Lg.Qd=_.Ng(7);_.Lg.$=_.Ng(5);_.Lg.sc=_.Ng(3);_.Lg.Pb=_.Ng(1);_.on=new _.av;_.bv=new _.S("clpp.xml.Parser");_.ql="dom";var jn,cv,hn;_.sn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];jn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];cv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};hn=class extends cv{};_.rn=class extends cv{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var un=!!(performance&&performance.mark&&performance.measure),wn=new _.S("clpp.perf");var Zn=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.om).ea("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.Ll(_.em(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Ll(_.em(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
|
|
455
455
|
a.reader.getPosition()!==a.reader.Na()&&_.C("Mismatch between box size and data size!")}}};var Un,dv;
|
|
456
|
-
_.cp=class{constructor(a,b){this.D=a;this.bb=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=dv;this.B=new _.Nt;this.M=new xu;this.h=new Map;this.L=[];this.H=new _.bn;this.za=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.ba=new Map;this.V=new _.rk(()=>Ln(this));this.j=!1;this.fa=new _.bn;this.G=!1;this.X=[];this.ia=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.da=(new _.rk(()=>{Mn(this)})).
|
|
456
|
+
_.cp=class{constructor(a,b){this.D=a;this.bb=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=dv;this.B=new _.Nt;this.M=new xu;this.h=new Map;this.L=[];this.H=new _.bn;this.za=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.ba=new Map;this.V=new _.rk(()=>Ln(this));this.j=!1;this.fa=new _.bn;this.G=!1;this.X=[];this.ia=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.da=(new _.rk(()=>{Mn(this)})).Bb(1);this.H.catch(()=>{});
|
|
457
457
|
this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.x(function*(){a.j?yield a.fa:(a.j=!0,yield Nn(a),a.fa.resolve())})}keySystem(){return this.a?_.An(this.a.keySystem):""}getDrmInfo(){return this.a}Ua(a){const b=this;return _.x(function*(){b.G&&b.K===Un||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ia?yield eo(b,a):b.X.push(a))})}Ja(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
|
|
458
458
|
_.Nf){var g=f;f=e;e=g}if(zn(this.a.keySystem)&&16===f.byteLength&&_.tk()){g=_.Ri(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Lf&&(c.loaded=!0);c&&c.hb&&c.hb.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.Ll(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.pd)&&16!==f.byteLength&&(h=Ti(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
|
|
459
459
|
this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.lb.forEach(e=>{this.o.get(e)===Lf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Me))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Lf&&_.Ml(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Me))}a=b.expiration-Date.now();(0>a||d&&1E3>
|
|
460
|
-
a)&&c&&!c.
|
|
460
|
+
a)&&c&&!c.ic&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Lc&&a.Lc.stop(),this.h.delete(b),b.close().catch(()=>{}));oo(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.ka(.5):Ln(this))}};Un=0;dv=3;_.Ao=new Map;_.Bo=new _.S("clpp.text");var ev=class{constructor(){this.a=null;this.f=[]}};var fv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.gv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new ev;this.f=new fv}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Fo(this.a,_.Wo),pauseTime:Fo(this.a,_.Vo),bufferingTime:Fo(this.a,_.Po),stateHistory:Go(this.a),switchHistory:Ho(this.f)}}};var iv=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.Nt;this.f=_.To;this.w=_.hv;this.G=0;this.o=-1;this.J=this.l=this.H=this.A=0;this.h=this.Z=this.C=!1;this.F=0;this.j=null;this.I=0;this.K=_.Fk();this.B=!1;this.H=Date.now();No(this)}Ta(a,b){this.m&&this.m.trigger(new _.F(a,{detail:b}))}getState(){return Qo(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",Xo);var $o=new _.S("clpp.sources");var jv=class extends _.vu{constructor(){super(jd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Nt;this.C=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new iv(this);Ko(this.j,_.To)}namespace(){return jd}unload(){const a=this;return _.x(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.P&&(a.P.destroy(),a.P=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
|
|
461
461
|
a.o=null);_.Dh(a.h);a.f&&(a.f=new _.gv);a.C=null;a.ga=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.G,7,7E3);a.a&&(b=a.a,a.h.off(b,_.q),a.h.off(b,_.vf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Ko(this.j,_.To)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(za);const a=this.getTrackManager();
|
|
462
|
-
a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.
|
|
462
|
+
a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.jc}load(a){const b=this;return _.x(function*(){if(b.w)return Promise.reject(new _.I(_.G,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.F.getMedia();b.H=Date.now()/
|
|
463
463
|
1E3;b.f=new _.gv;b.h.on(b,_.Kf,()=>{b.f&&_.Eo(b.f.a,b.getState())});Ko(b.j,_.Uo);b.ga=_.Zo(a);b.configuration=_.tl(b.ia,a);b.log.debug(_.Oa,b.configuration);b.log.debug(_.fb,b.ga);const d=_.Do(b.configuration,[_.ae,"native"]);b.P=d.create(b);b.P.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.wl(_.Qf)&&!_.Hk()&&(b.A=new au(b),b.A.start(c));b.l?b.l.release():b.l=new Ot(b);c.textTracks&&Zh(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||
|
|
464
|
-
b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Oc,()=>{b.trigger(new _.F(_.$f))});null==b.configuration.startTime&&ip(b,c);_.Fk()&&jp(b,c);try{bp(b,c),yield ep(b),yield hp(b).T}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.j&&Ko(this.j,_.Mo),this.trigger(new _.F(_.q,{detail:a})))}
|
|
464
|
+
b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Oc,()=>{b.trigger(new _.F(_.$f))});null==b.configuration.startTime&&ip(b,c);_.Fk()&&jp(b,c);try{bp(b,c),yield ep(b),yield hp(b).T}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.G&&null!==this.j&&Ko(this.j,_.Mo),this.trigger(new _.F(_.q,{detail:a})))}Jg(){return new U}getState(){return null!==this.j?this.j.getState().currentState:_.hv}getPresentationStartTime(){if(this.a&&
|
|
465
465
|
this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.C=a={start:a.start(0),end:a.end(a.length-1)};if(this.C)return this.C}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.Io();this.f&&_.Eo(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;
|
|
466
|
-
b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.na())a.bandwidth&&(this.f.w=a.bandwidth),a.
|
|
467
|
-
_.uh(new class{a(){return jd}canPlay(a,b){a=a.type||"";const c=a===_.tc,d=a===_.yc,e=a===_.kl;var f;_.Ek()||c||d||e&&!_.Fk()?f=0:f=""!==sk().canPlayType(a)?e&&_.Fk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.ma}create(){return new jv}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var lp=new _.S("clpp.ads"),kp=[];var kv=class{load(){}start(){}
|
|
468
|
-
V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.gb;V.prototype.getPositionInSequence=V.prototype.sb;V.prototype.getPodTimeOffset=V.prototype.
|
|
469
|
-
V.prototype.getClickThroughUrl=V.prototype.qb;V.prototype.isBumper=V.prototype.
|
|
470
|
-
V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.
|
|
471
|
-
Q.prototype.getCustomAttributes=Q.prototype.
|
|
472
|
-
Q.prototype.getMediaBitrate=Q.prototype.Oa;Q.prototype.getMediaHeight=Q.prototype.eb;Q.prototype.getMediaWidth=Q.prototype.fb;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.qb;Q.prototype.isBumper=Q.prototype.
|
|
473
|
-
Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.
|
|
466
|
+
b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.na())a.bandwidth&&(this.f.w=a.bandwidth),a.Zc&&(this.f.h=a.Zc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
|
|
467
|
+
_.uh(new class{a(){return jd}canPlay(a,b){a=a.type||"";const c=a===_.tc,d=a===_.yc,e=a===_.kl;var f;_.Ek()||c||d||e&&!_.Fk()?f=0:f=""!==sk().canPlayType(a)?e&&_.Fk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.ma}create(){return new jv}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var lp=new _.S("clpp.ads"),kp=[];var kv=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.z("clpp.ads.IAdsManager",kv);kv.prototype.getPosition=kv.prototype.getPosition;kv.prototype.setVolume=kv.prototype.setVolume;kv.prototype.getVolume=kv.prototype.getVolume;kv.prototype.skip=kv.prototype.skip;kv.prototype.pause=kv.prototype.pause;kv.prototype.resume=kv.prototype.resume;var V=class{ob(){}pb(){}ub(){}getId(){}getCreativeId(){}Qb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Tb(){}qb(){}getMediaUrl(){}fb(){}eb(){}Oa(){}Pa(){}getPodIndex(){}Hb(){}sb(){}gb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Sb(){}canSeek(){}};_.z("clpp.ads.IAd",V);V.prototype.canSeek=V.prototype.canSeek;V.prototype.getVideoElement=V.prototype.Sb;V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;
|
|
468
|
+
V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.gb;V.prototype.getPositionInSequence=V.prototype.sb;V.prototype.getPodTimeOffset=V.prototype.Hb;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.Pa;V.prototype.getMediaBitrate=V.prototype.Oa;V.prototype.getMediaHeight=V.prototype.eb;V.prototype.getMediaWidth=V.prototype.fb;V.prototype.getMediaUrl=V.prototype.getMediaUrl;
|
|
469
|
+
V.prototype.getClickThroughUrl=V.prototype.qb;V.prototype.isBumper=V.prototype.Tb;V.prototype.getSkipTimeOffset=V.prototype.getSkipTimeOffset;V.prototype.getPosition=V.prototype.getPosition;V.prototype.getDuration=V.prototype.getDuration;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getAdSystem=V.prototype.getAdSystem;V.prototype.getApiFramework=V.prototype.getApiFramework;V.prototype.getSourceId=V.prototype.Qb;
|
|
470
|
+
V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.ub;V.prototype.getAdManagerVersion=V.prototype.pb;V.prototype.getAdManagerName=V.prototype.ob;var Q=class{constructor(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}ob(){return""}pb(){return""}ub(){return 2}getId(){return this.B}getCreativeId(){return""}Qb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}canSeek(){return this.A}Tb(){return!1}qb(){return null}getMediaUrl(){return null}fb(){return 0}eb(){return 0}Oa(){return 0}Pa(){return this.F}getPodIndex(){return 0}Hb(){return 0}sb(){return this.f}gb(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Sb(){return this.videoEl}Ah(){return this.C}};
|
|
471
|
+
Q.prototype.getCustomAttributes=Q.prototype.Ah;Q.prototype.getVideoElement=Q.prototype.Sb;Q.prototype.getWrapperCreativeIds=Q.prototype.getWrapperCreativeIds;Q.prototype.getWrapperAdSystems=Q.prototype.getWrapperAdSystems;Q.prototype.getWrapperAdIds=Q.prototype.getWrapperAdIds;Q.prototype.getSequenceLength=Q.prototype.gb;Q.prototype.getPositionInSequence=Q.prototype.sb;Q.prototype.getPodTimeOffset=Q.prototype.Hb;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Pa;
|
|
472
|
+
Q.prototype.getMediaBitrate=Q.prototype.Oa;Q.prototype.getMediaHeight=Q.prototype.eb;Q.prototype.getMediaWidth=Q.prototype.fb;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.qb;Q.prototype.isBumper=Q.prototype.Tb;Q.prototype.canSeek=Q.prototype.canSeek;Q.prototype.getSkipTimeOffset=Q.prototype.getSkipTimeOffset;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.getTitle=Q.prototype.getTitle;
|
|
473
|
+
Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.Qb;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.ub;Q.prototype.getAdManagerVersion=Q.prototype.pb;Q.prototype.getAdManagerName=Q.prototype.ob;var lv=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,Kd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.Kd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.Kd);if(!b)throw Error("No available players in the pool");b.Kd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Kd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
|
|
474
474
|
d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.z("clpp.utils.dom.createHTMLElement",_.rp);var mv=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=sp(this,a)}get(){return this.a}};var yp=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.Wg(nv,b);this.f=new mv;this.h=null;this.a=new mv;this.l=ov;ov+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Nt;if(null==a)throw new _.I(_.G,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.I(_.G,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
|
|
475
475
|
HTMLMediaElement))throw new _.I(_.G,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.I(_.G,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Cd);a.parentNode?a.parentNode.replaceChild(c,
|
|
476
476
|
a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.pp(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Pf);for(d of[_.Fg,_.Zd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.vk()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),tp(this.a,"clpp-container"),
|
|
477
477
|
tp(this.a,this.o),tp(this.f,_.Yc),tp(this.f,"clpp-video"));b.webOSStartupPatch&&up(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.pp(a,Zc):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(Zc):
|
|
478
478
|
this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.pp(a,_.Yc);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.pp(a,Zc)}show(a){a.classList.remove(Zc)}release(){this.j.release()}};
|
|
479
|
-
yp.prototype.removeElementFromContainer=yp.prototype.removeElementFromContainer;yp.prototype.addElementToContainer=yp.prototype.addElementToContainer;yp.prototype.getCastElement=yp.prototype.getCastElement;yp.prototype.getContainer=yp.prototype.getContainer;yp.prototype.getMedia=yp.prototype.getMedia;var nv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},ov=1;var pv=class{constructor(a){this.ja=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.
|
|
480
|
-
a,_.Re)}load(a){return Qp(this,a,_.ke)}release(){const a=this;return _.x(function*(){yield Promise.all([yield Xp(a),a.f?Np(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();iq(a)})}isMuted(){return this.B}},fq="preload",dq=_.oe,Gp="primary",Fp="ad";var qv=class extends _.su{constructor(a){super();this.ja=_.Wg({
|
|
481
|
-
c.startTime)return Zp(this.Y),this.g.info("Seek inside resolution area of",c.ca),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.ca),bq(this.Y),!1;if(c.
|
|
482
|
-
sideAdContainer:this.ja.sideAdContainer,onAudioDecision:this.ja.onAudioDecision
|
|
483
|
-
null}Ta(a){this.f.trigger(a)}},kq=0,pq=1,Uq=2,Vq=3,sq=4,Yq=5,lq=6;var Jr=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}
|
|
484
|
-
Jq(this.a);return a?a.getPosition():-1}
|
|
479
|
+
yp.prototype.removeElementFromContainer=yp.prototype.removeElementFromContainer;yp.prototype.addElementToContainer=yp.prototype.addElementToContainer;yp.prototype.getCastElement=yp.prototype.getCastElement;yp.prototype.getContainer=yp.prototype.getContainer;yp.prototype.getMedia=yp.prototype.getMedia;var nv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},ov=1;var pv=class{constructor(a){this.ja=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.xg;this.C=xp(a);this.A=[];const b=zp(this,this.C,this.ja.lh);this.l=new lv(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.Z=this.B=!1;this.G=a.bi||(()=>{});Ap(this).forEach(c=>Bp(this,c,!1))}getCurrentItem(){return this.f}Rd(){return this.f?this.f.player:null}Zf(){return Array.from(this.j.values())}nd(){return 0<this.j.size}play(a){return Qp(this,
|
|
480
|
+
a,_.Re)}load(a){return Qp(this,a,_.ke)}release(){const a=this;return _.x(function*(){yield Promise.all([yield Xp(a),a.f?Np(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();iq(a)})}isMuted(){return this.B}},fq="preload",dq=_.oe,Gp="primary",Fp="ad";var qv=class extends _.su{constructor(a){super();this.ja=_.Wg({hi:.5},a);this.se=this.Z=!1;this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.Z)return!1;if(c=qq(this))return this.g.info("Seek ignored while binding interstitial",c.ca),!1;rq(this,b);c=tq(this);const d=uq(this,b),e=vq(this,b);if(c){if(d&&d!==c)return yq(this,d,b),!1;if(e&&e!==c)return zq(this,e,b),!1;if(b<c.startTime-this.ja.resolutionOffsetSec)return wq(this,c),!0;if(b<
|
|
481
|
+
c.startTime)return Zp(this.Y),this.g.info("Seek inside resolution area of",c.ca),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.ca),bq(this.Y),!1;if(c.Lf)return this.g.info("Jump over a scheduled interstitial",c.ca),aq(this.Y),c.state=kq,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.ca);bq(this.Y);hq(this.Y,b,!0);return!1}return d?(yq(this,d,b),!1):e&&!e.nh?(zq(this,e,b),!1):!0});this.Y=new pv({lh:this.ja.config,xg:a.player,preloadMedia:!0,cb:a.cb,
|
|
482
|
+
sideAdContainer:this.ja.sideAdContainer,onAudioDecision:this.ja.onAudioDecision,bi:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Hq(this,a.player)}destroy(){const a=this;return _.x(function*(){Iq(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.Y.destroy()})}Kb(){return this.j}setMuted(a){var b=this.Y;(b.B=a)?(b.a.setMuted(!0),cq(b,!0)):(a=b.getCurrentItem(),Ep(b,a,a&&a.Lb?Fp:Gp))}isMuted(){return this.Y.isMuted()}isLive(){const a=this.Y.Rd();return a?a.isLive():
|
|
483
|
+
null}Ta(a){this.f.trigger(a)}},kq=0,pq=1,Uq=2,Vq=3,sq=4,Yq=5,lq=6;var Jr=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,cb:b},d.ads.hls||{},{gi:c});this.a=new qv(a);Qq(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=Jq(this.a);a&&a.play()}pause(){const a=Jq(this.a);a&&a.pause()}skip(){}getVolume(){const a=Jq(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Jq(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
|
|
484
|
+
Jq(this.a);return a?a.getPosition():-1}l(){return!this.a.Kb()}h(){return this.a.destroy()}};Jr.prototype.getPosition=Jr.prototype.getPosition;Jr.prototype.setVolume=Jr.prototype.setVolume;Jr.prototype.getVolume=Jr.prototype.getVolume;Jr.prototype.skip=Jr.prototype.skip;Jr.prototype.pause=Jr.prototype.pause;Jr.prototype.resume=Jr.prototype.resume;var rv=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Nt;this.h=null;this.f=!0;cr(this)}release(){this.a.release();dr(this);this.m=null}};var fr=[];var lr=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Ui(_.Jl(a)));this.a=JSON.parse(_.Ui(_.Jl(b)));this.j=c}};var jr={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},ol="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Lr=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},yr="vod",xr="live";var es,Cr,Fr,Dr;es=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Gr(this);this.f.Gc(this.h);this.a=null}release(){this.a=null;this.f.xd(this.h)}};_.sv="maxSuggestedBitrateKbps";Cr={du:"duress",etp:_.Td,mb:_.sv,rd:"responseDelay",rtt:"roundTripTime"};Fr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:lg};
|
|
485
485
|
Dr=new _.S("clpp.net.CmsdManager");var R=class extends _.su{constructor(a,b,c){super();gr();this.g=new _.S("clpp.Player");if(!a)throw new _.I(_.G,7,7102);this.da=new _.Nt;this.f=this.C=b||_.rl();this.l=null;void 0===this.f.license&&(this.f.license=ol,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.I(_.G,7,7101,"No license provided in configuration!");this.j=new yp(a,c);this.G=this.A=this.a=
|
|
486
|
-
this.F=null;this.I=new _.zr;this.h=null;this.X=[];this.ba=!0;this.K={};this.fa=null;this.R=!0;this.S=this.P=!1;this.L=this.
|
|
487
|
-
void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Hr)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Or(this,a);this.M=_.ma;Bl(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.q,{detail:a}),this.trigger(a)}
|
|
486
|
+
this.F=null;this.I=new _.zr;this.h=null;this.X=[];this.ba=!0;this.K={};this.fa=null;this.R=!0;this.S=this.P=!1;this.L=this.Nc=null;this.He=!1;this.ia=new rv(this);this.B=null;this.on(_.Kf,()=>{this.getState()===_.Mo&&(this.a?this.a.unload():Promise.resolve())});this.on(_.qc,()=>{this.He=!0});this.on(_.pc,()=>{this.He=!1});this.on(_.Yf,()=>Kr(this));Mr(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
|
|
487
|
+
void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Hr)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Or(this,a);this.M=_.ma;Bl(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.F(_.q,{detail:a}),this.trigger(a)}jd(a){a=
|
|
488
488
|
this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Xg(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Rr(this);return this.l.finally(()=>{Sr(this);this.g.debug("Player released");this.l=null})}destroy(){if(this.P)return this.g.debug("The player is already destroyed. No-op"),
|
|
489
|
-
new Promise(a=>a());this.P=!0;return this.release().then(()=>{this.g.debug(za);this.trigger(new _.F("destroying"));return _.Nr(this,_.Ge)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.
|
|
489
|
+
new Promise(a=>a());this.P=!0;return this.release().then(()=>{this.g.debug(za);this.trigger(new _.F("destroying"));return _.Nr(this,_.Ge)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.fd.clear();this.ia.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{El();this.A=this.a=null;this.trigger(new _.F("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.vn(Ze);b.M=_.ma;b.ba=!0;const c=_.Zo(a),d=ul(a)?a:{};if(d.license)throw new _.I(_.G,7,7100,
|
|
490
490
|
"License cannot be passed into the load method.");yield _.$r(b,d,c);yield _.as(b);yield _.cs(b);_.vn(Ye);_.xn("player.load",Ze,Ye)}catch(c){Sr(b);if(b.l)throw b.g.info(Ma),new _.I(_.G,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.$r(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(ib)}else b.g.warn(eb)})}use(a){(a=Fl(a))&&a.o(this)}remove(a){return(this.getState()<=_.To||this.R)&&null!==zl(a)?(Gl(a),this.S=!0):!1}play(){return this.a?!this.h||this.h instanceof
|
|
491
491
|
Jr||this.a.namespace()===_.dd?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.ru}getState(){return this.a?this.a.getState():_.To}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
|
|
492
|
-
this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.Mo?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}
|
|
492
|
+
this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.Mo?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}vc(){const a=this.a;return a&&a.vc?a.vc():null}getVolume(){return this.a?this.a.getVolume():
|
|
493
493
|
null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof Jr?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof Jr&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=
|
|
494
|
-
a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}
|
|
495
|
-
_.z("clpp.Player",R);R.registerPlugin=_.Ir;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype
|
|
494
|
+
a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}cg(){return Object.freeze(this.fa)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Nc=a;Xr(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};
|
|
495
|
+
_.z("clpp.Player",R);R.registerPlugin=_.Ir;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.cg;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;
|
|
496
496
|
R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;
|
|
497
|
-
R.prototype.getVolume=R.prototype.getVolume;R.prototype.getTimelineOffset=R.prototype.
|
|
498
|
-
R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.
|
|
497
|
+
R.prototype.getVolume=R.prototype.getVolume;R.prototype.getTimelineOffset=R.prototype.vc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;
|
|
498
|
+
R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.jd;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;
|
|
499
499
|
R.prototype.on=R.prototype.on;_.To=0;_.Uo=1;_.Po=2;_.Wo=3;_.Vo=4;_.Lo=5;_.Mo=6;_.hv=7;_.So={IDLE:_.To,PREPARING:_.Uo,BUFFERING:_.Po,PLAYING:_.Wo,PAUSED:_.Vo,ENDED:_.Lo,ERROR:_.Mo,UNSET:_.hv};R.State=_.So;var Hr=[];var uv=class extends R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.Wg(this.C,a);this.f=_.Wg(this.f,a);this.H=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.x(function*(){if(c.w)throw new _.I(_.G,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.I(_.G,7,7007,"The index parameter only supports the value of 0.");
|
|
500
500
|
if(0===b.length)throw new _.I(_.G,7,7003,Wa);if(b.some(g=>!g.id||!g.source))throw new _.I(_.G,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.I(_.G,7,7100,"Some config contains a non-unique property `id`!");const d=b[0].playlist;if(d){var e=d.timeline,f=["flat","basic"];if(e&&!f.includes(e))throw new _.I(_.G,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.t||0>e))throw new _.I(_.G,
|
|
501
|
-
7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.I(_.G,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.G,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{gs(c),c.w="open",yield js(c,b),c.H=0,c.o=b,c.V=!0,ks(c,b[0].playlist||{})}finally{c.w=null}})}
|
|
502
|
-
if(!b.V)throw new _.I(_.G,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.G,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.I(_.G,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield ls(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}
|
|
501
|
+
7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.I(_.G,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.G,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{gs(c),c.w="open",yield js(c,b),c.H=0,c.o=b,c.V=!0,ks(c,b[0].playlist||{})}finally{c.w=null}})}Tg(a){const b=this;return _.x(function*(){if(b.w)throw new _.I(_.G,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
|
|
502
|
+
if(!b.V)throw new _.I(_.G,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.G,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.I(_.G,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield ls(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}Dh(){return[...this.o]}kd(){return this.o.length}getTimeline(){return this.a?
|
|
503
503
|
this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.V=!1;return super.release()}destroy(){gs(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",uv);uv.prototype.setCdnErrorCallback=uv.prototype.setCdnErrorCallback;uv.prototype.destroy=uv.prototype.destroy;uv.prototype.release=uv.prototype.release;uv.prototype.seekWith=uv.prototype.seekWith;
|
|
504
|
-
uv.prototype.getTimeline=uv.prototype.getTimeline;uv.prototype.getSize=uv.prototype.
|
|
505
|
-
this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}
|
|
506
|
-
yield qs(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,us(a)}}})}
|
|
507
|
-
d;}finally{a.j=!1,b&&ys(a,b),us(a)}}else a.g.warn("There are no more items in the playlist")})}
|
|
508
|
-
d;}finally{a.j=!1,b&&ys(a,b),us(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([As(a),a.f?ys(a,a.f):Promise.resolve()]);yield Bs(a)})}};_.z(kd,vv);vv.prototype.destroy=vv.prototype.destroy;vv.prototype.playPrev=vv.prototype.
|
|
509
|
-
vv.prototype.setIndex=vv.prototype.
|
|
510
|
-
b){const c=new Map;c.set(a,b);try{const d=_.nk(b),e=_.ok(b).split(","),f=new Map,g=yi(_.p,e),h=yi(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.mk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.mk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.
|
|
511
|
-
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===wv?b.push(k):h.type===xv&&c.push(k)},g=()=>{e={video:_.Nl(...b),captions:d,audio:_.Nl(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.I(_.G,3,3018);return e}};hk(_.
|
|
512
|
-
_.dj(this.h)?this.g.warn(_.Da):_.dj(this.a)?this.g.warn(_.Ca):this.$a(_.pd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.
|
|
513
|
-
zc;this.
|
|
514
|
-
var Cv="hostname",Bv="full-skd";Dv.FairPlayContentIdStrategy={HOSTNAME:Cv,FULL_SKD:Bv};_.z("clpp.drm.HeaderDrmComponent",class extends _.Av{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ia){a=a.drm.customData;if(!a)throw new _.I(_.G,7,7100,_.ud);a=new Dv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Bv);_.Rl(a)}}a(){delete _.Ql.HeaderDrm}id(){return"headerdrm"}});_.hr(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.hr(function(){_.qh("mathRound.install")});_.hr(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;
|
|
504
|
+
uv.prototype.getTimeline=uv.prototype.getTimeline;uv.prototype.getSize=uv.prototype.kd;uv.prototype.getPlaylist=uv.prototype.Dh;uv.prototype.getCurrentItemIndex=uv.prototype.getCurrentItemIndex;uv.prototype.getCurrentItem=uv.prototype.getCurrentItem;uv.prototype.addItem=uv.prototype.Tg;uv.prototype.open=uv.prototype.open;var vv=class extends _.su{constructor(a){super();this.ja=_.Wg({transition:_.Ne,preloadMedia:!1},a);this.h=[];this.a=0;const b=ms(a.anchorId,this.ja.config);this.o=new lv(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(kd);this.o.a.forEach(c=>ns(this,c.player,!1))}hd(){return this.f}Rd(){return this.f?this.f.player:null}Yf(){return this.l.get(this.a+1)||null}$f(){return this.l.get(this.a-1)||null}Zf(){return[this.$f(),this.Yf()].filter(Boolean)}xi(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
|
|
505
|
+
this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}wi(a){if(0===this.h.length)throw Error(Va);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}nd(){return this.a<this.h.length-1}dg(){return 0<this.a}ei(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Va);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
|
|
506
|
+
yield qs(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,us(a)}}})}ug(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.nd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ja.transition===_.Ne&&b.player.pause();zs(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield vs(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
|
|
507
|
+
d;}finally{a.j=!1,b&&ys(a,b),us(a)}}else a.g.warn("There are no more items in the playlist")})}fi(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.dg()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ja.transition===_.Ne&&b.player.pause();zs(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield vs(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
|
|
508
|
+
d;}finally{a.j=!1,b&&ys(a,b),us(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([As(a),a.f?ys(a,a.f):Promise.resolve()]);yield Bs(a)})}};_.z(kd,vv);vv.prototype.destroy=vv.prototype.destroy;vv.prototype.playPrev=vv.prototype.fi;vv.prototype.playNext=vv.prototype.ug;vv.prototype.playFirst=vv.prototype.ei;vv.prototype.hasPrev=vv.prototype.dg;vv.prototype.hasNext=vv.prototype.nd;
|
|
509
|
+
vv.prototype.setIndex=vv.prototype.wi;vv.prototype.setItems=vv.prototype.xi;vv.prototype.getPreloading=vv.prototype.Zf;vv.prototype.getPrev=vv.prototype.$f;vv.prototype.getNext=vv.prototype.Yf;vv.prototype.getCurrentPlayer=vv.prototype.Rd;vv.prototype.getCurrent=vv.prototype.hd;var xs="preload",os=_.oe;var Cs=new Map;var yv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Ac;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Ds(Gc);if(b)return _.Ds(Hs(b,a));b=Hs(_.p,a);a=Hs(_.w,a);return _.Ds(b)||_.Ds(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
|
|
510
|
+
b){const c=new Map;c.set(a,b);try{const d=_.nk(b),e=_.ok(b).split(","),f=new Map,g=yi(_.p,e),h=yi(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.mk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.mk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Ac?Gc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Hs(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.K(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
|
|
511
|
+
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===wv?b.push(k):h.type===xv&&c.push(k)},g=()=>{e={video:_.Nl(...b),captions:d,audio:_.Nl(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.I(_.G,3,3018);return e}};hk(_.Ac,()=>new yv(_.Ac));hk(_.og,()=>new yv(_.og));var xv=_.p,wv=_.w;var zv=class{getCuePoints(){}Kb(){}Jb(){}};_.z("clpp.ads.IAdsTimeline",zv);zv.prototype.hasPostroll=zv.prototype.Jb;zv.prototype.hasPreroll=zv.prototype.Kb;zv.prototype.getCuePoints=zv.prototype.getCuePoints;_.Av=class{f(){}a(){}h(){}o(){}};var Dv=class extends _.yu{constructor(a,b,c,d,e){super(Ia);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(ed);_.dj(this.l)?this.g.warn(_.Fb):this.$a(_.td,{licenseUrl:this.l,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.vd.bind(this)}});_.dj(this.j)?this.g.warn(_.db):this.$a(_.rd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.vd.bind(this)}});
|
|
512
|
+
_.dj(this.h)?this.g.warn(_.Da):_.dj(this.a)?this.g.warn(_.Ca):this.$a(_.pd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.pg.bind(this),licenseResponse:this.qg.bind(this),certificateRequest:this.vd.bind(this),extractContentId:this.Tf.bind(this)}})}vd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Tf(a,b){a=lm(b);switch(this.o){case Bv:return a;case Cv:return(new _.mm(a)).a;default:throw Error("Unknown content ID strategy");}}pg(a,b){b.headers[ta]=
|
|
513
|
+
zc;this.vd(a,b);a={spc:_.Hl(b.body)};b.body=_.$i(_.Lj(a,!0))}qg(a,b){a=_.Ui(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.Jl(a).buffer}};_.z(ed,Dv);Dv.prototype.onFairPlayLicenseResponse=Dv.prototype.qg;Dv.prototype.onFairPlayLicenseRequest=Dv.prototype.pg;Dv.prototype.extractFairPlayContentId=Dv.prototype.Tf;Dv.prototype.onLicenseRequest=Dv.prototype.vd;Dv.prototype.constructor=Dv.prototype.constructor;Dv.NAME=Ia;
|
|
514
|
+
var Cv="hostname",Bv="full-skd";Dv.FairPlayContentIdStrategy={HOSTNAME:Cv,FULL_SKD:Bv};_.z("clpp.drm.HeaderDrmComponent",class extends _.Av{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ia){a=a.drm.customData;if(!a)throw new _.I(_.G,7,7100,_.ud);a=new Dv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Bv);_.Rl(a)}}a(){delete _.Ql.HeaderDrm}id(){return"headerdrm"}});_.hr(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.hr(function(){_.qh("mathRound.install")});_.hr(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;Xd in document||(Object.defineProperty(document,Xd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
515
515
|
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Is);document.addEventListener("webkitfullscreenerror",Is);document.addEventListener("mozfullscreenchange",Is);document.addEventListener("mozfullscreenerror",Is);document.addEventListener("MSFullscreenChange",Is);document.addEventListener("MSFullscreenError",Is)}});_.hr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.qh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ks,document.exitPictureInPicture=Ls,document.addEventListener("webkitpresentationmodechanged",Js,!0))}});_.hr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Ms)}});_.hr(function(){if(window.VTTCue)_.ph("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.ph(Ab),window.VTTCue=Ns;else if(6===a)_.ph("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Os;else{try{var b=!!Ns(1,2,"")}catch(c){b=!1}b&&(_.ph(Ab),window.VTTCue=Ns)}}else _.rh("VTTCue not available.")});var Ps;_.hr(function(){_.qh("InputEvent.install");_.uk("Trident/")&&HTMLInputElement.prototype.addEventListener!==Qs&&(_.ph("Patching input event support on IE."),Ps=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Qs)});_.hr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.hr(function(){_.qh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var Ts=class{constructor(){this.a=Rs()}};var Ev=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Fv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Gv;_.Hv=class{constructor(){this.a=new Blob([Gv],{type:_.pg})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.bn;b=b.play();const d=(new _.rk(()=>{d.stop();c.resolve(a)})).ka(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===ab?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
|
|
516
516
|
Gv=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
517
517
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
@@ -519,7 +519,7 @@ Gv=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,
|
|
|
519
519
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,
|
|
520
520
|
0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,
|
|
521
521
|
0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,
|
|
522
|
-
116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.Iv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}
|
|
522
|
+
116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.Iv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Rb(){return this.f}qd(){return this.h}Oc(a){return this.getId()===a.getId()&&this.Rb()===a.Rb()&&this.getDuration()===a.getDuration()&&this.qd()===a.qd()}};_.z("clpp.media.TimelineWindow",_.Iv);_.Iv.prototype.isDynamic=_.Iv.prototype.qd;_.Iv.prototype.getStart=_.Iv.prototype.Rb;_.Iv.prototype.getId=_.Iv.prototype.getId;_.Iv.prototype.getDuration=_.Iv.prototype.getDuration;_.Jv=new _.S("clpp.media.TimestampParser");_.Kv=class{constructor(){this.a=[];this.f=-1;this.h=null}Gh(a){return this.a[a]||null}Hh(){return this.a.length}Ih(){return this.a}Xf(){return this.a[this.f]||null}zh(){return this.f}};_.z("clpp.media.Timeline",_.Kv);_.Kv.prototype.getCurrentWindowIndex=_.Kv.prototype.zh;_.Kv.prototype.getCurrentWindow=_.Kv.prototype.Xf;_.Kv.prototype.getWindows=_.Kv.prototype.Ih;_.Kv.prototype.getWindowCount=_.Kv.prototype.Hh;_.Kv.prototype.getWindow=_.Kv.prototype.Gh;_.Ys={};_.$s={};var ut=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Ts}};var dt=window.XMLHttpRequest;var tt=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Ev(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Ts}};var mu=class extends _.gp{constructor(a){super(new _.bn,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.T;this.f=-1;this.j=this.l=this.o=null;nt(this)}then(a,b){this.T=this.T.then(a,b);return this}catch(a){this.T=this.T.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};var st=window.fetch,pt=window.AbortController,ot=window.Headers;_.xt={};_.Mv=class{constructor(a){a=a.getConfiguration();a=_.Xg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Nf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Nf?a.windowColor:null;this.M=typeof a.fontColor===_.Nf?a.fontColor:null;this.P=typeof a.fontFamily===_.Nf?a.fontFamily:null;this.I=typeof a.fontSize===_.Nf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Nf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
|
|
523
523
|
_.Nf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.P}setFontFamily(a){this.P=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?Lv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
|
|
524
524
|
a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Mv.prototype.setEdgeType=_.Mv.prototype.setEdgeType;_.Mv.prototype.getEdgeType=_.Mv.prototype.getEdgeType;_.Mv.prototype.setEdgeColor=_.Mv.prototype.setEdgeColor;_.Mv.prototype.getEdgeColor=_.Mv.prototype.getEdgeColor;_.Mv.prototype.setFontSizePercent=_.Mv.prototype.setFontSizePercent;_.Mv.prototype.getFontSizePercent=_.Mv.prototype.getFontSizePercent;_.Mv.prototype.setFontSize=_.Mv.prototype.setFontSize;
|
|
525
525
|
_.Mv.prototype.getFontSize=_.Mv.prototype.getFontSize;_.Mv.prototype.setFontColor=_.Mv.prototype.setFontColor;_.Mv.prototype.getFontColor=_.Mv.prototype.getFontColor;_.Mv.prototype.setFontFamily=_.Mv.prototype.setFontFamily;_.Mv.prototype.getFontFamily=_.Mv.prototype.getFontFamily;_.Mv.prototype.setWindowColor=_.Mv.prototype.setWindowColor;_.Mv.prototype.getWindowColor=_.Mv.prototype.getWindowColor;_.Mv.prototype.setBackgroundColor=_.Mv.prototype.setBackgroundColor;
|