@castlabs/prestoplay 6.25.2 → 6.27.0
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 +38 -0
- package/README.md +5 -5
- 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 +115 -114
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +620 -620
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +89 -88
- package/cjs/cl.externs.js +89 -51
- package/cjs/cl.freewheel.js +25 -25
- package/cjs/cl.hls.js +79 -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 +351 -336
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +15 -15
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -16
- package/cjs/cl.simid.js +17 -17
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +73 -72
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +39 -37
- package/cjs/polyfill.min.js +15 -3
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +92 -90
- package/cl.conviva.js +27 -27
- package/cl.core.js +496 -500
- package/cl.crypto.js +9 -9
- package/cl.dash.js +82 -82
- package/cl.externs.js +89 -51
- 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 -17
- package/cl.mediatailor.js +3 -3
- package/cl.mse.js +305 -294
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +11 -11
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +14 -14
- package/cl.smooth.js +60 -60
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +15 -15
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +29 -28
- package/package.json +3 -3
- package/typings.d.ts +124 -3
package/cjs/cl.core.js
CHANGED
|
@@ -1,541 +1,540 @@
|
|
|
1
1
|
(function(){var g={}; var _ = {};
|
|
2
|
-
(function(window){var ba,ca,ea,fa,ha,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
_.na="
|
|
7
|
-
|
|
8
|
-
_.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_.
|
|
13
|
-
_.
|
|
14
|
-
|
|
15
|
-
_.
|
|
16
|
-
_.
|
|
17
|
-
_.Se="onBitrateChanged()";_.Te="onContentLoaded";_.Ue="onPlayerError()";_.Ve="onPlayerWillDestroy";_.We="onPlayerWillRelease";_.Xe="onStateChanged()";Ye="online-status-changed";_.Ze="optional";_.$e="org.w3.clearkey";_.af="output-restricted";_.bf="pause";_.cf="persistent";_.df="persistent-license";ef="picture-in-picture";_.ff="play";gf="player.afterLoad.end";hf="player.afterLoad.start";jf="player.appendLoad.end";kf="player.appendLoad.start";lf="player.beforeLoad.end";mf="player.beforeLoad.start";
|
|
18
|
-
nf="player.load.end";of="player.load.start";pf="player.setupPlaylist.end";qf="player.setupPlaylist.start";_.rf="playing";_.sf="playlist-item-changed";_.tf="playlist-modified";uf="playlist.next.end";vf="playlist.next.start";wf="preload-aborted";xf="preload-failed";yf="preloaded";zf="preloading";_.Af="prevent";Bf="primary-content";_.
|
|
19
|
-
_.Rf="sc-playlist-live-turned-static";_.Sf="sc-playlist-timeline-changed";_.Tf="seeked";_.Uf="seeking";_.Vf="showing";_.Wf="simid-creative-started";_.Xf="simid-creative-stopped";_.Yf="sinf";_.Zf="smooth";$f="stalled";_.ag="start";_.bg="statechanged";cg="status-pending";_.dg="stbl";_.eg="string";_.fg="stsd";_.gg="style";_.hg="subtitle";_.ig="subtitles-htmlcue";jg="temporary";_.kg="text
|
|
20
|
-
_.qg="timeline-cues-changed";_.
|
|
21
|
-
Tg="webkit-org.w3.clearkey";
|
|
22
|
-
_.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_.wh=function(a){var b=a.B.splice(0)[0];(b=a.h=a.h||b)?b.
|
|
26
|
-
yh=function(a,b,c,d){try{var e=b.call(a.a.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.w=!1,e;var f=e.value}catch(g){return a.a.l=null,
|
|
27
|
-
Bh=function(a){this.next=function(b){
|
|
28
|
-
Dh=function(a,b){if(b){for(var c=
|
|
29
|
-
_.
|
|
30
|
-
_.Oh=function(a){Mh.debug.apply(Mh,arguments)};_.Jh=function(a){Mh.warn.apply(Mh,arguments)};_.Ph=function(a){Mh.error.apply(Mh,arguments)};Qh=function(a,b){this.
|
|
31
|
-
Wh=function(a,b,c){function d(){e&&a.f()}a.stop();var e=!0,f=null;a.a=function(){c?clearInterval(f):clearTimeout(f);e=!1};f=c?setInterval(d,1E3*b):setTimeout(d,1E3*b);return a};_.Xh=function(a){this.f=a;this.a=null};Yh=function(a){return 0>=a?Promise.resolve():new Promise(function(b){setTimeout(function(){b()},1E3*a)})};Zh=function(){this.
|
|
32
|
-
bi=function(a,b){var c;_.
|
|
33
|
-
_.
|
|
34
|
-
|
|
35
|
-
mi=function(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.gi;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.
|
|
36
|
-
ni=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.
|
|
37
|
-
l.f.has(g)?(l.f["delete"](g),l.m.trigger(new _.
|
|
38
|
-
var l=ri(f,a.l);g=new Set;h=!1;l=_.
|
|
39
|
-
vi=function(a,b){return Array.from(a.a.values()).find(function(c){return b.startTime===c.startTime&&b.endTime===c.endTime})||null};ui=function(a,b){if(b.cues){var c=wi(b.cues).filter(function(l){return l.type===
|
|
40
|
-
ti=function(a,b,c){c=_.
|
|
41
|
-
Ai=function(a){var b=[],c={};a=_.
|
|
42
|
-
yi=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=_.
|
|
43
|
-
ri=function(a,b){var c=a.map(function(d){return{startTime:d.startTime,endTime:d.endTime,key:d.value.key,value:d.value.data,
|
|
2
|
+
(function(window){var ba,ca,ea,fa,ha,qa,ua,za,Aa,Fa,Ga,Ha,Ja,Ma,Na,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,ab,bb,fb,hb,ib,jb,kb,lb,mb,ob,pb,tb,xb,Fb,Gb,Hb,Ib,Jb,Mb,Ob,Rb,Sb,Tb,Wb,Xb,Zb,$b,ac,bc,cc,dc,ec,fc,mc,nc,oc,Nc,Tc,ad,bd,id,jd,kd,md,nd,pd,qd,sd,td,ud,vd,wd,xd,Cd,Ed,Jd,Qd,Rd,Sd,Td,Ud,Vd,Xd,Yd,Zd,be,ce,ee,ke,ue,we,xe,Ee,Ye,ef,gf,hf,jf,kf,lf,mf,nf,of,pf,qf,uf,vf,wf,xf,yf,zf,Bf,Jf,Lf,$f,cg,jg,wg,zg,Fg,Qg,Ug,Vg,Wg,Xg,Yg,$g,ah,bh,gh,kh,oh,qh,ph,rh,sh,th,xh,Ah,yh,zh,Bh,Dh,Eh,Ih,Lh,Qh,Uh,Wh,Yh,Zh,$h,bi,ci,ai,ei,fi,hi,li,ii,mi,oi,ni,
|
|
3
|
+
si,vi,ui,ti,xi,Ai,zi,yi,qi,pi,wi,ri,Di,Ei,Fi,Hi,Ji,Ii,Li,Wi,Xi,Yi,$i,bj,cj,ej,ij,kj,lj,oj,jj,fj,pj,uj,zj,Jj,Nj,Oj,Vj,Wj,Zj,ak,bk,dk,ek,fk,ik,mk,nk,ok,lk,pk,rk,qk,sk,tk,uk,xk,wk,yk,zk,vk,Ck,Pk,Rk,Sk,Tk,dl,Uk,kl,jl,nl,ol,xl,zl,Al,yl,Bl,Dl,El,Il,Fl,Gl,Ol,Ql,Rl,Tl,Wl,Yl,Xl,Vl,Zl,Ul,bm,$l,am,cm,dm,gm,sm,um,wm,xm,vm,zm,Am,tm,Bm,Cm,Dm,Em,Fm,Hm,Im,Jm,Km,Gm,Om,Pm,Rm,Um,Wm,bn,cn,dn,en,fn,gn,hn,jn,kn,ln,mn,sn,Fn,Ln,On,Pn,Sn,Tn,ao,fo,go,lo,ro,so,uo,vo,xo,yo,zo,Ao,Bo,Co,Do,Eo,Fo,Go,Ho,Io,Jo,Mo,Ko,To,Vo,Wo,Lo,
|
|
4
|
+
Uo,Xo,Yo,Zo,$o,cp,ep,fp,lp,mp,up,Ap,Jp,Gp,Hp,Np,Pp,Sp,Wp,Xp,aq,Lp,Fp,hq,Zp,iq,kq,jq,sq,oq,nq,qq,tq,rq,vq,pq,uq,wp,Qp,lq,xp,gq,Ep,cq,dq,yq,fq,Kp,Ip,zp,Dq,Fq,Gq,Hq,Iq,Oq,Pq,Rq,Vq,$q,Nq,ar,br,er,gr,hr,jr,kr,fr,lr,mr,nr,or,sr,tr,ur,vr,wr,Br,Cr,Dr,Hr,Gr,Mr,Qr,Sr,Tr,Vr,Ur,Yr,Zr,Xr,Or,ms,Nr,as,Pr,ns,$r,Kr,ks,Ir,Wr,ps,js,gs,hs,fs,is,es,os,rs,ls,us,Lr,Jr,bs,vs,ws,ts,Rr,Hs,Is,Ks,ys,zs,xs,Es,Cs,Ds,Js,Ts,Ps,Os,Ns,Us,Ss,Rs,Zs,Gs,at,Qs,$s,As,Bs,Ws,ht,Xs,Ys,ct,bt,it,gt,lt,Vs,dt,mt,nt,pt,ot,rt,st,tt,ut,qt,wt,yt,
|
|
5
|
+
zt,Bt,Ct,Dt,Et,Ft,Gt,Ht,It,Kt,Lt,Mt,Nt,Jt,Rt,Tt,St,Ut,Vt,X,$t,du,bu,eu,gu,fu,iu,ju,ou,qu,pu,lu,Zt,ku,su,tu,uu,xu,yu,wu,vu,Bu,Du,Cu,Gu,Eu,Ju,Ku,Iu,Mu,Nu,Ou,Lu,Au,Pu,zu,Su,Tu,Vu,Xu,Yu,Zu,$u,av,bv,cv,dv,ev,gv,nv,rv,Dv,Gv,ih,Iv;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";ea="': 'output-restricted'";fa="() is ongoing!";ha=".start";_.ia="6.27.0";_.ja="AUDIO";_.ka="AdaptationSet";_.la="Already destroyed. No-op";_.ma="Already released. No-op";
|
|
6
|
+
_.na="Autoplay is not allowed due to browser policy.";_.oa="BANDWIDTH";_.pa="BASIC";qa="CHECKSUM";_.sa="CLOSED-CAPTIONS";_.ta="CODECS";ua="Can not set volume to ";_.va="Cannot retrieve buffer information due to platform limitations";_.xa="CastlabsPlayer";_.ya="Configuration is valid";za="Content-Length";Aa="Content-Type";_.Ba="Could not find configured DRM environment.";_.Ca="DRM environment '";Fa="DRM licenses loaded";Ga="DRMtoday";Ha="DRMtodayOnboard";_.Ia="DURATION";Ja="Destroying player";
|
|
7
|
+
_.Ka="EXT-X-MEDIA";_.La="EXT-X-STREAM-INF";Ma="Error while decoding string!";Na="Error while fetching certificate!";_.Pa="FairPlay Certificate URL is not defined";_.Qa="FairPlay License URL is not defined";_.Ra="GROUP-ID";Sa="HW_SECURE_ALL";Ta="HW_SECURE_CRYPTO";Ua="HW_SECURE_DECODE";Va="HeaderDrm";Wa="Hide video element .";Xa="Invalid track type: ";Ya="InvalidStateError";Za="Key status for Key ID '";_.$a="LANGUAGE";ab="License verification failed: ";bb="Load interrupted while a player release is pending";
|
|
8
|
+
_.cb="Loading player with configuration";_.db="MaxHeight";_.eb="MaxWidth";fb="Missing media element";_.gb="NAME";hb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";ib="No event provided!";jb="No items in the playlist";kb="No sources provided!";lb="No track data attached to the event, unable to add track!";mb="Not a persistent session.";_.nb="Not supported";ob="NotAllowedError";pb="NotSupportedError";_.qb="PLAYLIST";_.rb="POST";_.sb="PlayReady License URL is not defined";
|
|
9
|
+
tb="Player not ready yet.";_.ub="Player sources";_.vb="Player state change: ";_.wb="Please make sure ";xb="Preloading is not supported by this player.";_.yb="QualityLevel";_.Ab="RESOLUTION";_.Bb="Representation";_.Cb="SUBTITLES";_.Db="SW_SECURE_CRYPTO";_.Eb="SW_SECURE_DECODE";Fb="Schedule interstitial ";Gb="Session is closed";Hb="Setting native ";Ib="Show video element .";Jb="Skipping Session creation. License for init data was already requested in Session: '";_.Kb="SmoothStreamingMedia";_.Lb="TYPE";
|
|
10
|
+
Mb="The index is not in the allowed range.";_.Nb="URI";Ob="Unable to translate ";_.Pb="Unhandled/ignored event";_.Qb="Unregistering listeners";Rb="Unsupported keySystem";Sb="Updating playout limit for interstitial";Tb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Ub="VIDEO";_.Vb="VOD";Wb="Wait for preloading to finish";Xb="WebkitEmeManager.MediaKeySession.load";_.Yb="Widevine License URL is not defined";Zb="Will create EME Manager: ";$b="X-AD-CREATIVE-SIGNALING";ac="X-ASSET-LIST";bc="X-ASSET-URI";
|
|
11
|
+
cc="X-PLAYOUT-LIMIT";dc="X-RESTRICT";ec="X-RESUME-OFFSET";fc="X-TIMELINE-OCCUPIES";_.gc="ad-break-started";_.hc="ad-break-stopped";_.ic="ad-buffering";_.jc="ad-clicked";_.kc="ad-completed";_.lc="ad-first-quartile";mc="ad-hls-asset-list-request";nc="ad-hls-asset-list-response";oc="ad-hls-resoled";_.pc="ad-impression";_.qc="ad-loaded";_.rc="ad-midpoint";_.sc="ad-paused";_.tc="ad-progress";_.uc="ad-resumed";_.vc="ad-skipped";_.wc="ad-started";_.yc="ad-stopped";_.zc="ad-third-quartile";_.Ac="addtrack";
|
|
12
|
+
_.Bc="ads-timeline-changed";_.Cc="airplay-casting-ended";_.Dc="airplay-casting-started";_.Ec="airplay-status-changed";_.Fc="application";_.Gc="application/cea-608";_.Hc="application/dash+xml";_.Ic="application/mp4";_.Jc='application/mp4; codecs\x3d"stpp"';_.Kc='application/mp4; codecs\x3d"wvtt"';_.Lc="application/ttml+xml";_.Mc="application/vnd.ms-sstr+xml";Nc="application/x-www-form-urlencoded";_.Oc="audio";_.Pc="audio/aac";_.Qc="audio/ac3";_.Rc="audio/eac3";_.Sc="audio/mp4";Tc='audio/mp4;codecs\x3d"mp4a.40.2"';
|
|
13
|
+
_.Uc="audiobufferchanged";_.Vc="audiotrackchanged";_.Wc="autoplaynotallowed";_.Xc="bitratechanged";_.Yc="boolean";_.Zc="bufferingended";_.$c="bufferingstarted";ad="canplay";bd="canplaythrough";_.cd="caption";_.dd="castingstarted";_.ed="caststatuschanged";_.fd="cdn-switch-success";_.gd="cenc";_.hd="center";id="certificate-request";jd="change";kd="chrome";_.ld="clpp-fill";md="clpp-hidden";nd="clpp-mc-playlist";pd="clpp-visible";qd="clpp.PlayerFleet";_.rd="clpp.cast.CastSender";sd="clpp.drm.HeaderDrm";
|
|
14
|
+
td="clpp.drm.eme.AppleEmeManager";ud="clpp.drm.eme.EmeFactory";vd="clpp.native.Player";wd="clpp.plist.McPlaylist";xd="clpp.utils.Platform";_.yd="codecs";_.zd="column-reverse";_.Ad="com.adobe.primetime";_.Bd="com.apple.fps";Cd="com.apple.quicktime.HLS";_.Dd="com.microsoft.playready";Ed="com.microsoft.playready.recommendation";_.Fd="com.widevine.alpha";_.Gd="config.drm.customData is not defined";_.Hd="content-steering-change";_.Id="content-steering-location-ban-update";Jd="controls";_.Kd="cuechange";
|
|
15
|
+
_.Ld="decoder";_.Md="destroy()";_.Nd="disabled";_.Od="div";Qd="drm.license.req.";Rd="drm.mediaKeys.end";Sd="drm.mediaKeys.start";Td="drm.onPlay.end";Ud="drm.onPlay.start";Vd="drm.sess.update.";_.Wd="drmexpirationupdate";Xd="drmlicenserequested";Yd="drmrenewalstarted";Zd="drmsessioncreated";_.$d="drmsessionpersisted";_.ae="drmsessionupdate";be="drmtoday";ce="durationchange";_.de="ec-3";ee="encrypted";_.fe="end";_.ge="ended";_.he="error";_.ie="estimatedThroughputKbps";_.je="forced";ke="fullscreenElement";
|
|
16
|
+
_.le="function";_.me="height";_.ne="hidden";_.oe="html";_.re="https://";_.se="image";_.te="internal-error";ue="keystatuseschange";_.ve="left";we="license-renewal";xe="license-request";_.ye="line-left";_.ze="line-right";_.Ae="live-turned-static";_.Be="load";_.Ce="loadeddata";_.De="loadedmetadata";Ee="loadstart";_.Fe="main";_.Ge="mdat";_.He="mdia";_.Ie="message";_.Je="metadata";_.Ke="mimeType";_.Le="minf";_.Me="moov";_.Oe="mpd-type-changed";_.Pe="mpeg-dash-callback-event";_.Qe="none";_.k="number";
|
|
17
|
+
_.Re="object";_.Se="onBitrateChanged()";_.Te="onContentLoaded";_.Ue="onPlayerError()";_.Ve="onPlayerWillDestroy";_.We="onPlayerWillRelease";_.Xe="onStateChanged()";Ye="online-status-changed";_.Ze="optional";_.$e="org.w3.clearkey";_.af="output-restricted";_.bf="pause";_.cf="persistent";_.df="persistent-license";ef="picture-in-picture";_.ff="play";gf="player.afterLoad.end";hf="player.afterLoad.start";jf="player.appendLoad.end";kf="player.appendLoad.start";lf="player.beforeLoad.end";mf="player.beforeLoad.start";
|
|
18
|
+
nf="player.load.end";of="player.load.start";pf="player.setupPlaylist.end";qf="player.setupPlaylist.start";_.rf="playing";_.sf="playlist-item-changed";_.tf="playlist-modified";uf="playlist.next.end";vf="playlist.next.start";wf="preload-aborted";xf="preload-failed";yf="preloaded";zf="preloading";_.Af="prevent";Bf="primary-content";_.Cf="progress";_.Ef="px";_.If="ratechange";Jf="released";_.Kf="releasing";Lf="removetrack";_.Mf="required";_.Nf="resize";_.Of="right";_.Pf="sc-playlist-ended";_.Qf="sc-playlist-item-changed";
|
|
19
|
+
_.Rf="sc-playlist-live-turned-static";_.Sf="sc-playlist-timeline-changed";_.Tf="seeked";_.Uf="seeking";_.Vf="showing";_.Wf="simid-creative-started";_.Xf="simid-creative-stopped";_.Yf="sinf";_.Zf="smooth";$f="stalled";_.ag="start";_.bg="statechanged";cg="status-pending";_.dg="stbl";_.eg="string";_.fg="stsd";_.gg="style";_.hg="subtitle";_.ig="subtitles-htmlcue";jg="temporary";_.kg="text";_.lg="text/vtt";_.mg="text/xml";_.ng="texttrackchanged";_.og="timeline-cue-added";_.pg="timeline-cue-enter";
|
|
20
|
+
_.qg="timeline-cue-exit";_.rg="timeline-cues-changed";_.sg="timeupdate";_.tg="tracksadded";_.ug="trak";_.vg="ttml-xml";wg="unauthenticated";_.xg="und";_.yg="unknown";zg="update";_.Ag="urn:scte:scte35";_.Bg="urn:scte:scte35:2014";_.Cg="user-seeked";_.Dg="user-seeking";_.Eg="value";Fg="version";_.Gg="vertical-lr";_.Ig="vertical-rl";_.Jg="video";_.Lg="video/mp2t";_.Mg="video/mp4";_.Ng="videobufferchanged";_.Og="videotrackchanged";_.Pg="vimond-response";Qg="visibilitychange";_.Rg="vtt-xml";_.Sg="waiting";
|
|
21
|
+
_.Tg="waitingforkey";Ug="webkit-org.w3.clearkey";Vg="webkitkeyadded";Wg="webkitkeyerror";Xg="webkitkeymessage";Yg="webkitneedkey";_.Zg="width";$g="x-dt-csl-tracking-token";ah="x-dt-follow-up-token";bh="x-dt-resp-code";_.ch="yospace-session-ended";_.dh="yospace-session-started";_.fh=function(a){return function(){return _.eh[a].apply(this,arguments)}};gh=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};
|
|
22
|
+
_.v=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:gh(a)}};_.hh=function(a){if(!(a instanceof Array)){a=_.v(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a};_.w=function(a,b){a.prototype=ih(b.prototype);a.prototype.constructor=a;if(jh)jh(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c]};
|
|
23
|
+
kh=function(){kh=function(){};lh.Symbol||(lh.Symbol=mh)};oh=function(a,b){this.a=a;nh(this,"description",{configurable:!0,writable:!0,value:b})};qh=function(){kh();var a=lh.Symbol.iterator;a||(a=lh.Symbol.iterator=lh.Symbol("Symbol.iterator"));typeof Array.prototype[a]!=_.le&&nh(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ph(gh(this))}});qh=function(){}};ph=function(a){qh();a={next:a};a[lh.Symbol.iterator]=function(){return this};return a};
|
|
24
|
+
rh=function(){this.w=!1;this.l=null;this.f=void 0;this.a=1;this.j=this.o=0;this.B=this.h=null};sh=function(a){if(a.w)throw new TypeError("Generator is already running");a.w=!0};th=function(a,b){a.h={Kh:b,ki:!0};a.a=a.o||a.j};_.x=function(a,b,c){a.a=c;return{value:b}};_.z=function(a){a.a=0};_.F=function(a,b,c){a.o=b;void 0!=c&&(a.j=c)};_.uh=function(a){a.o=0;a.j=2};_.G=function(a,b){a.a=b;a.o=0};_.H=function(a){a.o=0;var b=a.h.Kh;a.h=null;return b};_.vh=function(a){a.B=[a.h];a.o=0;a.j=0};
|
|
25
|
+
_.wh=function(a){var b=a.B.splice(0)[0];(b=a.h=a.h||b)?b.ki?a.a=a.o||a.j:void 0!=b.C&&a.j<b.C?(a.a=b.C,a.h=null):a.a=a.j:a.a=0};xh=function(a){this.a=new rh;this.f=a};Ah=function(a,b){sh(a.a);var c=a.a.l;if(c)return yh(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.a["return"]);a.a["return"](b);return zh(a)};
|
|
26
|
+
yh=function(a,b,c,d){try{var e=b.call(a.a.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.w=!1,e;var f=e.value}catch(g){return a.a.l=null,th(a.a,g),zh(a)}a.a.l=null;d.call(a.a,f);return zh(a)};zh=function(a){for(;a.a.a;)try{var b=a.f(a.a);if(b)return a.a.w=!1,{value:b.value,done:!1}}catch(c){a.a.f=void 0,th(a.a,c)}a.a.w=!1;if(a.a.h){b=a.a.h;a.a.h=null;if(b.ki)throw b.Kh;return{value:b["return"],done:!0}}return{value:void 0,done:!0}};
|
|
27
|
+
Bh=function(a){this.next=function(b){sh(a.a);a.a.l?b=yh(a,a.a.l.next,b,a.a.A):(a.a.A(b),b=zh(a));return b};this["throw"]=function(b){sh(a.a);a.a.l?b=yh(a,a.a.l["throw"],b,a.a.A):(th(a.a,b),b=zh(a));return b};this["return"]=function(b){return Ah(a,b)};qh();this[Symbol.iterator]=function(){return this}};_.Ch=function(a,b){var c=new Bh(new xh(b));jh&&jh(c,a.prototype);return c};
|
|
28
|
+
Dh=function(a,b){if(b){for(var c=lh,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];f in c||(c[f]={});c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&nh(c,d,{configurable:!0,writable:!0,value:f})}};Eh=function(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.I=function(a){return Eh(new Bh(new xh(a)))};
|
|
29
|
+
_.J=function(a,b){var c=a.split("."),d=Fh;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};Ih=function(a){return a&&0<=Gh[a]?Gh[a]:Hh};Lh=function(a){if(!a)return _.Jh("clpp.log",Ob+a+ca),-1;var b=Kh[a.toUpperCase()];return void 0===b?(_.Jh("clpp.log",Ob+a+ca),-1):b};_.K=function(a){(this.tag=a)&&void 0===Gh[a]&&(Gh[a]=-1)};_.Nh=function(a){Mh.info.apply(Mh,arguments)};
|
|
30
|
+
_.Oh=function(a){Mh.debug.apply(Mh,arguments)};_.Jh=function(a){Mh.warn.apply(Mh,arguments)};_.Ph=function(a){Mh.error.apply(Mh,arguments)};Qh=function(a,b){this.ib=a;this.sourceIndex=b};_.Th=function(a){if(a){var b=a.a();b in _.Rh?_.Sh.warn("Player-Factory '"+b+"' already registered"):(_.Rh[b]=a,_.Sh.info("Registered Player-Factory: '"+b+"'"))}};Uh=function(a){return Object.values(_.Rh).find(a)||null};_.Vh=function(a){this.f=a;this.a=null};
|
|
31
|
+
Wh=function(a,b,c){function d(){e&&a.f()}a.stop();var e=!0,f=null;a.a=function(){c?clearInterval(f):clearTimeout(f);e=!1};f=c?setInterval(d,1E3*b):setTimeout(d,1E3*b);return a};_.Xh=function(a){this.f=a;this.a=null};Yh=function(a){return 0>=a?Promise.resolve():new Promise(function(b){setTimeout(function(){b()},1E3*a)})};Zh=function(){this.Jc=null;this.f=[];this.h=[];this.Ca=new _.K(qd);this.a=null;this.j=!1};$h=function(a){return[a.Jc].concat(_.hh(a.f)).filter(function(b){return null!=b})};
|
|
32
|
+
bi=function(a,b){var c;_.I(function(d){c=function(){return Promise.all(a.f.filter(function(e){return null!=e.getLoadedSource()}).map(b))};return _.x(d,ai(a,c),0)})};ci=function(a,b){var c;return _.I(function(d){c=function(){return Promise.all($h(a).map(b))};return _.x(d,ai(a,c),0)})};ai=function(a,b){return _.I(function(c){if(1==c.a)return a.a?_.x(c,a.a,2):c.C(2);a.a=b().then(function(){a.a=null});_.z(c)})};_.di=function(){this.a={}};ei=function(a,b,c,d){this.f=a;this.dd=b;this.a=c;this.Yn=!!d};
|
|
33
|
+
_.M=function(a,b){if(b)for(var 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};fi=function(a){this.a=new _.di;this.f=a};_.gi=function(){this.a=new _.di};
|
|
34
|
+
hi=function(a,b,c){function d(h){for(var l=_.v(e),m=l.next();!m.done;m=l.next())a.off(b,m.value,d);c(h)}for(var e=[ee,"msneedkey",Yg,"needkey"],f=_.v(e),g=f.next();!g.done;g=f.next())a.on(b,g.value,d)};_.ji=function(a){var b=a.a,c=[],d;for(d in b.a)c.push.apply(c,b.a[d]);for(b=0;b<c.length;++b)ii(c[b]);a.a.clear()};li=function(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)};ii=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
|
|
35
|
+
mi=function(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.gi;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.K("clpp.native.Metadata")};oi=function(a,b){a.j.on(b,_.Ac,function(c){c=c.track;c.kind===_.Je&&ni(a,c)})};
|
|
36
|
+
ni=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.ne;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=pi(d);qi(c);a.a=ri(c,a.l);0<a.a.size&&(si(a,a.a),a.m.trigger(new _.M(_.rg)));a.j.on(b,_.Kd,function(){for(var e=a.m.getPosition(),f=_.v(a.a),g=f.next();!g.done;g=f.next()){var h,l=a;g=g.value;if(Infinity===g.endTime){if(h=!l.f.has(g)){h=g.startTime;var m=h+.5;h=h<=e&&e<=m}h&&(l.f.add(g),l.m.trigger(new _.M(_.pg,{detail:g})))}else h=g.startTime<=e&&e<=g.endTime,!h&&
|
|
37
|
+
l.f.has(g)?(l.f["delete"](g),l.m.trigger(new _.M(_.qg,{detail:g}))):h&&!l.f.has(g)&&(l.f.add(g),l.m.trigger(new _.M(_.pg,{detail:g})))}});a.m.isLive()&&(a.h=setInterval(function(){if(b.cues){var e=a.m.getSeekRange().start;for(var f=[],g=_.v(b.cues),h=g.next();!h.done;h=g.next())h=h.value,h.endTime<e&&f.push(h);ti(a,b,f);0<f.length&&a.g.debug("Evicted "+f.length+" old cues.");g=_.v(a.a);for(h=g.next();!h.done;h=g.next())h=h.value,h.endTime<e&&a.a["delete"](h);e=0<f.length}else e=!1;ui(a,b);f=pi(d);
|
|
38
|
+
var l=ri(f,a.l);g=new Set;h=!1;l=_.v(l);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=vi(a,m);n?(m.customAttributes&&(n.customAttributes=_.N.ua(n.customAttributes||{},m.customAttributes)||void 0),h=!0):(a.a.add(m),g.add(m))}h=0<g.size||h;qi(f);(e||h)&&a.m.trigger(new _.M(_.rg));si(a,g)},6E3))}};si=function(a,b){for(var c=_.v(b),d=c.next();!d.done;d=c.next())a.m.trigger(new _.M(_.og,{detail:d.value}))};
|
|
39
|
+
vi=function(a,b){return Array.from(a.a.values()).find(function(c){return b.startTime===c.startTime&&b.endTime===c.endTime})||null};ui=function(a,b){if(b.cues){var c=wi(b.cues).filter(function(l){return l.type===Cd}),d=c.filter(function(l){return l.xg}),e=c.filter(function(l){return!l.xg});c=[];e=_.v(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;for(var g=_.v(d),h=g.next();!h.done;h=g.next())h=h.value,xi(f,h)&&(c.push(f),h.Hh=f.startTime)}ti(a,b,c);0<c.length&&a.g.debug("Removed "+c.length+" duplicated cues.")}};
|
|
40
|
+
ti=function(a,b,c){c=_.v(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}}};xi=function(a,b){var c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Hh||a.startTime,f=b.Hh||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};
|
|
41
|
+
Ai=function(a){var b=[],c={};a=_.v(a);for(var d=a.next();!d.done;c={zd:c.zd},d=a.next())c.zd=d.value,(d=b.find(function(e){return function(f){var g=e.zd;return f.startTime===g.startTime&&f.endTime===g.endTime}}(c)))?yi(c.zd,d):(d=zi(c.zd),b.push(d));return b};zi=function(a){var b=a.startTime,c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:"T"+b.toFixed(2)+"-"+c.toFixed(2),type:_.Bi,eventElement:null};yi(a,b);return b};
|
|
42
|
+
yi=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=_.Bg,b.type=_.Ci};qi=function(a){a.forEach(function(b){b.xg=!0})};pi=function(a){return wi(a).filter(function(b){return b.type===Cd&&!b.xg})};wi=function(a){var b=[];a=_.v(a);for(var c=a.next();!c.done;c=a.next())b.push(c.value);return b};
|
|
43
|
+
ri=function(a,b){var c=a.map(function(d){return{startTime:d.startTime,endTime:d.endTime,key:d.value.key,value:d.value.data,li:!1}});c=Di(c);b&&(c=Ei(c));return new Set(Ai(c))};Di=function(a){var b=new Set(a),c=new Set(a.filter(function(d){return"SCTE35-OUT"===d.key}).map(Fi));a.filter(function(d){return"SCTE35-IN"===d.key}).forEach(function(d){c.has(Fi(d))||(d.li=!0)});return Array.from(b.values())};Ei=function(a){a.forEach(function(b){b.li&&(b.endTime=b.startTime,b.startTime=0)});return a};
|
|
44
44
|
Fi=function(a){return a.startTime+"-"+a.endTime};_.Gi=function(a){return Array.isArray(a)?a:[a]};Hi=function(a,b){return a===b?!0:a.length===b.length&&a.every(function(c,d){return c===b[d]})};Ji=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 Ii(a,b)&&Ii(b,a)};Ii=function(a,b){var c=new Set(a);return b.every(function(d){return c.has(d)})};
|
|
45
|
-
_.Ki=function(a,b){b=void 0===b?{}:b;if(b.
|
|
45
|
+
_.Ki=function(a,b){b=void 0===b?{}:b;if(b.Bh){for(var c=[],d={},e=_.v(a),f=e.next();!f.done;d={He:d.He},f=e.next())d.He=f.value,c.some(function(g){return function(h){return b.Bh(g.He,h)}}(d))||c.push(d.He);return c}return Array.from((new Set(a)).values())};Li=function(a,b){var c=new Set(a),d=new Set(b);return{Zn:a.filter(function(e){return!d.has(e)}),up:a.filter(function(e){return d.has(e)}),Ej:b.filter(function(e){return!c.has(e)})}};
|
|
46
46
|
_.Si=function(a,b,c,d){d=void 0===d?_.Mi:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Ni;this.writingMode=_.Oi;this.lineInterpretation=_.Pi;this.line=null;this.lineAlign=_.Qi;this.direction=Ri;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null};
|
|
47
|
-
_.Vi=function(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Ti;this.scroll=Ui;this.cssClassList=[];this.writingMode=this.displayAlign=null};Wi=function(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.gi;this.j=!1;this.g=new _.
|
|
48
|
-
Xi=function(a,b){var c=b.track;c.kind!==_.Je&&(c.mode===_.Vf&&(c.mode=_.
|
|
49
|
-
Yi=function(a,b,c,d){a=(a===_.
|
|
50
|
-
$i=function(a,b){var c=b||Hi,d=null,e=null,f=!1;return function(g){for(var h=[],l=0;l<arguments.length;++l)h[l]=arguments[l];if(f&&c(h,d))return e;f=!0;d=h;return e=a.apply(null,_.
|
|
51
|
-
cj=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];for(c=0;c<b.length;c++){var d=b[c];if(null!==d&&void 0!==d)return d}};_.dj=function(a){var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
_.
|
|
56
|
-
_.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_.
|
|
60
|
-
_.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
_.
|
|
66
|
-
[],
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
_.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
_.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
_.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
_.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
_.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
_.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
_.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
_.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
_.
|
|
147
|
-
|
|
148
|
-
_.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
_.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
_.
|
|
173
|
-
_.
|
|
174
|
-
this.
|
|
175
|
-
|
|
176
|
-
if(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
_.
|
|
191
|
-
_.
|
|
192
|
-
_.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
_.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
_.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if(
|
|
205
|
-
|
|
47
|
+
_.Vi=function(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Ti;this.scroll=Ui;this.cssClassList=[];this.writingMode=this.displayAlign=null};Wi=function(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.gi;this.j=!1;this.g=new _.K("clpp.native.CueHandler")};
|
|
48
|
+
Xi=function(a,b){var c=b.track;c.kind!==_.Je&&(c.mode===_.Vf&&(c.mode=_.ne),a.a.on(c,_.Kd,function(d){d=d.target||d.srcElement;d.mode=_.ne;d.activeCues&&(d=Array.from(d.activeCues).map(a.o),a.l.append(d,[]))}))};_.O=function(a,b,c,d,e){var f=Error.call(this,Yi(a,b,c,d));this.message=f.message;"stack"in f&&(this.stack=f.stack);this.severity=a;this.category=b;this.code=c;this.data=!d||_.N.ia(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.O)};
|
|
49
|
+
Yi=function(a,b,c,d){a=(a===_.Q?"FATAL":"RECOVERABLE")+" Clpp-Error [Category "+b+" - Code "+c+"]";if(_.N.ia(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};_.Zi=function(a,b){var c=Error.call(this,a);this.message=c.message;"stack"in c&&(this.stack=c.stack);this.code=b};
|
|
50
|
+
$i=function(a,b){var c=b||Hi,d=null,e=null,f=!1;return function(g){for(var h=[],l=0;l<arguments.length;++l)h[l]=arguments[l];if(f&&c(h,d))return e;f=!0;d=h;return e=a.apply(null,_.hh(h))}};_.aj=function(a){return null!=a};bj=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];for(c=0;c<b.length;c++){var d=b[c];if(null!==d&&void 0!==d)return d}throw new _.Zi("No non-null, non-undefined value found");};
|
|
51
|
+
cj=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];for(c=0;c<b.length;c++){var d=b[c];if(null!==d&&void 0!==d)return d}};_.dj=function(a,b){for(var c=_.v(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};ej=function(){};
|
|
52
|
+
ij=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(fj(a)===fj(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;for(var c=_.gj(a),d=_.gj(b),e=_.v(hj(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!==d[f])return!1;return!0};_.gj=function(a,b,c){c=void 0===c?Infinity:c;return jj(a,void 0===b?0:b,c,Uint8Array)};kj=function(a,b,c){c=void 0===c?Infinity:c;return jj(a,void 0===b?0:b,c,Uint16Array)};
|
|
53
|
+
lj=function(a,b,c){c=void 0===c?Infinity:c;return jj(a,void 0===b?0:b,c,Uint32Array)};_.mj=function(a,b,c){c=void 0===c?Infinity:c;return jj(a,void 0===b?0:b,c,Int32Array)};_.nj=function(a,b,c){c=void 0===c?Infinity:c;return jj(a,void 0===b?0:b,c,DataView)};oj=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};
|
|
54
|
+
jj=function(a,b,c,d){var e=d.BYTES_PER_ELEMENT||1,f=fj(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};fj=function(a){return a instanceof ArrayBuffer?a:a.buffer};
|
|
55
|
+
_.qj=function(a,b){var c=[a];var d=pj.apply(_.qj,_.hh(c));if(!d||d.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(d=pj.apply(_.qj,_.hh(c)))?c:null;if(!c)throw new _.O(_.Q,1,1011,{message:"The provided URL is invalid.",url:a,base:b});d=_.v(c);c=d.next().value;d=d.next().value;this.a=new URL(c,d);this.f=a.startsWith("//")};pj=function(a,b){try{return new URL(a,b)}catch(c){return null}};
|
|
56
|
+
_.rj=function(a){this.j=a;this.scheme=null;var b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/),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;_.R.startsWith(this.path,
|
|
57
|
+
"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash};_.sj=function(a){return a.scheme+"//"+(a.a+(a.port?":"+a.port:"")+a.path+a.h+a.f)};_.tj=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;var f=a[e],g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};
|
|
58
|
+
uj=function(a){var b={};a=a||"";a=a.substring(a.indexOf("?")+1);a=_.v(a.split("\x26"));for(var c=a.next();!c.done;c=a.next()){var d=c.value.split("\x3d");c=decodeURIComponent(d[0]);d=decodeURIComponent(d[1]||"");c&&(b[c]=d)}return b};_.vj=function(a,b){if(a.startsWith("http://")||a.startsWith(_.re))return a;var c=b;b.startsWith("//")&&(c=location.protocol+c);c=new URL(c);c.search="";return(new URL(a,c)).toString()};
|
|
59
|
+
_.wj=function(a){if(!a)return null;a=(new _.qj(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};zj=function(a,b){for(var c=_.v(xj[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=_.v(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a===_.yj?"":null};
|
|
60
|
+
_.Bj=function(a,b){for(var c=Aj[a],d=0;d<c.length;d++)for(var e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.yj?"":null};_.Dj=function(a,b,c){return a.map(function(d){d=_.wj(d)||"";return(d=_.Cj[b][d])?d:b===_.yj?c&&"vtt"!==c?_.Ic:_.lg:null}).filter(Boolean)[0]||null};_.Ej=function(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d};
|
|
61
|
+
_.S=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.O(_.Q,4,4023,"Required attribute missing: "+b);return a?a.value:c||null};_.Fj=function(a,b){return _.S(a,b,void 0,{required:!0})};_.Gj=function(a,b){this.name=a;this.value=b};
|
|
62
|
+
_.Hj=function(a,b,c,d,e,f,g,h,l,m,n,p,q,t,u,y,A){l=void 0===l?!1:l;m=void 0===m?null:m;n=void 0===n?null:n;p=void 0===p?null:p;q=void 0===q?null:q;t=void 0===t?[]:t;u=void 0===u?null:u;y=void 0===y?function(){return""}:y;this.position=a;this.startTime=b;this.endTime=c;this.Fa=g;this.Ka=d;this.la=e;this.ga=f;this.keyInfo=(void 0===h?null:h)||null;this.Td=_.N.R(l)?!1:!!l;this.timescale=m;this.horizontalTiles=n;this.verticalTiles=p;this.durationPerTile=q;this.a=t||[];this.h=!1;this.initSegment=u;this.ce=
|
|
63
|
+
y?y:function(){return""};this.Pa=A};_.Ij=function(a,b,c,d,e,f,g,h,l,m,n,p,q,t,u){t=void 0===t?[]:t;_.Hj.call(this,a,b,c,d,e,f,g,void 0===h?null:h,void 0===l?!1:l,void 0===m?null:m,void 0===n?null:n,void 0===p?null:p,void 0===q?null:q,t,void 0===u?null:u);this.qa=0};Jj=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.Lj=function(a,b){a=_.Kj(a);b=_.Kj(b);return a.split("-")[0]===b.split("-")[0]};
|
|
64
|
+
_.Kj=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Mj.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};Nj=function(a){if(null!==a&&void 0!==a)return Number(a)};Oj=function(a){return a.reduce(function(b,c){return b+c},0)};_.Pj=function(a){if(typeof a!==_.eg)return null;var b=a.trim().match(/^(\d+)x(\d+)$/);if(!b)return null;a=parseInt(b[1],10);b=parseInt(b[2],10);return 0>=a||0>=b?null:{ee:a,Be:b,wo:a*b}};_.Qj=function(a){this.f=a;this.a=0};
|
|
65
|
+
_.Rj=function(a,b){b.lastIndex=a.a;var c=b.exec(a.f);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.a===a.f.length||null===c||c.position!==a.a)return null;a.a+=c.length;return c.results};
|
|
66
|
+
_.Sj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.O(_.Q,4,4016,{invalidTag:b});var d=c[1],e=c[2];c=[];var f;if(e){e=new _.Qj(e);var g;(g=_.Rj(e,/^([^,=]+)(?:,|$)/g))&&g[1]&&(f=g[1].trim());for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=_.Rj(e,h);)c.push(new _.Gj(g[1],g[2]||g[3]||""))}return new _.Ej(a,d,c,f)};_.Uj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:_.hh(Tj).concat()}};
|
|
67
|
+
Vj=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||_.hh(Tj).concat()};Wj=function(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b};
|
|
68
|
+
_.Yj=function(a,b){_.N.ia(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});var c={uris:a.uris||[],type:a.type||_.Xj,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
|
|
69
|
+
[],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:_.hh(Tj).concat(),requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&
|
|
70
|
+
Vj(c,b);return c};_.ck=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(Zj(c))return ak(a);throw bk(a);};Zj=function(a){return 200<=a&&299>=a&&202!==a};ak=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
|
|
71
|
+
bk=function(a){a=ak(a);try{var b=_.R.Yd(a.data,!0)}catch(d){b=null}_.Oh("HTTP error text:",b);var c=a.request;return new _.O(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.Q:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};dk=function(a,b){var c=parseInt(b,10);Number.isNaN(c)&&(c=-1);a.bytesTotal=c;a.bytesLoaded=0;a.bytesRemaining=c};
|
|
72
|
+
ek=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};fk=function(a,b,c){if(0>=a)return Promise.resolve();var d=8*c/a-b/1E3;return 0<d?new Promise(function(e){setTimeout(e,1E3*d)}):Promise.resolve()};
|
|
73
|
+
_.gk=function(){this.$i=this.yf=this.done=!1;this.error=this.value=null;var a,b,c=new Promise(function(d,e){a=function(f){this.done=this.yf=!0;this.value=f;d(f)};b=function(f){this.done=this.$i=!0;this.error=f;e(f)}});c.yf=!1;c.done=!1;c.$i=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c};_.hk=function(a,b){this.T=a;this.A=b;this.a=!1};ik=function(a,b){a.T.then(function(){return b(!0)},function(){return b(!1)});return a};_.jk=function(){this.a=[]};
|
|
74
|
+
_.kk=function(a,b){a.a.push(ik(b,function(){var c=a.a,d=c.indexOf(b);-1<d&&c.splice(d,1)}))};mk=function(){this.a=lk()};nk=function(a){return lk()-a.a};ok=function(a){var b=new mk;b.a=a.a;return b};lk=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};pk=function(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new mk};
|
|
75
|
+
rk=function(a,b,c){return b.read().then(function(d){var e=d.done;d=d.value;null!=d&&(qk(a,d),ek(c,d.byteLength,nk(a.h)),a.h.a=lk());return e?(e=a.a.buffer,a.a.byteLength!==a.f&&(e=e.slice(0,a.f)),Promise.resolve(e)):Promise.resolve().then(function(){return rk(a,b,c)})})};qk=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){for(var d=a.a.byteLength;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
|
|
76
|
+
sk=function(a){var b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0};tk=function(a,b){var c=a.f+b.byteLength;if(c>a.a.byteLength){var d=a.a;a.a=new Uint8Array(Math.max(Math.ceil(a.a.buffer.byteLength*a.h),c));a.a.set(d)}a.a.set(b,a.f);a.f+=b.byteLength};uk=function(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new sk(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new mk};
|
|
77
|
+
xk=function(a,b,c,d){return b.read().then(function(e){var f=e.done;e=e.value;d&&e&&(d(e.byteLength,nk(a.w)),a.w.a=lk());if(f)return f=vk(a),(f=c(!0,f))?f.then(function(){return a.j.a.buffer}):Promise.resolve(a.j.a.buffer);var g=Promise.resolve();if(null!=e){tk(a.j,e);a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f);e=wk(a);for(f=[];e;)f.push(e),e=wk(a);if(!a.A)f.forEach(function(m){g=g.then(function(){return c(!1,m)})});else if(0<f.length){e=f[0];if(1<f.length){e=f[0];var h=f[f.length-1],
|
|
78
|
+
l=h.end-e.start;e={start:e.start,end:h.end,length:l,data:new DataView(a.j.a.buffer,e.start,l),count:f.length}}(f=c(!1,e))&&(g=f)}}return g.then(function(){return xk(a,b,c,d)})})};wk=function(a){if(0<=a.o&&a.f<a.o)return null;for(var b=yk(a);null!==b;){if(b.name===_.Ge){var c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=yk(a)}return null};
|
|
79
|
+
yk=function(a){var b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=zk(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=zk(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;try{var e=a.l.getUint32(a.a,!1);var f=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.O(_.Q,3,3E3);}if(2097151<e)throw new _.O(_.Q,3,3E3);a.a+=8;c=e*Math.pow(2,32)+f}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
|
|
80
|
+
zk=function(a){var b=a.l.getUint32(a.a,!1);a.a+=4;return b};vk=function(a){var b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};Ck=function(){};_.Dk=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Fk=function(a){return _.Ek("Tizen"+(a?" "+String(a):""))};_.Gk=function(){return _.Ek("Web0S")};_.Ik=function(){return _.Gk()&&79===_.Hk().major};_.Jk=function(){return _.Ek("CrKey")};
|
|
81
|
+
_.Kk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Fk()};_.Lk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Kk()&&1<navigator.maxTouchPoints};_.Mk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};_.Ek=function(a){return(navigator.userAgent||"").includes(a)};
|
|
82
|
+
Pk=function(){if(Nk)return Nk;Ok||(Ok=new _.Xh(function(){Nk=null}));(Nk=document.querySelector(_.Jg)||document.querySelector(_.Oc))||(Nk=document.createElement(_.Jg));Ok.ha(1);return Nk};Rk=function(a,b){try{return parseInt(b,10)}catch(c){Qk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};
|
|
83
|
+
Sk=function(a){var b={major:-1,name:_.yg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Rk(a,c[0]));2<=c.length&&(b.minor=Rk(a,c[1]));3<=c.length&&(b.patch=Rk(a,c[2]));4<=c.length&&(b.build=Rk(a,c[3]));return b};Tk=function(a,b){if(!a||!b||0===b.length)return!1;for(var c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
|
|
84
|
+
dl=function(){var a=Uk();if(!a)return Vk;var b=a.match(/^.+?(?=\))/);if(!b)return Vk;b=b[0];if(Tk(b,["iphone","ipad"]))return Wk;if(Tk(b,["android"]))return Xk;if(Tk(b,["macintosh"]))return Yk;if(Tk(b,["windows nt"]))return Zk;if(Tk(b,["tizen"]))return $k;if(Tk(b,["web0s"]))return al;if(Tk(b,["linux"]))return bl;Qk.warn("Unable to identify OS from user agent: "+a);return Vk};
|
|
85
|
+
_.Hk=function(){var a=Uk(),b=["ie","edge","opera","firefox","safari",kd];var c=dl();for(var d=el[c],e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Sk(c[1]);return Sk("")};Uk=function(){var a=window.navigator.userAgent;return a=a.toLowerCase()};
|
|
86
|
+
_.gl=function(){var a=dl();var b=dl();var c=el[b];if(c){c=Uk().match(c.os_version)[1];c=Sk(c);if(b===Zk)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=Sk("");a:{c=Uk();var d=["ie","edge","opera","firefox","safari",kd],e=dl();e=el[e];for(var f=0,g=d.length;f<g;f++)if(e[d[f]]&&c.match(e[d[f]])){c=d[f];break a}c=fl}return{os:a,osVersion:b,browser:c,browserVersion:_.Hk()}};
|
|
87
|
+
kl=function(a){var b=new hl,c;for(c in a.headers)b.append(c.toLowerCase(),a.headers[c]);var d=new il,e={Ld:!1,lj:!1};b={T:jl(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:d.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},e),request:a,abort:function(){e.Ld||(e.Ld=!0,d.abort());return Promise.resolve()}};if(a=a.timeout){var f=window.setTimeout(function(){e.lj=!0;d.abort()},a);b.T=b.T["finally"](function(){window.clearTimeout(f)})}return b};
|
|
88
|
+
jl=function(a,b,c,d){var e,f,g,h,l,m,n,p,q,t,u,y,A,B,C,E,D;return _.I(function(L){switch(L.a){case 1:return e=ll,f=new mk,g=ok(f),_.F(L,2),_.x(L,e(a,c),4);case 4:h=L.f;l=Wj(h.headers);m={uri:h.url,data:null,headers:l,status:h.status,timeMs:0,responseStartMs:nk(g),request:b};if(Zj(h.status)){L.C(5);break}n=m;return _.x(L,h.arrayBuffer(),6);case 6:throw n.data=L.f,m.timeMs=nk(f),bk(m);case 5:p=h.headers.get(za);dk(b,p);q=p?parseInt(p,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type)return A=
|
|
89
|
+
h.body.getReader(),B=new uk(q,!b.disableMergedFragments),C=function(P,U){if(d.Ld)return null;U&&U.data&&(ek(b,U.data.byteLength,nk(g)),g.a=lk());return b.onFragment&&U?b.rateLimitBps?fk(b.rateLimitBps,nk(f),b.bytesLoaded).then(function(){return b.onFragment(U)}):b.onFragment(U):null},E=m,_.x(L,xk(B,A,C,b.onProgress),12);t=h.body.getReader();u=new pk(q);return _.x(L,rk(u,t,b),9);case 9:y=L.f;if(!b.rateLimitBps){L.C(10);break}return _.x(L,fk(b.rateLimitBps,nk(f),y.byteLength),10);case 10:m.data=y;L.C(8);
|
|
90
|
+
break;case 12:E.data=L.f;case 8:if(d.Ld)throw Error("Request was aborted");m.timeMs=nk(f);return L["return"](ak(m));case 2:D=_.H(L);if(d.Ld)throw new _.O(1,1,7001,{url:a,request:b});if(d.lj)throw new _.O(1,1,1003,{url:a,request:b});if(D&&1001===D.code)throw D;_.Ph("Error while fetching data:",D);throw new _.O(1,1,1002,{url:a,error:D,request:b,status:-1},D);}})};
|
|
91
|
+
nl=function(a){var b=a.uris[a.uriIndex],c=new ml,d=new mk,e=ok(d),f=0,g,h=new _.gk;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;var l=!1,m=!1;c.onreadystatechange=function(p){p=p.target;p.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=nk(e));p.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!l&&(p=p.getResponseHeader(za),dk(a,p),l=!0)};c.onload=function(p){p=p.target;var q=(p.getAllResponseHeaders()||"").trim().split("\r\n"),t={};
|
|
92
|
+
q=_.v(q);for(var u=q.next();!u.done;u=q.next())u=u.value.split(": "),t[u[0].toLowerCase()]=u.slice(1).join(": ");try{var y=nk(e);m||ek(a,p.response?p.response.length:0,y);var A=_.ck(t,p.response,p.status,b,p.responseURL,a,y,g);a.rateLimitBps?fk(a.rateLimitBps,nk(e),a.bytesLoaded).then(function(){h.resolve(A)}):h.resolve(A)}catch(B){h.reject(B)}};c.onerror=function(p){p=p.target;if(0>=p.status)h.reject(new _.O(1,1,1002,{url:b,request:a,status:p.status}));else{var q=p.getAllResponseHeaders(),t={};if(q){q=
|
|
93
|
+
_.v(q.trim().split("\r\n"));for(var u=q.next();!u.done;u=q.next())u=u.value.split(": "),t[u[0].toLowerCase()]=u.slice(1).join(": ")}p=_.ck(t,p.response,p.status,b,p.responseURL,a,nk(e),g);h.resolve(p)}};c.ontimeout=function(){h.reject(new _.O(1,1,1003,{url:b,request:a}))};c.onprogress=function(p){var q=nk(d);d.a=lk();if(100<q||p.lengthComputable&&p.loaded===p.total)ek(a,p.loaded-f,q),f=p.loaded,m=!0};for(var n in a.headers)c.setRequestHeader(n.toLowerCase(),a.headers[n]);c.send(a.body);return{T:h,
|
|
94
|
+
request:a,abort:function(){c.abort();h.reject(new _.O(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};ol=function(){};_.ql=function(a,b){b=void 0===b?!0:b;var c=_.pl(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")};_.rl=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};
|
|
95
|
+
_.sl=function(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.tl=function(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};_.ul=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};
|
|
96
|
+
_.vl=function(a){for(var b=0,c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);for(var d=c=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};_.pl=function(a){a=_.R.fromCharCode(_.gj(a));return btoa(a)};
|
|
97
|
+
xl=function(a){try{var b=a.uris[a.uriIndex],c=_.wl(b);return{T:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:function(){return Promise.resolve()}}}catch(d){return{T:Promise.reject(d),request:a,abort:function(){return Promise.resolve()}}}};
|
|
98
|
+
_.wl=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Ph("Bad data URI, failed to parse scheme"),new _.O(_.Q,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.Ph("Bad data URI, failed to extract encoding and MIME type"),new _.O(_.Q,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.rl(a).buffer:_.R.eb(a).buffer,contentType:c}};
|
|
99
|
+
zl=function(a){_.hk.call(this,new _.gk,function(){return Promise.resolve()});this.B=a;this.h=null;this.w=this.T;this.f=-1;this.j=this.l=this.o=null;yl(this)};Al=function(a,b,c){a.o=setTimeout(b,c)};
|
|
100
|
+
yl=function(a){a.h=a.B.then(function(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=Bl(e.request.baseDelay,1E3));var f=a.f*(1+(2*Math.random()-1)*Bl(e.request.fuzzFactor,.5));a.f*=Bl(e.request.backoffFactor,2);if(0<f)return(new Promise(function(g,h){a.l=h;Al(a,function(){g(e.plugin(e.request))},f)}))["catch"](function(g){if(!a.a)throw g;})}if(a.a)throw new _.O(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});
|
|
101
|
+
return e.plugin(e.request)});var b=0,c=0,d=0;return a.h.then(function(e){var f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.T}).then(function(e){a.w.resolve(e)})["catch"](function(e){if(e instanceof _.O){var f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return yl(a);g&&e.a(_.Q);a.w.reject(e)}else a.w.reject(e)})};Bl=function(a,b){return null===a||void 0===a?b:a};
|
|
102
|
+
_.Cl=function(){this.h=[];this.f=[];this.j=[];this.l=[];this.A=!1;this.w=new _.jk;this.a={};this.headers=new Map;this.o=0;this.a.data=xl;!window.fetch||!window.AbortController||_.Fk(6)||_.Gk()&&68<_.gl().browserVersion.major?(this.a.http=nl,this.a.https=nl):(this.a.http=kl,this.a.https=kl)};Dl=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return c=_.R,_.x(e,a.fetch(b),2);d=e.f;return e["return"](c.zi(c.ea(d.data)))})};
|
|
103
|
+
El=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return _.x(e,Dl(a,b),2);c=e.f;if(!c)return e["return"](null);try{d=JSON.parse(c);if(null==d||typeof d!==_.Re)throw Error("Not an object");return e["return"](d)}catch(f){throw new _.Zi("Failed to parse JSON response","json-failed");}})};
|
|
104
|
+
_.Hl=function(a,b,c){if(a.A)return new zl(Promise.reject(new _.O(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.o&&0<a.o&&(b.rateLimitBps=a.o);for(var d=[],e=_.v(a.h),f=e.next();!f.done;f=e.next())d.push(f.value);if(b.requestModifiers)for(e=_.v(b.requestModifiers),f=e.next();!f.done;f=e.next())d.push(f.value);b.requestModifiers=d;Fl(a,b);d=[];e=_.v(a.j);for(f=e.next();!f.done;f=e.next())d.push(f.value);if(b.responseModifiers)for(e=_.v(b.responseModifiers),f=e.next();!f.done;f=e.next())d.push(f.value);
|
|
105
|
+
b.responseModifiers=d;d=f=new _.gk;try{e={};for(var g=_.v([{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.f}]),h=g.next();!h.done;e={Ke:e.Ke},h=g.next()){e.Ke=h.value;for(var l={},m=_.v(e.Ke.modifiers),n=m.next();!n.done;l={Je:l.Je},n=m.next())l.Je=n.value,d=d.then(function(u,y){return function(A){if(p.a)throw new _.O(_.Q,1,7001,A?{url:A.uris[A.uriIndex],request:A}:null);return"internal"===u.Ke.type?y.Je(A,c)||A:y.Je(A)||A}}(e,l))["catch"](function(u){if(u instanceof _.O)throw u;
|
|
106
|
+
throw new _.O(_.Q,1,1006,null,u);})}d=d.then(function(u){return{request:u,plugin:Gl(a,u)}});var p=new zl(d);g={};var q=_.v(b.responseModifiers);for(n=q.next();!n.done;g={Ie:g.Ie},n=q.next())g.Ie=n.value,p.then(function(u){return function(y){function A(){if(p.a)throw new _.O(_.Q,1,7001,y?{url:y.request.uris[y.request.uriIndex],request:y.request}:null);}A();var B=u.Ie(y)||y;A();return B}}(g))["catch"](function(u){return function(y){if(y instanceof _.O&&y.data&&y.data.response){var A=u.Ie(y.data.response);
|
|
107
|
+
if(A&&A.then)return A.then(function(){return Promise.reject(y)})}return Promise.reject(y)}}(g))["catch"](function(u){if(u instanceof _.O)throw u;throw new _.O(_.Q,1,1007,null,u);});q={};var t=_.v(a.l);for(n=t.next();!n.done;q={If:q.If},n=t.next())q.If=n.value,p["catch"](function(u){return function(y){y instanceof _.O&&y.data&&y.data.response||u.If({uri:b.uris[b.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:b});return Promise.reject(y)}}(q))["catch"](function(u){if(u instanceof
|
|
108
|
+
_.O)throw u;throw new _.O(_.Q,1,1007,null,u);});_.kk(a.w,p);f.resolve(b);return p}catch(u){return new zl(Promise.reject(u))}};Il=function(a,b,c,d){d=void 0===d?"HEAD":d;var e,f;return _.I(function(g){switch(g.a){case 1:if(!navigator.onLine)return g["return"](!1);if(!b){g.C(2);break}e=_.Yj(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";_.F(g,4);return _.x(g,a.fetch(e).T,6);case 6:_.G(g,2);break;case 4:if(f=_.H(g),1002===f.code||1003===f.code)return g["return"](!1);case 2:return g["return"](!0)}})};
|
|
109
|
+
Fl=function(a,b){for(var c=_.v(a.headers),d=c.next();!d.done;d=c.next()){var e=_.v(d.value);d=e.next().value;e=e.next().value;b.headers[d]||(b.headers[d]=e)}};Gl=function(a,b){var c=b.uris[b.uriIndex],d=new _.qj(c,location.href);d=d?d.a.protocol.slice(0,-1):"";var e=a.a[d];if(!e)throw new _.O(_.Q,1,1E3,{url:c});return function(f){return e(f)}};
|
|
110
|
+
_.Jl=function(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=[]};_.Kl=function(a){return a&&a!==_.xg?a:null};
|
|
111
|
+
Ol=function(a){if(!a)throw new _.O(_.Q,3,3101,Xa+a);if(!_.N.ia(a))throw new _.O(_.Q,3,3101,Xa+a+". Track type must be a string!");switch(a.toLowerCase()){case _.Ll:return _.Ll;case _.T:return _.T;case _.Ml:return _.Ml;case Nl:return Nl}throw new _.O(_.Q,3,3101,"Unknown track type: "+a+".");};
|
|
112
|
+
Ql=function(a,b){a=Ol(a);var c=_.Kl(b.kind),d=b.id;d||(d=String(_.Pl++));d=new _.Jl(d,c===_.Je?Nl:a);d.kind=c;d.label=_.Kl(b.label);d.language=_.Kl(b.language);d.originalLanguage=b.originalLanguage||d.language;return d};Rl=function(a){return"@@scheme:"+(a.scheme||"")+("@@value:"+a.value)+("@@id:"+(a.id||"")+"@@type:"+(a.type||""))+("@@protocol:"+(a.protocol||""))};_.Sl=function(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Gd=this.bandwidth=this.height=this.width=null;this.a=!1};
|
|
113
|
+
Tl=function(a){this.f=a;this.g=new _.K("clpp.native.hls.HlsMetadataParser");this.a=$i(this.h.bind(this),function(b,c){return b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata})};
|
|
114
|
+
Wl=function(a,b,c){var d,e,f,g,h;return _.I(function(l){if(1==l.a)return _.x(l,Ul(a,b,c),2);d=l.f;e=d.mimeType;f=d.renditions;g=new _.Jl("dummy",_.Ml);h=f.map(function(m,n){var p=new _.Sl("R"+n,g);p.bandwidth=m.bandwidth;p.Gd=m.Gd;p.codec=m.codec;p.width=m.width;p.height=m.height;return p});Vl(h);return l["return"]({renditions:h,mimeType:e||void 0})})};
|
|
115
|
+
Yl=function(a){a=a.split("\n").filter(function(c){return c.trim().startsWith("#EXT-X-MEDIA:")}).map(function(c){return Xl(c)});var b=new Map;a.forEach(function(c){if(c.type&&c.name){var 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};
|
|
116
|
+
Xl=function(a){function b(d){return(d=c.getAttribute(d))?d.value:void 0}var c=_.Sj(0,a);a=b(_.Lb);a=null!=a?{AUDIO:_.T,VIDEO:_.Ml,SUBTITLES:_.Ll}[a]:void 0;return{type:a,groupId:b(_.Ra),name:b(_.gb),language:b(_.$a),$o:b("AUTOSELECT"),"default":b("DEFAULT"),lp:b("FORCED"),oh:b("CHARACTERISTICS"),uri:b(_.Nb)}};Vl=function(a){var b=new Set;a.forEach(function(c){b.add(c.width+"x"+c.height)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};
|
|
117
|
+
Zl=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return c=_.Yj(b),_.x(e,Dl(a.f,c),2);d=e.f;return e["return"](d)})};Ul=function(a,b,c){var d,e,f,g;return _.I(function(h){if(1==h.a)return d=$l(b),e=am(b,c),f=d[0]?d[0].codec:null,_.x(h,bm(a,e,f),2);g=h.f;return h["return"]({mimeType:g,renditions:d})})};bm=function(a,b,c){var d,e;return _.I(function(f){if(1==f.a)return b&&c?_.x(f,Zl(a,b),2):f["return"](null);d=f.f;e=[cm(d,b),dm(d,b)].filter(Boolean);return f["return"](_.Dj(e,_.Jg,c))})};
|
|
118
|
+
$l=function(a){return a.split("\n").filter(function(b){return b.trim().startsWith("#EXT-X-STREAM-INF:")}).map(function(b){var c=_.Sj(0,b);if(c.getAttribute(_.Ub))throw Error("Playlist contains alternative video streams.");var d=_.S(c,_.Ab);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.S(c,_.oa);e=e?Number(e):null;var f=_.S(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.S(c,_.ta);c=_.Bj(_.Jg,c?c.split(","):[]);return{bandwidth:e,Gd:f,codec:c,width:b,height:d,mimeType:null}})};
|
|
119
|
+
am=function(a,b){var c=a.split("\n").filter(function(d){return d.trim().endsWith(".m3u8")})[0];return c?_.vj(c,b):null};cm=function(a,b){var c=a.split("\n").find(function(d){return!d.startsWith("#")&&0<d.trim().length});return c?_.vj(c,b):null};dm=function(a,b){var c=a.split("\n").find(function(d){return d.startsWith("#EXT-X-MAP:")});return c?(c=_.S(_.Sj(0,c),_.Nb))?_.vj(c,b):null:null};gm=function(a,b){var c=em;fm.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,plugin:b})};
|
|
120
|
+
_.km=function(a,b){for(var c=_.v([hm,im,jm,em]),d=c.next();!d.done;d=c.next())if(d=fm.get(a.toLowerCase().split(";")[0]+"-"+d.value)){var e=d.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return d.plugin}return null};_.lm=function(a,b){var c=a;b&&(c+=';codecs\x3d"'+b+'"');return c.replace(/\s/g,"")};_.mm=function(a){return a.split(";")[0]};
|
|
121
|
+
_.nm=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(function(b){return b.startsWith("codecs\x3d")}))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};_.pm=function(a,b,c){for(var d=_.v(_.om),e=d.next();!e.done;e=d.next())if(e=e.value,e.probe(b,c))return e.create(a);return null};_.qm=function(a){a=_.om.indexOf(a);0<=a&&_.om.splice(a,1)};_.rm=function(){};
|
|
122
|
+
sm=function(){this.g=new _.K("clpp.native.TrackManager");this.m=null;this.f=new _.gi;this.h=[];this.B=0;this.o={};this.F=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.J=this.sg.bind(this,_.Ll);this.L=this.ug.bind(this,_.Ll);this.K=this.tg.bind(this,_.Ll);this.N=this.sg.bind(this,_.Ml);this.U=this.ug.bind(this,_.Ml);this.P=this.tg.bind(this,_.Ml);this.G=this.sg.bind(this,_.T);this.I=this.ug.bind(this,_.T);this.H=this.tg.bind(this,_.T);this.j=null};
|
|
123
|
+
um=function(a,b){var c,d,e,f,g,h,l,m,n,p,q;return _.I(function(t){if(1==t.a){c=a.m.getConfiguration();d=_.pm(c,b.mimeType,_.lg);if(!d)return a.g.warn("Track MIME type is not supported",b),t["return"]();e=_.Yj(b.url);f=b.mimeType===_.Ic?"tt":"c";g={objectType:f};h=_.Hl(a.m.getNetworkEngine(),e,g);return _.x(t,h.T,2)}(l=t.f)&&l.data&&(m="External_"+a.B++,a.o[m]=b,n=d.a(_.gj(l.data)),p=URL.createObjectURL(new Blob([n])),q={url:p,kind:b.kind,language:b.language,label:b.label,mimeType:_.lg},tm(a,q,m));
|
|
124
|
+
_.z(t)})};wm=function(a,b,c){return vm(a)&&b===_.Ml&&!!c.enableHlsVideoTrackInfo};xm=function(a,b,c){return vm(a)&&(b===_.T||b===_.Ll)&&!!c.enableMetadata};vm=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.ym&&!a.url.endsWith(".m3u8"))&&_.Kk()};
|
|
125
|
+
zm=function(a,b,c){var d,e;return _.I(function(f){if(1==f.a)return(d=a.m.getLoadedSource())&&a.j?_.x(f,a.j.a(d.url,c),2):f["return"]();e=f.f;e.mimeType&&(b.mimeType=e.mimeType);e.renditions&&0<e.renditions.length&&(b.renditions=e.renditions,b.renditions.forEach(function(g){g.track=b}));_.z(f)})};
|
|
126
|
+
Am=function(a,b,c){var d,e,f,g;return _.I(function(h){if(1==h.a)return(d=a.m.getLoadedSource())&&a.j?_.x(h,a.j.a(d.url,c),2):h["return"]();e=h.f;e.Lc&&(f=b.type+":"+b.label,(g=e.Lc.get(f))&&g.oh&&(b.accessibility=g.oh.split(",").map(function(l){return l.trim()}).map(function(l){return{value:l,type:b.type,protocol:"HLS"}})));_.z(h)})};
|
|
127
|
+
tm=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);_.R.empty(b.url)?e.src=URL.createObjectURL(new Blob([])):e.src=b.url;d.appendChild(e);a.F.push(e)}}};Bm=function(a,b){if(!a.m)return null;var c=a.m.getSurface();if(!c)return null;c=c.getMedia();if(!c)return null;switch(b){case _.T:return c.audioTracks;case _.Ml:return c.videoTracks;case _.Ll:return c.textTracks;default:return null}};
|
|
128
|
+
Cm=function(a,b){var c=Bm(a,b);c&&(c=Array.from(c),b===_.Ll&&(c=c.filter(function(d){return d.kind!==_.Je})));return c};Dm=function(a,b){return a.h.filter(function(c){return c.type===b})};Em=function(a,b){var c=a.a.get(b)||null;return c&&c.renditions[0]};Fm=function(a,b){var c=a.l.get(b);return c&&c.renditions[0]};
|
|
129
|
+
Hm=function(a,b,c){var d=Cm(a,b);if(c){if(void 0===a.h.find(function(l){return l.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);var e=!0,f=!1;switch(b){case _.Ll:var g="mode";e=_.Vf;f=_.Nd;break;case _.T:g="enabled";break;case _.Ml:g="selected"}if(g){d=_.v(d);for(var h=d.next();!h.done;h=d.next())h=h.value,h[g]=Gm(c,h,c.type)?e:
|
|
130
|
+
f}}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&d&&b===_.Ll){g=_.v(d);for(h=g.next();!h.done;h=g.next())h.value.mode=_.Nd;a.a.set(b,null)}b===_.T?a.m.trigger(new _.M(_.Vc)):b===_.Ll&&a.m.trigger(new _.M(_.ng))};Im=function(a){return a.enabled||a.selected||a.mode===_.Vf||a.mode===_.ne};
|
|
131
|
+
Jm=function(a,b,c){c=_.Gi(c).filter(function(e){return e});a.g.info("Find preferred tracks for",b,c);var d=Dm(a,b);c.some(function(e){var f=_.Kj(e);return(e=d.find(function(g){g=_.Kj(g.language||"");return _.Lj(f,g)}))?(a.g.info("Will select track with id",e.id),Hm(a,b,e),!0):!1})};Km=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};
|
|
132
|
+
Gm=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.N.ra(a,{kind:_.Kl(b.kind),language:_.Kl(b.language),label:_.Kl(b.label)},["kind","language","label"])};_.Lm=function(a,b){this.length=(this.f=a)?a.length:0;this.a=[];this.type=void 0===b?"total":b};_.Mm=function(){this.Wd=new fi(this);this.Sd=[]};Om=function(a){return a.name===ob&&Nm.some(function(b){return a.message.startsWith(b)})};Pm=function(){};
|
|
133
|
+
_.Tm=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Lk()&&(a=360);var b=_.Uj();b.maxAttempts=3;a={source:"",license:Qm,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.Uj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
|
|
134
|
+
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Rm(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.Uj()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.Fe,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
|
|
135
|
+
suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,xmlParser:_.Sm,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,
|
|
136
|
+
stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,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:_.Af},restrictions:Rm(),tizen:{sideStreamText:_.Fk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Ld,
|
|
137
|
+
preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Vb,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1};if(_.Fk()||_.Gk())a.ads.hls.enable=!1;if(_.Ek("Edge/")||_.Fk())a.streaming.gapDetectionThreshold=.5;_.Gk()&&(a.streaming.stallEnabled=!1);_.Ik()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Fk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
|
|
138
|
+
1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};
|
|
139
|
+
_.Vm=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];if(!b)return _.Tm();c=[_.Tm()];var d=!1;b=_.v(b);for(var e=b.next();!e.done;e=b.next())e=e.value,null!==e&&void 0!==e&&(_.N.ia(e)&&(e={source:e}),e.lowLatencyMode&&!d&&(c.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),d=!0),c.push(e),null!=e.suggestedPresentationDelay&&
|
|
140
|
+
c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));c=_.N.ua.apply(null,c);_.N.ia(c.volume)&&(""===""+c.volume?c.volume=null:c.volume=Number(c.volume));if(!_.N.R(c.volume)&&(!_.N.xa(c.volume)||_.N.isNaN(c.volume)))throw new _.O(_.Q,7,7100,"config.volume is not a number");if(!_.N.R(c.preferredTextLanguage)&&!_.N.ia(c.preferredTextLanguage)&&!Array.isArray(c.preferredTextLanguage))throw new _.O(_.Q,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.N.R(c.preferredAudioLanguage)&&
|
|
141
|
+
!_.N.ia(c.preferredAudioLanguage)&&!Array.isArray(c.preferredAudioLanguage))throw new _.O(_.Q,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.N.R(c.preferredAudioCodec)&&!_.N.ia(c.preferredAudioCodec)&&!Array.isArray(c.preferredAudioCodec))throw new _.O(_.Q,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.N.R(c.preferredVideoCodec)&&!_.N.ia(c.preferredVideoCodec)&&!Array.isArray(c.preferredVideoCodec))throw new _.O(_.Q,7,7100,"config.preferredVideoCodec is not a string or an array");
|
|
142
|
+
if(!_.N.R(c.drm)){if(c.drm.env&&!_.N.ia(c.drm.env))throw new _.O(_.Q,7,7100,"config.drm.env is not a string");if(c.drm.offlineId&&!_.N.ia(c.drm.offlineId))throw new _.O(_.Q,7,7100,"config.drm.offlineId is not a string");}if(d=c.streaming){d.bufferingGoal=Number(d.bufferingGoal);d.rebufferingGoal=Number(d.rebufferingGoal);d.bufferBehind=Number(d.bufferBehind);d.smallGapLimit=Number(d.smallGapLimit);d.durationBackoff=Number(d.durationBackoff);if(!_.N.xa(d.bufferingGoal)||_.N.isNaN(d.bufferingGoal))throw new _.O(_.Q,
|
|
143
|
+
7,7100,"config.streaming.bufferingGoal is not a number");if(!_.N.xa(d.rebufferingGoal)||_.N.isNaN(d.rebufferingGoal))throw new _.O(_.Q,7,7100,"config.streaming.rebufferingGoal is not a number");if(d.rebufferingGoal>d.bufferingGoal)throw new _.O(_.Q,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.N.xa(d.bufferBehind)||_.N.isNaN(d.bufferBehind))throw new _.O(_.Q,7,7100,"config.streaming.bufferBehind is not a number");if(!_.N.xa(d.smallGapLimit)||_.N.isNaN(d.smallGapLimit))throw new _.O(_.Q,
|
|
144
|
+
7,7100,"config.streaming.smallGapLimit is not a number");if(!_.N.xa(d.durationBackoff)||_.N.isNaN(d.durationBackoff))throw new _.O(_.Q,7,7100,"config.streaming.durationBackoff is not a number");d=c.manifest;if(_.N.R(d.availabilityWindowOverride))d.availabilityWindowOverride=NaN;else if(typeof d.availabilityWindowOverride!==_.k)throw new _.O(_.Q,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Um(c.restrictions);Um(c.abr.restrictions);c.abr.initialRestrictions&&Um(c.abr.initialRestrictions)}return c};
|
|
145
|
+
Rm=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}};
|
|
146
|
+
Um=function(a){_.N.R(a.maxPixels)&&(a.maxPixels=Infinity);_.N.R(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.N.R(a.maxHeight)&&(a.maxHeight=Infinity);_.N.R(a.maxWidth)&&(a.maxWidth=Infinity);_.N.R(a.minPixels)&&(a.minPixels=0);_.N.R(a.minBandwidth)&&(a.minBandwidth=0);_.N.R(a.minHeight)&&(a.minHeight=0);_.N.R(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);
|
|
147
|
+
a.maxBandwidth=Number(a.maxBandwidth);a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.O(_.Q,7,7100,"Restrictions contain NaN");};Wm=function(a){return typeof a===_.Re&&!Array.isArray(a)&&"source"in a};
|
|
148
|
+
_.Xm=function(a){_.Mm.call(this);this.log=new _.K(a);this.configuration=this.Ia=_.Tm();this.ca=this.F=null;this.ne=this.Lg=!1;this.Xg=new _.K("clpp.video.events");this.Hd=null;this.cf=-1;this.rj=this.Xn.bind(this);this.Cg=new _.Cl;this.N=new _.gi;this.yg=this.Xc=this.ld=this.P=null};_.Zm=function(a){return _.Ym.get(a)||null};_.an=function(a){_.Ym.get(a.id())?$m.warn("Component already in use."):_.Ym.set(a.id(),a)};
|
|
149
|
+
bn=function(a){return Array.from(_.Ym.values()).find(function(b){return b instanceof a})||null};cn=function(a){for(var b=_.v(_.Ym.values()),c=b.next();!c.done;c=b.next())a(c.value)};dn=function(a){cn(function(b){b.o(a)})};en=function(a){cn(function(b){b.h(a)})};fn=function(){cn(function(){})};gn=function(){cn(function(){})};hn=function(a){if(null!==bn(a))return null;a=new a;a.f();_.an(a);$m.info("Installed component:",a.id());return a};
|
|
150
|
+
jn=function(a){if(a=bn(a))a.a(),_.Ym["delete"](a.id()),$m.info("Uninstalled component:",a.id())};kn=function(){this.a=this.f=null;this.g=new _.K("clpp.drm.csl")};ln=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[$g]=a.f),a.a&&(b.headers[ah]=a.a))};
|
|
151
|
+
mn=function(a,b){if(b.request&&3===b.request.type){a.f=b.headers[$g];a.a=b.headers[ah];var c=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);if(c)return c=JSON.parse(_.R.ea(_.rl(c))),{delay:c.renewalPeriod,Wo:{maxAttempts:c.retryCount,baseDelay:1E3*c.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}}return null};_.on=function(a){_.nn[a.J]=a};
|
|
152
|
+
_.qn=function(a){var b={attemptParameters:_.Uj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Oa:{},widevineVersion:_.Fd};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!==
|
|
153
|
+
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.eg&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){var c=_.nn[a.env]||null;if(!c)throw _.Oh(_.Ba,_.wb+a.env+_.aa),new _.O(_.Q,6,6015,_.Ca+a.env+"' is missing.");b.Oa=_.pn(c,a.customData)||{};_.R.startsWith(a.env.toLowerCase(),be)&&(b.enforceSingleSession=!0)}return b};
|
|
154
|
+
sn=function(a){a=rn[a];if(!a)return null;var b=_.gl();return b.os===Xk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};_.tn=function(a){this.J=a;this.f={}};
|
|
155
|
+
_.pn=function(a,b){var c={},d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0,f=b?b.serverCertificate:void 0,g=a.f[_.Fd];g&&(c[_.Fd]={licenseUrl:g.licenseUrl,videoRobustness:cj(d,g.videoRobustness),audioRobustness:cj(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:bj(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:bj(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1),
|
|
156
|
+
serverCertificate:void 0===f?g.serverCertificate:null===f?null:typeof f===_.eg?sn(f):f});(g=a.f[_.Bd])&&(c[_.Bd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;e=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Dd])&&(c[_.Dd]={licenseUrl:g.licenseUrl,videoRobustness:d||g.videoRobustness,audioRobustness:e||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});
|
|
157
|
+
return c};_.un=function(a,b){b=void 0===b?!1:b;this.f=_.N.xa(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer};_.wn=function(a,b,c){var d=c||0;c=b.byteLength-d;var e=_.gj(a.f.buffer);b=_.gj(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.vn()}};_.W=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.vn()}};_.vn=function(){throw new _.O(_.Q,3,3E3);};_.xn=function(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0};_.yn=function(a){return a.a<a.f.byteLength};
|
|
158
|
+
_.An=function(a){try{var b=a.f.getUint8(a.a);a.a+=1;return b}catch(c){_.zn()}};_.Bn=function(a){try{var b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(c){_.zn()}};_.Cn=function(a){try{var b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(c){_.zn()}};_.Dn=function(a){try{var b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(c){_.zn()}};
|
|
159
|
+
_.En=function(a){var 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){_.zn()}if(2097151<c)throw new _.O(_.Q,3,3001);a.a+=8;return c*Math.pow(2,32)+b};Fn=function(a,b){for(var c=new Uint8Array(b),d=0;d<b;d++)c[d]=_.An(a);return c};_.Gn=function(a,b){a.a+b>a.f.byteLength&&_.zn();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.gj(c)};
|
|
160
|
+
_.zn=function(){throw new _.O(_.Q,3,3E3,"Buffer read out of bounds.");};_.Hn=function(){this.h=[];this.f=[];this.a=!1;this.g=new _.K("clpp.mp4")};_.In=function(a){for(;_.yn(a.reader)&&!a.parser.a;)a.parser.uf(a.start+a.headerSize,a.reader,a.partialOkay)};_.Jn=function(a){for(var b=_.Cn(a.reader);0<b&&!a.parser.a;--b)a.parser.uf(a.start+a.headerSize,a.reader,a.partialOkay)};_.Kn=function(a){return function(b){var c=b.reader.Ua()-b.reader.getPosition();a(_.Gn(b.reader,c))}};
|
|
161
|
+
Ln=function(a){for(var b=0,c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Mn=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Nn=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};On=function(){};Pn=function(a){var b="";try{b=_.R.Yd(a)}catch(c){}return b};_.Rn=function(a){a=Pn(a);var b="";a.length&&(b=(new _.rj(a)).a);return b};
|
|
162
|
+
Sn=function(a){if(!a)return null;var b=null;try{var c=JSON.parse(_.R.ea(a)),d=_.rl(c.sinf[0]);(new _.Hn).M(_.Yf,_.In).M("schi",_.In).M("tenc",function(e){e.reader.skip(6);_.An(e.reader)&&(e.reader.skip(1),b=_.tl(_.Gn(e.reader,16)));e.parser.stop()}).parse(d)}catch(e){}return b};
|
|
163
|
+
Tn=function(a,b,c){if(!c||!c.byteLength)throw new _.O(_.Q,6,6102);var d;typeof b===_.eg?d=_.R.Cf(b,!0):d=b;a=_.R.Cf(Pn(a),!0);b=new _.un(12+a.byteLength+d.byteLength+c.byteLength,!0);_.W(b,a.byteLength);_.wn(b,_.gj(a));_.W(b,d.byteLength);_.wn(b,_.gj(d));_.W(b,c.byteLength);_.wn(b,_.gj(c));return _.gj(b.buffer)};_.Un=function(a){var b=_.gj(a.body);b=_.ql(b);a.headers[Aa]=Nc;a.body=_.R.eb("spc\x3d"+b).buffer};
|
|
164
|
+
_.Vn=function(a){try{var b=_.R.ea(a.data)}catch(d){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{var c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(d){}a.data=oj(_.rl(b))};
|
|
165
|
+
ao=function(){var a=Wn;if(a===Xn)return"https://lic.drmtoday.com";if(a===Yn)return"https://lic.staging.drmtoday.com";if(a===Zn)return"https://lic-demo.staging.drmtoday.com";if(a===$n)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};fo=function(a){var b=ao();if(a===_.Fd)return b+bo;if(a===_.Dd)return b+co;if(a===_.Bd)return b+eo;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
|
|
166
|
+
go=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
|
|
167
|
+
_.io=function(a,b,c){b=Pn(b);c=c&&c.customData?c.customData:{};b=new _.rj(go(b));var d=uj(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.R.kf(""+a)&&(d.assetId=a,ho.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.R.kf(""+e)&&(d.variantId=e,ho.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],ho.debug("KeyId found in FPS SKD. Removing other parameters")):
|
|
168
|
+
a=["assetId","variantId"];b.f=_.tj(d,!1,a);"/"!==b.path||b.j.includes(b.a+"/")||(b.path="");b=_.sj(b);return c.fpsContentId=b};_.ko=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(Ga)?c.customData&&(_.jo(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(""+c.customData.assetId),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(""+c.customData.variantId)),b.uris[0]=a)):ho.warn(hb)};
|
|
169
|
+
lo=function(a,b,c){_.ko(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.qj(b.uris[0]);c.a.searchParams.set(_.cf,a.toString());b.uris[0]=c.toString()};
|
|
170
|
+
_.mo=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.ko(a,b,c,!1);b.headers[Aa]=Nc;c={spc:_.pl(b.body)};if((a=a.drm)&&a.env.startsWith(Ha)&&d){a={};var e=uj((new _.rj(go(d))).f);d=e.keyId;if(e=e.assetId)ho.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(ho.info("Applying keyId from HLS manifest."),a.keyId=d);a.keyId&&(ho.info("Adding keyID to FPS payload:",a.keyId),c.keyId=a.keyId);a.assetId&&(ho.info("Adding assetID to FPS payload:",a.assetId),c.assetId=a.assetId)}b.body=
|
|
171
|
+
_.R.xd(_.tj(c,!0))};_.no=function(a,b){ho.debug("Clearing response data");if(200===b.status){var c=_.R.ea(b.data).trim();"\x3cckc\x3e"===c.substr(0,5)&&"\x3c/ckc\x3e"===c.substr(-6)&&(c=c.slice(5,-6));b.data=_.rl(c).buffer}};_.oo=function(a,b){var c=a.drm;if(!c||!c.env.startsWith(Ga))ho.warn(hb);else if(c.customData&&c.customData.merchant&&!c.env.startsWith(Ha)){var d=new _.qj(b.uris[0]),e=d.a.pathname;e.endsWith("/")||(e+="/");e+=c.customData.merchant;d.a.pathname=e;b.uris[0]=d.toString()}};
|
|
172
|
+
_.po=function(a,b){try{var c=_.gj(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));ho.debug("Widevine License response",d);var e=atob(d.license),f=new Uint8Array(e.length);for(c=0;c<e.length;++c)f[c]=e.charCodeAt(c);b.data=f.buffer}catch(g){ho.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
|
|
173
|
+
_.jo=function(a,b){var c=b.drm;if(c&&c.customData){var d={userId:c.customData.userId,sessionId:c.customData.sessionId,merchant:c.customData.merchant};_.N.Ec(d)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(d)));(c=c.customData.authToken)&&(a.headers["x-dt-auth-token"]=c)}};ro=function(a){var b={},c=a?a[bh]:void 0;a=qo[a?a[bh]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
|
|
174
|
+
so=function(a){a=a["x-dt-li"];if(!a)return null;try{var b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(c){return ho.warn("Unable to parse DRMtoday License Info header (x-dt-li)",c),null}};_.to=function(a){this.f=a;this.a=void 0};uo=function(){this.size=0;this.a=void 0;this.g=new _.K("clpp.drm.eme.MediaKeyStatusMap")};vo=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
|
|
175
|
+
xo=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=wo.value().get(b),c.one(a,b,d))};yo=function(){this.a=this.f=null};
|
|
176
|
+
zo=function(a,b){this.keySystem=a;if(a.startsWith(_.Bd))for(var c=_.v(b),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.persistentState===_.Mf)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:_.Ze,distinctiveIdentifier:_.Ze,initDataTypes:e.initDataTypes,sessionTypes:[jg],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=_.v(e.audioCapabilities),l=h.next();!l.done;l=h.next())l=l.value,l.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,l.contentType.split(";")[0])&&
|
|
177
|
+
(d.audioCapabilities.push(l),g=!0));if(e.videoCapabilities)for(e=_.v(e.videoCapabilities),l=e.next();!l.done;l=e.next())h=l.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Mg));d=g?d:null}if(d){this.a=d;return}}c=Error(Rb);c.name=pb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;};
|
|
178
|
+
Ao=function(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.gi;this.j=0;this.g=new _.K(td);this.g.info("Created Media Keys for "+a)};
|
|
179
|
+
Bo=function(a,b){a.f=b;_.ji(a.a);if(!b)return Promise.resolve();a.a.on(b,ee,function(c){_.Oh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Yg,function(c){a.g.debug("Handle webkitNeedKey event");c=_.gj(c.initData);if(_.nj(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");
|
|
180
|
+
c=_.R.Cc(c.subarray(4),!0);c=_.R.eb(c);var d=new Event(ee);d.initDataType="skd";d.initData=oj(c);a.f.dispatchEvent(d)});xo(b,HTMLMediaElement.HAVE_METADATA,a.a,function(){return b.webkitSetMediaKeys(a.h)});return Promise.resolve()};Co=function(a,b){_.Mm.call(this);this.a=null;this.o=a;this.f=this.h=null;this.j=new _.gi;this.sessionId=b;this.expiration=NaN;this.closed=new _.gk;this.l=!1;this.keyStatuses=new uo;this.g=new _.K(td)};Do=function(a,b){vo(a.keyStatuses,b);a.dispatchEvent(new _.M(ue))};
|
|
181
|
+
Eo=function(){};Fo=function(){this.a=null;this.g=new _.K("clpp.drm.eme.StandardEmeManager")};Go=function(){};Ho=function(){this.f=this.a=null;this.h="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.h="webkit")};
|
|
182
|
+
Io=function(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.$e&&(this.a=Ug,a=!1);var e=!1;d=_.v(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=[],h=[],l=!1;if(f.audioCapabilities)for(var m=_.v(f.audioCapabilities),n=m.next();!n.done;n=m.next())n=n.value,n.contentType&&(l=!0,b.canPlayType(n.contentType.split(";")[0],this.a)&&(g.push(n),e=!0));if(f.videoCapabilities)for(g=_.v(f.videoCapabilities),n=g.next();!n.done;n=g.next())m=n.value,m.contentType&&(l=!0,b.canPlayType(m.contentType,
|
|
183
|
+
this.a)&&(h.push(m),e=!0));l||(e=b.canPlayType(_.Mg,this.a)||b.canPlayType("video/webm",this.a));f.persistentState!==_.Mf||a||(e=!1);if(e){this.f=f;return}}b=Rb;if(c===_.$e||c===_.Fd)b="None of the requested configurations were supported.";c=Error(b);c.name=pb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;};Jo=function(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.gi;this.j=[];this.l=new Map};
|
|
184
|
+
Mo=function(a,b){a.a=b;_.ji(a.f);b&&(a.f.on(b,a.h+"needkey",function(c){var d=new Event(ee);d.initDataType=_.gd;d.initData=oj(c.initData);a.a.dispatchEvent(d)}),a.f.on(b,a.h+"keymessage",function(c){var d=Ko(a,c.sessionId);if(d){var e=void 0===d.keyStatuses.getStatus();c=new _.M(_.Ie,{messageType:e?xe:we,message:c.message});_.Oh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);d.dispatchEvent(c)}else _.Ph("Session not found",c.sessionId)}),a.f.on(b,a.h+"keyadded",function(c){(c=
|
|
185
|
+
Ko(a,c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",function(c){var d=Ko(a,c.sessionId);if(d){var e=Error("EME v0.1b key error"),f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?Lo(d,_.af):1===e?Lo(d,"expired"):Lo(d,_.te))}}))};
|
|
186
|
+
Ko=function(a,b){var c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};To=function(a,b,c,d){_.Mm.call(this);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 _.gk;this.keyStatuses=new uo};
|
|
187
|
+
Vo=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if(a.l===_.df)if(c)var d=_.gj(_.R.eb("LOAD_SESSION|"+c));else{var e=_.R.eb("PERSISTENT|"),f=new Uint8Array(e.byteLength+b.byteLength);f.set(e,0);f.set(_.gj(b),e.byteLength);d=f}else d=_.gj(b)}catch(h){return Promise.reject(h)}a.f=new _.gk;var g=Uo(a,"generateKeyRequest");try{a.j[g](a.h,d)}catch(h){if(h.name!==Ya)return a.f=null,Promise.reject(h);(new _.Xh(function(){try{a.j[g](a.h,d)}catch(l){a.f.reject(l),
|
|
188
|
+
a.f=null}})).ha(.01)}return a.f};Wo=function(a,b,c){if(a.a)a.a.then(function(){return Wo(a,b,c)})["catch"](function(){return Wo(a,b,c)});else{a.a=b;if(a.h===Ug){var d=_.R.ea(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.rl(e.keys[0].k);e=_.rl(e.keys[0].kid)}else d=_.gj(c),e=null;var f=Uo(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};Lo=function(a,b){vo(a.keyStatuses,b);a.dispatchEvent(new _.M(ue))};
|
|
189
|
+
Uo=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};Xo=function(){};Yo=function(){};Zo=function(){};$o=function(){};cp=function(a,b){var c=ap;if(a){var d=c.find(function(e){return e.a()===a});if(d)return bp.info(Zb+d.a()),d.create();bp.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(function(e){return e.a()===b})))return bp.info(Zb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");bp.info(Zb+c.a());return c.create()};
|
|
190
|
+
_.dp=function(){};ep=function(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c};fp=function(){ep.apply(this,arguments)};_.hp=function(a){var b=_.sl(a);b=parseInt(b.byteLength,10).toString(16);b=_.sl("12"+b+a);return new fp(gp,a,b)};
|
|
191
|
+
_.ip=function(a){function b(t){switch(t){case 0:do if(!_.yn(d))throw Error("not enough data to skip!");while(_.An(d)&128);break;case 1:d.skip(8);break;case 2:d.skip(c());break;case 3:for(;4!==(t=c()&7);)b(t);break;case 5:d.skip(4);break;default:throw Error("invalid wire type "+t);}}function c(){for(var t=_.An(d),u=(t&127)>>>0,y=7;128<=t&&28>=y;)t=_.An(d),u=(u|(t&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:u}var d=new _.xn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.Cn(d);var e=_.Cn(d);
|
|
192
|
+
e=_.Mn(e);var f=_.Cn(d),g=f>>>24;f&=16777215;var h=_.Gn(d,16);h=_.tl(h);if(0<g){var l=_.Cn(d);d.skip(16*l)}l=_.Cn(d);for(var m=[],n=null;_.yn(d);){var p=c(),q=p&7;p>>>=3;if(2===q){q=c();if(0>q)throw Error("unable to read length of field "+p);q=Fn(d,q);2===p?m.push(q):4===p&&(n=q)}else b(q)}_.Oh("Parsed WV PSSH Box","size",a,"name",e,Fg,g,"flags",f,"size",l,"systemId",h,"contentId (base64)",n?_.pl(n):"","keyIds",m.map(function(t){return _.tl(t)}));return 0<m.length?_.hp(_.tl(m[0])):null};
|
|
193
|
+
_.jp=function(a,b,c,d,e,f){f=void 0===f?null:f;ep.call(this,a,b,d);this.version=e;this.h=c;this.l=f};
|
|
194
|
+
_.pp=function(a){var b=_.kp;a:{var c=new _.xn(new DataView(a.buffer),!0);_.Cn(c);for(_.Bn(c);_.yn(c);)if(1===_.Bn(c)){var d=_.Bn(c);c=_.Gn(c,d);break a}c=null}c||(c=a);a=_.R.Cc(c,!0);d=b.te(a,"WRMHEADER");a=d.getAttribute(Fg)||"";d=b.Ja(d,"DATA");var e=b.Ja(d,"LA_URL");b=e?b.sa(e):"";e=_.kp;var f=e.Ja(d,"KID");if(f)if(f=e.sa(f)){var g=e.Ja(d,qa);e=g?e.sa(g):null;e={value:f,Vf:e}}else e=null;else e=null;d=e?[e]:(e=lp(d))?[e]:(d=mp(d))?d:null;e=d&&d[0]||{};d=e.Vf;e=_.rl(void 0===e.value?"":e.value);
|
|
195
|
+
e=_.np(e);e=_.tl(e);return new _.jp(_.op,e,b,c,a,d)};_.np=function(a){var 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=_.gj(a);a.set(b,0);return a};lp=function(a){var b=_.kp;a=b.Ja(a,"PROTECTINFO");if(!a)return null;var c=b.Ja(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(qa);c=c.getAttribute("ALGID");return{value:b,Vf:a,Gj:c}};
|
|
196
|
+
mp=function(a){var b=_.kp;a=b.Ja(a,"PROTECTINFO");if(!a)return null;a=b.Ja(a,"KIDS");if(!a)return null;a=b.aa(a,"KID");if(!a.length)return null;b=[];a=_.v(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;if(c=d.getAttribute("VALUE")){var e=d.getAttribute(qa);d=d.getAttribute("ALGID");b.push({value:c,Vf:e,Gj:d})}}return b.length?b:null};_.rp=function(a){qp&&performance.mark(a)};
|
|
197
|
+
_.tp=function(a,b,c){qp&&(b=performance.measure(a,b,c),null!=b&&sp.info('Step: "'+a+'" took '+b.duration.toFixed(0)+" ms."))};up=function(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Hn).ba("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.Jh("No pssh box found!")};
|
|
198
|
+
_.yp=function(a,b){var c=this;this.D=a;this.jc=b;this.K=new Set;this.F=this.J=this.l=null;this.da=!1;this.a=null;this.L=vp;this.B=new _.gi;this.P=new kn;this.h=new Map;this.N=[];this.I=new _.gk;this.Hb=0;this.f=null;this.w=function(d){c.A=!0;c.G=!1;c.I.reject(d);a.onError(d)};this.o=new Map;this.ka=new Map;this.fa=new _.Xh(function(){return wp(c)});this.j=!1;this.Ia=new _.gk;this.H=!1;this.ja=[];this.gb=!1;this.Z=0;this.g=new _.K("clpp.drm.DrmEngine");this.ya=(new _.Xh(function(){xp(c)})).Gb(1);this.I["catch"](function(){});
|
|
199
|
+
this.A=this.G=!1;this.U=null};
|
|
200
|
+
Ap=function(a){var b,c,d,e,f;return _.I(function(g){switch(g.a){case 1:a.B.release();a.B=null;a.P.release();a.P=null;a.A=!1;a.G=!1;a.I.reject();a.ya.stop();a.ya=null;a.fa.stop();a.fa=null;b=Array.from(a.h.keys());c=_.v(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,e.kd&&e.kd.stop();a.h.clear();return _.x(g,Promise.all(b.map(function(h){return Promise.resolve().then(function(){var l;return _.I(function(m){if(1==m.a)return a.g.debug("Closing session",h.sessionId),_.F(m,2),_.x(m,zp(h),4);
|
|
201
|
+
if(2!=m.a)return _.G(m,0);l=_.H(m);a.g.warn("Error while closing session",l);_.z(m)})})})),2);case 2:if(!a.F){g.C(3);break}_.F(g,4);return _.x(g,a.l.Nd(null),6);case 6:_.G(g,5);break;case 4:f=_.H(g),a.g.warn("Error while resetting media keys",f);case 5:a.F=null;case 3:a.l=null,a.a=null,a.K.clear(),a.J=null,a.N=[],a.f=null,a.w=null,a.D=null,a.Z=0,a.U=null,_.z(g)}})};
|
|
202
|
+
_.Dp=function(a,b,c){c=void 0===c?[]:c;a.L=Bp;a.N=c;a.H=0<c.length;a.g.debug("Using Persisted Licenses: "+a.H);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.Cp(a,b)};
|
|
203
|
+
Jp=function(a,b){var c=b.some(function(g){return 0<g.drmInfos.length});if(!c){var d=_.N.$g(a.f.Oa);Ep(b,d)}var e=a.f.Oa[_.Bd];d=b.some(function(g){return g.drmInfos.some(function(h){return h.keySystem===_.Bd})});if(!1!==a.f.Zo&&_.Kk()&&!d&&e){var f=_.v(b);for(d=f.next();!d.done;d=f.next())d.value.drmInfos.push({keySystem:_.Bd,licenseServerUri:e.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],
|
|
204
|
+
periodId:null})}if(e=Fp(a))for(f=_.v(b),d=f.next();!d.done;d=f.next())d.value.drmInfos=[e];d=Gp(b);Hp(a,d);d=_.v(d);for(e=d.next();!e.done;e=d.next())Ip(e.value,a.f.Oa);return c};_.Cp=function(a,b){var c=Jp(a,b),d=Gp(b);d=_.v(d);for(var e=d.next();!e.done;e=d.next())Kp(a,e.value,a.f.Oa);d=Lp(a,b);if(!d.size)return a.da=!0,Promise.resolve();_.rp(Sd);d=_.Mp(a,d);return(c?d:d["catch"](function(){})).then(function(){_.rp(Rd);_.tp("DRM queryMediaKeys_()",Sd,Rd)})};
|
|
205
|
+
Gp=function(a){var b=[];a=_.v(a);for(var c=a.next();!c.done;c=a.next()){c=_.v(c.value.drmInfos);for(var d=c.next();!d.done;d=c.next())b.push(d.value)}return b};Hp=function(a,b){for(var c=_.v(b),d=c.next();!d.done;d=c.next())d=d.value,""===d.licenseServerUri||a.f.Oa[d.keySystem]||(a.f.Oa[d.keySystem]={licenseUrl:""})};
|
|
206
|
+
Np=function(a){var b;return _.I(function(c){switch(c.a){case 1:if(a.l.$e())return c["return"]();if(!a.U){c.C(2);break}return _.x(c,a.U,3);case 3:return c["return"]();case 2:return _.F(c,4),a.U=a.l.Nd(a.J),_.x(c,a.U,6);case 6:_.G(c,0);break;case 4:b=_.H(c);if(a.j)return c["return"]();a.w(new _.O(_.Q,6,6003,b.message,b));_.z(c)}})};
|
|
207
|
+
Pp=function(a,b){return _.I(function(c){if(1==c.a)return a.g.info("Handle encrypted event for type "+b.initDataType),_.x(c,Np(a),2);if(!b.initData)return c["return"]();_.Op(a,b.initDataType,_.gj(b.initData));_.z(c)})};
|
|
208
|
+
_.Vp=function(a,b){if(!a.J)return hi(a.B,b,function(){a.w(new _.O(_.Q,6,6010))}),Promise.resolve();a.F=b;a.l.Se(b);a.B.one(a.F,_.ff,function(){return Qp(a)});a.B.on(a.F,_.Tg,function(e){var f=a.G;a.G=!a.A;!f&&a.G&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(function(e){return 0<e.initData.length}),d=Promise.resolve();if(c||a.l.Md()!==Rp||a.N.length)d=Np(a);c=Promise.resolve();_.Gk()&&38===_.Hk().major||(a.a&&a.a.keySystem!==_.$e&&!a.a.serverCertificate&&
|
|
209
|
+
(c=Sp(a)),c=c.then(function(){return _.Tp(a)}));return Promise.all([d,c]).then(function(){a.j||(_.Up(a),a.B.on(a.F,ee,function(e){return Pp(a,e)}))})["catch"](function(e){if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.Fd&&1>a.Z&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.O(1,6,6004)),a.a.serverCertificate=null,a.Z++,_.Vp(a,b);1<=a.Z&&a.g.info("Could not get valid widevine server certificate. Giving up");
|
|
210
|
+
throw e;}})};_.Tp=function(a){var b,c;return _.I(function(d){if(1==d.a){if(!(a.J&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length))return d.C(0);_.F(d,3);return _.x(d,a.J.setServerCertificate(a.a.serverCertificate),5)}if(3!=d.a)return b=d.f,void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored."),_.G(d,0);c=_.H(d);throw new _.O(_.Q,6,6004,{browserError:c.message});})};
|
|
211
|
+
Sp=function(a){var b=a.keySystem(),c=a.f.Oa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();var e=a.D.getConfiguration();return Wp(a,e).then(function(){var f=c.modifiers,g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Yj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=id;g&&f.requestModifiers.push(function(l){return g(e,l)});h&&f.responseModifiers.push(function(l){return h(e,l)});a.g.debug("Fetching certificate");return a.D.Bb.fetch(f).T}).then(function(f){a.a.serverCertificate=
|
|
212
|
+
_.gj(f.data)})["catch"](function(f){var g=f.data.headers;g=Object.assign({message:Na,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},ro(g));throw new _.O(_.Q,6,6100,g,f);})};Wp=function(a,b){var c,d;return _.I(function(e){c=a.D.nd();return c?(d=b&&b.drm&&b.drm.customData)?_.x(e,c(d),0):e["return"]():e["return"]()})};Xp=function(a,b){if(!a)return!1;for(var c=0;c<b.We.length;c++)if(_.ul(a,b.We[c]))return!0;return!1};
|
|
213
|
+
_.Up=function(a){for(var b=a.a?a.a.initData||[]:[],c=_.v(b),d=c.next();!d.done;d=c.next()){d=d.value;var e=!_.Fk(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.Bd)){var f=a.h.values();f=_.v(f);for(var g=f.next();!g.done;g=f.next())g=g.value,_.ul(d.initData,g.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),e=!1):g.periodId===d.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode for Key ID "+(d.keyId+
|
|
214
|
+
".")),Xp(d.initData,g)||(g.We.push(d.initData),d.keyId&&!g.rb.includes(d.keyId)&&g.rb.push(d.keyId),a.o.get(d.keyId)||a.o.set(d.keyId,cg)),e=!1)}!e||a.H&&a.L===Bp||(_.Yp(a,d.keyId,d.initData)&&(e=!1),e&&(a.g.info("Request new media key session on create"),Zp(a,d.keyId,d.periodId,d.initDataType,d.initData)))}c=_.v(a.N);for(d=c.next();!d.done;d=c.next())_.$p(a,d.value);b.length||a.N.length||(a.A||a.g.info(Fa),a.A=!0,a.G=!1,a.I.resolve());return a.I};
|
|
215
|
+
_.Op=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.H||a.L!==Bp)){var e=a.keySystem();if(!e.startsWith(_.Bd)&&b===_.gd){var f=new up(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(var 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.F.webkitCurrentPlaybackTargetIsWireless||
|
|
216
|
+
_.Fk(2)||a.keySystem().startsWith(_.Bd)||!_.Yp(a,d,c,!0))&&Zp(a,d,null,b,c)}};
|
|
217
|
+
_.Yp=function(a,b,c,d){d=void 0===d?!1:d;for(var e=_.v(a.h.keys()),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.h.get(f);if(_.ul(c,g.initData))return b?g.rb.includes(b)?d&&a.g.info("Skipping Session creation. License for init data with Key ID "+(b+" was already requested in Session: '")+(f.sessionId+"'. ")):(g.rb.push(b),a.o.get(b)||a.o.set(b,cg),d&&a.g.info(Jb+(f.sessionId+"'Adding Key ID ")+(b+" to session meta-data."))):d&&a.g.info(Jb+(f.sessionId+"'")),!0;if(Xp(c,g))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
|
|
218
|
+
!0}return!1};aq=function(a){var b=Infinity;a=a.h.keys();a=_.v(a);for(var c=a.next();!c.done;c=a.next())c=c.value,isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};
|
|
219
|
+
Lp=function(a,b){var c=new Set(Gp(b)),d=a.H?_.Mf:_.Ze,e=a.H?[_.df]:[jg],f=new Map,g=_.v(c);for(c=g.next();!c.done;c=g.next())c=c.value,f.set(c.keySystem,{initDataTypes:[_.gd],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ze,persistentState:d,sessionTypes:e,label:c.keySystem,drmInfos:[]});d={};e=_.v(b);for(c=e.next();!c.done;d={Ff:d.Ff,Bd:d.Bd,Mf:d.Mf,Cd:d.Cd},c=e.next()){c=c.value;g=c.audio;var h=c.video;d.Ff=g?_.bq(g):"";d.Bd=null;g&&"ac-3"===g.codecs.toLowerCase()&&_.Fk()&&(d.Bd=
|
|
220
|
+
_.bq(g,_.de));d.Mf=h?_.bq(h):"";d.Cd=null;h&&"ac-3"===h.codecs.toLowerCase()&&_.Fk()&&(d.Cd=_.bq(h,_.de));var l={},m=_.v(c.drmInfos);for(c=m.next();!c.done;l={fb:l.fb},c=m.next())c=c.value,l.fb=f.get(c.keySystem),l.fb.drmInfos.push(c),c.initData&&c.initData.length&&(l.fb.initDataTypes=_.hh(new Set(c.initData.map(function(n){return n.initDataType}))).concat()),c.distinctiveIdentifierRequired&&(l.fb.distinctiveIdentifier=_.Mf),c.persistentStateRequired&&(l.fb.persistentState=_.Mf),g&&_.Gi(c.audioRobustness).forEach(function(n,
|
|
221
|
+
p){return function(q){var t={robustness:q||"",contentType:n.Ff};p.fb.audioCapabilities.find(function(u){return u.robustness===t.robustness&&u.contentType===t.contentType})||p.fb.audioCapabilities.push(t);n.Bd&&p.fb.audioCapabilities.push({robustness:q||"",contentType:n.Bd})}}(d,l)),h&&_.Gi(c.videoRobustness).forEach(function(n,p){return function(q){var t={robustness:q||"",contentType:n.Mf};p.fb.videoCapabilities.find(function(u){return u.robustness===t.robustness&&u.contentType===t.contentType})||
|
|
222
|
+
p.fb.videoCapabilities.push(t);n.Cd&&p.fb.videoCapabilities.push({robustness:q||"",contentType:n.Cd})}}(d,l))}return f};_.bq=function(a,b){var c=_.lm(a.mimeType,b||a.codecs);if(_.km(c,a.type)){var d=a.type,e=_.km(c,d);e&&(e=e(),c=e.convertCodecs(d,c),e.destroy())}return c};
|
|
223
|
+
_.Mp=function(a,b){function c(n,p,q){p.drmInfos.some(function(t){return!!t.licenseServerUri})===n&&(f=f["catch"](function(){if(a.j)return null;if(q===_.Dd){if((_.Dk()||g.os===Zk&&_.Ek("Chrome")&&!_.Dk())&&!a.f.Oa[q].useLegacySystem)return p.label=Ed,a.l.Vb(Ed,[p])["catch"](function(){a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");p.label=_.Dd;cq(p);return a.l.Vb(q,[p])});cq(p)}if(q===_.Fd&&a.f.widevineVersion!==_.Fd){var t=a.f.widevineVersion;
|
|
224
|
+
if(!t.startsWith(_.Fd))return a.g.error('Invalid "widevineVersion" value "'+t+'".'),Promise.reject();var u=Object.assign({},p,{label:t,distinctiveIdentifier:_.Ze,persistentState:_.Ze});return a.l.Vb(t,[u])["catch"](function(){return a.l.Vb(q,[p])})}return a.l.Vb(q,[p])["catch"](function(y){a:{if(q===_.Fd&&dq(p)){var A=_.gl();if(dq(p)&&A.os===Xk&&A.browser===kd){a.g.warn("requestMediaKeySystemAccess() failed",y);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");
|
|
225
|
+
cq(p);y=a.l.Vb(q,[p]);break a}}throw y;}return y})}))}if(1===b.size&&b.has(""))return Promise.reject(new _.O(_.Q,6,6E3));null===a.l&&(a.l=cp(a.f.emeApi,a.jc));for(var d=_.v(b.values()),e=d.next();!e.done;e=d.next())e=e.value,0===e.audioCapabilities.length&&delete e.audioCapabilities,0===e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new _.gk,g=_.gl(),h=a.f.preferredDrmSystem;if(!h)if(e=_.gl(),e.os===Zk&&10<=e.osVersion.major&&"edge"===e.browser)h=_.Dd;else if("safari"===e.browser)h=
|
|
226
|
+
_.Bd;else if(e.browser===kd||"firefox"===e.browser)h=_.Fd;h&&(e=b.get(h))&&(c(!0,e,h),c(!1,e,h));e={};for(var l=_.v([!0,!1]),m=l.next();!m.done;e={Kf:e.Kf},m=l.next())e.Kf=m.value,b.forEach(function(n){return function(p,q){q!==h&&c(n.Kf,p,q)}}(e));f=f["catch"](function(){throw new _.O(_.Q,6,6001,"Failed to get MediaKeySystemAccess.");});f=f.then(function(n){if(a.j)return null;a.K.clear();var p=n.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",p);var q=p.videoCapabilities||
|
|
227
|
+
[],t=_.v(p.audioCapabilities||[]);for(p=t.next();!p.done;p=t.next())a.K.add(p.value.contentType.toLowerCase());q=_.v(q);for(p=q.next();!p.done;p=q.next())a.K.add(p.value.contentType.toLowerCase());q=n.keySystem;p=b.get(_.eq(n.keySystem));t=[];var u=[],y=[],A=[];fq(p.drmInfos,t,u,y,A);1<u.length&&_.Jh("Multiple unique server certificates found! Only the first will be used.");1<t.length&&_.Jh("Multiple unique license server URIs found! Only the first will be used.");a.a={keySystem:q,licenseServerUri:t[0],
|
|
228
|
+
distinctiveIdentifierRequired:p.distinctiveIdentifier===_.Mf,persistentStateRequired:p.persistentState===_.Mf,audioRobustness:p.audioCapabilities?p.audioCapabilities[0].robustness:"",videoRobustness:p.videoCapabilities?p.videoCapabilities[0].robustness:"",serverCertificate:u[0],initData:y,keyIds:A,periodId:null};if(!a.a.licenseServerUri)throw new _.O(_.Q,6,6012,a.a.keySystem);return n.createMediaKeys()}).then(function(n){a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.J=n,a.da=
|
|
229
|
+
!0)})["catch"](function(n){if(!a.j){a.a=null;a.K.clear();if(n instanceof _.O)throw n;throw new _.O(_.Q,6,6002,{browserError:n.message});}});d.reject();return f};
|
|
230
|
+
Fp=function(a){a=_.N.$g(a.f.Oa[_.$e]||{});if(0===a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=_.sl(f),h=_.sl(e);g={kty:"oct",kid:_.ql(g,!1),k:_.ql(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.R.eb(d),initDataType:"keyids"}];return{keySystem:_.$e,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
206
231
|
initData:d,keyIds:[],periodId:null}};
|
|
207
|
-
_
|
|
208
|
-
b,f);if(!f)return a.h["delete"](c),a.w(new _.
|
|
209
|
-
|
|
210
|
-
initData:e}),a.f.ignoreUnrecognizedInitData)return
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
6,6006,{browserError:
|
|
215
|
-
|
|
216
|
-
_.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);l=_.
|
|
221
|
-
7);case 7:q=
|
|
222
|
-
!1,a.I.resolve()))});
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
url:p.data.url,status:p.data.status,response:p.data.response},q?{headers:q}:{},t);
|
|
226
|
-
|
|
227
|
-
response:m.data.response},n?{headers:n}:{},p);t=new _.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
_.
|
|
234
|
-
_.
|
|
235
|
-
licenseServerUriOrigin:g.licenseServerUriOrigin||f.licenseServerUriOrigin,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:e.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
d.some(function(m){return function(n){var p=m.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
_.
|
|
245
|
-
|
|
246
|
-
_.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
f||e||g;!a.N||a.m.isLive()||a.h!==_.
|
|
252
|
-
|
|
253
|
-
_.
|
|
254
|
-
_.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
{expirationTime:l}))},onEvent:function(h){h instanceof _.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
b.url,uri:b.url},d.error))})).
|
|
264
|
-
return new _.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
_.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
HTMLMediaElement))throw new _.
|
|
272
|
-
c):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");for(var f=[],g=0;g<c.classList.length;g++)f.push(c.classList[g]);f=_.
|
|
273
|
-
(this.a.set(e),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
if(!m)return
|
|
277
|
-
t=b-(q.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
3);m.
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
g.V);a.g.info("Start timeupdate polling");b.player.on(_.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
e();_.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
!c.w&&m>=3*n/4&&(c.w=!0,a.a.trigger(new _.
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
(d+")")),b.config.autoplay=!1);if(f=a.a.getBandwidthEstimate())b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=f;b.preloadPromise=
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
e
|
|
303
|
-
this.o=[];this.h=[];this.w=!1;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
h[0]&&
|
|
310
|
-
|
|
311
|
-
if(!f||null!=f.
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
if(A)try{var
|
|
315
|
-
|
|
316
|
-
g);if(h=
|
|
317
|
-
|
|
318
|
-
t.length){var
|
|
319
|
-
|
|
320
|
-
n.customAttributes[
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
b.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
" for "+(b.startTime+" s"));
|
|
327
|
-
|
|
328
|
-
" of interstitial "+h.
|
|
329
|
-
e.map(function(h){return h.id}));2===c&&
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
_.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
e.method="GET";e.headers=d;return(new _.
|
|
345
|
-
break;default:f=Promise.resolve();break a}a.g.error(
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
b.length&&a.g.warn("Forced subtitles are configured to be preferred, but
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
Zt=function(a
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
_.
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
_.
|
|
392
|
-
|
|
393
|
-
4,4E3,{url:a});})};
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
_.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
l=h.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
_.
|
|
411
|
-
_.
|
|
412
|
-
_.
|
|
413
|
-
_.eg&&(this.o=a.edgeType)};_.Xv=function(a){if(!a.o)return null;var b=a.H;switch(a.o){case Mv:return"-2px -2px 0 "+b+", -1px -1px 0 "+b;case Uv:return"2px 2px 0 "+b+", 1px 1px 0 "+b;case Vv:return"-1px 0 "+b+", 0 1px "+b+", 1px 0 "+b+", 0 -1px "+b;case Wv:return"2px 2px 3px "+b+", 2px 2px 4px "+b+", 2px 2px 5px "+b;default:return _.Qe}};Yv=function(a){this.f=a;this.a=null;this.g=new _.J("clpp.text.Mp4TextParser")};
|
|
414
|
-
_.$v=function(a){_.Dv.call(this,a);this.l=a.getSurface().getMedia();this.f="clpp-video-"+Zv++;this.h=document.createElement(_.gg);this.j=this.w=!1;_.fr(this.l,this.f);document.head.appendChild(this.h);this.Wb()};aw=function(){};_.bw=function(){};_.dh=[];hh=typeof Object.create==_.oe?Object.create:function(a){function b(){}b.prototype=a;return new b};
|
|
415
|
-
if(typeof Object.setPrototypeOf==_.oe)cw=Object.setPrototypeOf;else{var dw;a:{var ew={Dj:!0},fw={};try{fw.__proto__=ew;dw=fw.Dj;break a}catch(a){}dw=!1}cw=dw?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
|
|
416
|
-
var ih=cw,mh=typeof Object.defineProperties==_.oe?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},kh="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;nh.prototype.toString=function(){return this.a};var lh=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new nh("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}();
|
|
417
|
-
qh.prototype.A=function(a){this.f=a};qh.prototype["return"]=function(a){this.h={"return":a};this.a=this.j};qh.prototype.D=function(a){this.a=a};
|
|
418
|
-
Dh("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(l){h.reject(l)}}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=kh.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 l=
|
|
419
|
-
g[h];g[h]=null;try{l()}catch(m){this.j(m)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(m){return function(n){l||(l=!0,m.call(h,n))}}var h=this,l=!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.G(g);else{a:switch(typeof g){case _.Re:var h=null!=g;break a;case _.oe:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
420
|
-
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(l){this.h(l);return}typeof h==_.oe?this.H(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.G=function(g){var h=this.j();
|
|
421
|
-
g.Se(h.resolve,h.reject)};b.prototype.H=function(g,h){var l=this.j();try{g.call(h,l.resolve,l.reject)}catch(m){l.reject(m)}};b.prototype.then=function(g,h){function l(q,t){return typeof q==_.oe?function(v){try{m(q(v))}catch(z){n(z)}}:t}var m,n,p=new b(function(q,t){m=q;n=t});this.Se(l(g,m),l(h,n));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Se=function(g,h){function l(){switch(m.f){case 1:g(m.l);break;case 2:h(m.l);break;default:throw Error("Unexpected state: "+
|
|
422
|
-
m.f);}}var m=this;null==this.a?f.f(l):this.a.push(l)};b.resolve=d;b.reject=function(g){return new b(function(h,l){l(g)})};b.race=function(g){return new b(function(h,l){for(var m=_.u(g),n=m.next();!n.done;n=m.next())d(n.value).Se(h,l)})};b.all=function(g){var h=_.u(g),l=h.next();return l.done?d([]):new b(function(m,n){function p(v){return function(z){q[v]=z;t--;0==t&&m(q)}}var q=[],t=0;do q.push(void 0),t++,d(l.value).Se(p(q.length-1),n),l=h.next();while(!l.done)})};return b});var Fh=this||self;
|
|
423
|
-
Fh.a=!0;_.L={Bj:20,kb:function(a){var b=_.L.R,c=_.L.wi,d=_.L.ta;return b(a)||c(a)?a:d(a)}};_.I("clpp.utils.obj.cloneItem",_.L.kb);_.L.ta=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];c={};for(var d=0;d<b.length;d++)null!=b[d]&&(c=_.L.Ci(c,{merging:b[d]},1));return c.merging||null};_.I("clpp.utils.obj.merge",_.L.ta);_.L.Jc=function(a){for(var b in a)if(void 0!==a[b])return!0;return!1};
|
|
424
|
-
_.L.Ci=function(a,b,c){var d=_.L.R,e=_.L.wi,f=_.L.Ci,g=_.L.Ub,h=_.L.ym,l=_.L.mg,m=_.L.sm,n=_.L.xd;c+=1;if(d(a)||!n(a))a={};for(var p in b)n=b[p],e(n)||d(n)||g(n)||m(n)?a[p]=n:h(n)?a[p]=n.subarray(0):n instanceof Array?a[p]=f([],n,c):!d(n)&&l(n)&&c<_.L.Bj&&(a[p]=f(a[p],n,c));return a};_.L.wi=function(a){a=typeof a;return a===_.eg||a===_.k||a===_.Zc};_.L.sm=function(a){return a instanceof Element};_.L.R=function(a){return null===a||"undefined"===typeof a};_.L.xd=function(a){return typeof a===_.Re};
|
|
425
|
-
_.L.Ub=function(a){return typeof a===_.oe};_.L.ia=function(a){return typeof a===_.eg};_.L.wa=function(a){return typeof a===_.k};_.L.pi=function(a){return typeof a===_.Zc};_.L.mg=function(a){var b=_.L.xd,c=_.L.R;if(c(a)||!b(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};_.L.ym=function(a){var b=_.L.xd,c=_.L.Ub;return!!(b(a)&&a.buffer&&a.buffer instanceof ArrayBuffer&&c(a.subarray))};
|
|
426
|
-
_.L.pa=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.L.xd(a)||!_.L.xd(b))return!1;for(var e=c||Object.keys(a),f={},g=0;g<e.length;g++){var h=e[g];if(_.L.R(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.L.R(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.L.R(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
|
|
427
|
-
_.L.isNaN=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:function(b){return b!==b})(a)};_.L.tm=function(a,b,c){return a>=b&&a<=c};_.L.hh=function(a){for(var b=new Map,c=_.u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b};_.L.ih=function(a){var b={};a.forEach(function(c,d){b[d]=c});return b};
|
|
428
|
-
_.L.fi=function(a,b){for(var c=b.toLowerCase(),d=_.u(Object.entries(a)),e=d.next();!e.done;e=d.next()){var f=_.u(e.value);e=f.next().value;f=f.next().value;if(e.toLowerCase()===c)return f}return null};_.L.xi=function(a,b){for(var c in a){if(!(c in b))return!1;var d=a[c],e=b[c];if(d&&typeof d===_.Re&&e&&typeof e===_.Re){if(!_.L.xi(d,e))return!1}else if(void 0!==d&&void 0!==e&&d!==e)return!1}return!0};
|
|
429
|
-
_.L.yi=function(a,b){if(!_.L.xi(a,b))return!1;for(var c in b){if(!(c in a))return!0;var d=a[c],e=b[c];if(!d&&e||d&&typeof d===_.Re&&e&&typeof e===_.Re&&_.L.yi(d,e))return!0}return!1};var Kh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.I("clpp.log.Level",Kh);var Hh=0,Gh={},gw=[];_.I("clpp.log.getLoggers",function(){return _.L.kb(Gh)});_.I("clpp.log.addInterceptor",function(a){a&&gw.push(a)});_.I("clpp.log.removeInterceptor",function(a){a&&(a=gw.indexOf(a),0<=a&&gw.splice(a,1))});_.I("clpp.log.getTagLevel",Ih);_.I("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Gh[a]});_.I("clpp.log.setTagLevel",function(a,b){a&&(_.L.ia(b)&&(b=Lh(b)),Gh[a]=b)});
|
|
430
|
-
_.I("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.L.ia(a)&&(a=Lh(a));Hh=a});_.I("clpp.log.getLogLevel",function(){return Hh});_.r=_.J.prototype;
|
|
232
|
+
_.$p=function(a,b){try{a.g.debug("Attempting to load an offline session",b);var c=a.J.createSession(_.df)}catch(f){var d=new _.O(_.Q,6,6005,{browserError:f.message});a.w(d);return Promise.reject(d)}a.B.on(c,_.Ie,a.Li.bind(a));a.B.on(c,ue,a.Gi.bind(a));var e={initData:null,loaded:!1,mg:Infinity,uc:null,nb:new _.gk,periodId:null,We:[],keyId:null,rb:[],initDataType:null,Ac:null,sessionContext:{ldlDelay:0,customData:{}}};e.nb["catch"](function(){});a.h.set(c,e);return c.load(b).then(function(f){if(a.j)return null;a.g.debug("Loaded offline session",
|
|
233
|
+
b,f);if(!f)return a.h["delete"](c),a.w(new _.O(_.Q,6,6013)),null;e.loaded=!0;gq(a)&&(a.A||a.g.info(Fa),a.A=!0,a.G=!1,a.I.resolve());return c},function(f){a.j||(a.h["delete"](c),a.w(new _.O(_.Q,6,6005,{browserError:f.message})))})};hq=function(a,b,c,d){if(!b&&c!==_.Yf)return!1;d=b||Sn(d);a=_.v(a.h.values());for(var e=a.next();!e.done;e=a.next())if(e=e.value,b&&e.keyId===b||b&&e.rb.includes(b)||c===_.Yf&&(e.keyId||Sn(e.initData))===d)return!0;return!1};
|
|
234
|
+
Zp=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;var h,l,m,n,p,q,t,u,y,A,B,C,E,D,L,P,U,V,ra,Da,wa;_.I(function(Ea){switch(Ea.a){case 1:if(!e.length)return a.g.warn("Empty init data"),Ea["return"]();h=b;if(!h)try{h=iq(a,d,e,f)}catch(Oa){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:Oa,initDataType:d,
|
|
235
|
+
initData:e}),a.f.ignoreUnrecognizedInitData)return Ea["return"]()}if(g){Ea.C(2);break}if(!hq(a,h,d,e)){Ea.C(2);break}l=!0;if("skd"!==d||a.f.enableSessionCacheForSkd){Ea.C(4);break}m=_.v(a.h.keys());n=m.next();case 5:if(n.done){Ea.C(4);break}p=n.value;q=a.h.get(p);if(!h||q.keyId!==h){Ea.C(6);break}a.g.warn("Close and re-open session for "+h);_.F(Ea,9);return _.x(Ea,p.close(),11);case 11:_.G(Ea,10);break;case 9:t=_.H(Ea),a.g.warn("Unable to close session",t);case 10:l=!1;case 6:n=m.next();Ea.C(5);break;
|
|
236
|
+
case 4:if(l)return a.g.warn("Skip creating a new session for "+h),Ea["return"]();case 2:try{y=a.H?_.df:jg,u=a.J.createSession(y),a.D.onEvent(new _.M(Zd,{keySystem:a.keySystem()})),a.g.info("Created new "+y+" session for Key ID: '"+h+"'. Init data type: "+(d+"."))}catch(Oa){return a.w(new _.O(_.Q,6,6005,{browserError:Oa.message})),Ea["return"]()}a.B.on(u,_.Ie,a.Li.bind(a));a.B.on(u,ue,a.Gi.bind(a));A={Ac:f,We:[],initData:e,initDataType:d,keyId:h,rb:h?[h]:[],loaded:!1,mg:Infinity,periodId:c,uc:null,
|
|
237
|
+
nb:new _.gk,sessionContext:{ldlDelay:0,customData:{}}};A.nb["catch"](function(){});f&&(B=a.h.get(f),A.sessionContext=B.sessionContext);a.h.set(u,A);h&&!a.o.get(h)&&a.o.set(h,cg);if(e)for(C=0;C<a.a.initData.length;C++)E=a.a.initData[C],E.keyId&&!A.rb.includes(E.keyId)&&_.ul(E.initData,e)&&(A.keyId||(A.keyId=E.keyId),A.rb.push(E.keyId),a.o.get(E.keyId)||a.o.set(E.keyId,cg));D=_.N;L=D.Qb;P=a.D.getConfiguration();U=a.keySystem();V=a.f.Oa[U];Da=(ra=V.modifiers)&&ra.transformInitData;L(Da)||(Da=jq);try{e=
|
|
238
|
+
Da({playerConfig:P,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:V,sessionContext:A.sessionContext,emeApi:a.l.Md()})}catch(Oa){return wa=Oa,Oa instanceof _.O||(wa=new _.O(_.Q,6,6016,Oa)),A.nb&&A.nb.reject(Oa),a.w(wa),Ea["return"]()}a.g.info("Generate License Request for key ID: '"+h+"'");u.generateRequest(d,e.buffer)["catch"](function(Oa){if(!a.j){var zb=null;Oa.errorCode&&Oa.errorCode.systemCode&&(zb=Oa.errorCode.systemCode,0>zb&&(zb+=Math.pow(2,32)),zb="0x"+zb.toString(16));a.w(new _.O(_.Q,
|
|
239
|
+
6,6006,{browserError:Oa.message,error:Oa,extended:zb},Oa))}});_.z(Ea)}})};
|
|
240
|
+
iq=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.Oa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.N.Qb(g)||(g=kq);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var l=g(f,c,h);a.g.debug("Extracted Content ID '"+l+"' from SKD");var m=l;break a}catch(C){a.g.warn("Unable to extract Content ID from SKD",C)}m=""}return m}if(b===_.Yf)return Sn(c)||"";if(b===_.gd){m=a.keySystem();try{if(m.match(/^com\.widevine\.alpha/)){var n=
|
|
241
|
+
_.ip(c);if(n)return n.a}else if(lq(m)){e=new _.xn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);f=_.Cn(e);var p=_.Cn(e);g=_.Mn(p);var q=_.Cn(e);c=q>>>24;l=q&16777215;h=_.Gn(e,16);var t=_.tl(h);if(0<c){var u=_.Cn(e);e.skip(16*u)}var y=_.Cn(e),A=_.Gn(e,y),B=_.pp(A);_.Oh("Parsed PR PSSH Box","size",f,"name",g,Fg,c,"flags",l,"size",y,"systemId",t,"keyId",B.a);if(B)return B.a}}catch(C){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:C,keySystem:m}),C;}}return""};
|
|
242
|
+
kq=function(a,b){var c=_.Rn(b);_.Oh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+c);return c};
|
|
243
|
+
jq=function(a){var b=a.playerConfig,c=a.initData,d=a.drmInfo,e=a.drmSystemConfig,f=a.sessionContext,g=a.emeApi;if("skd"===a.initDataType&&g===mq){a=_.N.Qb;d=d.serverCertificate;e=e&&e.modifiers&&e.modifiers.extractContentId;a(e)||(e=kq);a="";try{a=e(b,c,f)}catch(h){throw new _.O(_.Q,6,6103);}if(!a.length)throw new _.O(_.Q,6,6101,"Content ID is an empty string");c=Tn(c,a,d)}return c};
|
|
244
|
+
sq=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,u,y,A,B,C,E;return _.I(function(D){switch(D.a){case 1:c=b.target;d=a.h.get(c);if(!d)return a.g.error("Session metadata not found for "+c.sessionId+"."),D["return"]();e=a.a.licenseServerUri;if(!nq(a,b)){D.C(2);break}return _.x(D,oq(a,e,b,c,d),3);case 3:return D["return"]();case 2:f=a.Hb;if(!(0<f)){D.C(4);break}a.g.info("Delaying license request by "+f+" s.");return _.x(D,Yh(f),5);case 5:if(a.j)return D["return"]();case 4:g=a.keySystem();h=a.f.Oa[g];"individualization-request"===
|
|
245
|
+
b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);l=_.Yj([e],a.f.attemptParameters);l.type=3;l.body=b.message;l.method=_.rb;l.licenseRequestType=b.messageType===xe&&d.Ac?we:b.messageType;l.sessionId=c.sessionId;if(l.licenseRequestType===we)a.D.onEvent(new _.M(Yd));lq(a.a.keySystem)&&pq(a,l);ln(a.P,l);m=String(Math.floor(b.timeStamp));return _.x(D,qq(a,l,d,m,e,c.sessionId,b.messageType,f),6);case 6:n=D.f;if(!n)return D["return"]();p=mn(a.P,n);return _.x(D,rq(a,c,n.data,d,m),
|
|
246
|
+
7);case 7:q=D.f;if(!q)return D["return"]();t=aq(a);u=p?Date.now()+1E3*p.delay:Number.NaN;a.D.onEvent(new _.M(_.ae,{keySystem:g,expirationTime:t,expectedRenewalTime:u}));d.uc&&d.uc.resolve();d.Ac&&(y=d.Ac,a.g.info("Closing expired session '"+y.sessionId+"'"),zp(y)["catch"](function(){a.g.warn("Unable to close expired session in time")}),(A=a.h.get(d.Ac))&&A.kd&&A.kd.stop(),a.h["delete"](d.Ac),d.Ac=null);B=new _.Xh(function(){a.j||(d.loaded=!0,d.nb&&d.nb.resolve(),gq(a)&&(a.A||a.g.info(Fa),a.A=!0,a.G=
|
|
247
|
+
!1,a.I.resolve()))});B.ha(5);null!==d.initData&&(0<d.sessionContext.ldlDelay||p&&(_.R.startsWith(g,_.Bd)||_.R.startsWith(g,_.Dd)))&&(C=new _.Xh(function(){!a.j&&a.P&&(a.g.info("Updating CSL Sessions"),lq(g)?Zp(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.Bd)&&c.update(_.R.eb("renew")))}),d.kd=C,E=p?p.delay:d.sessionContext.ldlDelay,C.ha(E));_.z(D)}})};
|
|
248
|
+
oq=function(a,b,c,d,e){var f,g,h;return _.I(function(l){if(1==l.a)return f=_.Yj([b],a.f.attemptParameters),f.type=3,f.body=c.message,f.method=_.rb,f.licenseRequestType=id,f.sessionId=d.sessionId,_.x(l,tq(a,f,e,b,d.sessionId,c.messageType),2);g=l.f;if(!g)return l["return"]();h=String(Math.floor(c.timeStamp));return _.x(l,rq(a,d,g.data,e,h),0)})};nq=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};
|
|
249
|
+
qq=function(a,b,c,d,e,f,g,h){var l,m,n,p,q,t,u,y,A,B,C,E;return _.I(function(D){switch(D.a){case 1:return a.g.info("License request for SID:'"+(f+"'/KID:'"+c.keyId+"' from msg '")+(g+"'.")),_.x(D,uq(a,b,c.sessionContext),2);case 2:return a.g.debug("Sending DRM license request to",e,b),a.D.onEvent(new _.M(Xd,{delay:h})),l=Date.now(),_.rp(Qd+d+ha),m=null,_.F(D,3),_.x(D,a.D.Bb.fetch(b).T,5);case 5:m=D.f;_.G(D,4);break;case 3:n=_.H(D);if(a.j)return D["return"](null);p=n;q=p.data.headers;t=ro(q);u=Object.assign({message:"Error while fetching DRM license!",
|
|
250
|
+
url:p.data.url,status:p.data.status,response:p.data.response},q?{headers:q}:{},t);y=new _.O(_.Q,6,6007,u,p);vq(a,y,c);return D["return"](null);case 4:_.rp(Qd+d+".end");_.tp(Qd+d,Qd+d+ha,Qd+d+".end");A=Date.now()-l;if(B=so(m.headers))a.Hb=B.delay||0;C="";B&&B.requestId&&(C=" RID:"+B.requestId);E=m.data.byteLength;a.g.info("License response for SID:'"+(f+"'/KID:'")+(c.keyId+"' ")+(E+" bytes in ")+(A+"ms"+C));return a.j?D["return"](null):D["return"](m)}})};
|
|
251
|
+
tq=function(a,b,c,d,e,f){var g,h,l,m,n,p,q,t,u,y,A,B;return _.I(function(C){switch(C.a){case 1:return a.g.info("WV Server certificate request for SID:'"+(e+" from msg '"+f+"'.")),_.x(C,uq(a,b,c.sessionContext),2);case 2:return a.g.debug("Sending Widevine certificate request to",d,b),g=Date.now(),h=null,_.F(C,3),_.x(C,a.D.Bb.fetch(b).T,5);case 5:h=C.f;_.G(C,4);break;case 3:l=_.H(C);if(a.j)return C["return"](null);m=l;n=m.data.headers;p=ro(n);q=Object.assign({message:Na,url:m.data.url,status:m.data.status,
|
|
252
|
+
response:m.data.response},n?{headers:n}:{},p);t=new _.O(_.Q,6,6100,q,m);vq(a,t,c);return C["return"](null);case 4:return u=Date.now()-g,y=so(h.headers),A="",y&&y.requestId&&(A=" RID:"+y.requestId),B=h.data.byteLength,a.g.info("WV Server certificate response for SID:'"+(e+"' ")+(B+" bytes in ")+(u+"ms"+A)),a.j?C["return"](null):C["return"](h)}})};
|
|
253
|
+
rq=function(a,b,c,d,e){var f,g;return _.I(function(h){switch(h.a){case 1:return _.rp(Vd+e+ha),_.F(h,2),_.x(h,b.update(c),4);case 4:_.G(h,3);break;case 2:f=_.H(h);if(a.j)return h["return"](!1);if(f===Gb)return a.g.info("Ignore update for closed sessions"),h["return"](!1);g=new _.O(_.Q,6,6008,{browserError:f.message});vq(a,g,d);return h["return"](!1);case 3:return _.rp(Vd+e+".end"),_.tp(Vd+e,Vd+e+ha,Vd+e+".end"),a.j?h["return"](!1):h["return"](!0)}})};
|
|
254
|
+
vq=function(a,b,c){a.j||(a.w(b),c.uc&&c.uc.reject(b),c.nb&&c.nb.reject(b))};
|
|
255
|
+
pq=function(a,b){var c=_.R.Cc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector(_.Eg).textContent;b.body=_.rl(c.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[Aa]="text/xml; charset\x3dutf-8"};
|
|
256
|
+
uq=function(a,b,c){var d,e,f,g,h,l;return _.I(function(m){if(1==m.a)return d=a.D.getConfiguration(),_.x(m,Wp(a,d),2);e=a.keySystem();h=(g=(f=a.f.Oa[e])&&f.modifiers)&&g.licenseRequest;l=g&&g.licenseResponse;h?b.requestModifiers.push(function(n){return h(d,n,c)}):e.startsWith(_.Bd)&&b.requestModifiers.push(function(n){return _.Un(n)});l?b.responseModifiers.push(function(n){return l(d,n,c)}):e.startsWith(_.Bd)&&b.responseModifiers.push(function(n){return _.Vn(n)});_.z(m)})};
|
|
257
|
+
wp=function(a){var b=a.o,c=a.ka;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"===d})&&a.w(new _.O(_.Q,6,6014));a.D.qg(_.N.ah(c));a.A||a.g.info(Fa);a.A=!0;a.G=!1};Qp=function(a){var b;return _.I(function(c){if(1==c.a)return _.rp(Ud),b=a.ja.map(function(d){return sq(a,d)}),a.gb=!0,a.ja=[],_.x(c,Promise.all(b),2);_.rp(Td);_.tp("drm.onPlay",Ud,Td);_.z(c)})};lq=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
|
|
258
|
+
_.eq=function(a){return lq(a)?_.Dd:a};_.xq=function(a,b){return a.length&&b.length?0<_.wq(a,b).length:!0};
|
|
259
|
+
_.wq=function(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=0;d<a.length;d++)for(var e={},f=0;f<b.length;e={Dd:e.Dd},f++)if(a[d].keySystem===b[f].keySystem&&a[d].periodId===b[f].periodId){var g=a[d];f=b[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);e.Dd=_.hh(g.keyIds||[]).concat();f.keyIds&&f.keyIds.length&&f.keyIds.forEach(function(l){return function(m){l.Dd.includes(m)||l.Dd.push(m)}}(e));c.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,
|
|
260
|
+
licenseServerUriOrigin:g.licenseServerUriOrigin||f.licenseServerUriOrigin,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:e.Dd,periodId:g.periodId});break}return c};
|
|
261
|
+
xp=function(a){a.h.forEach(function(b,c){var d=b.mg,e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.pg(c.sessionId,e),b.mg=e)})};gq=function(a){a=a.h.values();return _.dj(a,function(b){return b.loaded})};
|
|
262
|
+
Ep=function(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var d=_.v(a),e=d.next();!e.done;e=d.next())e.value.drmInfos=c};cq=function(a){for(var b=_.v(a.audioCapabilities||[]),c=b.next();!c.done;c=b.next())delete c.value.robustness;a=_.v(a.videoCapabilities||[]);for(b=a.next();!b.done;b=a.next())delete b.value.robustness};
|
|
263
|
+
dq=function(a){return(a.audioCapabilities||[]).some(yq)||(a.videoCapabilities||[]).some(yq)};yq=function(a){return null!=a.robustness&&""!==a.robustness};
|
|
264
|
+
fq=function(a,b,c,d,e){var f={};a=_.v(a);for(var g=a.next();!g.done;f={Ha:f.Ha},g=a.next()){f.Ha=g.value;b.includes(f.Ha.licenseServerUri)||b.push(f.Ha.licenseServerUri);f.Ha.serverCertificate&&(c.some(function(m){return function(n){return _.ul(n,m.Ha.serverCertificate)}}(f))||c.push(f.Ha.serverCertificate));if(f.Ha.initData){var h=_.v(f.Ha.initData);for(g=h.next();!g.done;g=h.next())g.value.periodId=f.Ha.periodId;h={};var l=_.v(f.Ha.initData);for(g=l.next();!g.done;h={Ge:h.Ge},g=l.next())h.Ge=g.value,
|
|
265
|
+
d.some(function(m){return function(n){var p=m.Ge;return n.keyId&&n.keyId===p.keyId&&n.periodId===p.periodId?!0:!1}}(h))||d.push(h.Ge)}if(f.Ha.keyIds)for(g=0;g<f.Ha.keyIds.length;++g)e.includes(f.Ha.keyIds[g])||e.push(f.Ha.keyIds[g])}};
|
|
266
|
+
Kp=function(a,b,c){var d=_.eq(b.keySystem);c=c[d];d===_.$e&&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)};
|
|
267
|
+
Ip=function(a,b){var c=b[_.eq(a.keySystem)];a.keyIds||(a.keyIds=[]);c&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness||""),a.audioRobustness||(a.audioRobustness=c.audioRobustness||""),a.serverCertificate||(a.serverCertificate=c.serverCertificate||null))};
|
|
268
|
+
zp=function(a){var b,c;return _.I(function(d){if(1==d.a)return b=new Promise(function(e){(new _.Xh(e)).ha(1)}),_.x(d,Promise.race([a.close().then(function(){return!0}),b.then(function(){return!1})]),2);(c=d.f)||_.Jh("Timeout waiting for session close");_.z(d)})};_.Bq=function(a,b){a&&b&&(_.zq.set(a,b),_.Aq.info("Registered TextDisplayerFactory: '"+a+"'"))};
|
|
269
|
+
_.Cq=function(a,b){var c=b.find(function(d){return(d=_.zq.get(d))?d.a(a):!1});if(null==c)return _.Aq.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Aq.info("Chosen the text displayer: "+c);return _.zq.get(c)};Dq=function(){this.a=null;this.f=[]};_.Eq=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{var 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})}};
|
|
270
|
+
Fq=function(a,b){var c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(var d=_.v(a.f),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state===b?e.duration:0;return c};Gq=function(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=_.v(a.f),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.a&&c.push(b(a.a));return c};Hq=function(){this.h=this.f=this.j=null;this.a=[]};Iq=function(a){return a.a.map(function(b){return _.N.hb(b)})};
|
|
271
|
+
_.Jq=function(){this.h=this.w=this.B=this.F=this.l=this.o=this.j=this.A=NaN;this.a=new Dq;this.f=new Hq};_.Kq=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:[]}};
|
|
272
|
+
Oq=function(a){this.g=new _.K("clpp.StateManager");this.m=a;this.a=new _.gi;this.h=_.Lq;this.A=_.Mq;this.I=0;this.w=-1;this.L=this.o=this.J=this.B=0;this.j=this.f=this.G=!1;this.H=0;this.l=null;this.K=0;this.N=_.Kk();this.F=!1;this.J=Date.now();Nq(this)};Pq=function(a,b){return Object.keys(b)[a]};
|
|
273
|
+
Rq=function(a,b){var c={type:_.bg};b===_.$c||b===_.Zc?(c.reason=a.w,b===_.$c?c.timeSinceLastStateChangeMS=a.I:c.bufferedTimeMS=a.B):(a.h===_.Qq&&(c.reason=a.w),a.A===_.Qq&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.h,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.I);return c};
|
|
274
|
+
Vq=function(a,b){if(a.h===b)return!1;var c=Date.now(),d=a.h===_.Qq;a.A=a.h;a.h=b;a.A===_.Sq&&(a.J=c,a.o=0);a.o||(a.o=a.J||c);a.I=c-a.o;a.o=c;b===_.Qq?(a.L=a.o,a.w=a.f?1:2,a.g.info("Buffering started. Reason: "+Pq(a.w-1,_.Tq)),c=Rq(a,_.$c),a.Za(_.$c,c)):d&&(a.B=a.o-a.L,a.g.info("Buffering finished. Reason: "+Pq(a.w-1,_.Tq)+". Buffering time: "+a.B+" ms"),c=Rq(a,_.Zc),a.Za(_.Zc,c));c=Pq(a.A,_.Uq);d=Pq(a.h,_.Uq);a.g.info(_.vb+c+" -\x3e "+d);a.Za(_.bg,Rq(a,""));return!0};
|
|
275
|
+
$q=function(a,b){if(a.h===_.Wq)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.f||(a.j=!1,Vq(a,_.Sq));else if(b!==_.sg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ra(e,!0):-1;a.H=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.K=a.m.getPlaybackRate()||1;e=typeof a.l===_.k&&2>a.l&&2===e.networkState;var f=typeof a.l===_.k&&0>=a.H&&a.h===_.Lq,g=typeof a.l===_.k&&2>=a.l&&a.j;e=a.f||
|
|
276
|
+
f||e||g;!a.N||a.m.isLive()||a.h!==_.Qq||e||(f=b===_.Tf&&4===a.l,(g=a.A===_.Xq)&&!a.F?e=!0:g||a.F||f||(e=!0));f=!1;e?f=Vq(a,_.Qq):c?f=Vq(a,_.Yq):a.G&&(f=Vq(a,_.Zq));f&&(a.F=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.f+", waiting: "+a.j+", playing: "+a.G+", paused: "+c+", readyState: "+a.l+", rate: "+a.K+", buffer: "+a.H+", ended: "+d+". Changed state: "+f+", Current state: "+Pq(a.h,_.Uq))}}};
|
|
277
|
+
Nq=function(a){function b(d){return $q(a,d.type)}a.g.debug("Start watching for video events for "+a.m.namespace());var c=a.m;a.a.on(c,_.ge,function(){a.f||(a.j=!1,Vq(a,_.Sq))});a.a.on(c,ad,b);a.a.on(c,_.rf,function(){a.G=!0;a.j=!1;$q(a,_.rf)});a.a.on(c,_.bf,function(){a.G=!1;a.j=!1;$q(a,_.bf)});a.a.on(c,_.sg,b);a.a.on(c,_.If,b);a.a.on(c,_.Tf,function(d){a.f=!1;a.j=!1;$q(a,d.type)});a.a.on(c,_.Uf,function(d){a.f=!0;$q(a,d.type)});a.a.on(c,$f,b);a.a.on(c,_.Sg,function(){a.j=!0;$q(a,_.Sg)});a.a.on(c,
|
|
278
|
+
_.he,function(d){(d=d&&d.detail)&&d.severity&&d.severity===_.Q&&Vq(a,_.Wq)});a.a.on(c,_.De,b);a.a.on(c,bd,function(){a.F=!0;$q(a,bd)});a.a.on(c,_.Dg,function(d){a.f=!0;$q(a,d.type)});a.a.on(c,_.Cg,function(d){a.f=!1;a.j=!1;$q(a,d.type)})};ar=function(a){if(!a)return null;a=(new _.qj(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.Hc:a.endsWith(".M3U8")?_.ym:a.endsWith(".MP4")?_.Mg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Mc:null};
|
|
279
|
+
_.cr=function(a){var b;Wm(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(function(e){return typeof e===_.eg||"url"in e});a=[];for(var c=0;c<b.length;c++){var d=br(b[c]);d&&a.push(d)}return a};
|
|
280
|
+
br=function(a){var b=null;_.N.ia(a)&&(a={url:a});typeof a===_.Re&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.N.R(a.drmProtected)||typeof a.drmProtected!==_.Yc||(b.drmProtected=a.drmProtected),_.N.R(a.isLive)||typeof a.isLive!==_.Yc||(b.isLive=a.isLive),_.N.R(a.name)||typeof a.name!==_.eg||(b.name=a.name),_.N.R(a.gc)||typeof a.gc!==_.eg||(b.gc=a.gc),_.N.R(a.audioMimeType)||typeof a.audioMimeType!==_.eg||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=ar(a.url),b.type?
|
|
281
|
+
dr.debug("Detect media type "+b.type+" for "+a.url):dr.warn("Unable to detect media type for "+a.url));return b};er=function(){_.Xm.call(this,vd);this.w=this.H=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.gi;this.G=this.B=this.f=this.I=null};
|
|
282
|
+
gr=function(a,b){if(a.w)throw new _.O(_.Q,7,7E3);a.a||(a.h.on(b,_.he,function(){var c=fr(a);if(c)a.onError(c)}),a.h.on(b,_.Nf,function(){var c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.M(_.Xc,{detail:{width:c,height:d}}))}),a.a=b)};hr=function(a){var b=_.Kk()?mq:void 0;return new _.yp(a,b)};
|
|
283
|
+
jr=function(a){var b,c,d,e,f;return _.I(function(g){if(1==g.a){if(a.w)return g["return"](Promise.reject(new _.O(_.Q,7,7E3)));b=a.ca[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),g["return"](Promise.resolve());c=_.ir;d=_.qn(a.configuration.drm);a.log.debug("Drm configuration: ",d);e=a.getNetworkEngine();a.o=hr({Bb:e,onError:function(h){return a.onError(h)},qg:function(){},pg:function(h,l){a.trigger(new _.M(_.Wd,
|
|
284
|
+
{expirationTime:l}))},onEvent:function(h){h instanceof _.M?a.dispatchEvent(h):a.log.debug(_.Pb,h.type)},getConfiguration:function(){return a.getConfiguration()},nd:function(){return a.nd()}});a.o.f=d;f={id:0,language:_.xg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},adjustSegmentDurations:function(){},getDuration:a.getDuration.bind(a),initSegmentReference:null,
|
|
285
|
+
Fa:0,mimeType:_.Mg,codecs:"",encrypted:!0,keyId:null,language:_.xg,originalLanguage:_.xg,label:null,type:c.VIDEO,primary:!1,frameRate:void 0,qp:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Xo:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0};return _.x(g,_.Dp(a.o,[f]),2)}return _.x(g,_.Vp(a.o,a.a),0)})};
|
|
286
|
+
kr=function(a,b){xo(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){a.getState()!==_.Wq&&a.seek(b)["catch"](function(c){a.log.warn("Error while seeking to start position.",c)})})};fr=function(a){if(null===a.ca||!a.a.error)return null;var b=a.a.error.code;if(1===b)return null;var c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.O(_.Q,3,3016,{code:b,jp:c,message:a.a.error.message})};
|
|
287
|
+
lr=function(a){if(a.w)return new _.hk(Promise.reject(new _.O(_.Q,7,7E3)),function(){});var b=a.ca[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&kr(a,c);if(d.preload!==_.Qe)a.h.one(d,_.De,function(){var g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Fk()||_.Gk())&&d.load();var f=new _.gk;a.h.one(d,$f,function(){var g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Xh(function(){f.reject(new _.O(_.Q,3,3100,{message:"Unable to load media source successfully from "+
|
|
288
|
+
b.url,uri:b.url},d.error))})).ha(g))});xo(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,function(){return f.resolve()});d.error?f.reject(fr(a)):d.preload===_.Qe&&(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,_.he,function(){f.reject(fr(a))});
|
|
289
|
+
return new _.hk(f,function(){var g=new _.O(_.Q,7,7001);f.reject(g);return Promise.resolve()})};
|
|
290
|
+
mr=function(a,b){xo(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){if(a.isLive()&&a.getState()!==_.Wq){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"](function(e){a.log.warn("Error while seeking to seek range edge.",e)}))}})};
|
|
291
|
+
nr=function(a,b){var c=!1;a.h.on(b,_.Uf,function(){c=b.paused});a.h.on(b,_.Tf,function(){.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};or=function(){};_.rr=function(a){0<=pr.indexOf(a)?qr.warn("Factory '"+a.name()+"' is already registered"):(pr.push(a),qr.info("Factory '"+a.name()+"' has been registered."))};
|
|
292
|
+
sr=function(a,b){var c=pr.find(function(d){return d.a(a,b)})||null;c&&qr.info("Chosen ads manager: "+c.name());return c};tr=function(){};ur=function(){};vr=function(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.G=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=e+":"+b;this.H=e;this.videoEl=null;this.A=f;this.F=g||null};wr=function(a){this.a=a.map(function(b){return{videoId:b.getSurface().getMedia().id,player:b,Pe:!0,ready:Promise.resolve()}});this.g=new _.K("clpp.plist.PlayerPool")};
|
|
293
|
+
_.xr=function(a,b){var c=document.createElement(a),d;for(d in b){var e=b[d];null===e||void 0===e?c.setAttribute(d,""):c.setAttribute(d,e)}return c};_.yr=function(a,b){a.classList.add(b)};_.zr=function(a,b){if(a&&typeof b===_.Re)for(var c in b)a.style[c]=b[c]};_.Ar=function(a){return document.createElement(a)};Br=function(){this.a=null;this.h=new Set;this.f=null;this.set(null)};Cr=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
|
|
294
|
+
Dr=function(a,b){var c=new MutationObserver(function(){var d=Array.from(a.h.values());Ii(Array.from(b.classList),Array.from(d))||b.classList.add.apply(b.classList,_.hh(d))});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};
|
|
295
|
+
Hr=function(a,b){this.g=new _.K("clpp.PlayerSurface");this.w=_.N.ua(Er,b);this.f=new Br;this.h=null;this.a=new Br;this.l=Fr;Fr+=1;this.o="clpp-video-"+this.l;this.j=new _.gi;if(null==a)throw new _.O(_.Q,7,7102,"No Media element was provided");if(a instanceof Element)var c=a;else if(c=document.getElementById(a),!c)throw new _.O(_.Q,7,7004,"Media element not found");var d=this.w;this.g.debug("Initializing Player Surface on ",c);if("cast-media-player"===c.tagName.toLowerCase())this.h=c;else{if(!(c instanceof
|
|
296
|
+
HTMLMediaElement))throw new _.O(_.Q,7,7005,"Media element is not instance of HTMLMediaElement");if(!c.hasAttribute("crossorigin")){var e=d.crossorigin;this.g.info("Setting media elements crossorigin to "+e);c.setAttribute("crossorigin",e)}this.f.set(c);if(d.disableContainer)e=null;else if(d.containerEl){if(c.parentNode!==d.containerEl)throw new _.O(_.Q,7,7006,"Container element is not a direct parent of media element");e=d.containerEl}else{e=document.createElement(_.Od);c.parentNode?c.parentNode.replaceChild(e,
|
|
297
|
+
c):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");for(var f=[],g=0;g<c.classList.length;g++)f.push(c.classList[g]);f=_.v(f);for(g=f.next();!g.done;g=f.next())g=g.value,c.classList.remove(g),_.yr(e,g);e.style.cssText=c.style.cssText;c.removeAttribute(_.gg);f=_.v([_.Zg,_.me]);for(g=f.next();!g.done;g=f.next()){g=g.value;var h=c.getAttribute(g);h=parseInt(h,10);isNaN(h)||(e.style[g]=h+_.Ef);_.Fk()||c.removeAttribute(g)}e.appendChild(c)}e&&
|
|
298
|
+
(this.a.set(e),Cr(this.a,"clpp-container"),Cr(this.a,this.o),Cr(this.f,_.ld),Cr(this.f,"clpp-video"));d.webOSStartupPatch&&Gr(this,c,e)}};Gr=function(a,b,c){(_.Gk()&&53===_.Hk().major||_.Gk()&&68===_.Hk().major||_.Ik())&&!b.hasAttribute(Jd)&&(b.style.opacity="0",b.setAttribute(Jd,""),a.j.one(b,ce,function(){b.removeAttribute(Jd);b.style.opacity="1";c&&(c.style.opacity="1")}))};
|
|
299
|
+
Mr=function(a){var b=this;this.j=a;this.A=!!a.sideAdContainer;this.l=[];this.a=a.Zi;this.H=Ir(a);this.F=[];var c=Jr(this,this.H,this.j.pl);this.w=new wr(c);this.h=null;this.B=!1;this.o=new Map;this.I=a.toggleVisible;this.g=new _.K("clpp.interstitial.MultiController");this.f=this.G=!1;this.J=a.qn||function(){};Kr(this).forEach(function(d){return Lr(b,d,!1)})};
|
|
300
|
+
Qr=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,u;return _.I(function(y){if(1==y.a){a.g.info("Crop ads by playout limit",b);c=Nr(a);d=a.getCurrentItem();if(!c||!d||!d.$a||null==c.V)return y["return"]();e=a.l.filter(function(A){return!A.primary});f=Math.max.apply(Math,_.hh(e.map(function(A){return A.sb})));if(b>f)return a.g.info("Playout limit is greater than ad pod duration, ignored."),y["return"]();g=d.player.getPosition()+(d.sb-d.duration);h=e.sort(function(A,B){return B.sb-A.sb})[0];l=c.V;m=b<=g;
|
|
301
|
+
if(!m)return y.C(2);n=f-g;c.V-=n;a.g.warn("Playout limit exceeded, immediately returning to primary at "+(c.V.toFixed(1)+" instead of ")+l.toFixed(1));return _.x(y,Or(a,c.id,_.ff),3)}if(2!=y.a)return h.Da&&h.Da(),p=d.$a,a.a.trigger(new _.M(_.yc,{ad:p})),a.a.trigger(new _.M(_.kc,{ad:p})),a.a.trigger(new _.M(_.hc,{id:d.Ob})),y["return"]();a.g.warn("Limiting playout of ads to",b);q=e.find(function(A){return b<=A.sb&&b>=A.sb-A.duration});if(!q)return a.g.warn("Cannot find ad hit by limit"),y["return"]();
|
|
302
|
+
t=b-(q.sb-q.duration);q.$a.h=t;u=f-b;c.V-=u;a.g.info("Last ad is now ",q.$a.yb(),"with cropped duration",t,"and primary will resume at",c.V.toFixed(1),"instead of",l.toFixed(1));h.Da&&(q.Da=h.Da);q.transition={pf:{position:t,itemId:c.id,V:c.V}};Pr(a,q);_.z(y)})};Sr=function(a){var b;return _.I(function(c){if(1==c.a)return(b=a.h)?"loaded"===b.state?c.C(2):_.x(c,b.td,2):c["return"]();if(4!=c.a)return _.x(c,b.player.play(),4);b.state=_.rf;Rr(b);_.z(c)})};
|
|
303
|
+
Tr=function(a,b){a.g.info("Add items",b);a.l=a.l.concat(b.map(function(c){return Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),td:Promise.resolve()})}))};Vr=function(a){return _.I(function(b){return _.x(b,Ur(a,a.l.map(function(c){return c.id})),0)})};
|
|
304
|
+
Ur=function(a,b){var c,d,e,f,g;return _.I(function(h){a.g.info("Remove items",b);c=[];d=[];e=_.v(a.l);for(f=e.next();!f.done;f=e.next())g=f.value,b.includes(g.id)?d.push(g):c.push(g);a.l=c;return _.x(h,Promise.all(d.map(function(l){l.disposers.forEach(function(m){return m()});l.disposers=[];return Wr(a,l.id)})),0)})};Yr=function(a){var b;return _.I(function(c){b=a.l.filter(function(d){return!d.primary}).map(function(d){return d.id});Xr(a);return _.x(c,Ur(a,b),0)})};
|
|
305
|
+
Zr=function(a){var b,c;_.I(function(d){b=a.getCurrentItem();c=b.next[0];if(!(b&&b.primary&&c))return d.C(0);Xr(a);return _.x(d,a.play(c),0)})};Xr=function(a){var b=Nr(a);b&&(b.transition=void 0,b.next=[],$r(a))};
|
|
306
|
+
Or=function(a,b,c){var d,e,f,g,h,l;return _.I(function(m){switch(m.a){case 1:if(a.B)return a.g.warn("Cannot "+c+" item while busy (ID: "+b+")"),m["return"]();d=as(a,b);if(!d)return a.g.warn("Item not found (ID: "+b+")"),m["return"]();a.g.info(c+" item (ID: "+b+")");a.B=!0;if(e=a.h)e.player.isPaused()||(a.A?e.primary?bs(a,e,cs):e.player.pause():e.player.pause()),e.primary?bs(a,e,cs):bs(a,e,ds);(f=a.o.has(b))&&a.o["delete"](b);_.F(m,2,3);if(c===_.ff)return(g=e&&d.primary)?_.x(m,es(a,d),10):f?_.x(m,
|
|
307
|
+
fs(a,d),10):_.x(m,gs(a,d),10);if(f){a.g.error("Loading preloaded items is not supported");m.C(6);break}return _.x(m,hs(a,d),6);case 10:Rr(d);case 6:Pr(a,d);d.primary?bs(a,d,ds):bs(a,d,cs);d.$a&&is(a,d,d.$a);if(d.Da)d.player.one(_.ge,d.Da);d.Hi&&d.Hi(d.player.getDuration());e&&js(a,e);case 3:_.vh(m);a.B=!1;ks(a);ls(a,d.next);_.wh(m);break;case 2:h=_.H(m);a.g.error("Item failed to "+c+" (ID: "+b+")",h);if(d.primary)throw h;if(l=Nr(a))return a.g.warn("Ad failed, resuming primary item"),_.x(m,es(a,l),
|
|
308
|
+
3);m.C(3)}})};ms=function(a,b,c){c=void 0===c?!1:c;if(!a.f){var d=Nr(a);d?(d.V=b,c&&(a.f=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};Nr=function(a){return a.l.find(function(b){return!!b.primary})||null};as=function(a,b){return a.l.find(function(c){return c.id===b})||null};
|
|
309
|
+
Pr=function(a,b){var c=b.transition;if(c&&!c.ej){if(c.Da){var d=c.Da,e=function(){a.g.info("Transition onEnded to (ID: "+d+")");a.play(d)};b.player.one(_.ge,e);b.disposers.push(function(){b.player.off(_.ge,e)})}c.pf&&ns(a,b,function(){var f=a.h.$a;f&&(b.disposers.forEach(function(g){return g()}),b.disposers=[],a.a.trigger(new _.M(_.yc,{ad:f})),a.a.trigger(new _.M(_.kc,{ad:f})),a.a.trigger(new _.M(_.hc,{id:b.Ob})))});c.ej=!0}};
|
|
310
|
+
ns=function(a,b,c){function d(){a.g.info("Stop timeupdate polling");b.player.off(_.sg,f)}function e(){var l=b.player.getPosition();l>=g.position?(c(),a.g.info("Transition onPosition to (ID: "+g.itemId+"), playback position: "+(l.toFixed(3)+" s, transition point: ")+(g.position.toFixed(3)+" s. ")),a.play(g.itemId),l=!0):l=!1;l?h=null:h=requestAnimationFrame(e)}function f(){var l=b.player.getPosition();.5>=g.position-l&&(a.g.info("Start RAF polling"),d(),e())}var g=b.transition.pf,h=null;g.V&&ms(a,
|
|
311
|
+
g.V);a.g.info("Start timeupdate polling");b.player.on(_.sg,f);b.disposers.push(function(){null!=h&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(h),h=null)});b.disposers.push(d)};$r=function(a){a.h&&(a.h.disposers.forEach(function(b){return b()}),a.h.disposers=[],a.h.transition&&(a.h.transition.ej=!1),Pr(a,a.h))};Kr=function(a){return[a.a].concat(_.hh(a.w.a.map(function(b){return b.player})))};ks=function(a){Promise.all(Array.from(a.o.keys()).map(function(b){return Wr(a,b)}))};
|
|
312
|
+
Ir=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Zi.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};Wr=function(a,b){var c;return _.I(function(d){if(1==d.a){c=a.o.get(b);if(!c)return d.C(0);a.g.info("Stop preloading item (ID: "+b+")");return c.player?_.x(d,os(a,c.player),3):d.C(3)}a.o["delete"](b);_.z(d)})};ps=function(a){return _.I(function(b){if(1==b.a)return a.h?_.x(b,js(a,a.h),3):b.C(0);Lr(a,a.a,!0);_.z(b)})};
|
|
313
|
+
js=function(a,b){var c;return _.I(function(d){if(1==d.a){c=b.player;if(b.primary)return a.g.info("Pause primary playback"),a.A||Lr(a,c,!1),d.C(0);a.g.info("Stop previous playback (ID: "+b.id+")");b.disposers.forEach(function(e){return e()});b.disposers=[];b.player=null;b.videoEl=null;b.role=qs;return b.Ag?(a.g.info("Release player (ID: "+b.id+") after delay "+(b.Ag+" ms.")),_.x(d,new Promise(function(e){setTimeout(function(){return _.I(function(f){if(1==f.a)return _.x(f,os(a,c),2);Lr(a,c,!1);a.a.trigger(new _.M("ad-hls-released"));
|
|
314
|
+
e();_.z(f)})},b.Ag)}),0)):_.x(d,os(a,c),5)}Lr(a,c,!1);return d.C(0)})};gs=function(a,b){return _.I(function(c){if(1==c.a)return _.x(c,hs(a,b),2);if(3!=c.a)return _.x(c,b.player.play(),3);b.state=_.rf;_.z(c)})};hs=function(a,b){var c;return _.I(function(d){if(1==d.a)return _.x(d,rs(a,!!b.primary),2);if(3!=d.a)return c=d.f,a.h=b,b.role=ss,a.h.player=c,a.h.videoEl=c.getSurface().getMedia(),Lr(a,c,!0),b.state="loading",b.td=ts(c,b.config),_.x(d,b.td,3);b.state="loaded";_.z(d)})};
|
|
315
|
+
fs=function(a,b){var c;return _.I(function(d){switch(d.a){case 1:c=b.player;if(!c)return d["return"]();if(b.state!==zf){d.C(2);break}a.g.info(Wb);_.F(d,3);return _.x(d,b.preloadPromise,5);case 5:_.G(d,2);break;case 3:_.H(d);case 2:a.h=b;b.role=ss;Lr(a,c,!0);if(b.state===yf)return _.x(d,c.play(),7);if(b.state!==xf){d.C(7);break}return _.x(d,ts(c,b.config),7);case 7:b.state=_.rf,_.z(d)}})};
|
|
316
|
+
is=function(a,b,c){function d(){a.a.trigger(new _.M(_.yc,{ad:c}));a.a.trigger(new _.M(_.kc,{ad:c}));c.f===c.a&&a.a.trigger(new _.M(_.hc,{id:b.Ob}))}function e(){a.a.trigger(new _.M(_.ic,{ad:c}))}function f(){a.a.trigger(new _.M(_.uc,{ad:c}))}function g(){l.isEnded()||a.a.trigger(new _.M(_.sc,{ad:c}))}function h(){var m=l.getPosition(),n=c.getDuration();c.j=m;a.a.trigger(new _.M(_.tc,{ad:c}));!c.l&&m>=n/4&&(c.l=!0,a.a.trigger(new _.M(_.lc,{ad:c})));!c.o&&m>=n/2&&(c.o=!0,a.a.trigger(new _.M(_.rc,{ad:c})));
|
|
317
|
+
!c.w&&m>=3*n/4&&(c.w=!0,a.a.trigger(new _.M(_.zc,{ad:c})))}var l=b.player;l.on(_.sg,h);l.on(_.bf,g);l.on(_.rf,f);l.on(_.$c,e);l.one(_.ge,d);b.disposers.push(function(){l.off(_.sg,h);l.off(_.bf,g);l.off(_.rf,f);l.off(_.$c,e);l.off(_.ge,d)});1===c.f&&a.a.trigger(new _.M(_.gc,{id:b.Ob}));c.videoEl=l.getSurface().getMedia();a.a.trigger(new _.M(_.pc,{ad:c}));a.a.trigger(new _.M(_.wc,{ad:c}))};
|
|
318
|
+
es=function(a,b){return _.I(function(c){switch(c.a){case 1:if(!b.player)return c["return"]();a.J();if(b.state!==zf){c.C(2);break}a.g.info("Wait for seek to finish");_.F(c,3);return _.x(c,b.preloadPromise,5);case 5:_.G(c,2);break;case 3:_.H(c);case 2:a.f=!1;if(!b.V){c.C(6);break}return _.x(c,b.player.seek(b.V,!0),6);case 6:a.h=b;b.role=ss;Lr(a,b.player,!0);b.state="loading";if(a.A&&(bs(a,b,ds),!b.player.isPaused())){c.C(9);break}return _.x(c,b.player.play(),9);case 9:b.state=_.rf,_.z(c)}})};
|
|
319
|
+
os=function(a,b){return _.I(function(c){return b===a.a?c.C(0):_.x(c,a.w.release(b),0)})};rs=function(a,b){var c;return _.I(function(d){if(1==d.a)return b?d["return"](a.a):_.x(d,a.w.get(),2);c=d.f;if(!c)throw Error("No player available");return d["return"](c)})};ls=function(a,b){var c;_.I(function(d){if(0===b.length)return d["return"]();a.g.info("Preload items (IDs: "+b+")");c=a.l.filter(function(e){return b.includes(e.id)})||[];return _.x(d,Promise.all(c.map(function(e){return us(a,e)})),0)})};
|
|
320
|
+
us=function(a,b){var c,d,e,f,g;return _.I(function(h){switch(h.a){case 1:if(!b.primary){h.C(2);break}b.state=zf;a.o.set(b.id,b);if(!b.V||a.A){h.C(3);break}c=b.player;a.g.info("Preparing to resume at",b.V);bs(a,b,cs);return _.x(h,c.seek(b.V,!0),3);case 3:return b.state=yf,h["return"]();case 2:return d=b.id,_.x(h,rs(a,!1),5);case 5:e=h.f;b.player=e;b.videoEl=e.getSurface().getMedia();b.role=qs;b.state=zf;_.F(h,6);a.o.set(d,b);b.config.autoplay&&(a.g.warn("Autoplay should not be used for preloaded streams. Force disabling autoplay (ID: "+
|
|
321
|
+
(d+")")),b.config.autoplay=!1);if(f=a.a.getBandwidthEstimate())b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=f;b.preloadPromise=ts(e,b.config);return _.x(h,b.preloadPromise,8);case 8:b.state=yf;_.G(h,0);break;case 6:g=_.H(h),7001===g.code?(a.g.info("Preload aborted (ID: "+d+")"),b.state=wf):(a.g.warn("Preload failed (ID: "+d+")",g),b.state=xf),_.z(h)}})};
|
|
322
|
+
Lr=function(a,b,c){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(Ib+b),d.classList.add(pd),d.classList.remove("clpp-hide")):(a.g.debug(Wa+b),d.classList.remove(pd),d.classList.add("clpp-hide")),a.I&&a.I(d,c))};
|
|
323
|
+
Jr=function(a,b,c){return Array.from({length:2}).map(function(d,e){var f=document.createElement(_.Jg);b.appendChild(f);var g=a.j.ib.create();f=new Hr(f);g.init(f,c);g.setSourceIndex(0);var h=f.getContainer();if(!h)throw Error("Failed to create player surface container element");h.classList.add("secondary");f.getMedia().classList.add("v-"+e);a.F.push(h);return g})};
|
|
324
|
+
bs=function(a,b,c){var d=b?b.Ob||null:null;a.a.getConfiguration().muted||a.G?(a.a.setMuted(!0),vs(a,!0)):(b.audio&&(c=b.audio),a.j.onAudioDecision&&(c=a.j.onAudioDecision(d)),c===ds?(a.a.setMuted(!1),vs(a,!0)):c===cs?(a.a.setMuted(!0),vs(a,!1)):a.g.warn("Audio decision not supported",c))};vs=function(a,b){a.l.filter(function(c){return!c.primary&&c.player}).forEach(function(c){return c.player.setMuted(b)})};ws=function(a){a.F.forEach(function(b){return a.H.removeChild(b)});a.F=[];Lr(a,a.a,!0)};
|
|
325
|
+
ts=function(a,b){return _.I(function(c){return 1==c.a?_.x(c,a.release(),2):_.x(c,a.load(b),0)})};Rr=function(a){if(a.$a){var b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.$a.h=b}a.rf&&a.rf()};
|
|
326
|
+
Hs=function(a){_.Mm.call(this);var b=this;this.j=_.N.ua({Pn:.5},a);this.A=this.f=!1;this.g=new _.K("clpp.interstitial.Player");this.l=a.player;this.l.setSeekInterceptor(function(c,d){if(d)return!0;if(b.f)return!1;var e=xs(b);if(e)return b.g.info("Seek ignored while binding interstitial",e.$),!1;ys(b,c);e=zs(b);var f=As(b,c),g=Bs(b,c);if(e){if(f&&f!==e)return Cs(b,f,c),!1;if(g&&g!==e)return Ds(b,g,c),!1;if(c<e.startTime-b.j.resolutionOffsetSec)return Es(b,e),!0;if(c<e.startTime)return $r(b.a),b.g.info("Seek inside resolution area of",
|
|
327
|
+
e.$),!0;if(c<=e.endTime)return b.g.info("Seek into the scheduled interstitial",e.$),Zr(b.a),!1;if(e.mh)return b.g.info("Jump over a scheduled interstitial",e.$),Yr(b.a),e.state=Fs,!0;b.g.info("Jump over a scheduled interstitial triggering it",e.$);Zr(b.a);ms(b.a,c,!0);return!1}return f?(Cs(b,f,c),!1):g&&!g.ul?(Ds(b,g,c),!1):!0});this.a=new Mr({pl:this.j.config,Zi:a.player,preloadMedia:!0,ib:a.ib,sideAdContainer:this.j.sideAdContainer,onAudioDecision:this.j.onAudioDecision,qn:function(){b.g.info("Resume primary content")}});
|
|
328
|
+
this.o=[];this.h=[];this.w=!1;Gs(this,a.player)};Is=function(a){return(a=a.a.getCurrentItem())&&!a.primary?a.player:null};
|
|
329
|
+
Ks=function(a){var b,c,d;_.I(function(e){var f=a.a;Tr(f,[{id:Bf,primary:!0,config:f.a.getConfiguration(),next:[],sb:0,duration:0,Ob:null}]);var g=Nr(f);if(!g)throw Error("Failed to find primary item");f.h=g;g.role=ss;g.player=f.a;g.videoEl=g.player.getSurface().getMedia();Lr(f,g.player,!0);b=a.l;c=b.getConfiguration();d=!c.autoplay;a.w=Js(a,d,b.isLive(),!1);if(a.w){f=a.a;g=f.w;if(g=g.a[0]?g.a[0].player:null)f.A||Lr(f,f.a,!1),Lr(f,g,!0);return e.C(0)}return c.autoplay?_.x(e,Sr(a.a),0):e.C(0)})};
|
|
330
|
+
ys=function(a,b){var c=a.l.getPosition();b>=c||a.h.filter(function(d){return 1===d.vd&&!d.once&&d.yi&&d.startTime>b}).forEach(function(d){d.Tg=!0})};zs=function(a){return a.h.find(function(b){return b.state===Ls})||null};xs=function(a){return a.h.find(function(b){return b.state===Ms})||null};Es=function(a,b){return _.I(function(c){if(1==c.a)return a.g.info("Unschedule interstitial",b.$),_.x(c,Yr(a.a),2);b.state=Fs;_.z(c)})};
|
|
331
|
+
Cs=function(a,b,c){var d;_.I(function(e){switch(e.a){case 1:a.f=!0;_.F(e,2,3);d=zs(a);if(!d){e.C(5);break}return _.x(e,Es(a,d),5);case 5:return a.g.info("Seek into interstitial",b.$),_.x(e,Ns(a,b),3);case 3:_.vh(e);a.f=!1;_.wh(e);break;case 2:return _.H(e),_.x(e,a.l.seek(c),3)}})};
|
|
332
|
+
Ds=function(a,b,c){var d,e;_.I(function(f){switch(f.a){case 1:a.f=!0;_.F(f,2,3);d=zs(a);if(!d){f.C(5);break}return _.x(f,Es(a,d),5);case 5:return a.g.info("Play jumped interstitial",b.$,"resume at",c.toFixed(2)),_.x(f,Ns(a,b,c),3);case 3:_.vh(f);a.f=!1;_.wh(f);break;case 2:return e=_.H(f),a.g.warn("Failed to play jumped interstitial",b.$,e),b.ul=new Date,_.x(f,a.l.seek(c),3)}})};
|
|
333
|
+
Js=function(a,b,c,d){var e=Os(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=Li(a.h.map(function(n){return n.$}),e.map(function(n){return n.id}));Ps(a,f.Zn);var g=new Set(f.Ej);f=e.filter(function(n){return g.has(n.id)})}if(!Qs(a,f))return!1;var h=[],l=[],m=[];f.forEach(function(n){var p=n.customAttributes.CUE||[];p.includes(_.rb)?l.push(n):!d&&p.includes("PRE")?h.push(n):!c&&n.startTime<a.j.Pn?h.push(n):m.push(n)});1<h.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):
|
|
334
|
+
h[0]&&Rs(a,h[0],b);m.forEach(function(n){return Ss(a,n,1)});1<l.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):l[0]&&Ss(a,l[0],2);Ts(a,e);return 0<h.length};
|
|
335
|
+
Ts=function(a,b){var c,d,e,f;_.I(function(g){c=a.a.getCurrentItem();if(!c)return g["return"]();if(c.primary)return a.h.forEach(function(h){var l=b.find(function(n){return n.id===h.$});if(l){var m=l.customAttributes[cc];null==h.oc&&null!=m&&(a.g.info(Sb,l.id,"Playout limit",m),h.oc=m,1===h.vd&&h.state===Ls&&Us(a,h))}}),g["return"]();d=b.find(function(h){return h.id===c.Ob});if(!d)return g["return"]();e=d.customAttributes[cc];if(null==e)return g["return"]();f=a.h.find(function(h){return h.$===d.id});
|
|
336
|
+
if(!f||null!=f.oc)return g["return"]();a.g.info(Sb,d.id,"Playout limit",e);f.oc=e;return _.x(g,Qr(a.a,e),0)})};Ps=function(a,b){var c=new Set(b);a.h.forEach(function(d){c.has(d.$)&&!Vs(d)&&a.g.warn("Removing an interstitial in active state",d)});a.h=a.h.filter(function(d){return!c.has(d.$)})};Os=function(a){return a.l.getTimelineCues().filter(function(b){return Jj(b.schemeIdUri)&&b.customAttributes})};
|
|
337
|
+
Ns=function(a,b,c){var d;return _.I(function(e){if(1==e.a)return _.x(e,Ws(a,b),2);d=e.f;if(!d)throw Error("Failed to bind");return _.x(e,Xs(a,b,1,!1,c),0)})};Us=function(a,b){_.I(function(c){return 1==c.a?_.x(c,Es(a,b),2):_.x(c,Ys(a,b,a.l),0)})};
|
|
338
|
+
Ss=function(a,b,c){var d=b.customAttributes[bc],e=b.customAttributes[ac],f=b.customAttributes[ec],g=b.customAttributes[cc],h=b.customAttributes[dc]||[];b.customAttributes[fc]||(b.customAttributes[fc]=null==f||0<f?"RANGE":"POINT");var l=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];l="CONTENT"===l?ds:"AD"===l?cs:void 0;var m=b.id,n=b.startTime,p=b.endTime,q=Fs,t=null==f?null:Math.max(0,b.startTime+f),u="POINT"===b.customAttributes[fc],y=!h.includes("SKIP");h=!h.includes("JUMP");var A=b.customAttributes[$b];
|
|
339
|
+
if(A)try{var B=JSON.parse(atob(A))}catch(C){B=null}else B=null;b={$:m,startTime:n,endTime:p,state:q,bh:e,dh:d,Ba:null,V:t,co:f,oc:g,vd:c,mm:u,Nj:y,mh:h,ij:B,yi:null!=f&&0>f,once:(b.customAttributes.CUE||[]).includes("ONCE"),fj:!1,Tg:!0,customAttributes:b.customAttributes,audio:l};a.h.push(b);return b};
|
|
340
|
+
Rs=function(a,b,c){var d,e,f,g,h;_.I(function(l){switch(l.a){case 1:return d=Ss(a,b,0),_.x(l,Ws(a,d),2);case 2:e=l.f;f=d.Ba?d.Ba.length:0;if(e&&0<f){_.F(l,8);a.g.info("Player preroll interstitial "+d.$);var m=Xs(a,d,0,c);return _.x(l,m,10)}e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping");return _.x(l,ps(a.a),5);case 5:if(c){l.C(0);break}return _.x(l,Sr(a.a),0);case 10:_.G(l,0);break;case 8:g=_.H(l);a.g.error("Preroll interstitial failed.",
|
|
341
|
+
g);if(h=Nr(a.a))return _.x(l,a.a.play(h.id),0);l.C(0)}})};Zs=function(a){a.o.forEach(function(b){return b()});a.o=[]};
|
|
342
|
+
Gs=function(a,b){function c(){a.A=!1}function d(){a.A=!0}function e(){Js(a,!1,!0,!0)}function f(){var g,h,l,m,n;return _.I(function(p){switch(p.a){case 1:if(a.f||a.A)return p["return"]();g=b.getPosition();h=$s(a,g);if(!h){p.C(2);break}return _.x(p,Ws(a,h),3);case 3:(l=p.f)&&Ys(a,h,b);case 2:m=at(a);if(!(m&&m.state===Fs&&b.getDuration()-g<a.j.resolutionOffsetSec)){p.C(0);break}return _.x(p,Ws(a,m),5);case 5:if(n=p.f)if(m.Ba&&0!==m.Ba.length){var q=a.a.getCurrentItem();if(q){var t=bt(a,m,2);if(0!==
|
|
343
|
+
t.length){var u=t[0].id;q.next=[u];q.transition={Da:u};a.g.info("Schedule postroll interstitial "+m.$);ct(a,m,t)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.");_.z(p)}})}b.on(_.sg,f);a.o.push(function(){b.off(_.sg,f)});b.on(_.rg,e);a.o.push(function(){b.off(_.rg,e)});b.on(_.gc,d);a.o.push(function(){b.off(_.gc,d)});b.on(_.hc,c);a.o.push(function(){b.off(_.hc,c)})};at=function(a){return a.h.find(function(b){return 2===b.vd})||null};
|
|
344
|
+
Qs=function(a,b){for(var c=b.sort(function(n,p){return n.startTime-p.startTime}),d=a.j.resolutionOffsetSec,e=Infinity,f=[],g=0;g<c.length-1;g++){var h=c[g],l=c[g+1];l&&(e=Math.min(e,l.startTime-h.endTime));l&&l.startTime<=h.endTime&&f.push("Interstitials "+h.id+" and "+l.id+" overlap.")}e<d&&(c=e/2,a.j.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured resolutionOffsetSec ("+(d+" s) auto-reconfiguring to ")+(c+" s.")));var m=[];b.forEach(function(n){var p=n.customAttributes[bc];
|
|
345
|
+
n.customAttributes[ac]||p||m.push("Interstitial cue "+n.id+" is invalid it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<m.length?a.g.error("Invalid interstitials, all interstitials will be skipped. "+m.join(" ")):0<f.length&&a.g.warn("Unsupported format of interstitials, playback may not behave correctly. "+f.join(" "));return 0===m.length};$s=function(a,b){return a.h.find(function(c){var d=c.startTime-b;return 1===c.vd&&Vs(c)&&0<d&&d<=a.j.resolutionOffsetSec})||null};
|
|
346
|
+
As=function(a,b){return a.h.find(function(c){return Vs(c)&&!c.mm&&1===c.vd&&b>c.startTime&&b<c.endTime})||null};Bs=function(a,b){var c=a.l.getPosition();return a.h.filter(function(d){return 1===d.vd&&!d.mh}).sort(function(d,e){return e.startTime-d.startTime}).find(function(d){return d.startTime>c&&d.startTime<b})||null};
|
|
347
|
+
Ws=function(a,b){var c,d,e,f;return _.I(function(g){switch(g.a){case 1:b.state=Ms;if(!b.bh){b.dh?(b.Ba=[{URI:b.dh,DURATION:b.endTime-b.startTime}],a.Za(new _.M(oc,{id:b.$,detail:dt(b)})),b.state=et):b.state=ft;g.C(2);break}_.F(g,3);a.g.info("Load X-ASSET-LIST for "+b.$);a.Za(new _.M(mc));return _.x(g,gt(a,b.bh),5);case 5:c=g.f;b.Ba=c.ASSETS;b.Ba&&0!==b.Ba.length||a.g.info("Interstitial "+b.$+" has no assets, will be smoothly skipped");null==b.V&&(d=Oj(b.Ba.map(function(h){return h.DURATION})),e=null==
|
|
348
|
+
b.oc?d:Math.min(b.oc,d),b.V=b.startTime+e);b.state=et;a.Za(new _.M(nc));a.Za(new _.M(oc,{id:b.$,detail:c}));_.G(g,2);break;case 3:f=_.H(g),a.g.error("Failed to load X-ASSET-LIST",f),b.state=ft;case 2:return g["return"](b.state===et)}})};ht=function(a,b){var c=a.j.Nn;if(c){var d=new URL(b);d.searchParams.set("_HLS_primary_id",c);return d.toString()}return b};
|
|
349
|
+
Xs=function(a,b,c,d,e){var f,g,h;return _.I(function(l){if(0===b.Ba.length)return l["return"]();f=a.a.getCurrentItem();if(!f)return l["return"]();g=bt(a,b,c);if(0===g.length)return l["return"]();ct(a,b,g);(h=0===c&&a.l.isLive())||(null!=e?ms(a.a,e,!0):null!=b.V&&ms(a.a,b.V));return d?_.x(l,a.a.load(g[0].id),0):_.x(l,a.a.play(g[0].id),0)})};
|
|
350
|
+
Ys=function(a,b,c){if(b.Ba)if(0===b.Ba.length){var d=function(){c.isLive()?a.g.info("Skipping empty live interstitial "+b.$):null!=b.V&&0!==b.co?c.seek(b.V):a.g.info("Empty VOD interstitial "+b.$+", continuing to next segment")};c.one(_.pg,d);a.o.push(function(){c.off(_.pg,d)});a.g.info(Fb+b.$+" to be skipped")}else{var e=a.a.getCurrentItem();if(e){var f=bt(a,b,1);if(0!==f.length){var g=f[0].id;null!=b.V&&ms(a.a,b.V);e.next=[g];e.transition={pf:{position:b.startTime,itemId:g,V:b.V}};a.g.info(Fb+b.$+
|
|
351
|
+
" for "+(b.startTime+" s"));ct(a,b,f)}}}};ct=function(a,b,c){Tr(a.a,c);c=a.a;$r(c);c.h&&(c.h.$a&&is(c,c.h,c.h.$a),ks(c),ls(c,c.h.next));b.state=Ls;a.Za(new _.M(_.qc,{detail:null}))};
|
|
352
|
+
bt=function(a,b,c){var d=0,e=b.Ba.map(function(h,l){var m=b.$+"-"+l;d+=h.DURATION;return{id:m,config:{source:{url:ht(a,h.URI),type:_.ym}},duration:h.DURATION,sb:d,Ob:b.$,next:[],$a:new vr(c,l+1,b.Ba.length,h.DURATION,b.$,b.Nj,b.customAttributes||null),audio:b.audio}});e.forEach(function(h,l){var m=l===e.length-1;m&&2===c||(m?(h.next=[Bf],h.transition={Da:Bf}):(m=m?Bf:h.Ob+"-"+(l+1),h.next=[m],h.transition={Da:m}))});e.forEach(function(h){h.rf=function(){var l=h.$a;a.g.info("Playing ad "+(l.f+"/"+
|
|
353
|
+
l.a)+" of interstitial "+h.Ob)}});if(null!=b.oc&&(e=it(a,b,e),0===e.length))return[];var f=e[0].rf;e[0].rf=function(){b.fj=!0;b.yi&&(b.Tg=!1);a.g.info("Playing interstitial "+b.$+" with "+(b.Ba.length+" assets and will resume primary content ")+((b.V?"at "+b.V.toFixed(1)+" s":"after interstitial ended")+"."));f()};e[0].Hi=function(h){null==b.V&&(b.V=b.startTime+h,ms(a.a,b.V),a.g.info("Primary content will resume at",b.V.toFixed(1),"s"));b.state=jt};var g=e[e.length-1];g.Da=function(){b.state=kt;Ur(a.a,
|
|
354
|
+
e.map(function(h){return h.id}));2===c&&ps(a.a)};g.Ag=a.j.adReleaseDelayMs;return e};
|
|
355
|
+
it=function(a,b,c){var d=b.oc;a.g.info("Playout limit for "+b.$+" is "+(d+" s"));b=c[c.length-1].sb;if(d>=b)return a.g.info("Playout limit ("+d+") islarger or equal to total duration: ("+(b+").")),c;if(0>=d)return a.g.info("Discarding all ads."),[];var e=c.filter(function(f){return f.sb-f.duration<=d});e.forEach(function(f){f.$a.a=e.length});a=e[e.length-1];c=d-(a.sb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Da=Bf:a.transition.pf={position:c,itemId:Bf,V:null};a.maxDuration=c;return e};
|
|
356
|
+
gt=function(a,b){var c,d,e,f,g,h;return _.I(function(l){if(1==l.a){c=a.a.Ye();if(!c)throw Error("No player found");d=c.getNetworkEngine();e=_.Yj(ht(a,b));return _.x(l,El(d,e),2)}f=l.f;if(null===f)return a.g.warn("X-ASSET-LIST "+b+" returned no content"),l["return"]({ASSETS:[]});g=lt(f);if(!g)throw new _.Zi("Invalid X-ASSET-LIST list response");h=f;return l["return"](h)})};
|
|
357
|
+
lt=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(function(b){return typeof b.URI===_.eg&&typeof b.DURATION===_.k}):!1};Vs=function(a){return a.Tg&&!(a.once&&a.fj)&&[Fs,kt].includes(a.state)};dt=function(a){var b={URI:a.Ba[0].URI,DURATION:a.Ba[0].DURATION};a.ij&&(b[$b]=a.ij);return{ASSETS:[b]}};mt=function(){this.a=null};
|
|
358
|
+
nt=function(){try{var a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(c){var b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var e=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===d?e:e&3|8).toString(16)})}};pt=function(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.gi;this.h=null;this.f=!0;ot(this)};
|
|
359
|
+
ot=function(a){a.a.on(window,"offline",function(){qt(a,!1)});a.a.on(window,"online",function(){a.f||rt(a)});a.a.on(a.m,$f,function(){return st(a)});a.a.on(a.m,"suspend",function(){return st(a)});a.a.on(a.m,_.Sg,function(){return st(a)});a.a.on(a.m,_.rf,function(){a.f||rt(a)});a.a.on(a.m,_.Cf,function(){a.f||rt(a)});a.a.on(a.m,_.bg,function(){switch(a.m.getState()){case _.Qq:st(a);break;default:st(a)}})};rt=function(a){a.m.getConfiguration().connectivityCheck&&(tt(a),a.h=(new _.Xh(function(){return ut(a)})).ha(5))};
|
|
360
|
+
st=function(a){a.f&&rt(a)};tt=function(a){a.h&&(a.h.stop(),a.h=null)};ut=function(a){var b,c;return _.I(function(d){if(1==d.a)return(b=a.m.getConfiguration().connectivityCheck)&&a.m?_.x(d,Il(a.j,b.url,b.attemptParameters,b.method),2):d["return"]();c=d.f;qt(a,c);_.z(d)})};qt=function(a,b){tt(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.M(Ye,{online:a.f})))};wt=function(){for(var a=0;a<vt.length;++a)vt[a].dd()};
|
|
361
|
+
_.xt=function(a){var b=b||0;a={priority:b,dd:a};for(var c=0;c<vt.length;c++)if(vt[c].priority<b){vt.splice(c,0,a);return}vt.push(a)};yt=function(a,b){a.onError(b);a.release().then(function(){return a.destroy()})};zt=function(a,b,c){var d=_.R.ea;this.h=a;this.f=b;JSON.parse(d(_.rl(a)));this.a=JSON.parse(d(_.rl(b)));this.j=c};
|
|
362
|
+
Bt=function(a){var b=At,c=_.R.eb,d={kty:"RSA",n:b.n,e:b.e},e=a.h+"."+a.f,f=a.j;return new Promise(function(g,h){try{var l=window&&window.crypto&&window.crypto.subtle}catch(n){}if(l){var m={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};l.importKey("jwk",d,m,!1,["verify"]).then(function(n){var p=c(e),q=_.rl(f);return l.verify(m,n,q.buffer,p.buffer)}).then(function(n){n?g():h(new _.Zi("Signature Verification failed",wg))})["catch"](h)}else g()})};Ct=function(a){this.f=a;this.a=null;this.g=new _.K("clpp.utils.LicenseKey")};
|
|
363
|
+
Dt=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 zt(b[0],b[1],b[2]);a.a=b}return a.a};
|
|
364
|
+
Et=function(a){var b,c,d;return _.I(function(e){if(1==e.a)return b=Dt(a),_.F(e,2),_.x(e,Bt(b),4);if(2!=e.a)return _.G(e,0);if((c=_.H(e))&&c.code===wg)throw c;d=new _.qj(window.location.href);if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(d.a.hostname))return e["return"]();throw c;})};
|
|
365
|
+
Ft=function(a){switch((a.ca[0]||{src:"",type:""}).type){case _.Hc:a="dash";break;case _.Mc:a="ss";break;case _.ym:a="hls";break;case _.Mg:a="mp4";break;default:a=""}return a};Gt=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?""+a.customData.userId:""};Ht=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?""+a.customData.assetId:""};It=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?""+a.customData.sessionId:""};
|
|
366
|
+
Kt=function(a){var b=a.configuration,c="no";b.drm&&!_.N.ra(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(be)||Jt(a).endsWith("drmtoday.com"))&&(c=be);return c};Lt=function(a){a=a.drmInfo;var b="";if(a)switch(a.keySystem){case _.Fd:b="wv";break;case _.Dd:b="pr";break;case _.Bd:b="fps"}return b};Mt=function(a){a=a.drmInfo;var b=!1;a&&(b=a.persistentStateRequired);return b.toString()};
|
|
367
|
+
Nt=function(a){a=a.drmInfo;var b="";if(a)switch(a.videoRobustness){case Ua:case Sa:b="L1";break;case Ta:b="L2";break;case _.Eb:case _.Db:b="L3"}return b};Jt=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.qj(a)).a.hostname:""};
|
|
368
|
+
Rt=function(a,b){var c="ie"===_.gl().browser,d=b.configuration,e=_.hh(Array.from(_.Ym.keys())).concat(_.hh(b.Yi));d={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ia,"CL-USER-ID":Gt(d),"CL-ASSET-ID":Ht(d),"CL-SESSION-ID":It(d),"CL-PLAYBACK-TYPE":b.isLive?Ot:Pt,"CL-CONTENT-TYPE":Ft(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Kt(b),"CL-DRM-CDM":Lt(b),"CL-DRM-SEC-LEVEL":Nt(b),"CL-DRM-OFFLINE":Mt(b),"CL-DRM-IP":Jt(b)};Qt&&Qt.companionSdk&&(Qt.companionSdk.name&&(d["CL-COMPANION-SDK"]=Qt.companionSdk.name),
|
|
369
|
+
Qt.companionSdk.version&&(d["CL-COMPANION-SDK-VERSION"]=Qt.companionSdk.version));c&&(e=window.localStorage.getItem("cl_et"))&&(d["CL-ETAG"]=e);e=_.Yj(["https://downloads.castlabs.com/r/register/"]);e.method="GET";e.headers=d;return(new _.Cl).fetch(e).T.then(function(f){200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()})["catch"](function(f){a:{var g=Dt(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)f=Promise.resolve();else{switch(h){case 403:case 404:g=7101;
|
|
370
|
+
var l="Castlabs Player license is invalid";if(403===h){h=l;l="";try{l=JSON.parse(decodeURIComponent(f.responseText)).message}catch(m){}f=h+(": "+l)}else f=l+"!";l=f;break;case 412:g=7103;l="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.";break;default:f=Promise.resolve();break a}a.g.error(ab+l);f=Promise.reject(new _.O(_.Q,7,g,l))}}return f})};
|
|
371
|
+
Tt=function(a){this.m=a;this.f=a.getNetworkEngine();this.h=St(this);this.f.bd(this.h);this.a=null};
|
|
372
|
+
St=function(a){return function(b){var c=b.headers,d=b=null,e=_.N.$h(c,"cmsd-dynamic");c=_.N.$h(c,"cmsd-static");e&&(b=Ut(e),a.a=b);if(c)try{e={};var f=c.split(",");for(c=0;c<f.length;c++){var g=Vt(f[c]),h=g.key,l=g.value;Object.keys(Wt).includes(h)&&(e[Wt[h]]=l)}d=_.N.Ec(e)?e:null}catch(m){Xt.error("CmsdManager parseCmsdStaticHeader_ failed:",m),d=null}(b||d)&&a.m.trigger(new _.M("cmsd-event",{ip:b,wp:d}))}};
|
|
373
|
+
Ut=function(a){try{var b=a.split(",").map(function(c){var d={};c=c.split(";");for(var e=0;e<c.length;e++){var f=Vt(c[e]),g=f.key;f=f.value;Object.keys(Yt).includes(g)&&(d[Yt[g]]=f)}return d}).filter(function(c){return _.N.Ec(c)});return 0<b.length?b:null}catch(c){return Xt.error("CmsdManager parseCmsdDynamicHeader_ failed:",c),null}};
|
|
374
|
+
Vt=function(a){var b=a.split("\x3d"),c=b[0];b=b[1];if(!c)throw new _.Zi("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};var 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 _.Zi("Parsing CMSD, not recognized value type of "+a);};
|
|
375
|
+
X=function(a,b,c){_.Mm.call(this);var d=this;wt();this.g=new _.K("clpp.Player");this.g.info("SDK version: 6.27.0");if(!a)throw new _.O(_.Q,7,7102);this.ya=new _.gi;this.f=this.F=b||_.Tm();this.l=null;void 0===this.f.license&&(this.f.license=Qm,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 _.O(_.Q,7,7101,"No license provided in configuration!");this.j=
|
|
376
|
+
new Hr(a,c);this.H=this.A=this.a=this.G=null;this.J=new _.Cl;this.h=null;this.ja=[];this.ka=!0;this.L={};this.Ia=null;this.Z=!0;this.da=this.U=!1;this.N=this.ld=null;this.hg=!1;this.gb=new pt(this);this.B=null;this.on(_.bg,function(){d.getState()===_.Wq&&(d.a?d.a.unload():Promise.resolve())});this.on(_.Dc,function(){d.hg=!0});this.on(_.Cc,function(){d.hg=!1});this.on(_.rg,function(){return Zt(d)});$t(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
|
|
377
|
+
this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),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=[];b=_.v(au);for(c=b.next();!c.done;c=b.next()){c=c.value;try{var e=c.create(this.f);e&&a.push(e)}catch(f){this.g.error("Error while creating player plugin",f)}}bu(this,a);this.P=_.pa;dn(this)};
|
|
378
|
+
_.cu=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.F),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};$t=function(a,b){a.G=new Ct(b);Et(a.G)["catch"](function(c){setTimeout(function(){a.g.error(ab+c);a.trigger(new _.M(_.he,{detail:new _.O(_.Q,7,7101)}));a.destroy()},1E3)})};
|
|
379
|
+
du=function(a,b){var c,d;_.I(function(e){if(1==e.a)return a.j.getMedia()||a.j.getCastElement(),a.G||(a.G=new Ct(a.f.license)),_.F(e,2),a.g.debug("Verifying license remotely"),_.x(e,Rt(a.G,b),4);if(2!=e.a)return a.g.debug("License verified remotely"),_.G(e,0);c=_.H(e);a.g.debug("License rejected by remote",c);d={release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)};setTimeout(yt,1E3,d,c);_.z(e)})};
|
|
380
|
+
bu=function(a,b){a.ja=b;for(var c=_.v(a.ja),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.id();e&&(a.L[e]=d)}a.Nc("onPlayerCreated")};
|
|
381
|
+
eu=function(a){var b,c;return _.I(function(d){switch(d.a){case 1:if(a.Z)return a.g.debug("The player is already released. No-op"),d["return"](new Promise(function(e){return e()}));a.ya.off(document,Qg);a.trigger(new _.M(_.Kf));a.j&&a.j.release();if(!a.h){d.C(2);break}return _.x(d,a.h.zc(),3);case 3:a.h=null;case 2:if(!a.B){d.C(4);break}return _.x(d,a.B.release(),5);case 5:a.B=null;case 4:if(a.a)return b=null,c=a.a.on(_.bg,function(e){b=e}),d["return"](a.Nc(_.We).then(function(){a.a.stopForwardingEventsTo(a);
|
|
382
|
+
return Promise.all([a.a.release(),a.J.release()])}).then(function(){a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),a.trigger(b))})["finally"](function(){a.a.off(_.bg,c);a.trigger(new _.M(Jf))}));a.trigger(new _.M(Jf));return d["return"](new Promise(function(e){return e()}))}})};
|
|
383
|
+
gu=function(a,b,c){if(a.P===_.qb)b=fu(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.da){a.da=!1;if(b){for(var d=a=null,e=0;e<b.length;e++);e=Object.values(_.Rh);for(var f=0;f<b.length;f++)for(var g=0;g<e.length;g++){var h={ib:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.k&&0<a.confidence?(_.Sh.debug("Player Factory '"+a.ib.a()+"' can play",b[d]),b=new Qh(a.ib,d)):(_.Sh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
|
|
384
|
+
null;if(!b)throw new _.O(_.Q,7,7003,"No player factory compatible with given sources found!");c=b.ib;a=c.create();b={ib:c,player:a,sourceIndex:b.sourceIndex}}else b={ib:a.A,player:a.a,sourceIndex:0};return b};fu=function(a,b){var c=Uh(function(d){return d.f(_.qb)&&a.every(function(e){return 2===d.canPlay(e,b)})});if(!c)throw new _.O(_.Q,7,7003,"No compatible player implementing playlist mode found!");return{ib:c,player:c.create(),sourceIndex:0}};
|
|
385
|
+
iu=function(a){var b;return _.I(function(c){if(1==c.a){if(!a.a)return a.g.warn(tb),c["return"]();b=a.a;if(!b.rh)return a.g.warn(xb),c["return"]();a.trigger(new _.M(Ee));return _.x(c,b.rh(),2)}return _.x(c,_.hu(a),0)})};
|
|
386
|
+
_.mu=function(a,b,c){var d,e;return _.I(function(f){if(1==f.a){if(a.U)throw new _.O(_.Q,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.O(_.Q,7,7E3,"No surface associated with this player!");_.rp(mf);return _.x(f,a.release(),2)}if(3!=f.a){d=c||_.cr(b);if(!b||0===d.length)throw new _.O(_.Q,7,7003,kb);a.Ia=d;a.f=_.Vm(a.F,b,{source:d});a.Z=!1;e=gu(a,d,a.f);_.cu(a,e.player,e.ib);ju(a,a.a);a.a&&a.a.setSourceIndex(e.sourceIndex);ku(a);a.a&&a.a.setCdnErrorCallback(a.N);lu(a,a.f);a.f.cmsd.enabled&&
|
|
387
|
+
(a.B=new Tt(a),a.a.setCmsdManager(a.B));if(a.f.pauseWhenInBackground)a.ya.on(document,Qg,function(){document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});en(a);return _.x(f,a.Nc("onContentWillLoad",a.f.source[e.sourceIndex]),3)}_.rp(lf);_.tp("player.beforeLoad",mf,lf);_.z(f)})};
|
|
388
|
+
_.nu=function(a){return _.I(function(b){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.M(Ee));return _.x(b,Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()]),0)})};ju=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=nt()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.H=c};ou=function(a){a.H&&(a.g.info("Playback session ended, ID:",a.H),a.H=null,a.a&&a.a.setPlaybackSessionId(null))};
|
|
389
|
+
qu=function(a){var b,c,d,e;_.I(function(f){if(1==f.a){b=[];if(a.f.remoteTextTracks)for(c=_.v(a.f.remoteTextTracks),d=c.next();!d.done;d=c.next())e=d.value,b.push(a.getTrackManager().addTextTrack(e));return _.x(f,Promise.all(b),2)}pu(a);_.z(f)})};
|
|
390
|
+
pu=function(a){var b=_.Gi(a.f.preferredTextLanguage).filter(function(f){return f}),c=a.f.preferForcedSubtitles,d=a.getTrackManager().oa().filter(function(f){return c?f.kind===_.je:f.kind!==_.je});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().na();e&&e.language?(e=_.Kj(e.language||""),b.push(e)):(e=a.getTrackManager().La())&&e.language&&(e=_.Kj(e.language||""),b.push(e));0===
|
|
391
|
+
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(function(f){var g=_.Kj(f);if(f=d.find(function(h){h=_.Kj(h.language||"");return _.Lj(h,g)}))return a.getTrackManager().Ya(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};
|
|
392
|
+
_.hu=function(a){var b;return _.I(function(c){if(1==c.a)return _.rp(hf),du(a,{configuration:a.getConfiguration(),ca:a.di(),drmInfo:a.getDrmInfo(),Yi:Object.keys(a.L),isLive:a.isLive()}),qu(a),fn(),_.x(c,a.Nc(_.Te),2);if(3!=c.a)return a.f.autoplay?(b=a.h?a.h.cd():!0)?_.x(c,a.play(),3):c.C(3):c.C(3);_.rp(gf);_.tp("player.afterLoad",hf,gf);_.z(c)})};lu=function(a,b){var c=sr(a,b);c&&(a.h=c.create(a))};
|
|
393
|
+
Zt=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(function(c){return Jj(c.schemeIdUri)})){var b=a.f.mse.sendPlaybackSessionIdHeader?a.H:null;a.h=new mt;a.h.fd(a.a,a.A,b)}};ku=function(a){a.a&&a.a.setDrmCustomDataModifier(function(b){return _.I(function(c){return a.hg&&a.ld?_.x(c,a.ld(b),0):c["return"]()})})};_.ru=function(a){a&&(0<=au.indexOf(a)||au.push(a))};
|
|
394
|
+
su=function(a,b,c){X.call(this,a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.F=_.N.ua(this.F,a);this.f=_.N.ua(this.f,a);this.I=0;this.o=[];this.fa=!1;this.w=null;this.K=[]};tu=function(a){a.K.forEach(function(b){return b()});a.K=[]};
|
|
395
|
+
uu=function(a,b){function c(f){a.I=a.o.findIndex(function(g){return g.id===f.id})}a.addEventListener(_.Qf,c);a.K.push(function(){a.removeEventListener(_.Qf,c)});if(b.endTime){var d=b.endTime,e=function(){a.getPosition()>=d&&(a.removeEventListener(_.sg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.M(_.Pf)),a.pause())};a.addEventListener(_.sg,e);a.K.push(function(){a.removeEventListener(_.sg,e)})}};
|
|
396
|
+
xu=function(a,b){var c,d;return _.I(function(e){switch(e.a){case 1:return _.F(e,2),_.rp(qf),a.P=_.qb,a.ka=!1,c=b.slice(1).map(function(f){return{config:f,ca:_.cr(f)}}),_.x(e,_.mu(a,b[0]),4);case 4:return c.forEach(function(f){vu(a,f.config,f.ca)}),a.trigger(new _.M(Ee)),_.x(e,a.a.setupPlaylist(b),5);case 5:return _.x(e,_.hu(a),6);case 6:c.forEach(function(f){wu(a,f.config,f.ca)});_.rp(pf);_.tp("player.setupPlaylist",qf,pf);_.G(e,0);break;case 2:d=_.H(e);if(a.l)throw a.g.info(bb),new _.O(_.Q,7,7E3);
|
|
397
|
+
throw d;}})};yu=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return _.F(e,2),_.rp(kf),c=_.cr(b),vu(a,b,c),_.x(e,a.a.appendLoad(b),4);if(2!=e.a)return wu(a,b,c),_.rp(jf),_.tp("player.appendLoad",kf,jf),_.G(e,0);d=_.H(e);if(a.l)throw a.g.info(bb),new _.O(_.Q,7,7E3,{id:b.id});throw d;})};wu=function(a,b,c){du(a,{configuration:b,ca:c,drmInfo:a.getDrmInfo(),Yi:Object.keys(a.L),isLive:c[0].isLive})};
|
|
398
|
+
vu=function(a,b,c){if(0===c.length)throw new _.O(_.Q,7,7003,{message:kb,id:b.id});if(1<c.length)throw new _.O(_.Q,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 _.O(_.Q,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};
|
|
399
|
+
Bu=function(a){_.Mm.call(this);var b=this;this.j=_.N.ua({transition:_.bf,preloadMedia:!1},a);this.h=[];this.a=0;var c=zu(a.anchorId,this.j.config);this.w=new wr(c);this.f=null;this.l=!1;this.o=new Map;this.A=a.toggleVisible;this.g=new _.K(wd);this.w.a.forEach(function(d){return Au(b,d.player,!1)})};Du=function(a){return Promise.all(Array.from(a.o.keys()).map(function(b){return Cu(a,b)}))};
|
|
400
|
+
Cu=function(a,b){var c;return _.I(function(d){if(1==d.a){c=a.o.get(b);if(!c)return d.C(0);a.g.info("Stop preloading item (index: "+b+")");return c.player?_.x(d,Eu(a,c),3):d.C(3)}a.o["delete"](b);_.z(d)})};Gu=function(a,b){return _.I(function(c){if(1==c.a)return a.g.info("Stop current playback (index: "+b.index+")"),b.player.pause(),Au(a,b.player,!1),_.x(c,Eu(a,b),2);b.player=null;b.videoEl=null;b.role=Fu;_.z(c)})};
|
|
401
|
+
Eu=function(a,b){return _.I(function(c){b.disposers.forEach(function(d){return d()});b.disposers=[];return b.player?_.x(c,a.w.release(b.player),0):c.C(0)})};Ju=function(a,b){var c;return _.I(function(d){if(1==d.a)return _.x(d,a.w.get(),2);if(3!=d.a)return c=d.f,a.f=b,b.role=Hu,a.f.player=c,a.f.videoEl=c.getSurface().getMedia(),Au(a,c,!0),_.x(d,c.load(b.config),3);Iu(a,b);return b.config.autoplay?d.C(0):_.x(d,c.play(),0)})};
|
|
402
|
+
Ku=function(a,b){return _.I(function(c){switch(c.a){case 1:if(!b.player)return c["return"]();if(b.state!==zf){c.C(2);break}a.g.info(Wb);_.F(c,3);return _.x(c,b.preloadPromise,5);case 5:_.G(c,2);break;case 3:_.H(c);case 2:a.f=b;b.role=Hu;Au(a,b.player,!0);if(b.state===yf)return _.rp(vf),a.j.preloadMedia?_.x(c,b.player.play(),11):_.x(c,iu(b.player),11);if(b.state!==xf){c.C(7);break}return _.x(c,b.player.load(b.config),7);case 11:_.rp(uf),_.tp("playlist.next",vf,uf);case 7:if(Iu(a,b),b.config.autoplay)c.C(0);
|
|
403
|
+
else return _.x(c,b.player.play(),0)}})};Iu=function(a,b){if(a.j.autoplayNext){var c=function(){a.g.info("Automatically transition to next item");a.Wi()};b.player.on(_.ge,c);var d=b.player;b.disposers.push(function(){d.off(_.ge,c)})}};Mu=function(a){var b;return _.I(function(c){b=a.a+1;a.g.info("Preload following item (index: "+b+")");return _.x(c,Lu(a,b),0)})};Nu=function(a){var b;return _.I(function(c){b=a.a-1;a.g.info("Preload preceding item (index: "+b+")");return _.x(c,Lu(a,b),0)})};
|
|
404
|
+
Ou=function(a){var b;_.I(function(c){if(0===a.a)return _.x(c,Mu(a),0);if(a.a===a.h.length-1)return _.x(c,Nu(a),0);b=[a.a-1,a.a+1];a.g.info("Preload items (indices: "+b+")");return _.x(c,Promise.all(b.map(function(d){return Lu(a,d)})),0)})};
|
|
405
|
+
Lu=function(a,b){var c,d,e;return _.I(function(f){switch(f.a){case 1:return _.x(f,a.w.get(),2);case 2:return c=f.f,d=a.h[b],d.player=c,d.videoEl=c.getSurface().getMedia(),d.role=Fu,d.state=zf,a.trigger(new _.M(zg)),_.F(f,3),a.o.set(b,d),a.j.preloadMedia?(d.config.autoplay&&(a.g.warn("Autoplay should not be used for preloaded streams. Force disabling autoplay (index: "+(b+")")),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),_.x(f,d.preloadPromise,5);case 5:d.state=
|
|
406
|
+
yf;a.trigger(new _.M(zg));_.G(f,0);break;case 3:e=_.H(f),7001===e.code?(a.g.info("Preload aborted (index: "+b+")"),d.state=wf):(a.g.warn("Preload failed (index: "+b+")",e),a.trigger(new _.M(_.he,{detail:e})),d.state=xf),a.trigger(new _.M(zg)),_.z(f)}})};Au=function(a,b,c){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(Ib+b),d.classList.add(pd)):(a.g.info(Wa+b),d.classList.remove(pd)),a.A&&a.A(d,c))};
|
|
407
|
+
Pu=function(a){var b;return _.I(function(c){if(1==c.a)return _.x(c,a.w.destroy(),2);b=document.getElementById(a.j.anchorId);if(!b)return c["return"]();b.classList.remove(nd);b.innerHTML="";_.z(c)})};
|
|
408
|
+
zu=function(a,b){var c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(nd);return Array.from({length:3}).map(function(){var d=document.createElement(_.Jg);d.classList.add("clpp-mc-playlist-video-el");var e=document.createElement(_.Od);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new X(d,b)})};
|
|
409
|
+
_.Ru=function(a){if(Qu.has(a))return Qu.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Qu.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Qu.set(a,b),b):!1};Su=function(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)};
|
|
410
|
+
Tu=function(a,b){var c=b.replace(/mp2t/i,"mp4");a===_.Oc&&(c=c.replace(_.Jg,_.Oc));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"===f?e+"4200":"77"===f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c};Vu=function(){};_.Wu=function(){};
|
|
411
|
+
Xu=function(a,b,c,d,e){_.tn.call(this,Va);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.K(sd);_.R.empty(this.l)?this.g.warn(_.Yb):this.bb(_.Fd,{licenseUrl:this.l,videoRobustness:[_.Eb,void 0],audioRobustness:[_.Db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.se.bind(this)}});_.R.empty(this.j)?this.g.warn(_.sb):this.bb(_.Dd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.se.bind(this)}});
|
|
412
|
+
_.R.empty(this.h)?this.g.warn(_.Qa):_.R.empty(this.a)?this.g.warn(_.Pa):this.bb(_.Bd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Ei.bind(this),licenseResponse:this.Fi.bind(this),certificateRequest:this.se.bind(this),extractContentId:this.Mh.bind(this)}})};Yu=function(){};Zu=function(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if(typeof Event===_.le)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)};
|
|
413
|
+
$u=function(a){a=a.target;if(a.webkitPresentationMode===ef){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};av=function(){return this.webkitSupportsPresentationMode(ef)?(this.webkitSetPresentationMode(ef),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};
|
|
414
|
+
bv=function(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};cv=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};dv=function(a,b,c){return new window.TextTrackCue(a,b,c)};
|
|
415
|
+
ev=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};gv=function(a,b,c){if("input"===a)switch(this.type){case "range":a=jd}fv.call(this,a,b,c)};_.hv=function(a){var b=[];a=_.v(a);for(var c=a.next();!c.done;c=a.next()){c=_.v(c.value.variants);for(var d=c.next();!d.done;d=c.next())b.push(d.value)}return b};_.iv=function(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null};_.kv=function(){this.a=new Blob([jv],{type:_.Mg})};
|
|
416
|
+
_.lv=function(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d};_.mv=function(){this.a=[];this.f=-1;this.h=null};_.ov=function(a,b,c,d){var e,f;return _.I(function(g){if(1==g.a)return _.F(g,2),_.x(g,nv(a,b,c,d),4);if(2!=g.a)return e=g.f,g["return"](new e);f=_.H(g);f.a(_.Q);throw f;})};
|
|
417
|
+
nv=function(a,b,c,d){var e,f,g,h;return _.I(function(l){if(1==l.a){if(d){if(e=_.pv[d.toLowerCase()])return l["return"](e);_.Jh("Could not determine manifest type using MIME type ",d)}if(f=_.wj(a)){if(g=_.qv[f])return l["return"](g);_.Jh("Could not determine manifest type for extension ",f)}else _.Jh("Could not find extension for ",a);return d?l.C(2):_.x(l,rv(a,b,c),3)}if(2!=l.a&&(d=l.f)){if(h=_.pv[d])return l["return"](h);_.Jh("Could not determine manifest type using MIME type",d)}throw new _.O(_.Q,
|
|
418
|
+
4,4E3,{url:a});})};rv=function(a,b,c){var d,e,f;return _.I(function(g){if(1==g.a)return d=_.Yj(a),Vj(d,c),d.type=1,d.method="HEAD",_.x(g,b.fetch(d).T,2);e=g.f;f=e.headers["content-type"];return g["return"](f?f.toLowerCase():"")})};_.uv=function(a,b){var c=_.lm(_.mm(a),_.nm(a));_.sv[c]=b};_.vv=function(a){a=_.lm(_.mm(a),_.nm(a));return _.sv[a]||null};_.wv=function(a){a=_.lm(_.mm(a),_.nm(a));delete _.sv[a]};
|
|
419
|
+
_.xv=function(a){a=a.getConfiguration();a=_.N.hb(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.eg?a.backgroundColor:null;this.U=typeof a.windowColor===_.eg?a.windowColor:null;this.N=typeof a.fontColor===_.eg?a.fontColor:null;this.P=typeof a.fontFamily===_.eg?a.fontFamily:null;this.I=typeof a.fontSize===_.eg?a.fontSize:null;this.B=typeof a.fontSizePercent===_.k?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.eg?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
|
|
420
|
+
_.eg&&(this.o=a.edgeType)};_.Cv=function(a){if(!a.o)return null;var b=a.H;switch(a.o){case yv:return"-2px -2px 0 "+b+", -1px -1px 0 "+b;case zv:return"2px 2px 0 "+b+", 1px 1px 0 "+b;case Av:return"-1px 0 "+b+", 0 1px "+b+", 1px 0 "+b+", 0 -1px "+b;case Bv:return"2px 2px 3px "+b+", 2px 2px 4px "+b+", 2px 2px 5px "+b;default:return _.Qe}};Dv=function(a){this.f=a;this.a=null;this.g=new _.K("clpp.text.Mp4TextParser")};
|
|
421
|
+
_.Fv=function(a){_.xv.call(this,a);this.l=a.getSurface().getMedia();this.f="clpp-video-"+Ev++;this.h=document.createElement(_.gg);this.j=this.w=!1;_.yr(this.l,this.f);document.head.appendChild(this.h);this.Sb()};Gv=function(){};_.Hv=function(){};_.eh=[];ih=typeof Object.create==_.le?Object.create:function(a){function b(){}b.prototype=a;return new b};
|
|
422
|
+
if(typeof Object.setPrototypeOf==_.le)Iv=Object.setPrototypeOf;else{var Rv;a:{var Zv={zj:!0},$v={};try{$v.__proto__=Zv;Rv=$v.zj;break a}catch(a){}Rv=!1}Iv=Rv?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
|
|
423
|
+
var jh=Iv,nh=typeof Object.defineProperties==_.le?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},lh="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;oh.prototype.toString=function(){return this.a};var mh=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new oh("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}();
|
|
424
|
+
rh.prototype.A=function(a){this.f=a};rh.prototype["return"]=function(a){this.h={"return":a};this.a=this.j};rh.prototype.C=function(a){this.a=a};
|
|
425
|
+
Dh("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(l){h.reject(l)}}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=lh.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 l=
|
|
426
|
+
g[h];g[h]=null;try{l()}catch(m){this.j(m)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(m){return function(n){l||(l=!0,m.call(h,n))}}var h=this,l=!1;return{resolve:g(this.F),reject:g(this.h)}};b.prototype.F=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.G(g);else{a:switch(typeof g){case _.Re:var h=null!=g;break a;case _.le:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
427
|
+
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(l){this.h(l);return}typeof h==_.le?this.H(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.G=function(g){var h=this.j();
|
|
428
|
+
g.Qe(h.resolve,h.reject)};b.prototype.H=function(g,h){var l=this.j();try{g.call(h,l.resolve,l.reject)}catch(m){l.reject(m)}};b.prototype.then=function(g,h){function l(q,t){return typeof q==_.le?function(u){try{m(q(u))}catch(y){n(y)}}:t}var m,n,p=new b(function(q,t){m=q;n=t});this.Qe(l(g,m),l(h,n));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Qe=function(g,h){function l(){switch(m.f){case 1:g(m.l);break;case 2:h(m.l);break;default:throw Error("Unexpected state: "+
|
|
429
|
+
m.f);}}var m=this;null==this.a?f.f(l):this.a.push(l)};b.resolve=d;b.reject=function(g){return new b(function(h,l){l(g)})};b.race=function(g){return new b(function(h,l){for(var m=_.v(g),n=m.next();!n.done;n=m.next())d(n.value).Qe(h,l)})};b.all=function(g){var h=_.v(g),l=h.next();return l.done?d([]):new b(function(m,n){function p(u){return function(y){q[u]=y;t--;0==t&&m(q)}}var q=[],t=0;do q.push(void 0),t++,d(l.value).Qe(p(q.length-1),n),l=h.next();while(!l.done)})};return b});var Fh=this||self;
|
|
430
|
+
Fh.a=!0;_.N={xj:20,hb:function(a){var b=_.N.R,c=_.N.ni,d=_.N.ua;return b(a)||c(a)?a:d(a)}};_.J("clpp.utils.obj.cloneItem",_.N.hb);_.N.ua=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];c={};for(var d=0;d<b.length;d++)null!=b[d]&&(c=_.N.wi(c,{merging:b[d]},1));return c.merging||null};_.J("clpp.utils.obj.merge",_.N.ua);_.N.Ec=function(a){for(var b in a)if(void 0!==a[b])return!0;return!1};
|
|
431
|
+
_.N.wi=function(a,b,c){var d=_.N.R,e=_.N.ni,f=_.N.wi,g=_.N.Qb,h=_.N.qm,l=_.N.ig,m=_.N.km,n=_.N.qd;c+=1;if(d(a)||!n(a))a={};for(var p in b)n=b[p],e(n)||d(n)||g(n)||m(n)?a[p]=n:h(n)?a[p]=n.subarray(0):n instanceof Array?a[p]=f([],n,c):!d(n)&&l(n)&&c<_.N.xj&&(a[p]=f(a[p],n,c));return a};_.N.ni=function(a){a=typeof a;return a===_.eg||a===_.k||a===_.Yc};_.N.km=function(a){return a instanceof Element};_.N.R=function(a){return null===a||"undefined"===typeof a};_.N.qd=function(a){return typeof a===_.Re};
|
|
432
|
+
_.N.Qb=function(a){return typeof a===_.le};_.N.ia=function(a){return typeof a===_.eg};_.N.xa=function(a){return typeof a===_.k};_.N.ji=function(a){return typeof a===_.Yc};_.N.ig=function(a){var b=_.N.qd,c=_.N.R;if(c(a)||!b(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};_.N.qm=function(a){var b=_.N.qd,c=_.N.Qb;return!!(b(a)&&a.buffer&&a.buffer instanceof ArrayBuffer&&c(a.subarray))};
|
|
433
|
+
_.N.ra=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.N.qd(a)||!_.N.qd(b))return!1;for(var e=c||Object.keys(a),f={},g=0;g<e.length;g++){var h=e[g];if(_.N.R(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.N.R(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.N.R(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
|
|
434
|
+
_.N.isNaN=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:function(b){return b!==b})(a)};_.N.lm=function(a,b,c){return a>=b&&a<=c};_.N.$g=function(a){for(var b=new Map,c=_.v(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b};_.N.ah=function(a){var b={};a.forEach(function(c,d){b[d]=c});return b};
|
|
435
|
+
_.N.$h=function(a,b){for(var c=b.toLowerCase(),d=_.v(Object.entries(a)),e=d.next();!e.done;e=d.next()){var f=_.v(e.value);e=f.next().value;f=f.next().value;if(e.toLowerCase()===c)return f}return null};_.N.oi=function(a,b){for(var c in a){if(!(c in b))return!1;var d=a[c],e=b[c];if(d&&typeof d===_.Re&&e&&typeof e===_.Re){if(!_.N.oi(d,e))return!1}else if(void 0!==d&&void 0!==e&&d!==e)return!1}return!0};
|
|
436
|
+
_.N.pi=function(a,b){if(!_.N.oi(a,b))return!1;for(var c in b){if(!(c in a))return!0;var d=a[c],e=b[c];if(!d&&e||d&&typeof d===_.Re&&e&&typeof e===_.Re&&_.N.pi(d,e))return!0}return!1};var Kh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.J("clpp.log.Level",Kh);var Hh=0,Gh={},aw=[];_.J("clpp.log.getLoggers",function(){return _.N.hb(Gh)});_.J("clpp.log.addInterceptor",function(a){a&&aw.push(a)});_.J("clpp.log.removeInterceptor",function(a){a&&(a=aw.indexOf(a),0<=a&&aw.splice(a,1))});_.J("clpp.log.getTagLevel",Ih);_.J("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Gh[a]});_.J("clpp.log.setTagLevel",function(a,b){a&&(_.N.ia(b)&&(b=Lh(b)),Gh[a]=b)});
|
|
437
|
+
_.J("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.N.ia(a)&&(a=Lh(a));Hh=a});_.J("clpp.log.getLogLevel",function(){return Hh});_.r=_.K.prototype;
|
|
431
438
|
_.r.log=function(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=Ih(this.tag);if(0<=d){if(d<c)return}else if(Hh<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,arguments):2===c?console.warn.apply(console,arguments):
|
|
432
|
-
1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);d=_.
|
|
433
|
-
_.r.error=function(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)};_.r.
|
|
434
|
-
_.
|
|
435
|
-
_.
|
|
436
|
-
_.
|
|
437
|
-
_.
|
|
438
|
-
_.
|
|
439
|
-
_.
|
|
440
|
-
_.
|
|
441
|
-
_.Xh.prototype.tickNow=_.Xh.prototype.
|
|
442
|
-
_.r.
|
|
443
|
-
_.r.
|
|
444
|
-
_.r.
|
|
445
|
-
_.r.
|
|
446
|
-
l)return 1!==l&&a.Ca.info("Delta "+e.toFixed(1)+" s."),m["return"]();1===l?a.Ca.info("Secondary caught up."):1>l?a.Ca.info("Secondary slowing down to catch up. Rate: "+(l.toFixed(1)+", delta: "+e.toFixed(1)+" s")):1<l&&a.Ca.info("Secondary speeding up to catch up. Rate: "+(l.toFixed(1)+", delta: "+e.toFixed(1)+" s"));b.setPlaybackRate(l);_.
|
|
447
|
-
Zh.prototype.setLoop=Zh.prototype.
|
|
448
|
-
_.r.trigger=function(a){var b=this.a.get(a.type);if(b)for(var c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].
|
|
449
|
-
_.Si.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Oi,VERTICAL_LEFT_TO_RIGHT:_.Gg,VERTICAL_RIGHT_TO_LEFT:_.
|
|
450
|
-
_.Vi.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.
|
|
451
|
-
Wi.prototype.o=function(a){var b=new _.Si(a.startTime,a.endTime,a.text,_.
|
|
452
|
-
_.
|
|
453
|
-
_.
|
|
454
|
-
TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
|
|
455
|
-
MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,
|
|
456
|
-
DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,
|
|
457
|
-
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,
|
|
458
|
-
HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,INVALID_STREAMS_CHOSEN:5005,STREAMING_ERROR:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,
|
|
459
|
-
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,
|
|
460
|
-
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,
|
|
461
|
-
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,
|
|
462
|
-
SESSIONS_INVALID_CONFIGURATION:15E3};_.w(_.Zi,Error);var
|
|
463
|
-
_.
|
|
464
|
-
"
|
|
465
|
-
_.
|
|
466
|
-
_.
|
|
467
|
-
"
|
|
439
|
+
1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);d=_.v(aw);for(var e=d.next();!e.done;e=d.next())e=e.value,e.call(e,c,arguments)}};_.r.info=function(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)};_.r.debug=function(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)};_.r.warn=function(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)};
|
|
440
|
+
_.r.error=function(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)};_.r.jl=function(a){return a?this.tag?new _.K(this.tag+"."+a):new _.K(a):this};_.J("clpp.log.Logger",_.K);_.K.prototype.createChild=_.K.prototype.jl;_.K.prototype.error=_.K.prototype.error;_.K.prototype.warn=_.K.prototype.warn;_.K.prototype.debug=_.K.prototype.debug;_.K.prototype.info=_.K.prototype.info;_.K.prototype.log=_.K.prototype.log;var Mh=new _.K("clpp");_.J("clpp.log.info",_.Nh);
|
|
441
|
+
_.J("clpp.log.debug",_.Oh);_.J("clpp.log.warn",_.Jh);_.J("clpp.log.error",_.Ph);(function(){var a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();_.Sh=new _.K("clpp.players");_.Rh={};_.J("clpp.events.ERROR",_.he);_.J("clpp.events.LOADEDMETADATA",_.De);_.J("clpp.events.BUFFERING_ENDED",_.Zc);_.J("clpp.events.BUFFERING_STARTED",_.$c);_.J("clpp.events.STATE_CHANGED",_.bg);_.J("clpp.events.AUDIO_TRACK_CHANGED",_.Vc);_.J("clpp.events.TEXT_TRACK_CHANGED",_.ng);_.J("clpp.events.VIDEO_TRACK_CHANGED",_.Og);_.J("clpp.events.BITRATE_CHANGED",_.Xc);_.J("clpp.events.TRACKS_ADDED",_.tg);_.J("clpp.events.LOAD_START",Ee);_.J("clpp.events.RELEASING",_.Kf);_.J("clpp.events.RELEASED",Jf);
|
|
442
|
+
_.J("clpp.events.DESTROYING","destroying");_.J("clpp.events.DESTROYED","destroyed");_.J("clpp.events.VIDEO_BUFFER_CHANGED",_.Ng);_.J("clpp.events.AUDIO_BUFFER_CHANGED",_.Uc);_.J("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.J("clpp.events.DRM_SESSION_CREATED",Zd);_.J("clpp.events.DRM_SESSION_UPDATE",_.ae);_.J("clpp.events.DRM_SESSION_PERSISTED",_.$d);_.J("clpp.events.DRM_RENEWAL_STARTED",Yd);_.J("clpp.events.DRM_EXPIRATION_UPDATE",_.Wd);_.J("clpp.events.DRM_LICENSE_REQUESTED",Xd);
|
|
443
|
+
_.J("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Wc);_.J("clpp.events.PLAY",_.ff);_.J("clpp.events.SEEKING",_.Uf);_.J("clpp.events.SEEKED",_.Tf);_.J("clpp.events.USER_SEEKING",_.Dg);_.J("clpp.events.USER_SEEKED",_.Cg);_.Tq={SEEKING:1,NO_DATA:2};_.J("clpp.events.BufferingReasons",_.Tq);_.J("clpp.events.ADS_TIMELINE_CHANGED",_.Bc);_.J("clpp.events.AD_LOADED",_.qc);_.J("clpp.events.AD_BREAK_STARTED",_.gc);_.J("clpp.events.AD_STARTED",_.wc);_.J("clpp.events.AD_BUFFERING",_.ic);_.J("clpp.events.AD_PROGRESS",_.tc);
|
|
444
|
+
_.J("clpp.events.AD_FIRST_QUARTILE",_.lc);_.J("clpp.events.AD_MIDPOINT",_.rc);_.J("clpp.events.AD_THIRD_QUARTILE",_.zc);_.J("clpp.events.AD_PAUSED",_.sc);_.J("clpp.events.AD_RESUMED",_.uc);_.J("clpp.events.AD_SKIPPED",_.vc);_.J("clpp.events.AD_CLICKED",_.jc);_.J("clpp.events.AD_IMPRESSION",_.pc);_.J("clpp.events.AD_COMPLETED",_.kc);_.J("clpp.events.AD_STOPPED",_.yc);_.J("clpp.events.AD_BREAK_STOPPED",_.hc);_.J("clpp.events.AD_HLS_ASSET_LIST_REQUEST",mc);
|
|
445
|
+
_.J("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",nc);_.J("clpp.events.AD_HLS_RESOLVED",oc);_.J("clpp.events.SIMID_CREATIVE_STARTED",_.Wf);_.J("clpp.events.SIMID_CREATIVE_STOPPED",_.Xf);_.J("clpp.events.CASTING_STARTED",_.dd);_.J("clpp.events.CASTING_ENDED","castingended");_.J("clpp.events.CAST_STATUS_CHANGED",_.ed);_.J("clpp.events.AIRPLAY_STATUS_CHANGED",_.Ec);_.J("clpp.events.AIRPLAY_CASTING_STARTED",_.Dc);_.J("clpp.events.AIRPLAY_CASTING_ENDED",_.Cc);_.J("clpp.events.TIMELINE_CUE_ADDED",_.og);
|
|
446
|
+
_.J("clpp.events.TIMELINE_CUE_ENTER",_.pg);_.J("clpp.events.TIMELINE_CUE_EXIT",_.qg);_.J("clpp.events.TIMELINE_CUES_CHANGED",_.rg);_.J("clpp.events.MPD_TYPE_CHANGED",_.Oe);_.J("clpp.events.LIVE_TURNED_STATIC",_.Ae);_.J("clpp.events.VIMOND_RESPONSE",_.Pg);_.J("clpp.events.PLAYLIST_ITEM_CHANGED",_.sf);_.J("clpp.events.PLAYLIST_MODIFIED",_.tf);_.J("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Sf);_.J("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Qf);_.J("clpp.events.SC_PLAYLIST_ENDED",_.Pf);
|
|
447
|
+
_.J("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Rf);_.J("clpp.events.CDN_SWITCH_SUCCESS",_.fd);_.J("clpp.events.ONLINE_STATUS_CHANGED",Ye);_.J("clpp.events.CMSD_EVENT","cmsd-event");_.J("clpp.events.YOSPACE_SESSION_STARTED",_.dh);_.J("clpp.events.YOSPACE_SESSION_ENDED",_.ch);_.J("clpp.events.CONTENT_STEERING_CHANGE",_.Hd);_.J("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.Id);_.Vh.prototype.ha=function(a){return Wh(this,a,!1)};_.Vh.prototype.Gb=function(a){return Wh(this,a,!0)};_.Vh.prototype.stop=function(){this.a&&(this.a(),this.a=null)};_.Xh.prototype.Mg=function(){this.stop();this.f();return this};_.Xh.prototype.ha=function(a){var b=this;this.stop();this.a=(new _.Vh(function(){b.f()})).ha(a);return this};_.Xh.prototype.Gb=function(a){var b=this;this.stop();this.a=(new _.Vh(function(){b.f()})).Gb(a);return this};_.Xh.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};_.J("clpp.utils.Timer",_.Xh);_.Xh.prototype.stop=_.Xh.prototype.stop;_.Xh.prototype.tickEvery=_.Xh.prototype.Gb;_.Xh.prototype.tickAfter=_.Xh.prototype.ha;
|
|
448
|
+
_.Xh.prototype.tickNow=_.Xh.prototype.Mg;_.r=Zh.prototype;_.r.load=function(a){var b=this;return _.I(function(c){return b.Jc?_.x(c,ci(b,function(d){return _.I(function(e){return _.x(e,d.load(a),0)})}),0):(b.Ca.warn("No main player, cannot load."),c["return"]())})};_.r.lo=function(a){this.j=a;this.Ca.info("Looping set to",a)};_.r.Dj=function(a){this.f.push(a)};
|
|
449
|
+
_.r.Cj=function(a){if(this.Jc)this.Ca.warn("Main player already set.");else{this.Jc=a;var b=this.Bm.bind(this),c=this.Cm.bind(this),d=this.Rj.bind(this);a.on(_.bg,b);a.on(_.sg,c);a.on(_.ge,d);this.h.push(function(){a.off(_.bg,b);a.off(_.sg,c);a.on(_.ge,d)})}};_.r.clear=function(){this.Jc=null;this.f=[];this.h.forEach(function(a){return a()});this.h=[]};
|
|
450
|
+
_.r.Rj=function(){var a=this;return _.I(function(b){if(!a.j)return b.C(0);a.Ca.info("Looping playback.");return _.x(b,ci(a,function(c){return _.I(function(d){return 1==d.a?_.x(d,c.seek(0),2):_.x(d,c.play(),0)})}),0)})};
|
|
451
|
+
_.r.Bm=function(a){var b=this;this.a||(a=a.detail.currentState,a===_.Zq?(this.Ca.info("Mirroring playing."),bi(this,function(c){return _.I(function(d){return _.x(d,c.play(),0)})})):[_.Yq,_.Qq,_.Wq].includes(a)&&(this.Ca.info("Mirroring paused/buffering/error."),bi(this,function(c){var d,e;return _.I(function(f){if(1==f.a)return d=Math.round(b.Jc.getPosition())-.1,_.x(f,c.seek(d),2);if(3!=f.a)return _.x(f,Yh(.2),3);e=c.getState();return e!==_.Zq&&e!==_.Qq?f.C(0):_.x(f,c.pause(),0)})})))};
|
|
452
|
+
_.r.Cm=function(){var a=this;this.a||bi(this,function(b){var c,d,e,f,g,h,l;return _.I(function(m){switch(m.a){case 1:if(!b.isPaused()){m.C(2);break}return _.x(m,b.play(),2);case 2:c=a.Jc.getPosition();d=b.getPosition();e=c-d;f=Math.abs(e);g=b.getPlaybackRate();h=b.getState();if(h!==_.Zq||.05>=f)return m["return"]();var n=Math.abs(e);l=Math.min(Math.max(1+(.05>=n?0:n/(1>n?6:3))*Math.sign(e),.2),5);if(!(5<=f)){m.C(4);break}b.setPlaybackRate(1);return _.x(m,b.seek(c),5);case 5:return m["return"]();case 4:if(g===
|
|
453
|
+
l)return 1!==l&&a.Ca.info("Delta "+e.toFixed(1)+" s."),m["return"]();1===l?a.Ca.info("Secondary caught up."):1>l?a.Ca.info("Secondary slowing down to catch up. Rate: "+(l.toFixed(1)+", delta: "+e.toFixed(1)+" s")):1<l&&a.Ca.info("Secondary speeding up to catch up. Rate: "+(l.toFixed(1)+", delta: "+e.toFixed(1)+" s"));b.setPlaybackRate(l);_.z(m)}})})};_.J(qd,Zh);Zh.prototype.clear=Zh.prototype.clear;Zh.prototype.addMainPlayer=Zh.prototype.Cj;Zh.prototype.addSecondaryPlayer=Zh.prototype.Dj;
|
|
454
|
+
Zh.prototype.setLoop=Zh.prototype.lo;Zh.prototype.load=Zh.prototype.load;_.r=_.di.prototype;_.r.push=function(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]};_.r.get=function(a){return(a=this.a[a])?a.slice():[]};_.r.remove=function(a,b){var c=this.a[a];if(!c)return!1;for(var d=!1,e=0;e<c.length;++e)c[e]===b&&(c.splice(e,1),--e,d=!0);return d};_.r.clear=function(){this.a={}};_.r.forEach=function(a){for(var b in this.a)a(b,this.a[b])};ei.prototype.Za=function(a){try{this.dd.handleEvent?this.dd.handleEvent(a):this.dd.call(this.a,a)}catch(b){_.Ph("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}};_.M.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};_.M.prototype.stopImmediatePropagation=function(){this.f=!0};_.M.prototype.stopPropagation=function(){};_.r=fi.prototype;
|
|
455
|
+
_.r.trigger=function(a){var b=this.a.get(a.type);if(b)for(var c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Za(a),b[c].Yn&&this.a.remove(a.type,b[c]),!a||!a.f);c++);};_.r.on=function(a,b,c){this.a.push(a,new ei(a,b,c||this.f));return b};_.r.one=function(a,b,c){this.a.push(a,new ei(a,b,c||this.f,!0));return b};_.r.off=function(a,b){var c=this.a.get(a),d=!1;if(c)for(var e=0;e<c.length;e++)c[e].dd===b&&(d=this.a.remove(a,c[e])||d);return d};_.r.clear=function(){this.a.clear()};_.gi.prototype.release=function(){_.ji(this)};_.gi.prototype.on=function(a,b,c,d){a=new li(a,b,c,void 0===d?!1:d);this.a.push(b,a)};_.gi.prototype.one=function(a,b,c){function d(f){e.off(a,b,d);return c(f)}var e=this;this.on(a,b,d)};_.gi.prototype.off=function(a,b,c){for(var d=this.a.get(b)||[],e=0;e<d.length;++e){var f=d[e];f.target!==a||c!==f.a&&c||(ii(f),this.a.remove(b,f))}};mi.prototype.release=function(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)};mi.prototype.destroy=function(){var a=this;return _.I(function(b){a.release();_.z(b)})};mi.prototype.getTimelineCues=function(){return Array.from(this.a.values()).sort(function(a,b){return a.startTime-b.startTime})};_.Si.prototype.ra=function(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===a.payloadType};_.J("clpp.text.Cue",_.Si);_.Si.positionAlign={LEFT:_.ye,RIGHT:_.ze,CENTER:_.hd,AUTO:"auto"};_.Mi=_.kg;_.Si.payloadType={TEXT:_.Mi,VTT_XML:_.Rg,TTML_XML:_.vg};_.Ni=_.hd;_.bw={LEFT:_.ve,RIGHT:_.Of,CENTER:_.Ni,START:_.ag,END:_.fe};_.Si.textAlign=_.bw;var Ri="ltr";_.Si.direction={HORIZONTAL_LEFT_TO_RIGHT:Ri,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Oi="horizontal-tb";
|
|
456
|
+
_.Si.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Oi,VERTICAL_LEFT_TO_RIGHT:_.Gg,VERTICAL_RIGHT_TO_LEFT:_.Ig};_.Pi=0;_.Si.lineInterpretation={LINE_NUMBER:_.Pi,PERCENTAGE:1};_.Qi=_.ag;_.cw={CENTER:_.hd,START:_.Qi,END:_.fe};_.Si.lineAlign=_.cw;_.J("clpp.text.CueRegion",_.Vi);_.Ti=1;_.Vi.units={PX:0,PERCENTAGE:_.Ti,LINES:2};var Ui="";_.Vi.scrollMode={NONE:Ui,UP:"up"};_.Vi.displayAlign={BEFORE:"flex-end",CENTER:_.hd,AFTER:"flex-start"};
|
|
457
|
+
_.Vi.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.zd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};Wi.prototype.destroy=function(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()};Wi.prototype.start=function(a){var b=this;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,_.Ac,function(c){return Xi(b,c)}),this.a.on(this.f,jd,function(){for(var c=b.f,d=0;d<c.length;d++){var e=c[d];e.mode===_.Vf&&(e.mode=_.ne)}}))};
|
|
458
|
+
Wi.prototype.o=function(a){var b=new _.Si(a.startTime,a.endTime,a.text,_.Rg);if(_.N.ia(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Gg;break;case "rl":b.writingMode=_.Ig}_.N.xa(a.size)&&(b.size=a.size);if(_.N.ia(a.align))switch(a.align){case _.ve:case _.ag:b.textAlign=_.ag;break;case _.hd:b.textAlign=_.Ni;break;case _.Of:case _.fe:b.textAlign=_.fe}_.N.xa(a.position)&&(b.position=a.position);if(_.N.ia(a.positionAlign))switch(a.positionAlign){case _.ye:b.positionAlign=_.ye;break;case _.hd:b.positionAlign=
|
|
459
|
+
_.hd;break;case _.ze:b.positionAlign=_.ze}_.N.xa(a.line)&&(b.line=a.line);if(_.N.ia(a.lineAlign))switch(a.lineAlign){case _.ag:b.lineAlign=_.Qi;break;case _.hd:b.lineAlign=_.hd;break;case _.fe:b.lineAlign=_.fe}_.N.ji(a.snapToLines)&&(b.lineInterpretation=a.snapToLines?_.Pi:1);return b};_.w(_.O,Error);_.O.prototype.a=function(a){this.severity!==a&&(this.severity=a,this.message=Yi(this.severity,this.category,this.code,this.data))};_.O.prototype.toString=function(){var a=this.message;this.cause&&(a+="\n Caused by "+this.cause);return a};_.J("clpp.Error",_.O);_.Q=2;_.O.Severity={RECOVERABLE:1,FATAL:_.Q};_.O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
|
|
460
|
+
_.O.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,MALFORMED_URL:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,
|
|
461
|
+
INVALID_MP4:2011,TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
|
|
462
|
+
WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,
|
|
463
|
+
DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,
|
|
464
|
+
HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,
|
|
465
|
+
HLS_PLAYLIST_EMPTY:4043,HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,HLS_DISJOINT_PLAYLISTS:4048,INVALID_STREAMS_CHOSEN:5005,STREAMING_ERROR:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,
|
|
466
|
+
ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,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,
|
|
467
|
+
MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,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,
|
|
468
|
+
GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,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,
|
|
469
|
+
CONTENT_TRANSFORMATION_FAILED:14E3,SESSIONS_INVALID_CONFIGURATION:15E3};_.w(_.Zi,Error);var hj=function dw(a){var c;return _.Ch(dw,function(d){1==d.a&&(c=0);if(3!=d.a)return c<a?_.x(d,c,3):d.C(0);c++;return d.C(2)})};_.J("clpp.utils.BufferUtils",ej);ej.toArrayBuffer=oj;ej.toDataView=_.nj;ej.toInt32Array=_.mj;ej.toUint32Array=lj;ej.toUint16Array=kj;ej.toUint8Array=_.gj;ej.equal=ij;_.R={};_.R.Ca=new _.K("clpp.utils.strings");_.R.wj=16E3;_.R.fromCharCode=function(a){for(var b=_.R.wj,c="",d=0;d<a.length;d+=b)c+=String.fromCharCode.apply(null,a.subarray(d,d+b));return c};_.R.ea=function(a){if(!a)return"";a=_.gj(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Ma);return a}a=escape(_.R.fromCharCode(a));try{return decodeURIComponent(a)}catch(b){throw Error(Ma);}};
|
|
470
|
+
_.J("clpp.utils.strings.fromUtf8",_.R.ea);
|
|
471
|
+
_.R.Cc=function(a,b,c){if(!a)return"";var d=_.R.Ca;if(!c&&0!==a.byteLength%2)throw d.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.gj(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);a instanceof ArrayBuffer?d=a:(c=new Uint8Array(a.byteLength),c.set(_.gj(a)),d=c.buffer);a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(var e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return _.R.fromCharCode(c)};
|
|
472
|
+
_.R.Yd=function(a,b){if(_.N.ia(a))return a;var c="",d=!!b,e=_.gj(a);239===e[0]&&187===e[1]&&191===e[2]?c=_.R.ea(e):254===e[0]&&255===e[1]?c=_.R.Cc(e.subarray(2),!1):255===e[0]&&254===e[1]&&(c=_.R.Cc(e.subarray(2),!0));var f=function(g,h){return g.byteLength<=h||32<=g[h]&&126>=g[h]}.bind(null,e);_.R.Ca.debug("Unable to find byte-order-mark, making an educated guess.");0===e[0]&&0===e[2]?c=_.R.Cc(a,!1):0===e[1]&&0===e[3]?c=_.R.Cc(a,!0):f(0)&&f(1)&&f(2)&&f(3)&&(c=_.R.ea(a));if(c)return d&&(c=escape(c)),
|
|
473
|
+
c;throw Error("Unable to detect text encoding");};_.J("clpp.utils.strings.fromBytesAutoDetect",_.R.Yd);_.R.eb=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.J("clpp.utils.strings.toUtf8",_.R.eb);_.R.Cf=function(a,b){for(var c=new Uint8Array(2*a.length),d=new DataView(c.buffer),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
|
|
474
|
+
_.J("clpp.utils.strings.toUtf16",_.R.Cf);_.R.xd=function(a,b){var c=b||1,d=a.length,e=new ArrayBuffer(d*c),f;4===c?f=lj(e):2===c?f=kj(e):f=_.gj(e);for(c=0;c<d;c++)f[c]=a.charCodeAt(c);return e};_.J("clpp.utils.strings.toByteArray",_.R.xd);_.R.startsWith=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.J("clpp.utils.strings.startsWith",_.R.startsWith);
|
|
475
|
+
_.R.endsWith=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);var c=a.length-b.length,d=a.lastIndexOf(b,c);return-1!==d&&d===c};_.J("clpp.utils.strings.endsWith",_.R.endsWith);_.R.kf=function(a){return!!(a&&0<a.length)};_.R.empty=function(a){return!a||0===a.length};_.R.bp=function(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()};_.R.fp=function(a){return a.replace(/-(\w)/g,function(b,c){return c.toUpperCase()})};
|
|
476
|
+
_.R.Rf=function(a){if(void 0===a||null===a||""===a)return"";try{var b=Number(a);if(_.N.isNaN(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return b.toFixed(2).replace(/[.,]00$/,"")+a}catch(c){return""}};_.J("clpp.utils.strings.bitrateToString",_.R.Rf);
|
|
477
|
+
_.R.rl=function(a,b){function c(h){return function(l,m){return d(h,m.length-1)}}function d(h,l){return h.length<l?d("0"+h,l):h}b=void 0===b?"%h:%mm:%ss":b;if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";var e=Math.floor(a/3600),f=Math.floor((a-3600*e)/60),g=Math.floor(a-3600*e-60*f);return b.replace(/(%h+)/,c(String(e))).replace(/(%m+)/,c(String(f))).replace(/(%s+)/,c(String(g)))};_.J("clpp.utils.strings.durationToString",_.R.rl);
|
|
478
|
+
_.R.tl=function(a,b){for(var c in b)if(b[c]===a)return c;return""};_.R.bm=function(a){var b=0;if(0===a.length)return b;for(var c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b};_.J("clpp.utils.strings.hashCode",_.R.bm);_.R.Bo=function(a){_.R.hj.innerHTML=a;return _.R.hj.textContent};_.R.hj=document.createElement("span");_.R.Jg=function(a){a=a.replace(/<[^>]+>/gi,"");a=_.R.Bo(a);return a=a.replace(/<[^>]+>/gi,"")};_.R.zi=function(a){return a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")};_.qj.prototype.toString=function(){var a=this.a.toString();return this.f?a.replace(ew,""):a};var ew=/^[A-Za-z]+:/;_.J("clpp.utils.url.queryString",_.tj);var xj;_.yj=_.kg;_.ir={VIDEO:_.Jg,AUDIO:_.Oc,TEXT:_.yj,Jo:_.Fc,IMAGE:_.se,Zg:_.hg};_.fw=1/15;xj={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/]};xj[_.yj]=[/^vtt$/,/^wvtt/,/^stpp/];var Aj={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Cj={text:{mp4:_.Ic,m4s:_.Ic,m4i:_.Ic,cmft:_.Ic,vtt:_.lg,ttml:_.Lc},video:{mp4:_.Mg,m4s:_.Mg,m4f:_.Mg,m4i:_.Mg,m4v:_.Mg,cmfv:_.Mg,ts:_.Lg},audio:{mp4:_.Sc,m4s:_.Sc,m4f:_.Sc,m4i:_.Sc,m4a:_.Sc,cmfa:_.Sc,ts:_.Lg,aac:_.Pc,ec3:_.Rc,ac3:_.Qc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Ej.prototype.toString=function(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};_.Ej.prototype.getAttribute=function(a){var b=this.attributes.filter(function(c){return c.name===a});return b.length?b[0]:null};_.Ej.prototype.hasAttribute=function(a){return null!=this.getAttribute(a)};_.Hj.prototype.getPosition=function(){return this.position};_.Hj.prototype.de=function(){return this.ga?this.ga-this.la+1:null};_.Hj.prototype.f=_.fh(0);_.w(_.Ij,_.Hj);var Mj=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",
|
|
479
|
+
"cs"],["dan","da"],["deu","de"],[_.Od,"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",
|
|
468
480
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
469
481
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
470
482
|
"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",
|
|
471
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.Y={
|
|
472
|
-
d+'".');c.add(d)})},
|
|
473
|
-
d.getAttribute(_.
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
"CAN-SKIP-UNTIL"));d.
|
|
479
|
-
a.
|
|
480
|
-
b.drmInfos):null:a?a.drmInfos:b?b.drmInfos:null},
|
|
481
|
-
":"+b},
|
|
482
|
-
!a.hasAttribute(_.
|
|
483
|
-
g.getTime()/1E3+b;e={id:e,startTime:c,startDate:g,
|
|
484
|
-
a),null;g=Object.assign(g,h)}_.
|
|
485
|
-
c.value;break;case
|
|
486
|
-
_.
|
|
487
|
-
_.Q.Hc=function(a,b,c){if(!a)return"";var d=_.Q.Ca;if(!c&&0!==a.byteLength%2)throw d.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.Oj(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);a instanceof ArrayBuffer?d=a:(c=new Uint8Array(a.byteLength),c.set(_.Oj(a)),d=c.buffer);a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(var e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return _.Q.fromCharCode(c)};
|
|
488
|
-
_.Q.de=function(a,b){if(_.L.ia(a))return a;var c="",d=!!b,e=_.Oj(a);239===e[0]&&187===e[1]&&191===e[2]?c=_.Q.ea(e):254===e[0]&&255===e[1]?c=_.Q.Hc(e.subarray(2),!1):255===e[0]&&254===e[1]&&(c=_.Q.Hc(e.subarray(2),!0));var f=function(g,h){return g.byteLength<=h||32<=g[h]&&126>=g[h]}.bind(null,e);_.Q.Ca.debug("Unable to find byte-order-mark, making an educated guess.");0===e[0]&&0===e[2]?c=_.Q.Hc(a,!1):0===e[1]&&0===e[3]?c=_.Q.Hc(a,!0):f(0)&&f(1)&&f(2)&&f(3)&&(c=_.Q.ea(a));if(c)return d&&(c=escape(c)),
|
|
489
|
-
c;throw Error("Unable to detect text encoding");};_.I("clpp.utils.strings.fromBytesAutoDetect",_.Q.de);_.Q.hb=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.I("clpp.utils.strings.toUtf8",_.Q.hb);_.Q.Gf=function(a,b){for(var c=new Uint8Array(2*a.length),d=new DataView(c.buffer),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
|
|
490
|
-
_.I("clpp.utils.strings.toUtf16",_.Q.Gf);_.Q.Fd=function(a,b){var c=b||1,d=a.length,e=new ArrayBuffer(d*c),f;4===c?f=Tj(e):2===c?f=Sj(e):f=_.Oj(e);for(c=0;c<d;c++)f[c]=a.charCodeAt(c);return e};_.I("clpp.utils.strings.toByteArray",_.Q.Fd);_.Q.startsWith=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.I("clpp.utils.strings.startsWith",_.Q.startsWith);
|
|
491
|
-
_.Q.endsWith=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);var c=a.length-b.length,d=a.lastIndexOf(b,c);return-1!==d&&d===c};_.I("clpp.utils.strings.endsWith",_.Q.endsWith);_.Q.nf=function(a){return!!(a&&0<a.length)};_.Q.empty=function(a){return!a||0===a.length};_.Q.hp=function(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()};_.Q.kp=function(a){return a.replace(/-(\w)/g,function(b,c){return c.toUpperCase()})};
|
|
492
|
-
_.Q.Vf=function(a){if(void 0===a||null===a||""===a)return"";try{var b=Number(a);if(_.L.isNaN(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return b.toFixed(2).replace(/[.,]00$/,"")+a}catch(c){return""}};_.I("clpp.utils.strings.bitrateToString",_.Q.Vf);
|
|
493
|
-
_.Q.xl=function(a,b){function c(h){return function(l,m){return d(h,m.length-1)}}function d(h,l){return h.length<l?d("0"+h,l):h}b=void 0===b?"%h:%mm:%ss":b;if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";var e=Math.floor(a/3600),f=Math.floor((a-3600*e)/60),g=Math.floor(a-3600*e-60*f);return b.replace(/(%h+)/,c(String(e))).replace(/(%m+)/,c(String(f))).replace(/(%s+)/,c(String(g)))};_.I("clpp.utils.strings.durationToString",_.Q.xl);
|
|
494
|
-
_.Q.zl=function(a,b){for(var c in b)if(b[c]===a)return c;return""};_.Q.jm=function(a){var b=0;if(0===a.length)return b;for(var c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b};_.I("clpp.utils.strings.hashCode",_.Q.jm);_.Q.Go=function(a){_.Q.lj.innerHTML=a;return _.Q.lj.textContent};_.Q.lj=document.createElement("span");_.Q.Pg=function(a){a=a.replace(/<[^>]+>/gi,"");a=_.Q.Go(a);return a=a.replace(/<[^>]+>/gi,"")};_.Q.Fi=function(a){return a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")};var Xj=[403,401];_.I("clpp.net.DEFAULT_FATAL_STATUS_CODES",Xj);_.I("clpp.net.makeRequest",_.ck);_.bk=6;_.I("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.bk,CONTENT_STEERING:7});_.kk.prototype.resolve=function(){};_.kk.prototype.reject=function(){};_.lk.prototype.abort=function(){this.a=!0;return this.A()};_.nk.prototype.destroy=function(){for(var a=[],b=_.u(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.S["catch"](function(){}),a.push(c.abort());this.a=[];return Promise.all(a)};_.r=_.vk.prototype;_.r.uo=function(a){0<a?_.Jh("Rate limit set to "+a+"bps"):_.Jh("Rate limit disabled");this.l=a};_.r.release=function(){return this.o.destroy()};_.r.destroy=function(){this.w=!0;this.f=[];this.h=[];return this.o.destroy()};_.r.Qe=function(a){this.f.push(a)};_.r.fd=function(a){this.h.push(a)};_.r.Bf=function(a){this.f=this.f.filter(function(b){return b!==a})};_.r.ye=function(a){this.h=this.h.filter(function(b){return b!==a})};
|
|
495
|
-
_.r.fetch=function(a){var b=this;if(this.w)return new qv(Promise.reject(new _.N(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);for(var c=[],d=_.u(this.f),e=d.next();!e.done;e=d.next())c.push(e.value);if(a.requestModifiers)for(d=_.u(a.requestModifiers),e=d.next();!e.done;e=d.next())c.push(e.value);a.requestModifiers=c;zk(this,a);c=[];d=_.u(this.h);for(e=d.next();!e.done;e=d.next())c.push(e.value);if(a.responseModifiers)for(d=_.u(a.responseModifiers),e=d.next();!e.done;e=
|
|
496
|
-
d.next())c.push(e.value);a.responseModifiers=c;d=c=new _.kk;try{var f={},g=_.u(a.requestModifiers);for(e=g.next();!e.done;f={Mf:f.Mf},e=g.next())f.Mf=e.value,d=d.then(function(n){return function(p){if(h.a)throw new _.N(_.O,1,7001,p?{url:p.uris[p.uriIndex],request:p}:null);return n.Mf(p)||p}}(f))["catch"](function(n){if(n instanceof _.N)throw n;throw new _.N(_.O,1,1006,null,n);});d=d.then(function(n){return{request:n,plugin:Ck(b,n)}});var h=new qv(d);g={};var l=_.u(a.responseModifiers);for(e=l.next();!e.done;g=
|
|
497
|
-
{Le:g.Le},e=l.next())g.Le=e.value,h.then(function(n){return function(p){function q(){if(h.a)throw new _.N(_.O,1,7001,p?{url:p.request.uris[p.request.uriIndex],request:p.request}:null);}q();var t=n.Le(p)||p;q();return t}}(g))["catch"](function(n){return function(p){if(p instanceof _.N&&p.data&&p.data.response){var q=n.Le(p.data.response);if(q&&q.then)return q.then(function(){return Promise.reject(p)})}return Promise.reject(p)}}(g))["catch"](function(n){if(n instanceof _.N)throw n;throw new _.N(_.O,
|
|
498
|
-
1,1007,null,n);});l={};var m=_.u(this.j);for(e=m.next();!e.done;l={Nf:l.Nf},e=m.next())l.Nf=e.value,h["catch"](function(n){return function(p){p instanceof _.N&&p.data&&p.data.response||n.Nf({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:a});return Promise.reject(p)}}(l))["catch"](function(n){if(n instanceof _.N)throw n;throw new _.N(_.O,1,1007,null,n);});_.ok(this.o,h);c.resolve(a);return h}catch(n){return new qv(Promise.reject(n))}};
|
|
499
|
-
_.I("clpp.net.NetworkEngine",_.vk);_.vk.prototype.fetch=_.vk.prototype.fetch;_.vk.prototype.removeResponseModifier=_.vk.prototype.ye;_.vk.prototype.removeRequestModifier=_.vk.prototype.Bf;_.vk.prototype.addResponseModifier=_.vk.prototype.fd;_.vk.prototype.addRequestModifier=_.vk.prototype.Qe;_.vk.prototype.setRateLimit=_.vk.prototype.uo;var Gk;_.Dk.prototype.pa=function(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&&Ji(this.roles,a.roles)&&Ji(this.accessibility,a.accessibility,Kk)};_.Dk.prototype.toString=function(){return"Track type: "+this.type+" id: "+this.id+"\n renditions size: "+this.renditions.length};_.I("clpp.Track",_.Dk);
|
|
500
|
-
_.Dk.prototype.toString=_.Dk.prototype.toString;_.I("clpp.Rendition",_.Lk);_.Ik=1;_.Fk=_.Jg;_.T=_.Pc;_.S="text";Gk=_.Je;_.pw={VIDEO:_.Fk,AUDIO:_.T,TEXT:_.S,METADATA:Gk};_.Dk.Type=_.pw;_.I("clpp.utils.url.queryString",_.Ok);Rk.prototype.h=function(a,b){var c=this,d,e,f,g,h,l,m;return _.H(function(n){switch(n.a){case 1:return d=null,_.C(n,2),_.x(n,Xk(c,a),4);case 4:d=n.f;_.uh(n,3);break;case 2:return e=_.E(n),c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",e.message),n["return"](Promise.resolve({}));case 3:f={};_.C(n,5);if(!b.enableHlsVideoTrackInfo){n.D(7);break}return _.x(n,Uk(c,d,a),8);case 8:g=n.f,f.renditions=g.renditions,f.mimeType=g.mimeType;case 7:_.uh(n,6);break;case 5:h=_.E(n),c.g.warn("Failed to parse video metadata from HLS playlist.",
|
|
501
|
-
h.message);case 6:return _.C(n,9),_.x(n,Wk(d),11);case 11:l=n.f;f.Pc=l;_.uh(n,10);break;case 9:m=_.E(n),c.g.warn("Failed to parse metadata from HLS playlist.",m.message);case 10:return n["return"](f)}})};_.dl=[];_.r=_.gl.prototype;_.r.Yf=function(){return!0};_.r.Il=function(a){return this.getVideoTracks().find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.El=function(a){return this.getAudioTracks().find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.Gl=function(a){return this.la().find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.Hl=function(a){return this.getVideoTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};
|
|
502
|
-
_.r.Dl=function(a){return this.getAudioTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.r.Fl=function(a){return this.la().flatMap(function(b){return b.renditions}).find(function(b){return _.L.pa(b,a,a&&Object.keys(a))})};_.I("clpp.TrackManager",_.gl);_.gl.prototype.isAbrEnabled=_.gl.prototype.va;_.gl.prototype.addTextTrack=_.gl.prototype.addTextTrack;_.gl.prototype.findTextRendition=_.gl.prototype.Fl;_.gl.prototype.findAudioRendition=_.gl.prototype.Dl;
|
|
503
|
-
_.gl.prototype.findVideoRendition=_.gl.prototype.Hl;_.gl.prototype.findTextTrack=_.gl.prototype.Gl;_.gl.prototype.findAudioTrack=_.gl.prototype.El;_.gl.prototype.findVideoTrack=_.gl.prototype.Il;_.gl.prototype.setTextRendition=_.gl.prototype.Hb;_.gl.prototype.setAudioRendition=_.gl.prototype.Gb;_.gl.prototype.setVideoRendition=_.gl.prototype.sb;_.gl.prototype.setTextTrack=_.gl.prototype.Xa;_.gl.prototype.setAudioTrack=_.gl.prototype.Ia;_.gl.prototype.setVideoTrack=_.gl.prototype.Ib;
|
|
504
|
-
_.gl.prototype.getTextTrack=_.gl.prototype.Ba;_.gl.prototype.getAudioTrack=_.gl.prototype.qa;_.gl.prototype.getVideoTrack=_.gl.prototype.La;_.gl.prototype.getLoadingTextRendition=_.gl.prototype.Nb;_.gl.prototype.getLoadingAudioRendition=_.gl.prototype.Mb;_.gl.prototype.getLoadingVideoRendition=_.gl.prototype.Ab;_.gl.prototype.getTextRendition=_.gl.prototype.Wa;_.gl.prototype.getAudioRendition=_.gl.prototype.Sa;_.gl.prototype.getVideoRendition=_.gl.prototype.ma;_.gl.prototype.getTextTracks=_.gl.prototype.la;
|
|
505
|
-
_.gl.prototype.getAudioTracks=_.gl.prototype.getAudioTracks;_.gl.prototype.getVideoTracks=_.gl.prototype.getVideoTracks;_.gl.prototype.canSelectVideoTracks=_.gl.prototype.Yf;var il=new Map,hl=1,ml=2,ll=3,kl=4;_.qw=(new Map).set(_.zd,_.zd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Yg,_.Yg).set(_.pe,_.pe).set("channelsCount","channels");_.I(yd,rl);rl.getInfo=_.sk;
|
|
506
|
-
var Bl=null,Al=null,Dl=new _.J(yd),Kl="android",Jl="ios",Pl="linux",Ll="osx",Ml="windows",Nl="tizen",Ol="webos",Il=_.xg,Sl=_.xg,Rl={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,
|
|
483
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.Y={lc:function(a,b){return a.filter(function(c){return c.name===b})},mj:function(a){var b=/^[a-zA-Z0-9_-]+$/,c=new Set;a.forEach(function(d){var e=_.S(d,"VALUE"),f=_.S(d,_.gb),g=_.S(d,"IMPORT"),h=_.S(d,"QUERYPARAM");if(1!==[f,g,h].filter(Boolean).length||f&&null==e)throw new _.O(_.Q,4,4044,{message:"Invalid tag.",text:d.toString()});d=f||g||h;if(c.has(d))throw new _.O(_.Q,4,4044,'EXT-X-DEFINE redefined variable "'+d+'".');if(!b.test(d))throw new _.O(_.Q,4,4044,'EXT-X-DEFINE invalid variable name "'+
|
|
484
|
+
d+'".');c.add(d)})},cg:function(a,b){var c=Array.isArray(b)?b:[b];return a.filter(function(d){d=_.Fj(d,_.Lb);return c.includes(d)})},Fc:function(a,b){return a.some(function(c){return c.name===b})},Ta:function(a,b,c){c=void 0===c?{}:c;a=a.find(function(d){return d.name===b})||null;if(!a&&c.required)throw new _.O(_.Q,4,4024,{missingTag:b});return a},bi:function(a,b){return _.Y.Ta(a,b,{required:!0})},Pl:function(a,b,c){c=void 0===c?0:c;return(a=_.Y.Ta(a,b))?Number(a.value):c},kp:function(a,b,c){return a.filter(function(d){var e=
|
|
485
|
+
d.getAttribute(_.Lb);d=d.getAttribute(_.Ra);return e.value===b&&d.value===c})},In:function(a){var b=_.Y.Ta(a,"EXT-X-TILES");if(!b)return{ee:1,Be:1,durationPerTile:null};a=_.S(b,"LAYOUT")||"1x1";b=_.S(b,_.Ia);a=_.Pj(a);return{ee:a.ee,Be:a.Be,durationPerTile:b?Number(b):null}},im:function(a){return/^#(?!EXT)/m.test(a)},om:function(a){return/^(#EXT)/.test(a)},sm:function(a,b){Array.isArray(a)||(a=[a]);a.forEach(function(c){for(var d=_.v(_.Y.Af(c)),e=d.next();!e.done;e=d.next())b(e.value,c)})},Af:function(a){var b=
|
|
486
|
+
new Set;a.variants.forEach(function(c){c.audio&&b.add(c.audio);c.video&&b.add(c.video)});a.textStreams.forEach(function(c){return b.add(c)});a.thumbStreams.forEach(function(c){return b.add(c)});return Array.from(b)},cm:function(a){return a.some(function(b){return _.Y.Fc(b.Y,"EXT-X-ENDLIST")})},Jj:function(a){return _.Y.Af(a).filter(_.Y.ii)},Ti:function(a){if(_.Y.Ta(a,"EXT-X-ENDLIST"))return _.Vb;a=_.Y.Ta(a,"EXT-X-PLAYLIST-TYPE");if(!a)return"LIVE";if(a.value===_.Vb)return _.Vb;if("EVENT"===a.value)return"EVENT";
|
|
487
|
+
throw new _.O(_.Q,4,4044,"Invalid EXT-X-PLAYLIST-TYPE value: "+a.value);},Ch:function(a){a={AUDIO:_.Oc,VIDEO:_.Jg,SUBTITLES:_.yj,"CLOSED-CAPTIONS":_.yj}[a.toUpperCase()];if(!a)throw new _.O(_.Q,4,4044,"EXT-X-MEDIA tag has an invalid TYPE attribute.");return a},il:function(a){var b=_.Fj(a,_.Lb).toUpperCase();if(_.Y.Ch(b)!==_.yj)return null;a=a.getAttribute("FORCED");a=!(!a||!a.value||"YES"!==a.value.toUpperCase());var c=_.hg;b===_.sa&&(c=_.cd);a&&(c=_.je);return c},Pi:function(a,b,c){c=void 0===c?
|
|
488
|
+
!1:c;var d=0,e=null;if(a){d=a.split("@");a=Number(d[0]);if(0>=a)throw new _.O(_.Q,4,4044,"Byte range length must be positive.");if(d[1]){if(d=Number(d[1]),0>d)throw new _.O(_.Q,4,4044,"Byte range start byte must not be negative.");}else{if(c)throw new _.O(_.Q,4,4044,"Invalid byte range, offset is required but missing.");if(null==b)throw new _.O(_.Q,4,4044,"Invalid byte range, cannot calculate offset based on previous byte ranges.");d=b+1}e=d+a-1}return{la:d,ga:e}},Ri:function(a,b){var c=_.Y.Ta(a,
|
|
489
|
+
"EXT-X-BYTERANGE");return _.Y.Pi(c?c.value:null,b)},Si:function(a){a=_.Y.bi(a,"EXTINF").value.split(",");var b=Number(a[0]);if(isNaN(b))throw new _.O(_.Q,4,4044,"#EXTINF must be a number.");return{duration:b,title:a[1]||null}},Ui:function(a,b){function c(f){return null==f?null:Number(f)}b=void 0===b?{}:b;var d={lh:!1,Oj:!1,Pj:null,dm:null,Vi:null},e=_.Y.Ta(a,"EXT-X-SERVER-CONTROL",{required:b.cj});if(!e)return d;d.lh="YES"===_.S(e,"CAN-BLOCK-RELOAD");d.Oj="YES"===_.S(e,"CAN-SKIP-DATERANGES");d.Pj=
|
|
490
|
+
c(_.S(e,"CAN-SKIP-UNTIL"));d.dm=c(_.S(e,"HOLD-BACK"));d.Vi=c(_.S(e,"PART-HOLD-BACK",void 0,{required:b.cj}));return d},Qi:function(a,b,c){c=void 0===c?!1:c;a=_.S(a,"BYTERANGE");return _.Y.Pi(a,b,c)},Hn:function(a){var b=_.Y.lc(a,_.Ka),c=_.Y.lc(a,_.La);a=_.Y.lc(a,"EXT-X-IMAGE-STREAM-INF");return{Lc:{gh:_.Y.cg(b,[_.ja,_.Ub]),closedCaptions:_.Y.cg(b,_.sa),uo:_.Y.cg(b,_.Cb)},Ce:c,fg:a}},kl:function(a,b){var c=_.Y.Ri(a.Y,null);return new _.Ij(0,0,0,function(){return[a.a]},c.la,c.ga,0,b)},Wl:function(a){var b=
|
|
491
|
+
a.S;a=b[0].startTime;b=b[b.length-1].endTime;return{nc:a,ef:b,duration:b-a}},Tl:function(a){var b=Infinity,c=Infinity;_.Y.Jj(a).forEach(function(d){d=_.Y.Wl(d);b=Math.min(b,d.nc);c=Math.min(c,d.duration)});return{nc:b,duration:c}},ii:function(a){return a.type===_.Oc||a.type===_.Jg},vl:function(a){return a.filter(_.Y.ii)},Rl:function(a){return a.map(function(b){return _.Y.Tl(b).duration}).reduce(function(b,c){return b+c},0)},Kl:function(a,b){return a&&b?_.xq(a.drmInfos,b.drmInfos)?_.wq(a.drmInfos,
|
|
492
|
+
b.drmInfos):null:a?a.drmInfos:b?b.drmInfos:null},ml:function(a,b){return(b?b.Zb():"")+" - "+(a?a.Zb():"")},Dh:function(a){return(a.video?a.video.vc:"")+" - "+(a.audio?a.audio.vc:"")},Gn:function(a,b,c,d,e){if(b===_.Vb)return{delay:0,Ae:0};b=_.Y.Ta(a,"EXT-X-PART-INF");if(c&&b)return e=Number(_.Fj(b,"PART-TARGET")),null!=d?{delay:d,Ae:e}:{delay:_.Y.Ui(a,{cj:!0}).Vi,Ae:e};a=_.Y.bi(a,"EXT-X-TARGETDURATION");a=Number(a.value);e=e||a;return null!=d?{delay:d,Ae:e}:{delay:3*a,Ae:e}},Ue:function(a,b){return a+
|
|
493
|
+
":"+b},yo:function(a){var b=_.Y.Ue,c=new Map;a.forEach(function(d){var e=b(d.a(),d.f());c.has(e)?(e=c.get(e),e.includes(d)||e.push(d)):c.set(e,[d])});return c},Xh:function(a){return _.Kj(a||_.xg)},An:function(a){var b=new Map;a=_.v(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=_.S(c,_.$a);d=_.Y.Xh(d);var e=_.Fj(c,_.Ra);c=_.Fj(c,"INSTREAM-ID");b.has(e)||b.set(e,new Map);b.get(e).set(c,d)}return b},ql:function(a){return a.filter(function(b){return"mp4a.40.34"!==b})},Jn:function(a){if(!a.hasAttribute("FRAME-RATE")&&
|
|
494
|
+
!a.hasAttribute(_.Ab))return null;var b=_.S(a,"FRAME-RATE");a=_.S(a,_.Ab);var c=_.v(a?a.split("x"):[null,null]);a=c.next().value;c=c.next().value;return{frameRate:Nj(b),width:Nj(a),height:Nj(c)}},rm:function(a){return a.name!==_.Ka?!0:_.S(a,_.Lb)===_.Cb},Bn:function(a,b,c,d){var e=_.S(a,"ID"),f=_.S(a,"START-DATE");if(null===e||null===f)return _.Y.g.warn("Invalid EXT-X-DATERANGE missing mandatory ID or START-DATE attribute, ignoring the EXT-X-DATERANGE tag.",a),null;b=d?c-b:-b;var g=new Date(f);c=
|
|
495
|
+
g.getTime()/1E3+b;e={id:e,startTime:c,startDate:g,zf:f};f=Nj(_.S(a,_.Ia));void 0!==f&&0<=f&&(e.duration=f);d=Nj(_.S(a,"PLANNED-DURATION"));void 0!==d&&0<=d&&(e.plannedDuration=d);var h=_.S(a,"CLASS");null!==h&&(e.schemeIdUri=h);var l=_.S(a,"END-DATE");l=l?new Date(l):null;null!==l&&l.getTime()>=g.getTime()&&(e.endDate=l);g=_.Y.zn(a)||{};var m=_.S(a,"CUE");m&&(g.CUE=m.split(","));if(Jj(h)){h=_.Y.En(a);if(null===h)return _.Y.g.warn("Invalid interstitial attributes, ignoring the EXT-X-DATERANGE tag.",
|
|
496
|
+
a),null;g=Object.assign(g,h)}_.N.Ec(g)&&(e.customAttributes=g);e.endTime=l?l.getTime()/1E3+b:f?c+f:d?c+d:c;e.type=_.Bi;return e},zn:function(a){var b=a.attributes;if(null==b)return null;a={};b=_.v(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.name.trim().startsWith("X-")&&(a[c.name]=c.value);return _.N.Ec(a)?a:null},En:function(a){var b=a.attributes;if(null==b)return null;a={};b=_.v(b);for(var c=b.next();!c.done;c=b.next())switch(c=c.value,c.name){case bc:a[bc]=c.value;break;case ac:a[ac]=
|
|
497
|
+
c.value;break;case ec:a[ec]=Nj(c.value);break;case cc:a[cc]=Nj(c.value);break;case "X-SNAP":a["X-SNAP"]=c.value.split(",");break;case dc:a[dc]=c.value.split(",")}return a[bc]&&a[ac]||!a[bc]&&!a[ac]?(_.Y.g.warn("Invalid EXT-X-DATERANGE Interstitial attributes X-ASSET-URI, X-ASSET-LIST"),null):_.N.Ec(a)?a:null},Nh:function(a,b){if(!a)return null;var c=a.vc;return b.find(function(d){return d.Zb()===c})||null},Th:function(a){return(a=_.S(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}};_.Y.g=new _.K("clpp.hls.Utils");var Tj=[403,401];_.J("clpp.net.DEFAULT_FATAL_STATUS_CODES",Tj);_.J("clpp.net.makeRequest",_.Yj);_.Xj=6;_.J("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Xj,CONTENT_STEERING:7});_.gk.prototype.resolve=function(){};_.gk.prototype.reject=function(){};_.hk.prototype.abort=function(){this.a=!0;return this.A()};_.jk.prototype.destroy=function(){for(var a=[],b=_.v(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.T["catch"](function(){}),a.push(c.abort());this.a=[];return Promise.all(a)};_.J(xd,Ck);Ck.getInfo=_.gl;
|
|
498
|
+
var Ok=null,Nk=null,Qk=new _.K(xd),Xk="android",Wk="ios",bl="linux",Yk="osx",Zk="windows",$k="tizen",al="webos",Vk=_.yg,fl=_.yg,el={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,
|
|
507
499
|
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,
|
|
508
500
|
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},
|
|
509
|
-
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}};_.w(
|
|
510
|
-
_.r.
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
_.r.
|
|
514
|
-
_.
|
|
515
|
-
_.
|
|
516
|
-
_.
|
|
517
|
-
_.r.
|
|
518
|
-
_.
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
_.r.
|
|
523
|
-
_.r
|
|
524
|
-
_.
|
|
525
|
-
_.r.
|
|
526
|
-
_.r.
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
_.r.
|
|
530
|
-
_.r.
|
|
531
|
-
_.r.
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
_.r.
|
|
535
|
-
_.r.
|
|
536
|
-
_.r.
|
|
537
|
-
_.r.
|
|
538
|
-
|
|
501
|
+
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 ll=window.fetch,il=window.AbortController,hl=window.Headers;var ml=window.XMLHttpRequest;_.J("clpp.utils.Uint8ArrayUtils",ol);ol.toStandardBase64=_.pl;ol.concat=_.vl;ol.equal=_.ul;ol.toHex=_.tl;ol.fromHex=_.sl;ol.fromBase64=_.rl;ol.toBase64Url=_.ql;_.w(zl,_.hk);zl.prototype.then=function(a,b){this.T=this.T.then(a,b);return this};zl.prototype["catch"]=function(a){this.T=this.T["catch"](a);return this};zl.prototype.abort=function(){var a=this;if(this.a)return Promise.resolve();this.a=!0;return this.h.then(function(b){a.o&&clearTimeout(a.o);a.l&&a.l();return b.abort()})["catch"](function(){})};_.r=_.Cl.prototype;_.r.oo=function(a){0<a?_.Jh("Rate limit set to "+a+"bps"):_.Jh("Rate limit disabled");this.o=a};_.r.release=function(){return this.w.destroy()};_.r.destroy=function(){this.A=!0;this.h=[];this.f=[];this.j=[];return this.w.destroy()};_.r.Of=function(a){this.h.push(a)};_.r.bd=function(a){this.j.push(a)};_.r.Bg=function(a){this.h=this.h.filter(function(b){return b!==a})};_.r.ue=function(a){this.j=this.j.filter(function(b){return b!==a})};
|
|
502
|
+
_.r.fetch=function(a){var b=void 0;1===a.type&&(b={objectType:gw});return _.Hl(this,a,b)};_.J("clpp.net.NetworkEngine",_.Cl);_.Cl.prototype.fetch=_.Cl.prototype.fetch;_.Cl.prototype.removeResponseModifier=_.Cl.prototype.ue;_.Cl.prototype.removeRequestModifier=_.Cl.prototype.Bg;_.Cl.prototype.addResponseModifier=_.Cl.prototype.bd;_.Cl.prototype.addRequestModifier=_.Cl.prototype.Of;_.Cl.prototype.setRateLimit=_.Cl.prototype.oo;var Nl;_.Jl.prototype.ra=function(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&&Ji(this.roles,a.roles)&&Ji(this.accessibility,a.accessibility,Rl)};_.Jl.prototype.toString=function(){return"Track type: "+this.type+" id: "+this.id+"\n renditions size: "+this.renditions.length};_.J("clpp.Track",_.Jl);
|
|
503
|
+
_.Jl.prototype.toString=_.Jl.prototype.toString;_.J("clpp.Rendition",_.Sl);_.Pl=1;_.Ml=_.Jg;_.T=_.Oc;_.Ll=_.kg;Nl=_.Je;_.hw={VIDEO:_.Ml,AUDIO:_.T,TEXT:_.Ll,METADATA:Nl};_.Jl.Type=_.hw;Tl.prototype.h=function(a,b){var c=this,d,e,f,g,h,l,m;return _.I(function(n){switch(n.a){case 1:return d=null,_.F(n,2),_.x(n,Zl(c,a),4);case 4:d=n.f;_.G(n,3);break;case 2:return e=_.H(n),c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",e.message),n["return"](Promise.resolve({}));case 3:f={};_.F(n,5);if(!b.enableHlsVideoTrackInfo){n.C(7);break}return _.x(n,Wl(c,d,a),8);case 8:g=n.f,f.renditions=g.renditions,f.mimeType=g.mimeType;case 7:_.G(n,6);break;case 5:h=_.H(n),c.g.warn("Failed to parse video metadata from HLS playlist.",
|
|
504
|
+
h.message);case 6:return _.F(n,9),_.x(n,Yl(d),11);case 11:l=n.f;f.Lc=l;_.G(n,10);break;case 9:m=_.H(n),c.g.warn("Failed to parse metadata from HLS playlist.",m.message);case 10:return n["return"](f)}})};var fm=new Map,em=1,jm=2,im=3,hm=4;_.iw=(new Map).set(_.yd,_.yd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Zg,_.Zg).set(_.me,_.me).set("channelsCount","channels");var gw="m";_.om=[];_.r=_.rm.prototype;_.r.Uf=function(){return!0};_.r.Cl=function(a){return this.getVideoTracks().find(function(b){return _.N.ra(b,a,a&&Object.keys(a))})};_.r.yl=function(a){return this.getAudioTracks().find(function(b){return _.N.ra(b,a,a&&Object.keys(a))})};_.r.Al=function(a){return this.oa().find(function(b){return _.N.ra(b,a,a&&Object.keys(a))})};_.r.Bl=function(a){return this.getVideoTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.N.ra(b,a,a&&Object.keys(a))})};
|
|
505
|
+
_.r.xl=function(a){return this.getAudioTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.N.ra(b,a,a&&Object.keys(a))})};_.r.zl=function(a){return this.oa().flatMap(function(b){return b.renditions}).find(function(b){return _.N.ra(b,a,a&&Object.keys(a))})};_.J("clpp.TrackManager",_.rm);_.rm.prototype.isAbrEnabled=_.rm.prototype.wa;_.rm.prototype.addTextTrack=_.rm.prototype.addTextTrack;_.rm.prototype.findTextRendition=_.rm.prototype.zl;_.rm.prototype.findAudioRendition=_.rm.prototype.xl;
|
|
506
|
+
_.rm.prototype.findVideoRendition=_.rm.prototype.Bl;_.rm.prototype.findTextTrack=_.rm.prototype.Al;_.rm.prototype.findAudioTrack=_.rm.prototype.yl;_.rm.prototype.findVideoTrack=_.rm.prototype.Cl;_.rm.prototype.setTextRendition=_.rm.prototype.Eb;_.rm.prototype.setAudioRendition=_.rm.prototype.Db;_.rm.prototype.setVideoRendition=_.rm.prototype.pb;_.rm.prototype.setTextTrack=_.rm.prototype.Ya;_.rm.prototype.setAudioTrack=_.rm.prototype.Ga;_.rm.prototype.setVideoTrack=_.rm.prototype.Fb;
|
|
507
|
+
_.rm.prototype.getTextTrack=_.rm.prototype.va;_.rm.prototype.getAudioTrack=_.rm.prototype.na;_.rm.prototype.getVideoTrack=_.rm.prototype.La;_.rm.prototype.getLoadingTextRendition=_.rm.prototype.Kb;_.rm.prototype.getLoadingAudioRendition=_.rm.prototype.Jb;_.rm.prototype.getLoadingVideoRendition=_.rm.prototype.xb;_.rm.prototype.getTextRendition=_.rm.prototype.Xa;_.rm.prototype.getAudioRendition=_.rm.prototype.Sa;_.rm.prototype.getVideoRendition=_.rm.prototype.pa;_.rm.prototype.getTextTracks=_.rm.prototype.oa;
|
|
508
|
+
_.rm.prototype.getAudioTracks=_.rm.prototype.getAudioTracks;_.rm.prototype.getVideoTracks=_.rm.prototype.getVideoTracks;_.rm.prototype.canSelectVideoTracks=_.rm.prototype.Uf;_.w(sm,_.rm);_.r=sm.prototype;_.r.Uf=function(){return!_.Kk()};
|
|
509
|
+
_.r.sg=function(a,b){var c=this,d,e,f,g,h,l,m,n,p,q,t,u,y,A,B,C,E,D;return _.I(function(L){if(1==L.a){if(!b)return c.g.warn(ib),L["return"]();d=b.track;if(!d)return c.g.warn(lb),L["return"]();e=a===_.T;f=a===_.Ml;g=a===_.Ll;h=e||f;l=b.target;if(m=c.h.find(function(P){return Gm(P,d,a)}))return c.g.warn("Track from event already exists",d,m),L["return"]();n=Ql(a,d);p=Im(d);if(g){if(d.kind===_.Je)return L["return"]();void 0!==d.id?q=c.o[d.id]:(t=Object.values(c.o),q=t.find(function(P){return Gm(n,P,
|
|
510
|
+
a)}));n.kind&&"captions"===n.kind&&(n.mimeType=_.Gc);q&&(n.src=q.url,n.mimeType=q.mimeType)}else if(m=c.h.find(function(P){return P.type===a&&_.N.ra(P,n,["kind","label","language"])}))return m.id=d.id,p&&(c.g.debug(Hb+a+" track active"),c.a.set(a,m)),c.g.debug("Track from event seems to already exists, flipped native track to",d),L["return"]();_.F(L,2);u=new _.Sl(n.id,n);n.renditions.push(u);c.h.push(n);y=c.m.getConfiguration().safari;return wm(c,a,y)?_.x(L,zm(c,n,y),5):xm(c,a,y)?_.x(L,Am(c,n,y),
|
|
511
|
+
5):L.C(5)}if(2!=L.a)return c.g.debug(a+" Track added",n),c.m.trigger(new _.M(_.tg)),A=Dm(c,a).length,B=!(!l||!l.length),C=l&&l.length||0,E=function(){c.g.debug(Hb+a+" track active. Native track active: "+(p+". Number of tracks: ")+A,d);c.a.set(a,n)},p?E():1===A&&h&&(f?E():B&&1!==C||E()),_.G(L,0);D=_.H(L);c.g.error("Error while converting track data",D);_.z(L)})};
|
|
512
|
+
_.r.ug=function(a,b){if(b){var c=b.track;if(!c)this.g.warn(lb);else if(a===_.Ll&&c.kind!==_.Je){var d=this.h.find(function(e){return Gm(e,c,a)});d&&(this.h.splice(this.h.indexOf(d),1),(this.a.get(a)||null)===d&&(this.a.set(a,null),Km(this)),this.g.debug(a+" Track removed, id: ",d.id))}}else this.g.warn(ib)};
|
|
513
|
+
_.r.tg=function(a,b){this.g.debug(a+" Track changed",b);a===_.Ll&&Km(this);var c=Cm(this,a);if(c)for(var d={Uc:0};d.Uc<c.length;d={Uc:d.Uc},++d.Uc)if(Im(c[d.Uc])){if(d=this.h.find(function(e){return function(f){return Gm(f,c[e.Uc],a)}}(d)))this.a.set(a,d),this.g.debug("Track change detected, id:",d.id),d===this.l.get(a)&&this.l.set(a,null),a===_.T?this.m.trigger(new _.M(_.Vc)):a===_.Ll&&this.m.trigger(new _.M(_.ng));break}};_.r.initialize=function(a){this.m=a;this.j=new Tl(a.getNetworkEngine())};
|
|
514
|
+
_.r.load=function(){this.A=!1;var a=Bm(this,_.Ll);a&&(this.f.on(a,_.Ac,this.J),this.f.on(a,Lf,this.L),this.f.on(a,jd,this.K));if(a=Bm(this,_.T))this.f.on(a,_.Ac,this.G),this.f.on(a,Lf,this.I),this.f.on(a,jd,this.H);if(a=Bm(this,_.Ml))this.f.on(a,_.Ac,this.N),this.f.on(a,Lf,this.U),this.f.on(a,jd,this.P);this.f.one(this.m,bd,this.Mk.bind(this))};_.r.release=function(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()};_.r.destroy=function(){this.release();this.m=null};
|
|
515
|
+
_.r.getVideoTracks=function(){return Dm(this,_.Ml)};_.r.getAudioTracks=function(){return Dm(this,_.T)};_.r.oa=function(){return Dm(this,_.Ll)};_.r.pa=function(){var a=this,b=this.a.get(_.Ml)||null;if(!b)return null;if(this.w){var c=b.renditions.find(function(d){return d.width===a.w.width&&d.height===a.w.height});if(c)return c}return b.renditions[0]||null};_.r.Sa=function(){return Em(this,_.T)};_.r.Xa=function(){return Em(this,_.Ll)};_.r.xb=function(){return Fm(this,_.Ml)};
|
|
516
|
+
_.r.Jb=function(){return Fm(this,_.T)};_.r.Kb=function(){return Fm(this,_.Ll)};_.r.La=function(){return this.a.get(_.Ml)||null};_.r.na=function(){return this.a.get(_.T)||null};_.r.va=function(){return this.a.get(_.Ll)||null};_.r.Fb=function(a){Hm(this,_.Ml,a)};_.r.Ga=function(a){Hm(this,_.T,a)};_.r.Ya=function(a){Hm(this,_.Ll,a)};_.r.pb=function(a){Hm(this,_.Ml,a&&a.track)};_.r.Db=function(a){Hm(this,_.T,a&&a.track)};_.r.Eb=function(a){Hm(this,_.Ll,a&&a.track)};
|
|
517
|
+
_.r.addTextTrack=function(a){var b=this,c;return _.I(function(d){return a.mimeType.match(/text\/vtt/)?(c="External_"+b.B++,b.o[c]=a,tm(b,a,c),d.C(0)):_.x(d,um(b,a),0)})};_.r.wa=function(){return 1>=this.getVideoTracks().flatMap(function(a){return a.renditions}).length};
|
|
518
|
+
_.r.Mk=function(){var a=this,b,c,d;return _.I(function(e){if(1==e.a){b=a.m.getConfiguration();Jm(a,_.T,b.preferredAudioLanguage);c=Cm(a,_.Ll);if(c.some(function(f){return Im(f)}))return e.C(2);d=Bm(a,_.Ll);return _.x(e,new Promise(function(f){a.f.one(d,jd,f);(new _.Xh(f)).ha(1)}),2)}if(a.A)return e["return"]();Jm(a,_.Ll,b.preferredTextLanguage);_.z(e)})};sm.prototype.isAbrEnabled=sm.prototype.wa;sm.prototype.addTextTrack=sm.prototype.addTextTrack;sm.prototype.setTextRendition=sm.prototype.Eb;
|
|
519
|
+
sm.prototype.setAudioRendition=sm.prototype.Db;sm.prototype.setVideoRendition=sm.prototype.pb;sm.prototype.setTextTrack=sm.prototype.Ya;sm.prototype.setAudioTrack=sm.prototype.Ga;sm.prototype.setVideoTrack=sm.prototype.Fb;sm.prototype.getTextTrack=sm.prototype.va;sm.prototype.getAudioTrack=sm.prototype.na;sm.prototype.getVideoTrack=sm.prototype.La;sm.prototype.getLoadingTextRendition=sm.prototype.Kb;sm.prototype.getLoadingAudioRendition=sm.prototype.Jb;sm.prototype.getLoadingVideoRendition=sm.prototype.xb;
|
|
520
|
+
sm.prototype.getTextRendition=sm.prototype.Xa;sm.prototype.getAudioRendition=sm.prototype.Sa;sm.prototype.getVideoRendition=sm.prototype.pa;sm.prototype.getTextTracks=sm.prototype.oa;sm.prototype.getAudioTracks=sm.prototype.getAudioTracks;sm.prototype.getVideoTracks=sm.prototype.getVideoTracks;sm.prototype.canSelectVideoTracks=sm.prototype.Uf;_.r=_.Lm.prototype;_.r.start=function(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(Mb);};_.r.end=function(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Mb);};_.r.Ub=function(){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)};_.r.Qa=function(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-1)};
|
|
521
|
+
_.r.Ic=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;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};
|
|
522
|
+
_.r.Ra=function(a,b){b=void 0===b?!1:b;if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;var c=0;if(b){var d=this.Qa();null!=d&&(c=Math.max(0,d-a))}else for(d=this.length-1;0<=d&&this.end(d)>a;--d)c+=this.end(d)-Math.max(this.start(d),a);return c};_.r.toString=function(){for(var a="",b=0;b<this.length;b++)0<b&&(a+=" "),a+=this.start(b).toFixed(3)+"-"+this.end(b).toFixed(3);return a};_.J("clpp.BufferInfo",_.Lm);_.Lm.prototype.bufferedAheadOf=_.Lm.prototype.Ra;
|
|
523
|
+
_.Lm.prototype.isBuffered=_.Lm.prototype.Ic;_.Lm.prototype.bufferEnd=_.Lm.prototype.Qa;_.Lm.prototype.bufferStart=_.Lm.prototype.Ub;_.Lm.prototype.end=_.Lm.prototype.end;_.Lm.prototype.start=_.Lm.prototype.start;_.r=_.Mm.prototype;_.r.addEventListener=function(a,b){this.on(a,b)};_.r.removeEventListener=function(a,b){this.off(a,b)};_.r.on=function(a,b,c){return this.Wd.on(a,b,c)};_.r.one=function(a,b,c){return this.Wd.one(a,b,c)};_.r.off=function(a,b){return this.Wd.off(a,b)};_.r.forwardEventsTo=function(a){a&&(0<=this.Sd.indexOf(a)||this.Sd.push(a))};_.r.dispatchEvent=function(a){this.trigger(a);return a.defaultPrevented};
|
|
524
|
+
_.r.stopForwardingEventsTo=function(a){a&&(a=this.Sd.indexOf(a),0<=a&&this.Sd.splice(a,1))};_.r.trigger=function(a){this.Wd.trigger(a);for(var b=_.v(this.Sd),c=b.next();!c.done;c=b.next())c.value.dispatchEvent(a)};_.Mm.prototype.off=_.Mm.prototype.off;_.Mm.prototype.one=_.Mm.prototype.one;_.Mm.prototype.on=_.Mm.prototype.on;_.Mm.prototype.removeEventListener=_.Mm.prototype.removeEventListener;_.Mm.prototype.addEventListener=_.Mm.prototype.addEventListener;var Nm=["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"];_.J("clpp.version",_.ia);_.J("clpp.name",_.xa);var Qt=null;_.J("clpp.configure",function(a){Qt=a});_.ym="application/x-mpegurl";_.J("clpp.Type",{DASH:_.Hc,HLS:_.ym,SMOOTH_STREAMING:_.Mc,MP4:_.Mg,MP3:"audio/mp3"});_.Ci="scte35";_.Bi="hls-daterange";_.J("clpp.TimelineCueType",{SCTE35:_.Ci,DASH_CALLBACK:_.Pe,HLS_DATERANGE:_.Bi,UNKNOWN:_.yg});_.J("clpp.SpeedUpMode",{DECODER:_.Ld,SEEK:"seek"});_.J("clpp.CodecSwitchingStrategy",{PREVENT:_.Af,SMOOTH:_.Zf});_.J("clpp.utils.PlayerConfiguration",Pm);Pm.create=_.Vm;var jw=["abort",ad,bd,ce,"emptied",ee,_.ge,_.he,"interruptbegin","interruptend",_.Ce,_.De,Ee,"mozaudioavailable",_.bf,_.ff,_.rf,_.Cf,_.If,_.Tf,_.Uf,$f,"suspend",_.sg,"volumechange",_.Sg,_.Tg,_.Nf,Yg,Xg,Vg,Wg];_.w(_.Xm,_.Mm);_.r=_.Xm.prototype;_.r.init=function(a,b){this.configuration=this.Ia=b;this.F=a;this.log.info("Initializing Player surface");var c=this.F.getMedia();this.log.info("Attaching media element listeners");for(var d=_.v(jw),e=d.next();!e.done;e=d.next())e=e.value,this.N.on(c,e,this.rj,e!==_.he);this.Hd||(this.Hd=this.Eh());this.Hd.initialize(this);this.F.showMediaElement()};_.r.release=function(){this.P&&(this.P.destroy(),this.P=null);return Promise.resolve()};
|
|
525
|
+
_.r.destroy=function(){this.N.release();return this.Cg.release()};_.r.canPlay=function(a,b){return _.Rh[this.namespace()].canPlay(a,b)};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.nb)};_.r.appendLoad=function(){return Promise.reject(_.nb)};_.r.seekWith=function(){return Promise.reject(_.nb)};_.r.detach=function(){return Promise.resolve()};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};
|
|
526
|
+
_.r.play=function(){var a=this;if(!this.ca)return Promise.reject("No sources specified yet. You need to load content before calling play.");var b=this.F.getMedia().play();return Promise.resolve(b)["catch"](function(c){a.log.info("Caught play promise exception",c);var d={name:c.name||"",message:c.message||"",stack:c.stack||""};Om(d)?(a.trigger(new _.M(_.Wc)),a.log.warn(_.na)):d.name===ob&&a.log.warn('Unrecognized "NotAllowedError" on play(). '+(c.name+": "+c.message));throw c;})};
|
|
527
|
+
_.r.pause=function(){var a=this;return this.ca?new Promise(function(b,c){var d=a.getState();if(d!==_.Qq&&d!==_.Sq&&d!==_.Zq&&d!==_.Yq)c(new _.O(_.Q,7,3201,"The player state does not allow pause."));else if(a.F.getMedia().pause(),a.getState()===_.Zq)a.N.one(a,_.bg,function(){b()});else b()}):Promise.reject(new _.O(_.Q,7,3201,"No sources specified yet. You need to load content before calling pause."))};_.r.isPaused=function(){return this.F.getMedia().paused};_.r.isEnded=function(){return this.F.getMedia().ended};
|
|
528
|
+
_.r.getConfiguration=function(){return this.configuration};_.r.setDrmCustomDataModifier=function(a){this.ld=a};_.r.setCdnErrorCallback=function(a){this.Xc=a};_.r.nd=function(){return this.ld};_.r.getSurface=function(){return this.F};_.r.getBufferInfo=function(a){var b=this.getSurface().getMedia();return new _.Lm(b?b.buffered:void 0,a)};_.r.getPosition=function(){return this.getMediaPosition()};
|
|
529
|
+
_.r.getMediaPosition=function(){var a=this.F.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0};
|
|
530
|
+
_.r.seek=function(a){var b=this,c=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.k||a===c)return Promise.resolve();var d=this.F.getMedia();if(!d)return this.log.warn("No media element available, can not set current time!"),Promise.reject();var e=a-c;return.1>=Math.abs(e)?(this.log.info("Skip seek. Delta "+Math.abs(e)+" \x3c 0.1"),Promise.resolve()):new Promise(function(f,g){function h(){if(d.readyState>HTMLMediaElement.HAVE_NOTHING)m();else b.N.one(d,_.De,m)}function l(n){var p=b.getMediaPosition(),
|
|
531
|
+
q=.1>=Math.abs(a-p),t=.25<p-a,u=d.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,y=n.type===_.Tf,A=n.type===_.Cf,B=n.type===_.sg,C=A&&u;t=y||q&&C||B&&t;b.log.debug("Checking seeking state after "+n.type+" event. Seek completed:",t,"Current Time:",p,"Target Time:",a,"Native Event:",y,"Time reached",q,"Timeupdate:",B,"Progress:",A,"ReadyState:",u,"Progress Ready:",C);t?(b.Lg=!1,b.ne=!1,b.N.off(d,_.Tf,l),b.N.off(d,_.sg,l),b.N.off(d,_.Cf,l),b.Mi(),b.trigger(new _.M(_.Cg)),f()):A&&c===p&&(b.log.debug("Seek seemed to have been ignored. Trying again"),
|
|
532
|
+
d.currentTime=a)}function m(){b.trigger(new _.M(_.Dg));b.N.on(d,_.Tf,l);b.N.on(d,_.sg,l);b.N.on(d,_.Cf,l);b.log.info("Seeking to "+a+". Delta "+e);b.Lg=!0;b.ne=!0;d.currentTime=a}b.getState()===_.Lq?(b.log.debug("Player is in IDLE state. Postpone seek."),b.N.one(b,_.bg,function(){switch(b.getState()){case _.Qq:case _.Zq:case _.Yq:b.log.debug("Valid seek state reached.");h();break;default:b.log.warn("Invalid seek target state. Aborting seek"),g()}})):h()})};
|
|
533
|
+
_.r.getVolume=function(){var a=this.F.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null};_.r.setVolume=function(a){var b=this.F.getMedia();b?_.N.xa(a)?0>a||1<a?this.log.warn(ua+a+".\n Value must be between 0 and 1."):b.volume=a:this.log.warn(ua+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")};_.r.isMuted=function(){return this.F.getMedia().muted};
|
|
534
|
+
_.r.setMuted=function(a){var b=this.F.getMedia();typeof a===_.Yc&&(b.muted=a)};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){return this.ca?this.F.getMedia().duration:-1};_.r.getTrackManager=function(){return this.Hd};_.r.getPlaybackRate=function(){var a=this.F.getMedia();return a&&a.playbackRate||1};_.r.setPlaybackRate=function(a){var b=this.F.getMedia();void 0!==a&&b&&(b.playbackRate=a)};_.r.setSourceIndex=function(a){this.cf=a};_.r.getSourceIndex=function(){return this.cf};
|
|
535
|
+
_.r.getLoadedSource=function(){return this.ca&&-1!==this.cf?this.ca[this.cf]:null};_.r.getPeriods=function(){return[]};_.r.getNetworkEngine=function(){return this.Cg};_.r.setNetworkEngine=function(a){this.Cg=a};_.r.setCmsdManager=function(a){this.yg=a};_.r.getTextDisplayer=function(){return this.P};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){};
|
|
536
|
+
_.r.Xn=function(a){var b=this.getSurface().getMedia(),c=this.getPosition(),d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.sg||a.type===_.Cf)this.Xg.debug(d);else{var e="";switch(a.type){case _.If:e="Rate: "+this.getPlaybackRate();break;case ce:e="Duration: "+this.getDuration();break;case "volumechange":e="Volume: "+this.getVolume()+" Muted: "+this.isMuted();break;case _.ff:case _.rf:case "suspend":case _.Sg:case $f:case _.Uf:case _.Tf:case _.sg:case _.Cf:case ad:case bd:b=
|
|
537
|
+
this.getBufferInfo().Ra(c);e="State "+this.getSurface().getMedia().readyState+" Buffer: "+b;break;case _.Nf:null!=b&&(e="Size: "+b.videoWidth+"x"+b.videoHeight)}e&&(d+=". "+e);this.Xg.info(d)}a.type!==_.he&&this.trigger(new _.M(a.type,{detail:a}))};_.r.Mi=function(){};var $m;$m=new _.K("clpp.Components");_.Ym=new Map;_.J("clpp.install",function(a){hn(a)});_.J("clpp.uninstall",function(a){jn(a)});kn.prototype.release=function(){this.a=this.f=null};_.J("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Db,SW_SECURE_DECODE:_.Eb,HW_SECURE_CRYPTO:Ta,HW_SECURE_DECODE:Ua,HW_SECURE_ALL:Sa});_.J("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.J("clpp.drm.KeySystem",{NONE:_.Qe,CLEAR_KEY:_.$e,WIDEVINE:_.Fd,PLAYREADY:_.Dd,FAIRPLAY:_.Bd,PRIMETIME:_.Ad});_.nn={};_.J("clpp.drm.registerDrmEnvironment",_.on);var rn={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,
|
|
539
538
|
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,
|
|
540
539
|
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,
|
|
541
540
|
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,
|
|
@@ -549,104 +548,105 @@ this.getBufferInfo().$a(c);e="State "+this.getSurface().getMedia().readyState+"
|
|
|
549
548
|
21,58,231,13,118,215,58,166,74,44,51,103,50,120,198,197,213,64,34,105,66,115,72,235,88,51,28,238,54,93,147,140,187,28,173,50,109,5,234,155,141,29,52,234,135,38,55,103,111,116,98,171,210,13,211,129,249,70,57,64,155,151,38,8,225,188,229,3,247,234,26,46,91,211,250,252,38,87,111,205,37,108,74,168,112,74,116,191,73,170,243,167,54,36,20,23,72,67,35,181,159,241,102,250,221,22,18,92,161,54,236,172,183,214,18,160,199,92,46,171,180,211,90,64,62,144,121,201,77,74,211,17,244,49,124,244,120,116,148,234,184,79,
|
|
550
549
|
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,
|
|
551
550
|
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,
|
|
552
|
-
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]};_.
|
|
553
|
-
_.r.
|
|
554
|
-
a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.
|
|
555
|
-
for(var
|
|
556
|
-
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"},
|
|
557
|
-
|
|
558
|
-
{licenseUrl:
|
|
559
|
-
|
|
560
|
-
_.r.generateRequest=function(a,b){var c=this;if(this.l)return Promise.reject(
|
|
561
|
-
e);c.f&&(
|
|
562
|
-
c.f=null;else switch(c.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
563
|
-
_.r.close=function(){if(this.l)return this.closed;this.g.info("Closing Key Session "+this.sessionId);this.l=!0;try{this.a.close(),this.closed.resolve(),_.
|
|
564
|
-
|
|
565
|
-
_.r
|
|
566
|
-
|
|
567
|
-
_.r.
|
|
568
|
-
|
|
569
|
-
_.r.close=function(){_.Oh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.df){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
570
|
-
|
|
571
|
-
_.r.W=_.
|
|
572
|
-
_.r.
|
|
573
|
-
b.a.keySystem.startsWith(_.
|
|
574
|
-
_.af))}a=c.expiration-Date.now();(0>a||e&&1E3>a)&&d&&!d.
|
|
575
|
-
_.r.unload=function(){var a=this,b;return _.
|
|
576
|
-
_.r.release=function(){var a=this;return _.
|
|
577
|
-
_.r.destroy=function(){var a=this;if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return _.
|
|
578
|
-
_.r.getTrackManager=function(){return this.
|
|
579
|
-
_.r.load=function(a){var b=this,c,d,e,f,g;return _.
|
|
580
|
-
[_.
|
|
581
|
-
_.
|
|
582
|
-
_.r.getPresentationStartTime=function(){if(this.a&&this.a.getStartDate&&this.isLive()){var a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null};_.r.getSeekRange=function(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.
|
|
583
|
-
_.r.getStats=function(){if(!this.f||!this.a)return _.
|
|
584
|
-
_.r.getTimelineCues=function(){return this.l?this.l.getTimelineCues():[]};_.r.getCueTimeline=function(){return null};
|
|
585
|
-
_.Th(new
|
|
586
|
-
|
|
587
|
-
_.r.
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
_.r.canSeek=function(){return this.A};_.r.
|
|
592
|
-
_.r
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
_.r.
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
var
|
|
601
|
-
_.r.
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
_.r.
|
|
605
|
-
_.r.
|
|
606
|
-
_.r.
|
|
607
|
-
_.r.
|
|
608
|
-
_.r.
|
|
609
|
-
_.r.
|
|
610
|
-
_.r.
|
|
611
|
-
_.r.
|
|
612
|
-
_.r.
|
|
613
|
-
|
|
614
|
-
X.prototype.
|
|
551
|
+
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]};_.tn.prototype.bb=function(a,b){this.f[a]=b};_.J("clpp.drm.DrmEnvironment",_.tn);_.tn.prototype.setDrmSystem=_.tn.prototype.bb;_.un.prototype.getPosition=function(){return this.a};_.un.prototype.Ua=function(){return this.f.byteLength};_.un.prototype.seek=function(a){(0>a||a>=this.f.byteLength)&&_.vn();this.a=a};_.xn.prototype.getPosition=function(){return this.a};_.xn.prototype.Ua=function(){return this.f.byteLength};_.xn.prototype.skip=function(a){this.a+a>this.f.byteLength&&_.zn();this.a+=a};_.xn.prototype.seek=function(a){if(0>a||a>=this.f.byteLength)throw _.zn();this.a=a};_.J("clpp.utils.dataview.DataViewReader",_.xn);_.r=_.Hn.prototype;_.r.M=function(a,b){var c=Ln(a);this.h[c]=kw;this.f[c]=b;return this};_.r.ba=function(a,b){var c=Ln(a);this.h[c]=lw;this.f[c]=b;return this};_.r.stop=function(){this.a=!0};_.r.parse=function(a,b){var c=_.gj(a);c=new _.xn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);for(this.a=!1;_.yn(c)&&!this.a;)this.uf(0,c,b)};
|
|
552
|
+
_.r.uf=function(a,b,c){var d=b.getPosition(),e=_.Cn(b),f=_.Cn(b),g=!1;this.g.debug("Parsing MP4 box",_.Mn(f));switch(e){case 0:e=b.Ua()-d;break;case 1:e=_.En(b),g=!0}var h=this.f[f];if(h){var l=null,m=null;this.h[f]===lw&&(m=_.Cn(b),l=m>>>24,m&=16777215);f=b.getPosition()-d;var n=d+e;c&&n>b.Ua()&&(n=b.Ua());n-=b.getPosition();b=0<n?_.Gn(b,n):new Uint8Array(0);b=new _.xn(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:l,flags:m,reader:b,size:e,start:d+
|
|
553
|
+
a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Ua()-b.getPosition()),b.skip(a)};_.J("clpp.utils.Mp4Parser",_.Hn);_.Hn.typeToString=_.Mn;_.Hn.allData=_.Kn;_.Hn.sampleDescription=_.Jn;_.Hn.children=_.In;_.Hn.prototype.parseNext=_.Hn.prototype.uf;_.Hn.prototype.parse=_.Hn.prototype.parse;_.Hn.prototype.stop=_.Hn.prototype.stop;_.Hn.prototype.fullBox=_.Hn.prototype.ba;_.Hn.prototype.box=_.Hn.prototype.M;_.Hn.headerSize=_.Nn;var kw=0,lw=1;_.J("clpp.utils.FairplayUtils",On);On.parseFairPlayResponse=_.Vn;On.formatFairPlayRequest=_.Un;On.createFairplayPayload=Tn;On.extractContentId=_.Rn;On.extractExtXKeyUri=Pn;var ho=new _.K("clpp.drm.DrmToday"),Xn="PRODUCTION",Yn="STAGING",Zn="DEMO",$n="TEST",mw={PRODUCTION:Xn,STAGING:Yn,DEMO:Zn,TEST:$n};_.J("clpp.drm.DrmToday.Environment",mw);_.J("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
|
|
554
|
+
for(var bo="/license-proxy-widevine/cenc/",co="/license-proxy-headerauth/drmtoday/RightsManager.asmx",eo="/license-server-fairplay/",qo={"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",
|
|
555
|
+
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"},nw={video:[Sa,Ua,Ta,_.Eb,_.Db],audio:[Sa,
|
|
556
|
+
Ua,Ta,_.Eb,_.Db]},ow={video:["3000","2000","150"],audio:["2000","150"]},pw=_.v(Object.keys(mw)),qw=pw.next();!qw.done;qw=pw.next()){var Wn=qw.value,rw=Ga;Wn!==Xn&&(rw+="_"+Wn);var sw=new _.tn(rw),tw=null;switch(Wn){case Xn:case Yn:case Zn:tw=sn("V2");break;case $n:tw=null}sw.bb(_.Fd,{licenseUrl:fo(_.Fd),videoRobustness:nw.video,audioRobustness:nw.audio,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:tw,modifiers:{licenseRequest:_.ko,licenseResponse:_.po}});sw.bb(_.Bd,
|
|
557
|
+
{licenseUrl:fo(_.Bd),certificateUrl:ao()+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.mo,licenseResponse:_.no,extractContentId:_.io,certificateRequest:_.oo}});sw.bb(_.Dd,{licenseUrl:fo(_.Dd),videoRobustness:ow.video,audioRobustness:ow.audio,modifiers:{licenseRequest:lo}});_.on(sw)};_.to.prototype.value=function(){void 0===this.a&&(this.a=this.f());return this.a};_.r=uo.prototype;_.r.getStatus=function(){return this.a};_.r.forEach=function(a){this.a&&a(this.a,uw.value())};_.r.get=function(a){if(this.has(a))return this.a};_.r.has=function(a){var b=uw.value();return this.a&&ij(a,b)?!0:!1};_.r.entries=function(){};_.r.keys=function(){};_.r.values=function(){};var uw=new _.to(function(){return oj(new Uint8Array([0]))});var wo=new _.to(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,_.De],[HTMLMediaElement.HAVE_CURRENT_DATA,_.Ce],[HTMLMediaElement.HAVE_FUTURE_DATA,ad],[HTMLMediaElement.HAVE_ENOUGH_DATA,bd]])});_.r=yo.prototype;_.r.Se=function(a){this.f=a};_.r.Nd=function(a){var b=this.a;b&&b!==a&&Bo(b,null);return(this.a=a)?Bo(a,this.f):Promise.resolve()};_.r.$e=function(){return this.a};_.r.Vb=function(a,b){_.Oh("AppleEmeManager.requestMediaKeySystemAccess");try{var c=new zo(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}};_.r.Md=function(){return mq};zo.prototype.createMediaKeys=function(){var a=new Ao(this.keySystem);return Promise.resolve(a)};
|
|
558
|
+
zo.prototype.getConfiguration=function(){_.Oh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a};Ao.prototype.createSession=function(a){a=void 0===a?jg:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==jg)throw new TypeError("Session type "+a+ba);return new Co(this.h,"__session_"+this.j++)};Ao.prototype.setServerCertificate=function(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)};_.w(Co,_.Mm);_.r=Co.prototype;
|
|
559
|
+
_.r.generateRequest=function(a,b){var c=this;if(this.l)return Promise.reject(Gb);this.g.debug("generateRequest");this.h=new _.gk;try{var d=this.o.createSession(_.Mg,_.gj(b));this.a=d;this.sessionId=d.sessionId||this.sessionId||"";this.j.on(d,Xg,function(e){var f=c.keyStatuses.getStatus();c.g.debug("Received Key Message in "+c.sessionId);c.h&&(c.h.resolve(),c.h=null);e=new _.M(_.Ie,{messageType:void 0===f||f===cg?xe:we,message:oj(e.message.buffer)});c.dispatchEvent(e)});this.j.on(d,Vg,function(e){c.g.debug("onWebkitKeyAdded_",
|
|
560
|
+
e);c.f&&(Do(c,"usable"),c.f.resolve(),c.f=null)});this.j.on(d,Wg,function(){var e=c.keyStatuses.getStatus();if(c.a&&c.a&&c.a.error&&c.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&e===cg)c.g.warn("Ignoring webkit key error for session "+c.sessionId);else if(c.g.error("Received key error in session "+c.sessionId+" with code "+(c.a.error.code+". Session Status ")+(e+".")),e=Error("EME AppleEmeManager key error"),e.errorCode=c.a.error,null!==c.h)c.h.reject(e),c.h=null;else if(null!==c.f)c.f.reject(e),
|
|
561
|
+
c.f=null;else switch(c.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Do(c,"output-not-allowed");break;default:Do(c,_.te)}});Do(this,cg)}catch(e){this.h.reject(e)}return this.h};_.r.load=function(){this.g.debug(_.Be);return Promise.reject(Error("MediaKeySession.load not yet supported"))};_.r.update=function(a){if(this.l)return Promise.reject(Gb);this.g.debug(zg);this.f=new _.gk;try{this.a.update(_.gj(a))}catch(b){this.f.reject(b)}return this.f};
|
|
562
|
+
_.r.close=function(){if(this.l)return this.closed;this.g.info("Closing Key Session "+this.sessionId);this.l=!0;try{this.a.close(),this.closed.resolve(),_.ji(this.j)}catch(a){this.closed.reject(a)}return this.closed};_.r.remove=function(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))};Eo.prototype.a=function(){return mq};Eo.prototype.f=function(){return!!window.WebKitMediaKeys};
|
|
563
|
+
Eo.prototype.create=function(){return new yo};_.r=Fo.prototype;_.r.Se=function(a){this.a=a};_.r.Nd=function(a){return this.a?this.a.setMediaKeys(a):Promise.reject(fb)};_.r.$e=function(){return this.a&&this.a.mediaKeys};
|
|
564
|
+
_.r.Vb=function(a,b){var c=this;this.g.info("Requesting media key system access for",a,b.map(function(d){return Object.assign({},d,{drmInfos:d.drmInfos.map(function(){return"_anonymous_"})})}));return navigator.requestMediaKeySystemAccess(a,b)["catch"](function(d){c.g.info("Failed to request media key system access for "+(a+"."),d);return Promise.reject(d)})};_.r.Md=function(){return Rp};Go.prototype.a=function(){return Rp};
|
|
565
|
+
Go.prototype.f=function(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)};Go.prototype.create=function(){return new Fo};_.r=Ho.prototype;_.r.Se=function(a){this.a=a};_.r.Nd=function(a){_.Oh("WebkitEmeManager.setMediaKeys");if(!this.a)return Promise.reject(fb);var b=this.f;b&&b!==a&&Mo(b,null);(this.f=a)&&Mo(a,this.a);return Promise.resolve()};_.r.$e=function(){return this.f};_.r.Vb=function(a,b){_.Oh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.a)var c=this.a;else{var d=document.getElementsByTagName(_.Jg);c=d.length?d[0]:document.createElement(_.Jg)}var e=new Io(this.h,c,a,b);return Promise.resolve(e)}catch(f){return Promise.reject(f)}};
|
|
566
|
+
_.r.Md=function(){return vw};Io.prototype.createMediaKeys=function(){return Promise.resolve(new Jo(this.h,this.a))};Io.prototype.getConfiguration=function(){return this.f};Jo.prototype.createSession=function(a){a=void 0===a?jg:a;if(a!==jg&&a!==_.df)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ya,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new To(this.h,this.a,this.o,a);this.j.push(a);return a};
|
|
567
|
+
Jo.prototype.setServerCertificate=function(){return Promise.resolve(!1)};_.w(To,_.Mm);_.r=To.prototype;_.r.ready=function(){_.Oh("WebkitEmeManager.MediaKeySession.ready");Lo(this,"usable");this.a&&this.a.resolve();this.a=null};_.r.generateRequest=function(a,b){_.Oh("WebkitEmeManager.MediaKeySession.generateRequest");return Vo(this,b,null)};_.r.load=function(a){_.Oh(Xb);return this.l===_.df?Vo(this,null,a):Promise.reject(Error(mb))};_.r.update=function(a){_.Oh(Xb);var b=new _.gk;Wo(this,b,a);return b};
|
|
568
|
+
_.r.close=function(){_.Oh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.df){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Uo(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};_.r.remove=function(){_.Oh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.df?Promise.reject(Error(mb)):this.close()};Xo.prototype.a=function(){return vw};
|
|
569
|
+
Xo.prototype.f=function(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)};Xo.prototype.create=function(){return new Ho};_.r=Yo.prototype;_.r.Se=function(){};_.r.Nd=function(a){_.Oh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))};_.r.$e=function(){return null};_.r.Vb=function(){_.Oh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))};_.r.Md=function(){return ww};Zo.prototype.a=function(){return ww};Zo.prototype.f=function(){return!0};Zo.prototype.create=function(){return new Yo};_.J(ud,$o);var bp=new _.K(ud),ap=[];ap=[new Go,new Eo,new Xo,new Zo].filter(function(a){return a.f()});var Rp="STANDARD",mq="APPLE",vw="WEBKIT",ww="NOP";$o.Apis={STANDARD:Rp,APPLE:mq,WEBKIT:vw,NOP:ww};_.r=_.dp.prototype;_.r.Ja=function(a,b){var c=this.aa(a,b);return 1!==c.length?null:c[0]};_.r.Wb=_.fh(2);_.r.aa=function(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName===b})};_.r.Bc=_.fh(4);_.r.getAttributeNS=function(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null};_.r.sa=function(a){return Array.from(a.childNodes).every(function(b){return b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE})?a.textContent.trim():null};
|
|
570
|
+
_.r.W=_.fh(6);_.r.te=function(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,_.mg)}catch(e){}if(!d)return null;c=d.documentElement;return b&&c.tagName!==b||0<d.getElementsByTagName("parsererror").length?null:c};_.r.Xe=_.fh(8);_.r.hd=_.fh(10);_.r.wf=_.fh(12);_.r.removeChild=function(a,b){a.removeChild(b)};_.r.gf=_.fh(14);_.r.ff=_.fh(16);_.r.xf=_.fh(18);_.r.ze=_.fh(20);_.kp=new _.dp;_.xw=new _.K("clpp.xml.Parser");_.Sm="dom";var gp;_.op=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];gp=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];_.w(fp,ep);_.w(_.jp,ep);var qp=!!(performance&&performance.mark&&performance.measure),sp=new _.K("clpp.perf");up.prototype.j=function(a){if(1<a.version)_.Jh("Unrecognized PSSH version found!");else{var b=_.tl(_.Gn(a.reader,16)),c=[];if(0<a.version)for(var d=_.Cn(a.reader),e=0;e<d;++e){var f=_.tl(_.Gn(a.reader,16));c.push(f)}d=_.Cn(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});a.reader.getPosition()!==a.reader.Ua()&&_.Jh("Mismatch between box size and data size!")}};_.r=_.yp.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a){if(a.j)return _.x(b,a.Ia,0);a.j=!0;return _.x(b,Ap(a),4)}a.Ia.resolve();return b.C(0)})};_.r.keySystem=function(){return this.a?_.eq(this.a.keySystem):""};_.r.getDrmInfo=function(){return this.a};_.r.Li=function(a){var b=this;return _.I(function(c){return b.H&&b.L===Bp?c["return"]():!b.f.delayLicenseRequestUntilPlayed||b.F&&!b.F.paused||b.gb?_.x(c,sq(b,a),0):(b.ja.push(a),c.C(0))})};
|
|
571
|
+
_.r.Gi=function(a){var b=this,c=a.target;this.g.info("Key status changed for session",c.sessionId);var d=this.h.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if(typeof h===_.eg){var l=h;h=g;g=l}if(lq(b.a.keySystem)&&16===h.byteLength&&_.Dk()){l=_.nj(h);var m=l.getUint32(0,!0),n=l.getUint16(4,!0),p=l.getUint16(6,!0);l.setUint32(0,m,!1);l.setUint16(4,n,!1);l.setUint16(6,p,!1)}d&&g!==cg&&(d.loaded=!0);d&&d.nb&&d.nb.resolve();"expired"===g&&(e=!0);l=_.gj(h);var q=_.tl(l);"00"===q&&d&&d.keyId?q=d.keyId:
|
|
572
|
+
b.a.keySystem.startsWith(_.Bd)&&16!==l.byteLength&&(q=_.R.fromCharCode(l));(l=q||"")?b.g.info(Za+q+"': "+g):b.g.info("Key status global keys: "+g);b.o.set(l,g);d&&!d.keyId&&b.h.forEach(function(t,u){u===c||t.keyId!==q||t.loaded||(t.loaded=!0)})});d&&d.loaded&&d.rb.forEach(function(g){b.o.get(g)===cg&&(b.g.warn(Za+g+ea),b.o.set(g,_.af))});for(a=0;a<this.a.initData.length;a++){var f=this.a.initData[a];f.keyId&&this.o.get(f.keyId)===cg&&_.ul(f.initData,d.initData)&&(this.g.warn(Za+f.keyId+ea),this.o.set(f.keyId,
|
|
573
|
+
_.af))}a=c.expiration-Date.now();(0>a||e&&1E3>a)&&d&&!d.uc&&(this.g.debug("Session has expired",c.sessionId),(a=this.h.get(c))&&a.kd&&a.kd.stop(),this.h["delete"](c),c.close()["catch"](function(){}));gq(this)&&(this.I.resolve(),1!==this.h.size||e?this.fa.ha(.5):wp(this))};var Bp=0,vp=3;_.zq=new Map;_.Aq=new _.K("clpp.text");_.Jq.prototype.getStats=function(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.F,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Fq(this.a,_.Zq),pauseTime:Fq(this.a,_.Yq),bufferingTime:Fq(this.a,_.Qq),stateHistory:Gq(this.a),switchHistory:Iq(this.f)}};Oq.prototype.Za=function(a,b){this.m&&this.m.trigger(new _.M(a,{detail:b}))};Oq.prototype.getState=function(){return Rq(this,"")};Oq.prototype.destroy=function(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()};_.J("clpp.utils.media.detectType",ar);var dr=new _.K("clpp.sources");_.w(er,_.Xm);_.r=er.prototype;_.r.init=function(a,b){_.Xm.prototype.init.call(this,a,b);this.j=new Oq(this);Vq(this.j,_.Lq)};_.r.namespace=function(){return vd};
|
|
574
|
+
_.r.unload=function(){var a=this,b;return _.I(function(c){if(a.ca){a.log.debug("Releasing player with source",a.ca);a.B&&(a.B.stop(),a.B=null);(b=a.getTrackManager())&&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(),a.o=null);_.ji(a.h);a.f&&(a.f=new _.Jq);a.G=null;a.ca=null;a.H=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.O(_.Q,7,7E3);if(a.a){var d=a.a;a.h.off(d,_.he);a.h.off(d,_.Nf);a.a=null}}_.z(c)})};
|
|
575
|
+
_.r.release=function(){var a=this;return _.Xm.prototype.release.call(this).then(function(){return a.unload()}).then(function(){a.j&&Vq(a.j,_.Lq)})};
|
|
576
|
+
_.r.destroy=function(){var a=this;if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return _.Xm.prototype.destroy.call(this).then(function(){return a.release()}).then(function(){a.log.debug(Ja);var b=a.getTrackManager();b&&b.destroy();a.l&&(a.l.destroy()["catch"](function(c){a.log.warn("Error while disposing metadata handler",c)}),a.l=null);a.j&&(a.j.destroy(),a.j=null);a.f=null})};_.r.getDrmInfo=function(){return this.o?this.o.getDrmInfo():null};
|
|
577
|
+
_.r.getTrackManager=function(){return this.Hd};
|
|
578
|
+
_.r.load=function(a){var b=this,c,d,e,f,g;return _.I(function(h){switch(h.a){case 1:if(b.w)return h["return"](Promise.reject(new _.O(_.Q,7,7E3)));if(!b.getSurface()||!b.getSurface().getMedia())return h["return"](Promise.reject("No surface or no media element in surface"));c=_.N;d=b.F.getMedia();b.I=Date.now()/1E3;b.f=new _.Jq;b.h.on(b,_.bg,function(){b.f&&_.Eq(b.f.a,b.getState())});Vq(b.j,_.Xq);b.ca=_.cr(a);b.configuration=_.Vm(b.Ia,a);b.log.debug(_.cb,b.configuration);b.log.debug(_.ub,b.ca);e=_.Cq(b.configuration,
|
|
579
|
+
[_.oe,"native"]);b.P=e.create(b);b.P.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Zm(_.ig)&&!_.Mk()&&(b.A=new Wi(b),b.A.start(d));b.l?b.l.release():b.l=new mi(b);d.textTracks&&oi(b.l,d.textTracks);f=b.getTrackManager();f.load();d.loop=!!b.configuration.loop;c.R(b.configuration.volume)||b.setVolume(b.configuration.volume);c.R(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(d,ad,function(){b.trigger(new _.M(_.tg))});null==b.configuration.startTime&&mr(b,d);_.Kk()&&nr(b,d);
|
|
580
|
+
_.F(h,2);gr(b,d);return _.x(h,jr(b),4);case 4:return _.x(h,lr(b).T,5);case 5:_.G(h,0);break;case 2:g=_.H(h),b.H=!1,b.onError(g),_.z(h)}})};_.r.onError=function(a){this.H||(a.severity===_.Q&&null!==this.j&&Vq(this.j,_.Wq),this.trigger(new _.M(_.he,{detail:a})))};_.r.Eh=function(){return new sm};_.r.getState=function(){return null!==this.j?this.j.getState().currentState:_.Mq};
|
|
581
|
+
_.r.getPresentationStartTime=function(){if(this.a&&this.a.getStartDate&&this.isLive()){var a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null};_.r.getSeekRange=function(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.G=a={start:a.start(0),end:a.end(a.length-1)};if(this.G)return this.G}return{start:0,end:0}};_.r.isLive=function(){return this.a&&this.a.src?Infinity===this.a.duration:!1};
|
|
582
|
+
_.r.getStats=function(){if(!this.f||!this.a)return _.Kq();this.f&&_.Eq(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),b=this.f,c=Number(a.totalVideoFrames),b.o=Number(a.droppedVideoFrames),b.l=c,this.f.F=Number(a.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.pa())a.bandwidth&&(this.f.w=a.bandwidth),a.Gd&&(this.f.h=a.Gd);return this.f.getStats()};
|
|
583
|
+
_.r.getTimelineCues=function(){return this.l?this.l.getTimelineCues():[]};_.r.getCueTimeline=function(){return null};or.prototype.a=function(){return vd};or.prototype.canPlay=function(a,b){var c=a.type||"",d=c===_.Hc,e=c===_.Mc,f=c===_.ym;return _.Jk()||d||e||f&&!_.Kk()?0:""!==Pk().canPlayType(c)?f&&_.Kk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0};or.prototype.f=function(a){return a===_.pa};or.prototype.create=function(){return new er};
|
|
584
|
+
_.Th(new or);_.J("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.J("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.J("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var qr=new _.K("clpp.ads"),pr=[];_.r=tr.prototype;_.r.load=function(){};_.r.start=function(){};_.r.fd=function(){};_.r.resume=function(){};_.r.pause=function(){};_.r.skip=function(){};_.r.getVolume=function(){};_.r.setVolume=function(){};_.r.getPosition=function(){};_.r.zc=function(){};_.r.cd=function(){};_.J("clpp.ads.IAdsManager",tr);tr.prototype.getPosition=tr.prototype.getPosition;tr.prototype.setVolume=tr.prototype.setVolume;tr.prototype.getVolume=tr.prototype.getVolume;tr.prototype.skip=tr.prototype.skip;
|
|
585
|
+
tr.prototype.pause=tr.prototype.pause;tr.prototype.resume=tr.prototype.resume;_.r=ur.prototype;_.r.ub=function(){};_.r.vb=function(){};_.r.Ab=function(){};_.r.getId=function(){};_.r.getCreativeId=function(){};_.r.Xb=function(){};_.r.getApiFramework=function(){};_.r.getAdSystem=function(){};_.r.getAdvertiserName=function(){};_.r.getTitle=function(){};_.r.getDuration=function(){};_.r.getPosition=function(){};_.r.getSkipTimeOffset=function(){};_.r.ac=function(){};_.r.wb=function(){};_.r.getMediaUrl=function(){};_.r.kb=function(){};_.r.jb=function(){};_.r.Va=function(){};
|
|
586
|
+
_.r.Wa=function(){};_.r.getPodIndex=function(){};_.r.Lb=function(){};_.r.yb=function(){};_.r.lb=function(){};_.r.getWrapperAdIds=function(){};_.r.getWrapperAdSystems=function(){};_.r.getWrapperCreativeIds=function(){};_.r.$b=function(){};_.r.canSeek=function(){};_.J("clpp.ads.IAd",ur);ur.prototype.canSeek=ur.prototype.canSeek;ur.prototype.getVideoElement=ur.prototype.$b;ur.prototype.getWrapperCreativeIds=ur.prototype.getWrapperCreativeIds;ur.prototype.getWrapperAdSystems=ur.prototype.getWrapperAdSystems;
|
|
587
|
+
ur.prototype.getWrapperAdIds=ur.prototype.getWrapperAdIds;ur.prototype.getSequenceLength=ur.prototype.lb;ur.prototype.getPositionInSequence=ur.prototype.yb;ur.prototype.getPodTimeOffset=ur.prototype.Lb;ur.prototype.getPodIndex=ur.prototype.getPodIndex;ur.prototype.getPodType=ur.prototype.Wa;ur.prototype.getMediaBitrate=ur.prototype.Va;ur.prototype.getMediaHeight=ur.prototype.jb;ur.prototype.getMediaWidth=ur.prototype.kb;ur.prototype.getMediaUrl=ur.prototype.getMediaUrl;
|
|
588
|
+
ur.prototype.getClickThroughUrl=ur.prototype.wb;ur.prototype.isBumper=ur.prototype.ac;ur.prototype.getSkipTimeOffset=ur.prototype.getSkipTimeOffset;ur.prototype.getPosition=ur.prototype.getPosition;ur.prototype.getDuration=ur.prototype.getDuration;ur.prototype.getTitle=ur.prototype.getTitle;ur.prototype.getAdvertiserName=ur.prototype.getAdvertiserName;ur.prototype.getAdSystem=ur.prototype.getAdSystem;ur.prototype.getApiFramework=ur.prototype.getApiFramework;ur.prototype.getSourceId=ur.prototype.Xb;
|
|
589
|
+
ur.prototype.getCreativeId=ur.prototype.getCreativeId;ur.prototype.getId=ur.prototype.getId;ur.prototype.getTechnology=ur.prototype.Ab;ur.prototype.getAdManagerVersion=ur.prototype.vb;ur.prototype.getAdManagerName=ur.prototype.ub;_.r=vr.prototype;_.r.ub=function(){return""};_.r.vb=function(){return""};_.r.Ab=function(){return 2};_.r.getId=function(){return this.B};_.r.getCreativeId=function(){return""};_.r.Xb=function(){return this.H};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};_.r.getDuration=function(){return this.h};_.r.getPosition=function(){return this.j};_.r.getSkipTimeOffset=function(){return-1};
|
|
590
|
+
_.r.canSeek=function(){return this.A};_.r.ac=function(){return!1};_.r.wb=function(){return null};_.r.getMediaUrl=function(){return null};_.r.kb=function(){return 0};_.r.jb=function(){return 0};_.r.Va=function(){return 0};_.r.Wa=function(){return this.G};_.r.getPodIndex=function(){return 0};_.r.Lb=function(){return 0};_.r.yb=function(){return this.f};_.r.lb=function(){return this.a};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};
|
|
591
|
+
_.r.$b=function(){return this.videoEl};_.r.Ml=function(){return this.F};vr.prototype.getCustomAttributes=vr.prototype.Ml;vr.prototype.getVideoElement=vr.prototype.$b;vr.prototype.getWrapperCreativeIds=vr.prototype.getWrapperCreativeIds;vr.prototype.getWrapperAdSystems=vr.prototype.getWrapperAdSystems;vr.prototype.getWrapperAdIds=vr.prototype.getWrapperAdIds;vr.prototype.getSequenceLength=vr.prototype.lb;vr.prototype.getPositionInSequence=vr.prototype.yb;vr.prototype.getPodTimeOffset=vr.prototype.Lb;
|
|
592
|
+
vr.prototype.getPodIndex=vr.prototype.getPodIndex;vr.prototype.getPodType=vr.prototype.Wa;vr.prototype.getMediaBitrate=vr.prototype.Va;vr.prototype.getMediaHeight=vr.prototype.jb;vr.prototype.getMediaWidth=vr.prototype.kb;vr.prototype.getMediaUrl=vr.prototype.getMediaUrl;vr.prototype.getClickThroughUrl=vr.prototype.wb;vr.prototype.isBumper=vr.prototype.ac;vr.prototype.canSeek=vr.prototype.canSeek;vr.prototype.getSkipTimeOffset=vr.prototype.getSkipTimeOffset;vr.prototype.getPosition=vr.prototype.getPosition;
|
|
593
|
+
vr.prototype.getDuration=vr.prototype.getDuration;vr.prototype.getTitle=vr.prototype.getTitle;vr.prototype.getAdvertiserName=vr.prototype.getAdvertiserName;vr.prototype.getAdSystem=vr.prototype.getAdSystem;vr.prototype.getApiFramework=vr.prototype.getApiFramework;vr.prototype.getSourceId=vr.prototype.Xb;vr.prototype.getCreativeId=vr.prototype.getCreativeId;vr.prototype.getId=vr.prototype.getId;vr.prototype.getTechnology=vr.prototype.Ab;vr.prototype.getAdManagerVersion=vr.prototype.vb;
|
|
594
|
+
vr.prototype.getAdManagerName=vr.prototype.ub;wr.prototype.has=function(){return this.a.some(function(a){return a.Pe})};wr.prototype.get=function(){var a=this,b;return _.I(function(c){if(1==c.a){b=a.a.find(function(d){return d.Pe});if(!b)throw Error("No available players in the pool");b.Pe=!1;return _.x(c,b.ready,2)}return c["return"](b.player)})};
|
|
595
|
+
wr.prototype.release=function(a){var b=this,c=this.a.find(function(d){return d.player===a});if(!c)return Promise.resolve();c.Pe=!0;c.ready=new Promise(function(d){a.release()["catch"](function(e){b.g.error("Failed to unload player",e)}).then(d)});return c.ready};wr.prototype.destroy=function(){var a=this;return _.I(function(b){return _.x(b,Promise.all(a.a.map(function(c){return c.player.destroy()})),0)})};_.J("clpp.utils.dom.createHTMLElement",_.Ar);Br.prototype.set=function(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Dr(this,a)};Br.prototype.get=function(){return this.a};_.r=Hr.prototype;_.r.getMedia=function(){return this.f.get()};_.r.getContainer=function(){return this.a.get()};_.r.getSafeContainer=function(){return this.a};_.r.getId=function(){return this.l};_.r.getUniqueCssClass=function(){return this.o};_.r.getCastElement=function(){return this.h};_.r.isFullscreen=function(){return!!document.fullscreenElement};_.r.hideMediaElement=function(){var a=this.getMedia();a?_.yr(a,md):this.g.debug("No media element available that could be hidden")};
|
|
596
|
+
_.r.showMediaElement=function(){var a=this.getMedia();a?a.classList.remove(md):this.g.debug("No media element available that could be shown")};_.r.addElementToContainer=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.yr(a,_.ld);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)};
|
|
597
|
+
_.r.removeElementFromContainer=function(a){var b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)};_.r.hide=function(a){_.yr(a,md)};_.r.show=function(a){a.classList.remove(md)};_.r.release=function(){this.j.release()};Hr.prototype.removeElementFromContainer=Hr.prototype.removeElementFromContainer;Hr.prototype.addElementToContainer=Hr.prototype.addElementToContainer;Hr.prototype.getCastElement=Hr.prototype.getCastElement;
|
|
598
|
+
Hr.prototype.getContainer=Hr.prototype.getContainer;Hr.prototype.getMedia=Hr.prototype.getMedia;var Er={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Fr=1;_.r=Mr.prototype;_.r.getCurrentItem=function(){return this.h};_.r.Ye=function(){return this.h?this.h.player:null};_.r.Yh=function(){return Array.from(this.o.values())};_.r.ge=function(){return 0<this.o.size};_.r.play=function(a){return Or(this,a,_.ff)};_.r.load=function(a){return Or(this,a,_.Be)};_.r.release=function(){var a=this,b,c;return _.I(function(d){if(1==d.a)return b=Promise,c=b.all,_.x(d,Vr(a),3);if(2!=d.a)return _.x(d,c.call(b,[d.f,a.h?js(a,a.h):Promise.resolve()]),2);a.h=null;a.B=!1;_.z(d)})};
|
|
599
|
+
_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.g.info("Destroy"),_.x(b,a.release(),2);if(3!=b.a)return _.x(b,a.w.destroy(),3);ws(a);_.z(b)})};_.r.isMuted=function(){return this.G};var qs="preload",ss=_.Fe,ds="primary",cs="ad";_.w(Hs,_.Mm);_.r=Hs.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){Zs(a);a.h=[];a.w=!1;a.l.setSeekInterceptor(null);return _.x(b,a.a.destroy(),0)})};_.r.Nb=function(){return this.w};_.r.setMuted=function(a){var b=this.a;(b.G=a)?(b.a.setMuted(!0),vs(b,!0)):(a=b.getCurrentItem(),bs(b,a,a&&a.Ob?cs:ds))};_.r.isMuted=function(){return this.a.isMuted()};_.r.isLive=function(){var a=this.a.Ye();return a?a.isLive():null};_.r.Za=function(a){this.l.trigger(a)};
|
|
600
|
+
var Fs=0,Ms=1,et=2,ft=3,Ls=4,jt=5,kt=6;_.r=mt.prototype;_.r.load=function(){return Promise.resolve()};_.r.start=function(){return Promise.resolve()};_.r.fd=function(a,b,c){var d=a.getConfiguration();a=Object.assign({},{config:d,player:a,ib:b},d.ads.hls||{},{Nn:c});this.a=new Hs(a);Ks(this.a)};_.r.setMuted=function(a){this.a&&this.a.setMuted(a)};_.r.isMuted=function(){return this.a?this.a.isMuted():!0};_.r.resume=function(){var a=Is(this.a);a&&a.play()};_.r.pause=function(){var a=Is(this.a);a&&a.pause()};_.r.skip=function(){};
|
|
601
|
+
_.r.getVolume=function(){var a=Is(this.a);return a?a.getVolume()||0:0};_.r.setVolume=function(a){var b=Is(this.a);if(b)return b.setVolume(a)};_.r.getPosition=function(){var a=Is(this.a);return a?a.getPosition():-1};_.r.cd=function(){return!this.a.Nb()};_.r.zc=function(){return this.a.destroy()};mt.prototype.getPosition=mt.prototype.getPosition;mt.prototype.setVolume=mt.prototype.setVolume;mt.prototype.getVolume=mt.prototype.getVolume;mt.prototype.skip=mt.prototype.skip;mt.prototype.pause=mt.prototype.pause;
|
|
602
|
+
mt.prototype.resume=mt.prototype.resume;pt.prototype.release=function(){this.a.release();tt(this);this.m=null};var vt=[];var At={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Qm="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Pt="vod",Ot="live";var Yt,Wt,Xt;Tt.prototype.release=function(){this.a=null;this.f.ue(this.h)};_.yw="maxSuggestedBitrateKbps";Yt={du:"duress",etp:_.ie,mb:_.yw,rd:"responseDelay",rtt:"roundTripTime"};Wt={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:Fg};Xt=new _.K("clpp.net.CmsdManager");_.w(X,_.Mm);_.r=X.prototype;_.r.on=function(a,b,c){return _.Mm.prototype.on.call(this,a,b,c)};_.r.one=function(a,b,c){return _.Mm.prototype.one.call(this,a,b,c)};_.r.off=function(a,b){return _.Mm.prototype.off.call(this,a,b)};_.r.onError=function(a){if(null!==this.a)this.a.onError(a);else this.trigger(new _.M(_.he,{detail:a}))};_.r.be=function(a){a=this.L[a];void 0===a&&(a=null);return a};_.r.getSurface=function(){return this.j};_.r.getConfiguration=function(){return _.N.hb(this.f)};
|
|
603
|
+
_.r.getDrmInfo=function(){return this.a?this.a.getDrmInfo():null};_.r.detach=function(){return this.a?this.a.detach():Promise.resolve()};_.r.release=function(){var a=this;if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=eu(this);return this.l["finally"](function(){ou(a);a.g.debug("Player released");a.l=null})};
|
|
604
|
+
_.r.destroy=function(){var a=this;if(this.U)return this.g.debug("The player is already destroyed. No-op"),new Promise(function(b){return b()});this.U=!0;return this.release().then(function(){a.g.debug(Ja);a.trigger(new _.M("destroying"));return a.Nc(_.Ve)}).then(function(){a.a&&a.a.stopForwardingEventsTo(a);a.Wd.clear();a.gb.release();if(a.a)return a.a.destroy()}).then(function(){return a.J.destroy()}).then(function(){gn();a.a=null;a.A=null;a.trigger(new _.M("destroyed"))})};
|
|
605
|
+
_.r.load=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:_.F(f,2);_.rp(of);b.P=_.pa;b.ka=!0;c=_.cr(a);d=Wm(a)?a:{};if(d.license)throw new _.O(_.Q,7,7100,"License cannot be passed into the load method.");return _.x(f,_.mu(b,d,c),4);case 4:return _.x(f,_.nu(b),5);case 5:return _.x(f,_.hu(b),6);case 6:_.rp(nf);_.tp("player.load",of,nf);_.G(f,0);break;case 2:e=_.H(f);ou(b);if(b.l)throw b.g.info(bb),new _.O(_.Q,7,7E3);throw e;}})};
|
|
606
|
+
_.r.preload=function(a){var b=this,c;return _.I(function(d){if(1==d.a)return _.x(d,_.mu(b,a),2);if(!b.a)return b.g.warn(tb),d["return"]();c=b.a;return c.preload?_.x(d,c.preload(b.f),0):(b.g.warn(xb),d["return"]())})};_.r.Nc=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];if(!this.ka)return Promise.resolve();var e=this;d=this.ja.map(function(f){var g=f[a];return g.call.apply(g,[f,e].concat(_.hh(c)))}).filter(function(f){return f instanceof Promise});return Promise.all(d)};
|
|
607
|
+
_.r.use=function(a){(a=hn(a))&&a.o(this)};_.r.remove=function(a){return(this.getState()<=_.Lq||this.Z)&&null!==bn(a)?(jn(a),this.da=!0):!1};_.r.play=function(){return this.a?!this.h||this.h instanceof mt||this.a.namespace()===_.rd?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")};_.r.pause=function(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")};
|
|
608
|
+
_.r.getTrackManager=function(){return this.a&&this.a.getTrackManager()};_.r.getBufferInfo=function(a){return this.a?this.a.getBufferInfo(a):new _.Lm};_.r.getState=function(){return this.a?this.a.getState():_.Lq};_.r.getPeriods=function(){return this.a?this.a.getPeriods():[]};_.r.isEnded=function(){return this.a&&this.a.isEnded()||!1};_.r.isPaused=function(){return this.a&&this.a.isPaused()||!1};_.r.getPosition=function(){return this.a?this.a.getPosition():0};
|
|
609
|
+
_.r.seek=function(a){return this.getState()===_.Wq?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")};_.r.getPresentationStartTime=function(){return this.a?this.a.getPresentationStartTime():null};_.r.getSeekRange=function(){return this.a?this.a.getSeekRange():{start:0,end:0}};_.r.Dc=function(){var a=this.a;return a&&a.Dc?a.Dc():null};_.r.getVolume=function(){return this.a?this.a.getVolume():null};_.r.setVolume=function(a){this.a&&this.a.setVolume(a)};
|
|
610
|
+
_.r.getDuration=function(){return this.a?this.a.getDuration():-1};_.r.getAdsManager=function(){return this.h};_.r.namespace=function(){return this.a&&this.a.namespace()||"Undefined"};_.r.getPlaybackRate=function(){return this.a?this.a.getPlaybackRate():1};_.r.setPlaybackRate=function(a,b){this.a&&this.a.setPlaybackRate(a,b)};_.r.isMuted=function(){return this.h&&this.h instanceof mt?this.h.isMuted():this.a&&this.a.isMuted()||!1};
|
|
611
|
+
_.r.setMuted=function(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof mt&&this.h.setMuted(a)};_.r.getNetworkEngine=function(){return this.J};_.r.setNetworkEngine=function(a){this.J=a};_.r.getTextDisplayer=function(){return this.a&&this.a.getTextDisplayer()};_.r.isLive=function(){return!!this.a&&this.a.isLive()};_.r.getStats=function(){return this.a?this.a.getStats():null};_.r.di=function(){return Object.freeze(this.Ia)};_.r.getLoadedSource=function(){return this.a&&this.a.getLoadedSource()};
|
|
612
|
+
_.r.getTimelineCues=function(){return this.a?this.a.getTimelineCues():[]};_.r.getCueTimeline=function(){return this.a?this.a.getCueTimeline():null};_.r.resetAbr=function(){this.a&&this.a.resetAbr()};_.r.setDrmCustomDataModifier=function(a){this.ld=a;ku(this)};_.r.setCdnErrorCallback=function(a){this.N=a;this.a&&this.a.setCdnErrorCallback(this.N)};_.J("clpp.Player",X);X.registerPlugin=_.ru;X.prototype.setCdnErrorCallback=X.prototype.setCdnErrorCallback;X.prototype.setDrmCustomDataModifier=X.prototype.setDrmCustomDataModifier;
|
|
613
|
+
X.prototype.resetAbr=X.prototype.resetAbr;X.prototype.getTimelineCues=X.prototype.getTimelineCues;X.prototype.getLoadedSource=X.prototype.getLoadedSource;X.prototype.getSources=X.prototype.di;X.prototype.getStats=X.prototype.getStats;X.prototype.isLive=X.prototype.isLive;X.prototype.getTextDisplayer=X.prototype.getTextDisplayer;X.prototype.setNetworkEngine=X.prototype.setNetworkEngine;X.prototype.getNetworkEngine=X.prototype.getNetworkEngine;X.prototype.setMuted=X.prototype.setMuted;
|
|
614
|
+
X.prototype.isMuted=X.prototype.isMuted;X.prototype.setPlaybackRate=X.prototype.setPlaybackRate;X.prototype.getPlaybackRate=X.prototype.getPlaybackRate;X.prototype.namespace=X.prototype.namespace;X.prototype.getAdsManager=X.prototype.getAdsManager;X.prototype.getDuration=X.prototype.getDuration;X.prototype.setVolume=X.prototype.setVolume;X.prototype.getVolume=X.prototype.getVolume;X.prototype.getTimelineOffset=X.prototype.Dc;X.prototype.getSeekRange=X.prototype.getSeekRange;
|
|
615
615
|
X.prototype.getPresentationStartTime=X.prototype.getPresentationStartTime;X.prototype.seek=X.prototype.seek;X.prototype.getPosition=X.prototype.getPosition;X.prototype.isPaused=X.prototype.isPaused;X.prototype.isEnded=X.prototype.isEnded;X.prototype.getState=X.prototype.getState;X.prototype.getBufferInfo=X.prototype.getBufferInfo;X.prototype.getTrackManager=X.prototype.getTrackManager;X.prototype.pause=X.prototype.pause;X.prototype.play=X.prototype.play;X.prototype.remove=X.prototype.remove;
|
|
616
|
-
X.prototype.use=X.prototype.use;X.prototype.load=X.prototype.load;X.prototype.destroy=X.prototype.destroy;X.prototype.release=X.prototype.release;X.prototype.getDrmInfo=X.prototype.getDrmInfo;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.getSurface=X.prototype.getSurface;X.prototype.getPlugin=X.prototype.
|
|
617
|
-
_.
|
|
618
|
-
_.r.open=function(a,b){var c=this,d,e,f,g,h,l,m;return _.
|
|
619
|
-
7100,"Some config contains a non-unique property `id`!");if(e=b[0].playlist){f=e.timeline;g=["flat","basic"];if(f&&!g.includes(f))throw new _.
|
|
620
|
-
7100,"`playlist.endTime` config value is required for DVR content!");}_.
|
|
621
|
-
_.r.
|
|
622
|
-
|
|
623
|
-
_.r.destroy=function(){
|
|
624
|
-
|
|
625
|
-
_.r.
|
|
626
|
-
_.r.
|
|
627
|
-
_.r
|
|
628
|
-
a.l=!1;b&&
|
|
629
|
-
_.r.
|
|
630
|
-
a.a+")");case 3:_.vh(e);a.l=!1;b&&
|
|
631
|
-
|
|
632
|
-
_.r.demuxMimeTypes=function(a,b){var c=new Map;c.set(a,b);try{var d=_.
|
|
633
|
-
_.r.transmux=function(a){function b(){g={video:_.
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
638
|
-
var
|
|
616
|
+
X.prototype.use=X.prototype.use;X.prototype.load=X.prototype.load;X.prototype.destroy=X.prototype.destroy;X.prototype.release=X.prototype.release;X.prototype.getDrmInfo=X.prototype.getDrmInfo;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.getSurface=X.prototype.getSurface;X.prototype.getPlugin=X.prototype.be;X.prototype.off=X.prototype.off;X.prototype.one=X.prototype.one;X.prototype.on=X.prototype.on;_.Lq=0;_.Xq=1;_.Qq=2;_.Zq=3;_.Yq=4;_.Sq=5;_.Wq=6;_.Mq=7;
|
|
617
|
+
_.Uq={IDLE:_.Lq,PREPARING:_.Xq,BUFFERING:_.Qq,PLAYING:_.Zq,PAUSED:_.Yq,ENDED:_.Sq,ERROR:_.Wq,UNSET:_.Mq};X.State=_.Uq;var au=[];_.w(su,X);_.r=su.prototype;
|
|
618
|
+
_.r.open=function(a,b){var c=this,d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){if(c.w)throw new _.O(_.Q,7,7008,"Cannot call open() while "+c.w+fa);if(0!==a)throw new _.O(_.Q,7,7007,"The index parameter only supports the value of 0.");if(0===b.length)throw new _.O(_.Q,7,7003,kb);if(b.some(function(p){return!p.id||!p.source}))throw new _.O(_.Q,7,7100,"Some config is missing required properties `id` or `source`!");d=new Set(b.map(function(p){return p.id}));if(d.size!==b.length)throw new _.O(_.Q,7,
|
|
619
|
+
7100,"Some config contains a non-unique property `id`!");if(e=b[0].playlist){f=e.timeline;g=["flat","basic"];if(f&&!g.includes(f))throw new _.O(_.Q,7,7100,"Unsupported `playlist.timeline` config value!");h=e.startTime;if(null!=h&&(typeof h!==_.k||0>h))throw new _.O(_.Q,7,7100,"Invalid `playlist.startTime` config value!");l=e.endTime;if(null!=l&&(typeof l!==_.k||0>l||null!=h&&l<=h))throw new _.O(_.Q,7,7100,"Invalid `playlist.endTime` config value!");m=e.content;if("DVR"===m&&!l)throw new _.O(_.Q,7,
|
|
620
|
+
7100,"`playlist.endTime` config value is required for DVR content!");}_.uh(n);tu(c);c.w="open";return _.x(n,xu(c,b),4)}2!=n.a&&(c.I=0,c.o=b,c.fa=!0,uu(c,b[0].playlist||{}));_.vh(n);c.w=null;return _.wh(n)})};
|
|
621
|
+
_.r.Bj=function(a){var b=this,c;return _.I(function(d){if(1==d.a){if(b.w)throw new _.O(_.Q,7,7008,"Cannot call addItem() while "+b.w+fa);if(!b.fa)throw new _.O(_.Q,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.O(_.Q,7,7100,"The config is missing required properties `id` or `source`!");c=new Set(b.o.map(function(e){return e.id}));if(c.has(a.id))throw new _.O(_.Q,7,7100,"A config with this `id` already exists in the playlist!");_.uh(d);b.w="addItem";b.o.push(a);return _.x(d,
|
|
622
|
+
yu(b,a),2)}_.vh(d);b.w=null;return _.wh(d)})};_.r.getCurrentItem=function(){return this.o[this.I]||null};_.r.getCurrentItemIndex=function(){return this.I};_.r.Ul=function(){return _.hh(this.o).concat()};_.r.de=function(){return this.o.length};_.r.getTimeline=function(){return this.a?this.a.getTimeline():null};_.r.seekWith=function(a){return this.a?this.a.seekWith(a):Promise.resolve()};_.r.release=function(){this.o=[];this.I=0;this.fa=!1;return X.prototype.release.call(this)};
|
|
623
|
+
_.r.destroy=function(){tu(this);return X.prototype.destroy.call(this)};_.r.setCdnErrorCallback=function(){throw new _.O(1,7,7009,"CDN switching is not supported!");};_.J("clpp.plist.ScPlaylist",su);su.prototype.setCdnErrorCallback=su.prototype.setCdnErrorCallback;su.prototype.destroy=su.prototype.destroy;su.prototype.release=su.prototype.release;su.prototype.seekWith=su.prototype.seekWith;su.prototype.getTimeline=su.prototype.getTimeline;su.prototype.getSize=su.prototype.de;
|
|
624
|
+
su.prototype.getPlaylist=su.prototype.Ul;su.prototype.getCurrentItemIndex=su.prototype.getCurrentItemIndex;su.prototype.getCurrentItem=su.prototype.getCurrentItem;su.prototype.addItem=su.prototype.Bj;su.prototype.open=su.prototype.open;_.w(Bu,_.Mm);_.r=Bu.prototype;_.r.ae=function(){return this.f};_.r.Ye=function(){return this.f?this.f.player:null};_.r.Wh=function(){return this.o.get(this.a+1)||null};_.r.Zh=function(){return this.o.get(this.a-1)||null};_.r.Yh=function(){return[this.Zh(),this.Wh()].filter(Boolean)};_.r.jo=function(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");this.g.info("Set items",a);this.h=a.map(function(b,c){return{config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}})};
|
|
625
|
+
_.r.io=function(a){if(0===this.h.length)throw Error(jb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a};_.r.ge=function(){return this.a<this.h.length-1};_.r.ei=function(){return 0<this.a};
|
|
626
|
+
_.r.Ln=function(){var a=this,b,c;return _.I(function(d){switch(d.a){case 1:if(a.l)return a.g.warn("Cannot play first item while busy"),d["return"]();if(0===a.h.length)return a.g.warn(jb),d["return"]();a.l=!0;a.g.info("First (index: "+a.a+")");b=a.h[a.a];_.F(d,2,3);a.g.info("First loading (index: "+a.a+")");return _.x(d,Ju(a,b),5);case 5:a.g.info("First playing (index: "+a.a+")");case 3:_.vh(d);a.l=!1;Ou(a);_.wh(d);break;case 2:throw c=_.H(d),a.g.error("First failed (index: "+a.a+")"),c;}})};
|
|
627
|
+
_.r.Wi=function(){var a=this,b,c,d;return _.I(function(e){switch(e.a){case 1:if(a.l)return a.g.warn("Cannot play next item while busy"),e["return"]();if(!a.ge())return a.g.warn("There are no more items in the playlist"),e["return"]();a.l=!0;a.a+=1;a.g.info("Next (index: "+a.a+")");b=a.f;a.j.transition===_.bf&&b.player.pause();Cu(a,a.a+-2);a.o["delete"](a.a);c=a.h[a.a];_.F(e,2,3);a.g.info("Next loading (index: "+a.a+")");return _.x(e,Ku(a,c),5);case 5:a.g.info("Next playing (index: "+a.a+")");case 3:_.vh(e);
|
|
628
|
+
a.l=!1;b&&Gu(a,b);Ou(a);_.wh(e);break;case 2:throw d=_.H(e),a.g.error("Next failed (index: "+a.a+")"),d;}})};
|
|
629
|
+
_.r.Mn=function(){var a=this,b,c,d;return _.I(function(e){switch(e.a){case 1:if(a.l)return a.g.warn("Cannot play previous item while busy"),e["return"]();if(!a.ei())return a.g.warn("There are no more previous items in the playlist"),e["return"]();a.l=!0;--a.a;a.g.info("Previous (index: "+a.a+")");b=a.f;a.j.transition===_.bf&&b.player.pause();Cu(a,a.a+2);a.o["delete"](a.a);c=a.h[a.a];_.F(e,2,3);a.g.info("Previous loading (index: "+a.a+")");return _.x(e,Ku(a,c),5);case 5:a.g.info("Previous playing (index: "+
|
|
630
|
+
a.a+")");case 3:_.vh(e);a.l=!1;b&&Gu(a,b);Ou(a);_.wh(e);break;case 2:throw d=_.H(e),a.g.error("Previous failed (index: "+a.a+")"),d;}})};_.r.destroy=function(){var a=this;return _.I(function(b){return 1==b.a?(a.g.info("Destroy"),_.x(b,Promise.all([Du(a),a.f?Gu(a,a.f):Promise.resolve()]),2)):_.x(b,Pu(a),0)})};_.J(wd,Bu);Bu.prototype.destroy=Bu.prototype.destroy;Bu.prototype.playPrev=Bu.prototype.Mn;Bu.prototype.playNext=Bu.prototype.Wi;Bu.prototype.playFirst=Bu.prototype.Ln;Bu.prototype.hasPrev=Bu.prototype.ei;
|
|
631
|
+
Bu.prototype.hasNext=Bu.prototype.ge;Bu.prototype.setIndex=Bu.prototype.io;Bu.prototype.setItems=Bu.prototype.jo;Bu.prototype.getPreloading=Bu.prototype.Yh;Bu.prototype.getPrev=Bu.prototype.Zh;Bu.prototype.getNext=Bu.prototype.Wh;Bu.prototype.getCurrentPlayer=Bu.prototype.Ye;Bu.prototype.getCurrent=Bu.prototype.ae;var Fu="preload",Hu=_.Fe;var Qu=new Map;_.r=Su.prototype;_.r.destroy=function(){this.a.dispose();this.a=null};_.r.reset=function(){this.a=new muxjs.mp4.Transmuxer(this.f)};_.r.isSupported=function(a,b){var c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Pc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Ru(Tc);if(b)return _.Ru(Tu(b,a));c=Tu(_.Oc,a);d=Tu(_.Jg,a);return _.Ru(c)||_.Ru(d)};_.r.isMuxed=function(a,b){return 1<this.demuxMimeTypes(a,b).size};
|
|
632
|
+
_.r.demuxMimeTypes=function(a,b){var c=new Map;c.set(a,b);try{var d=_.mm(b),e=_.nm(b).split(","),f=new Map,g=zj(_.Oc,e),h=zj(_.Jg,e);g&&f.set(_.Oc,this.convertCodecs(_.Oc,_.lm(d,g)));h&&f.set(_.Jg,this.convertCodecs(_.Jg,_.lm(d,h)));return f}catch(l){return c}};_.r.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]===_.Pc?Tc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Tu(a,b):b};_.r.getOriginalMimeType=function(){return this.h};
|
|
633
|
+
_.r.transmux=function(a){function b(){g={video:_.vl.apply(ol,_.hh(d)),captions:f,audio:_.vl.apply(ol,_.hh(e))}}function c(h){f=h.captions;var l=new Uint8Array(h.data.byteLength+h.initSegment.byteLength);l.set(h.initSegment,0);l.set(h.data,h.initSegment.byteLength);h.type===zw?d.push(l):h.type===Aw&&e.push(l)}var d=[],e=[],f=[],g=null;a=_.gj(a);this.a.on("data",c);this.a.on("done",b);this.a.push(a);this.a.flush();this.a.off("data",c);this.a.off("done",b);if(!g)throw new _.O(_.Q,3,3018);return g};
|
|
634
|
+
gm(_.Pc,function(){return new Su(_.Pc)});gm(_.Lg,function(){return new Su(_.Lg)});var Aw=_.Oc,zw=_.Jg;Vu.prototype.getCuePoints=function(){};Vu.prototype.Nb=function(){};Vu.prototype.Mb=function(){};_.J("clpp.ads.IAdsTimeline",Vu);Vu.prototype.hasPostroll=Vu.prototype.Mb;Vu.prototype.hasPreroll=Vu.prototype.Nb;Vu.prototype.getCuePoints=Vu.prototype.getCuePoints;_.Wu.prototype.f=function(){};_.Wu.prototype.a=function(){};_.Wu.prototype.h=function(){};_.Wu.prototype.o=function(){};_.w(Xu,_.tn);Xu.prototype.se=function(a,b){for(var c=a.drm.customData.headers||{},d=_.v(Object.keys(c)),e=d.next();!e.done;e=d.next())e=e.value,b.headers[e]=c[e]};Xu.prototype.Mh=function(a,b){var c=Pn(b);switch(this.o){case Bw:return c;case Cw:return(new _.rj(c)).a;default:throw Error("Unknown content ID strategy");}};Xu.prototype.Ei=function(a,b){b.headers[Aa]=Nc;this.se(a,b);var c={spc:_.pl(b.body)};b.body=_.R.xd(_.tj(c,!0))};
|
|
635
|
+
Xu.prototype.Fi=function(a,b){var c=_.R.ea(b.data).trim(),d="\x3c/ckc\x3e"===c.substr(-6);"\x3cckc\x3e"===c.substr(0,5)&&d&&(c=c.slice(5,-6));b.data=_.rl(c).buffer};_.J(sd,Xu);Xu.prototype.onFairPlayLicenseResponse=Xu.prototype.Fi;Xu.prototype.onFairPlayLicenseRequest=Xu.prototype.Ei;Xu.prototype.extractFairPlayContentId=Xu.prototype.Mh;Xu.prototype.onLicenseRequest=Xu.prototype.se;Xu.prototype.constructor=Xu.prototype.constructor;Xu.NAME=Va;var Cw="hostname",Bw="full-skd";
|
|
636
|
+
Xu.FairPlayContentIdStrategy={HOSTNAME:Cw,FULL_SKD:Bw};_.w(Yu,_.Wu);Yu.prototype.h=function(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Va){a=a.drm.customData;if(!a)throw new _.O(_.Q,7,7100,_.Gd);a=new Xu(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Bw);_.on(a)}};Yu.prototype.a=function(){delete _.nn.HeaderDrm};Yu.prototype.id=function(){return"headerdrm"};_.J("clpp.drm.HeaderDrmComponent",Yu);_.xt(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);var c=new ArrayBuffer(b-a),d=_.gj(c),e=new Uint8Array(this,a,b-a);d.set(e);return c})});_.xt(function(){_.Oh("mathRound.install")});_.xt(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;ke in document||(Object.defineProperty(document,ke,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
637
|
+
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Zu);document.addEventListener("webkitfullscreenerror",Zu);document.addEventListener("mozfullscreenchange",Zu);document.addEventListener("mozfullscreenerror",Zu);document.addEventListener("MSFullscreenChange",Zu);document.addEventListener("MSFullscreenError",Zu)}});_.xt(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.Oh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=av,document.exitPictureInPicture=bv,document.addEventListener("webkitpresentationmodechanged",$u,!0))}});_.xt(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=cv)}});_.xt(function(){if(window.VTTCue)_.Nh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Nh(Tb),window.VTTCue=dv;else if(6===a)_.Nh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=ev;else{try{var b=!!dv(1,2,"")}catch(c){b=!1}b&&(_.Nh(Tb),window.VTTCue=dv)}}else _.Ph("VTTCue not available.")});var fv;_.xt(function(){_.Oh("InputEvent.install");_.Ek("Trident/")&&HTMLInputElement.prototype.addEventListener!==gv&&(_.Nh("Patching input event support on IE."),fv=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=gv)});_.xt(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});_.xt(function(){_.Oh("VideoPlayPromise.install");if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}});_.iv.prototype.start=function(){var a=this;this.a=new ResizeObserver(function(b){b=b[0];a.j(b.contentRect.width,b.contentRect.height,a.h.isFullscreen())});this.f&&this.a.observe(this.f)};_.iv.prototype.stop=function(){this.a&&(this.a.disconnect(),this.a=null)};_.kv.prototype.canPlay=function(a){function b(f){e.stop();d.resolve(f)}var c=document.createElement(_.Jg);c.setAttribute("playsinline","playsinline");a&&(c.muted=!0,c.setAttribute("muted","muted"));c.src=URL.createObjectURL(this.a);var d=new _.gk;c=c.play();var e=(new _.Xh(function(){b(a)})).ha(.25);void 0!==c?c.then(function(){return b(!0)})["catch"](function(f){f&&f.message&&f.message===pb?b(!0):b(!1)}):b(!0);return d};
|
|
638
|
+
var jv=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,
|
|
639
639
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
640
640
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,128,0,0,0,0,
|
|
641
641
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
642
642
|
0,0,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,
|
|
643
643
|
0,0,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,
|
|
644
|
-
115,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]);_.r=_.
|
|
645
|
-
_.r.getFontSizePercent=function(){return null===this.B?
|
|
646
|
-
_.
|
|
647
|
-
_.
|
|
648
|
-
|
|
649
|
-
_.r.
|
|
644
|
+
115,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]);_.r=_.lv.prototype;_.r.getDuration=function(){return this.a};_.r.getId=function(){return this.id};_.r.Yb=function(){return this.f};_.r.le=function(){return this.h};_.r.ra=function(a){return this.getId()===a.getId()&&this.Yb()===a.Yb()&&this.getDuration()===a.getDuration()&&this.le()===a.le()};_.J("clpp.media.TimelineWindow",_.lv);_.lv.prototype.isDynamic=_.lv.prototype.le;_.lv.prototype.getStart=_.lv.prototype.Yb;_.lv.prototype.getId=_.lv.prototype.getId;_.lv.prototype.getDuration=_.lv.prototype.getDuration;_.Dw=new _.K("clpp.media.TimestampParser");_.r=_.mv.prototype;_.r.Yl=function(a){return this.a[a]||null};_.r.Zl=function(){return this.a.length};_.r.$l=function(){return this.a};_.r.Uh=function(){return this.a[this.f]||null};_.r.Ll=function(){return this.f};_.J("clpp.media.Timeline",_.mv);_.mv.prototype.getCurrentWindowIndex=_.mv.prototype.Ll;_.mv.prototype.getCurrentWindow=_.mv.prototype.Uh;_.mv.prototype.getWindows=_.mv.prototype.$l;_.mv.prototype.getWindowCount=_.mv.prototype.Zl;_.mv.prototype.getWindow=_.mv.prototype.Yl;_.pv={};_.qv={};_.sv={};_.r=_.xv.prototype;_.r.getBackgroundColor=function(){return this.K};_.r.setBackgroundColor=function(a){this.K=a;this.Sb()};_.r.getWindowColor=function(){return this.U};_.r.setWindowColor=function(a){this.U=a;this.Sb()};_.r.getFontFamily=function(){return this.P};_.r.setFontFamily=function(a){this.P=a;this.Sb()};_.r.getFontColor=function(){return this.N};_.r.setFontColor=function(a){this.N=a;this.Sb()};_.r.getFontSize=function(){return this.I};_.r.setFontSize=function(a){this.I=a;this.Sb()};
|
|
645
|
+
_.r.getFontSizePercent=function(){return null===this.B?Ew:this.B};_.r.setFontSizePercent=function(a){this.B=a;this.Sb()};_.r.getEdgeColor=function(){return this.H};_.r.setEdgeColor=function(a){this.H=a;this.Sb()};_.r.getEdgeType=function(){return this.o};_.r.setEdgeType=function(a){this.o=a;this.Sb()};_.xv.prototype.setEdgeType=_.xv.prototype.setEdgeType;_.xv.prototype.getEdgeType=_.xv.prototype.getEdgeType;_.xv.prototype.setEdgeColor=_.xv.prototype.setEdgeColor;_.xv.prototype.getEdgeColor=_.xv.prototype.getEdgeColor;
|
|
646
|
+
_.xv.prototype.setFontSizePercent=_.xv.prototype.setFontSizePercent;_.xv.prototype.getFontSizePercent=_.xv.prototype.getFontSizePercent;_.xv.prototype.setFontSize=_.xv.prototype.setFontSize;_.xv.prototype.getFontSize=_.xv.prototype.getFontSize;_.xv.prototype.setFontColor=_.xv.prototype.setFontColor;_.xv.prototype.getFontColor=_.xv.prototype.getFontColor;_.xv.prototype.setFontFamily=_.xv.prototype.setFontFamily;_.xv.prototype.getFontFamily=_.xv.prototype.getFontFamily;
|
|
647
|
+
_.xv.prototype.setWindowColor=_.xv.prototype.setWindowColor;_.xv.prototype.getWindowColor=_.xv.prototype.getWindowColor;_.xv.prototype.setBackgroundColor=_.xv.prototype.setBackgroundColor;_.xv.prototype.getBackgroundColor=_.xv.prototype.getBackgroundColor;var Ew=1/15;var yv="raised",zv="depressed",Bv="dropshadow",Av="uniform";_.J("clpp.text.EdgeType",{NONE:_.Qe,RAISED:yv,DEPRESSED:zv,DROP_SHADOW:Bv,UNIFORM:Av});Dv.prototype.parseInit=function(a){try{var b=_.vv(_.Jc);if(b){var c=new b(this.f);c.parseInit(a)}else this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(e){c=null}if(c)this.a=c;else{try{var d=_.vv(_.Kc);d?(c=new d(this.f),c.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(e){c=null}if(c)this.a=c;else throw new _.O(_.Q,2,2011);}};
|
|
648
|
+
Dv.prototype.parseMedia=function(a,b){if(!this.a)throw new _.O(_.Q,2,2011);return this.a.parseMedia(a,b)};_.uv(_.Ic,Dv);_.w(_.Fv,_.xv);_.r=_.Fv.prototype;_.r.append=function(){};_.r.remove=function(){return!0};_.r.isTextVisible=function(){return this.w};_.r.setTextVisibility=function(a){this.w=a};
|
|
649
|
+
_.r.Sb=function(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Cv(this)},b=Object.keys(a).map(function(c){return null!==a[c]?c+":"+a[c]+";":""}).join("");this.h.textContent="."+this.f+"::cue {"+b+"}"}};_.r.destroy=function(){this.l.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()};var Ev=0;Gv.prototype.a=function(){return!0};Gv.prototype.create=function(a){return new _.Fv(a)};_.Bq("native",new Gv);_.r=_.Hv.prototype;_.r.onPlayerCreated=function(){};_.r.onContentWillLoad=function(){return Promise.resolve()};_.r.onContentLoaded=function(a,b){for(var c=1;c<arguments.length;++c);return Promise.resolve()};_.r.onPlayerWillDestroy=function(){};_.r.onPlayerWillRelease=function(){};}.call(g,this));
|
|
650
650
|
g.clpp._ = _;
|
|
651
651
|
if (typeof(module)!="undefined"&&module.exports) {module.exports=g.clpp;}
|
|
652
652
|
else if (typeof(define)!="undefined" && define.amd) {define(function(){return g.clpp;});}
|