@castlabs/prestoplay 6.23.1 → 6.24.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 +14 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +113 -113
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +608 -591
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +87 -86
- package/cjs/cl.externs.js +94 -30
- package/cjs/cl.freewheel.js +25 -24
- package/cjs/cl.hls.js +73 -71
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +23 -23
- package/cjs/cl.mse.js +344 -339
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +14 -13
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -16
- package/cjs/cl.simid.js +15 -15
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +71 -71
- 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 +37 -37
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +88 -88
- package/cl.conviva.js +27 -27
- package/cl.core.js +492 -478
- package/cl.crypto.js +9 -9
- package/cl.dash.js +81 -80
- package/cl.externs.js +94 -30
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +75 -74
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mse.js +307 -305
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +13 -13
- package/cl.smooth.js +59 -59
- 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 +14 -14
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +28 -28
- package/package.json +1 -1
- package/typings.d.ts +44 -10
package/cjs/cl.core.js
CHANGED
|
@@ -1,428 +1,450 @@
|
|
|
1
1
|
(function(){var g={}; var _ = {};
|
|
2
|
-
(function(window){var ba,ca,ea,fa,ha,
|
|
3
|
-
|
|
4
|
-
Bp,
|
|
5
|
-
|
|
6
|
-
_.
|
|
7
|
-
_.
|
|
8
|
-
fb="
|
|
9
|
-
|
|
10
|
-
_.
|
|
11
|
-
_.
|
|
12
|
-
_.
|
|
13
|
-
_.
|
|
14
|
-
sd="certificate-request";
|
|
15
|
-
_.
|
|
16
|
-
le="
|
|
17
|
-
_.Re="
|
|
18
|
-
pf="player.afterLoad.end";
|
|
19
|
-
|
|
20
|
-
_.
|
|
21
|
-
_.Qg="
|
|
22
|
-
_.w=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_.
|
|
31
|
-
_.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
2
|
+
(function(window){var ba,ca,ea,fa,ha,ra,ua,ya,Ba,Fa,Ga,Ha,Ka,Ma,Qa,Va,Wa,Za,ab,bb,cb,gb,hb,ib,jb,kb,lb,mb,nb,ob,qb,rb,vb,xb,yb,Ab,Bb,Cb,Db,Fb,Gb,Kb,Ob,Vb,Wb,Xb,Yb,ac,cc,fc,gc,hc,kc,lc,nc,oc,pc,qc,rc,sc,tc,vc,Cc,Dc,Ec,Xc,bd,hd,pd,qd,xd,yd,zd,Bd,Cd,Dd,Ed,Gd,Hd,Id,Jd,Kd,Ld,Td,Ud,Wd,ae,ge,he,ie,je,ke,le,ne,pe,qe,te,ue,we,Ce,Je,Le,Me,Ue,nf,uf,wf,xf,yf,zf,Af,Bf,Cf,Df,Ef,Gf,Nf,Of,Pf,Qf,Rf,Sf,Uf,Yf,$f,og,rg,yg,Kg,Og,Ug,bh,fh,gh,hh,ih,jh,lh,mh,nh,sh,wh,Ah,Ch,Bh,Dh,Eh,Fh,Kh,Nh,Lh,Mh,Oh,Qh,Rh,Vh,Yh,ci,hi,ki,mi,ni,oi,qi,ri,pi,
|
|
3
|
+
ti,ui,wi,zi,xi,Ai,Ci,Bi,Gi,Ji,Ii,Hi,Li,Oi,Ni,Mi,Ei,Di,Ki,Fi,Ri,Si,Ti,Vi,Xi,Wi,Zi,jj,kj,lj,nj,pj,qj,sj,tj,xj,zj,Bj,vj,Dj,Rj,Sj,Vj,Zj,bk,ck,fk,ak,Wj,gk,nk,tk,uk,xk,Ak,Bk,Dk,Ek,Fk,Ik,Sk,Tk,Uk,Vk,Wk,bl,el,fl,ll,ml,pl,rl,ql,ol,sl,nl,vl,tl,ul,wl,xl,El,Ml,Xl,Zl,$l,am,km,bm,nm,pm,rm,sm,qm,um,vm,om,wm,xm,ym,zm,Am,Cm,Dm,Em,Fm,Bm,Jm,Km,Mm,Pm,Rm,Xm,Ym,Zm,$m,an,bn,cn,dn,en,fn,gn,nn,An,Gn,Kn,Ln,Nn,On,Wn,$n,ao,go,mo,no,po,qo,so,to,uo,vo,wo,xo,yo,zo,Ao,Bo,Co,Do,Eo,No,Fo,Oo,Qo,Ro,Mo,Po,So,To,Uo,Vo,Yo,$o,ap,gp,hp,
|
|
4
|
+
pp,vp,Ep,Bp,Cp,Ip,Kp,Np,Rp,Sp,Wp,Gp,Ap,cq,Up,dq,fq,eq,nq,jq,iq,lq,oq,mq,qq,kq,pq,rp,Lp,gq,sp,bq,zp,Yp,Zp,tq,aq,Fp,Dp,up,yq,Aq,Bq,Cq,Dq,Jq,Kq,Mq,Qq,Vq,Iq,Wq,Xq,$q,br,cr,er,fr,ar,gr,hr,ir,jr,nr,or,pr,qr,rr,wr,xr,yr,Cr,Br,Hr,Lr,Nr,Or,Pr,Jr,bs,Ir,Qr,Kr,cs,ds,Fr,$r,Dr,es,gs,Zr,Wr,Xr,Vr,Yr,Ur,fs,is,as,ls,Gr,Er,Rr,ms,ns,ks,Mr,us,vs,xs,os,ws,Ds,zs,ys,rs,Cs,Bs,Hs,ts,Ks,As,Is,ps,ss,Es,Ss,Fs,Js,Ms,Ls,Us,Rs,Xs,qs,Os,Ys,Zs,at,$s,ct,dt,et,ft,bt,ht,jt,kt,mt,nt,ot,pt,qt,rt,st,tt,vt,wt,xt,yt,ut,Bt,Dt,Ct,Et,Ft,X,Kt,
|
|
5
|
+
Ot,Mt,Pt,Rt,Qt,Tt,Ut,Zt,au,$t,Wt,Jt,Vt,cu,du,eu,hu,iu,gu,fu,lu,nu,mu,qu,ou,tu,uu,su,wu,xu,yu,vu,ku,zu,ju,Cu,Du,Eu,Gu,Hu,Iu,Ju,Ku,Lu,Mu,Nu,Ou,Qu,Su,Tu,Uu,Ru,Wu,Xu,cv,hv,iv,kv,jv,Pk,mv,pv,ov,qv,rv,nv,uv,vv,sv,wv,Qk,zv,Lk,aw,dw,uh,fw;_.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.24.0";_.ja="AUDIO";_.ka="AdaptationSet";_.ma="Already destroyed. No-op";_.na="Already released. No-op";
|
|
6
|
+
_.oa="Autoplay is not allowed due to browser policy.";_.pa="BANDWIDTH";_.qa="BASIC";ra="CHECKSUM";_.sa="CLOSED-CAPTIONS";_.ta="CODECS";ua="Can not set volume to ";_.va="Cannot retrieve buffer information due to platform limitations";_.wa="CastlabsPlayer";_.xa="Configuration is valid";ya="Content-Length";Ba="Content-Type";_.Da="Could not find configured DRM environment.";_.Ea="DRM environment '";Fa="DRM licenses loaded";Ga="DRMtoday";Ha="DRMtodayOnboard";_.Ja="DURATION";Ka="Destroying player";Ma="EXT-X-BYTERANGE";
|
|
7
|
+
_.Na="EXT-X-DATERANGE";_.Oa="EXT-X-DISCONTINUITY";_.Pa="EXT-X-DISCONTINUITY-SEQUENCE";Qa="EXT-X-ENDLIST";_.Ra="EXT-X-KEY";_.Sa="EXT-X-MAP";_.Ta="EXT-X-MEDIA";_.Ua="EXT-X-MEDIA-SEQUENCE";Va="EXT-X-PART-INF";Wa="EXT-X-PLAYLIST-TYPE";_.Xa="EXT-X-PRELOAD-HINT";_.Ya="EXT-X-PROGRAM-DATE-TIME";Za="EXT-X-SERVER-CONTROL";_.$a="EXT-X-STREAM-INF";ab="EXT-X-TARGETDURATION";bb="Error while decoding string!";cb="Error while fetching certificate!";_.db="FairPlay Certificate URL is not defined";_.eb="FairPlay License URL is not defined";
|
|
8
|
+
_.fb="GROUP-ID";gb="HW_SECURE_ALL";hb="HW_SECURE_CRYPTO";ib="HW_SECURE_DECODE";jb="HeaderDrm";kb="Hide video element .";lb="Interstitial ";mb="Invalid track type: ";nb="InvalidStateError";ob="Key status for Key ID '";_.pb="LANGUAGE";qb="License verification failed: ";rb="Load interrupted while a player release is pending";_.sb="Loading player with configuration";_.tb="MaxHeight";_.ub="MaxWidth";vb="Missing media element";_.wb="NAME";xb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";
|
|
9
|
+
yb="No event provided!";Ab="No items in the playlist";Bb="No sources provided!";Cb="No track data attached to the event, unable to add track!";Db="Not a persistent session.";_.Eb="Not supported";Fb="NotAllowedError";Gb="NotSupportedError";_.Hb="PLAYLIST";_.Ib="POST";_.Jb="PlayReady License URL is not defined";Kb="Player not ready yet.";_.Lb="Player sources";_.Mb="Player state change: ";_.Nb="Please make sure ";Ob="Preloading is not supported by this player.";_.Pb="QualityLevel";_.Qb="RESOLUTION";
|
|
10
|
+
_.Rb="Representation";_.Sb="SUBTITLES";_.Tb="SW_SECURE_CRYPTO";_.Ub="SW_SECURE_DECODE";Vb="Session is closed";Wb="Setting native ";Xb="Show video element .";Yb="Skipping Session creation. License for init data was already requested in Session: '";_.Zb="SmoothStreamingMedia";_.$b="TYPE";ac="The index is not in the allowed range.";_.bc="URI";cc="Unable to translate ";_.dc="Unhandled/ignored event";_.ec="Unregistering listeners";fc="Unsupported keySystem";gc="Updating playout limit for interstitial";
|
|
11
|
+
hc="Using VTTCue polyfill from 3 argument TextTrackCue.";_.ic="VIDEO";_.jc="VOD";kc="Wait for preloading to finish";lc="WebkitEmeManager.MediaKeySession.load";_.mc="Widevine License URL is not defined";nc="Will create EME Manager: ";oc="X-AD-CREATIVE-SIGNALING";pc="X-ASSET-LIST";qc="X-ASSET-URI";rc="X-PLAYOUT-LIMIT";sc="X-RESTRICT";tc="X-RESUME-OFFSET";vc="X-TIMELINE-OCCUPIES";_.wc="ad-break-started";_.xc="ad-break-stopped";_.yc="ad-buffering";_.zc="ad-clicked";_.Ac="ad-completed";_.Bc="ad-first-quartile";
|
|
12
|
+
Cc="ad-hls-asset-list-request";Dc="ad-hls-asset-list-response";Ec="ad-hls-resoled";_.Fc="ad-impression";_.Gc="ad-loaded";_.Hc="ad-midpoint";_.Ic="ad-paused";_.Jc="ad-progress";_.Kc="ad-resumed";_.Lc="ad-skipped";_.Mc="ad-started";_.Nc="ad-stopped";_.Oc="ad-third-quartile";_.Pc="addtrack";_.Qc="ads-timeline-changed";_.Rc="airplay-casting-ended";_.Sc="airplay-casting-started";_.Tc="airplay-status-changed";_.Uc="application";_.Vc="application/cea-608";_.Wc="application/dash+xml";Xc="application/mp4";
|
|
13
|
+
_.Yc='application/mp4; codecs\x3d"stpp"';_.Zc='application/mp4; codecs\x3d"wvtt"';_.$c="application/ttml+xml";_.ad="application/vnd.ms-sstr+xml";bd="application/x-www-form-urlencoded";_.cd="audio";_.dd="audio/aac";_.ed="audio/ac3";_.fd="audio/eac3";_.gd="audio/mp4";hd='audio/mp4;codecs\x3d"mp4a.40.2"';_.id="audiobufferchanged";_.jd="audiotrackchanged";_.kd="autoplaynotallowed";_.ld="bitratechanged";_.md="boolean";_.nd="bufferingended";_.od="bufferingstarted";pd="canplay";qd="canplaythrough";
|
|
14
|
+
_.rd="caption";_.sd="castingstarted";_.td="caststatuschanged";_.ud="cdn-switch-success";_.vd="cenc";_.wd="center";xd="certificate-request";yd="change";zd="chrome";_.Ad="clpp-fill";Bd="clpp-hidden";Cd="clpp-mc-playlist";Dd="clpp-visible";Ed="clpp.PlayerFleet";_.Fd="clpp.cast.CastSender";Gd="clpp.drm.HeaderDrm";Hd="clpp.drm.eme.AppleEmeManager";Id="clpp.drm.eme.EmeFactory";Jd="clpp.native.Player";Kd="clpp.plist.McPlaylist";Ld="clpp.utils.Platform";_.Md="codecs";_.Pd="column-reverse";_.Qd="com.adobe.primetime";
|
|
15
|
+
_.Sd="com.apple.fps";Td="com.apple.hls.interstitial";Ud="com.apple.quicktime.HLS";_.Vd="com.microsoft.playready";Wd="com.microsoft.playready.recommendation";_.Xd="com.widevine.alpha";_.Yd="config.drm.customData is not defined";_.Zd="content-steering-change";_.$d="content-steering-location-ban-update";ae="controls";_.be="cuechange";_.ce="decoder";_.de="destroy()";_.ee="disabled";_.fe="div";ge="drm.license.req.";he="drm.mediaKeys.end";ie="drm.mediaKeys.start";je="drm.onPlay.end";ke="drm.onPlay.start";
|
|
16
|
+
le="drm.sess.update.";_.me="drmexpirationupdate";ne="drmlicenserequested";pe="drmrenewalstarted";qe="drmsessioncreated";_.re="drmsessionpersisted";_.se="drmsessionupdate";te="drmtoday";ue="durationchange";_.ve="ec-3";we="encrypted";_.xe="end";_.ye="ended";_.ze="error";_.Ae="estimatedThroughputKbps";_.Be="forced";Ce="fullscreenElement";_.De="function";_.Ee="height";_.Fe="hidden";_.Ge="html";_.He="image";_.Ie="internal-error";Je="keystatuseschange";_.Ke="left";Le="license-renewal";Me="license-request";
|
|
17
|
+
_.Oe="line-left";_.Pe="line-right";_.Qe="live-turned-static";_.Re="load";_.Se="loadeddata";_.Te="loadedmetadata";Ue="loadstart";_.Ve="main";_.We="mdat";_.Xe="mdia";_.Ye="message";_.Ze="metadata";_.$e="mimeType";_.af="minf";_.bf="moov";_.cf="mpd-type-changed";_.df="mpeg-dash-callback-event";_.ef="none";_.k="number";_.ff="object";_.gf="onBitrateChanged()";_.hf="onContentLoaded";_.jf="onPlayerError()";_.kf="onPlayerWillDestroy";_.lf="onPlayerWillRelease";_.mf="onStateChanged()";nf="online-status-changed";
|
|
18
|
+
_.of="optional";_.pf="org.w3.clearkey";_.qf="output-restricted";_.rf="pause";_.sf="persistent";_.tf="persistent-license";uf="picture-in-picture";_.vf="play";wf="player.afterLoad.end";xf="player.afterLoad.start";yf="player.appendLoad.end";zf="player.appendLoad.start";Af="player.beforeLoad.end";Bf="player.beforeLoad.start";Cf="player.load.end";Df="player.load.start";Ef="player.setupPlaylist.end";Gf="player.setupPlaylist.start";_.Kf="playing";_.Lf="playlist-item-changed";_.Mf="playlist-modified";
|
|
19
|
+
Nf="playlist.next.end";Of="playlist.next.start";Pf="preload-aborted";Qf="preload-failed";Rf="preloaded";Sf="preloading";_.Tf="prevent";Uf="primary-content";_.Vf="progress";_.Wf="px";_.Xf="ratechange";Yf="released";_.Zf="releasing";$f="removetrack";_.ag="required";_.bg="resize";_.cg="right";_.dg="sc-playlist-ended";_.eg="sc-playlist-item-changed";_.fg="sc-playlist-live-turned-static";_.gg="sc-playlist-timeline-changed";_.hg="seeked";_.ig="seeking";_.jg="showing";_.kg="simid-creative-started";
|
|
20
|
+
_.lg="simid-creative-stopped";_.mg="sinf";_.ng="smooth";og="stalled";_.pg="start";_.qg="statechanged";rg="status-pending";_.sg="stbl";_.tg="string";_.ug="stsd";_.vg="style";_.wg="subtitle";_.xg="subtitles-htmlcue";yg="temporary";_.zg="text/vtt";_.Ag="text/xml";_.Bg="texttrackchanged";_.Cg="timeline-cue-added";_.Dg="timeline-cue-enter";_.Eg="timeline-cue-exit";_.Fg="timeline-cues-changed";_.Gg="timeupdate";_.Hg="tracksadded";_.Ig="trak";_.Jg="ttml-xml";Kg="unauthenticated";_.Lg="und";_.Ng="unknown";
|
|
21
|
+
Og="update";_.Pg="urn:scte:scte35";_.Qg="urn:scte:scte35:2014";_.Rg="user-seeked";_.Sg="user-seeking";_.Tg="value";Ug="version";_.Vg="vertical-lr";_.Wg="vertical-rl";_.r="video";_.Xg="video/mp2t";_.Yg="video/mp4";_.Zg="videobufferchanged";_.$g="videotrackchanged";_.ah="vimond-response";bh="visibilitychange";_.ch="vtt-xml";_.dh="waiting";_.eh="waitingforkey";fh="webkit-org.w3.clearkey";gh="webkitkeyadded";hh="webkitkeyerror";ih="webkitkeymessage";jh="webkitneedkey";_.kh="width";lh="x-dt-csl-tracking-token";
|
|
22
|
+
mh="x-dt-follow-up-token";nh="x-dt-resp-code";_.oh="yospace-session-ended";_.ph="yospace-session-started";_.rh=function(a){return function(){return _.qh[a].apply(this,arguments)}};sh=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};_.w=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:sh(a)}};_.th=function(a){if(!(a instanceof Array)){a=_.w(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a};
|
|
23
|
+
_.x=function(a,b){a.prototype=uh(b.prototype);a.prototype.constructor=a;if(vh)vh(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]};wh=function(){wh=function(){};xh.Symbol||(xh.Symbol=yh)};Ah=function(a,b){this.a=a;zh(this,"description",{configurable:!0,writable:!0,value:b})};
|
|
24
|
+
Ch=function(){wh();var a=xh.Symbol.iterator;a||(a=xh.Symbol.iterator=xh.Symbol("Symbol.iterator"));typeof Array.prototype[a]!=_.De&&zh(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return Bh(sh(this))}});Ch=function(){}};Bh=function(a){Ch();a={next:a};a[xh.Symbol.iterator]=function(){return this};return a};Dh=function(){this.w=!1;this.l=null;this.f=void 0;this.a=1;this.j=this.o=0;this.B=this.h=null};Eh=function(a){if(a.w)throw new TypeError("Generator is already running");a.w=!0};
|
|
25
|
+
Fh=function(a,b){a.h={ai:b,Fi:!0};a.a=a.o||a.j};_.y=function(a,b,c){a.a=c;return{value:b}};_.B=function(a){a.a=0};_.C=function(a,b,c){a.o=b;void 0!=c&&(a.j=c)};_.Gh=function(a){a.o=0;a.j=2};_.Hh=function(a,b){a.a=b;a.o=0};_.E=function(a){a.o=0;var b=a.h.ai;a.h=null;return b};_.Ih=function(a){a.B=[a.h];a.o=0;a.j=0};_.Jh=function(a){var b=a.B.splice(0)[0];(b=a.h=a.h||b)?b.Fi?a.a=a.o||a.j:void 0!=b.F&&a.j<b.F?(a.a=b.F,a.h=null):a.a=a.j:a.a=0};Kh=function(a){this.a=new Dh;this.f=a};
|
|
26
|
+
Nh=function(a,b){Eh(a.a);var c=a.a.l;if(c)return Lh(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.a["return"]);a.a["return"](b);return Mh(a)};Lh=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,Fh(a.a,g),Mh(a)}a.a.l=null;d.call(a.a,f);return Mh(a)};
|
|
27
|
+
Mh=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,Fh(a.a,c)}a.a.w=!1;if(a.a.h){b=a.a.h;a.a.h=null;if(b.Fi)throw b.ai;return{value:b["return"],done:!0}}return{value:void 0,done:!0}};
|
|
28
|
+
Oh=function(a){this.next=function(b){Eh(a.a);a.a.l?b=Lh(a,a.a.l.next,b,a.a.A):(a.a.A(b),b=Mh(a));return b};this["throw"]=function(b){Eh(a.a);a.a.l?b=Lh(a,a.a.l["throw"],b,a.a.A):(Fh(a.a,b),b=Mh(a));return b};this["return"]=function(b){return Nh(a,b)};Ch();this[Symbol.iterator]=function(){return this}};_.Ph=function(a,b){var c=new Oh(new Kh(b));vh&&vh(c,a.prototype);return c};
|
|
29
|
+
Qh=function(a,b){if(b){for(var c=xh,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&&zh(c,d,{configurable:!0,writable:!0,value:f})}};Rh=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 Rh(new Oh(new Kh(a)))};
|
|
30
|
+
_.J=function(a,b){var c=a.split("."),d=Sh;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};Vh=function(a){return a&&0<=Th[a]?Th[a]:Uh};Yh=function(a){if(!a)return _.Wh("clpp.log",cc+a+ca),-1;var b=Xh[a.toUpperCase()];return void 0===b?(_.Wh("clpp.log",cc+a+ca),-1):b};_.K=function(a){(this.tag=a)&&void 0===Th[a]&&(Th[a]=-1)};_.$h=function(a){Zh.info.apply(Zh,arguments)};
|
|
31
|
+
_.ai=function(a){Zh.debug.apply(Zh,arguments)};_.Wh=function(a){Zh.warn.apply(Zh,arguments)};_.bi=function(a){Zh.error.apply(Zh,arguments)};ci=function(a,b){this.ob=a;this.sourceIndex=b};_.gi=function(a){if(a){var b=a.a();b in _.di?_.fi.warn("Player-Factory '"+b+"' already registered"):(_.di[b]=a,_.fi.info("Registered Player-Factory: '"+b+"'"))}};hi=function(a){return Object.values(_.di).find(a)||null};_.ji=function(a){this.f=a;this.a=null};
|
|
32
|
+
ki=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};_.li=function(a){this.f=a;this.a=null};mi=function(a){return 0>=a?Promise.resolve():new Promise(function(b){setTimeout(function(){b()},1E3*a)})};ni=function(){this.Nc=null;this.f=[];this.h=[];this.Ca=new _.K(Ed);this.a=null;this.j=!1};oi=function(a){return[a.Nc].concat(_.th(a.f)).filter(function(b){return null!=b})};
|
|
33
|
+
qi=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 _.y(d,pi(a,c),0)})};ri=function(a,b){var c;return _.I(function(d){c=function(){return Promise.all(oi(a).map(b))};return _.y(d,pi(a,c),0)})};pi=function(a,b){return _.I(function(c){if(1==c.a)return a.a?_.y(c,a.a,2):c.F(2);a.a=b().then(function(){a.a=null});_.B(c)})};_.si=function(){this.a={}};ti=function(a,b,c,d){this.f=a;this.hd=b;this.a=c;this.jo=!!d};
|
|
34
|
+
_.L=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};ui=function(a){this.a=new _.si;this.f=a};_.vi=function(){this.a=new _.si};
|
|
35
|
+
wi=function(a,b,c){function d(h){for(var l=_.w(e),m=l.next();!m.done;m=l.next())a.off(b,m.value,d);c(h)}for(var e=[we,"msneedkey",jh,"needkey"],f=_.w(e),g=f.next();!g.done;g=f.next())a.on(b,g.value,d)};_.yi=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)xi(c[b]);a.a.clear()};zi=function(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)};xi=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
|
|
36
|
+
Ai=function(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.vi;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.K("clpp.native.Metadata")};Ci=function(a,b){a.j.on(b,_.Pc,function(c){c=c.track;c.kind===_.Ze&&Bi(a,c)})};
|
|
37
|
+
Bi=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.Fe;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Di(d);Ei(c);a.a=Fi(c,a.l);0<a.a.size&&(Gi(a,a.a),a.m.trigger(new _.L(_.Fg)));a.j.on(b,_.be,function(){for(var e=a.m.getPosition(),f=_.w(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 _.L(_.Dg,{detail:g})))}else h=g.startTime<=e&&e<=g.endTime,!h&&
|
|
38
|
+
l.f.has(g)?(l.f["delete"](g),l.m.trigger(new _.L(_.Eg,{detail:g}))):h&&!l.f.has(g)&&(l.f.add(g),l.m.trigger(new _.L(_.Dg,{detail:g})))}});a.m.isLive()&&(a.h=setInterval(function(){if(b.cues){var e=a.m.getSeekRange().start;for(var f=[],g=_.w(b.cues),h=g.next();!h.done;h=g.next())h=h.value,h.endTime<e&&f.push(h);Hi(a,b,f);0<f.length&&a.g.debug("Evicted "+f.length+" old cues.");g=_.w(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;Ii(a,b);f=Di(d);
|
|
39
|
+
var l=Fi(f,a.l);g=new Set;h=!1;l=_.w(l);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=Ji(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;Ei(f);(e||h)&&a.m.trigger(new _.L(_.Fg));Gi(a,g)},6E3))}};Gi=function(a,b){for(var c=_.w(b),d=c.next();!d.done;d=c.next())a.m.trigger(new _.L(_.Cg,{detail:d.value}))};
|
|
40
|
+
Ji=function(a,b){return Array.from(a.a.values()).find(function(c){return b.startTime===c.startTime&&b.endTime===c.endTime})||null};Ii=function(a,b){if(b.cues){var c=Ki(b.cues).filter(function(l){return l.type===Ud}),d=c.filter(function(l){return l.Jg}),e=c.filter(function(l){return!l.Jg});c=[];e=_.w(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;for(var g=_.w(d),h=g.next();!h.done;h=g.next())h=h.value,Li(f,h)&&(c.push(f),h.Yh=f.startTime)}Hi(a,b,c);0<c.length&&a.g.debug("Removed "+c.length+" duplicated cues.")}};
|
|
41
|
+
Hi=function(a,b,c){c=_.w(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)}}};Li=function(a,b){var c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Yh||a.startTime,f=b.Yh||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};
|
|
42
|
+
Oi=function(a){var b=[],c={};a=_.w(a);for(var d=a.next();!d.done;c={Fd:c.Fd},d=a.next())c.Fd=d.value,(d=b.find(function(e){return function(f){var g=e.Fd;return f.startTime===g.startTime&&f.endTime===g.endTime}}(c)))?Mi(c.Fd,d):(d=Ni(c.Fd),b.push(d));return b};Ni=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:_.Pi,eventElement:null};Mi(a,b);return b};
|
|
43
|
+
Mi=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=_.Qg,b.type=_.Qi};Ei=function(a){a.forEach(function(b){b.Jg=!0})};Di=function(a){return Ki(a).filter(function(b){return b.type===Ud&&!b.Jg})};Ki=function(a){var b=[];a=_.w(a);for(var c=a.next();!c.done;c=a.next())b.push(c.value);return b};
|
|
44
|
+
Fi=function(a,b){var c=a.map(function(d){return{startTime:d.startTime,endTime:d.endTime,key:d.value.key,value:d.value.data,Gi:!1}});c=Ri(c);b&&(c=Si(c));return new Set(Oi(c))};Ri=function(a){var b=new Set(a),c=new Set(a.filter(function(d){return"SCTE35-OUT"===d.key}).map(Ti));a.filter(function(d){return"SCTE35-IN"===d.key}).forEach(function(d){c.has(Ti(d))||(d.Gi=!0)});return Array.from(b.values())};Si=function(a){a.forEach(function(b){b.Gi&&(b.endTime=b.startTime,b.startTime=0)});return a};
|
|
45
|
+
Ti=function(a){return a.startTime+"-"+a.endTime};_.Ui=function(a){return Array.isArray(a)?a:[a]};Vi=function(a,b){return a===b?!0:a.length===b.length&&a.every(function(c,d){return c===b[d]})};Xi=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 Wi(a,b)&&Wi(b,a)};Wi=function(a,b){var c=new Set(a);return b.every(function(d){return c.has(d)})};
|
|
46
|
+
_.Yi=function(a,b){b=void 0===b?{}:b;if(b.Sh){for(var c=[],d={},e=_.w(a),f=e.next();!f.done;d={Ke:d.Ke},f=e.next())d.Ke=f.value,c.some(function(g){return function(h){return b.Sh(g.Ke,h)}}(d))||c.push(d.Ke);return c}return Array.from((new Set(a)).values())};Zi=function(a,b){var c=new Set(a),d=new Set(b);return{ko:a.filter(function(e){return!d.has(e)}),Cp:a.filter(function(e){return d.has(e)}),Tj:b.filter(function(e){return!c.has(e)})}};
|
|
47
|
+
_.fj=function(a,b,c,d){d=void 0===d?_.$i:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.aj;this.writingMode=_.bj;this.lineInterpretation=_.cj;this.line=null;this.lineAlign=_.dj;this.direction=ej;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null};
|
|
48
|
+
_.ij=function(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.gj;this.scroll=hj;this.cssClassList=[];this.writingMode=this.displayAlign=null};jj=function(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.vi;this.j=!1;this.g=new _.K("clpp.native.CueHandler")};
|
|
49
|
+
kj=function(a,b){var c=b.track;c.kind!==_.Ze&&(c.mode===_.jg&&(c.mode=_.Fe),a.a.on(c,_.be,function(d){d=d.target||d.srcElement;d.mode=_.Fe;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,lj(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.ga(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.O)};
|
|
50
|
+
lj=function(a,b,c,d){a=(a===_.P?"FATAL":"RECOVERABLE")+" Clpp-Error [Category "+b+" - Code "+c+"]";if(_.N.ga(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};_.mj=function(a,b){var c=Error.call(this,a);this.message=c.message;"stack"in c&&(this.stack=c.stack);this.code=b};
|
|
51
|
+
nj=function(a,b){var c=b||Vi,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,_.th(h))}};_.oj=function(a){return null!=a};pj=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 _.mj("No non-null, non-undefined value found");};
|
|
52
|
+
qj=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}};_.rj=function(a){var b;a instanceof _.rj?(sj(this,a.Gb),this.Tc=a.Tc,this.bb=a.bb,tj(this,a.Bd),this.Pa=a.Pa,_.uj(this,vj(a.a)),this.Hc=a.Hc):a&&(b=String(a).match(wj))?(sj(this,b[1]||"",!0),this.Tc=xj(b[2]||""),this.bb=xj(b[3]||"",!0),tj(this,b[4]),this.Pa=xj(b[5]||"",!0),_.uj(this,b[6]||"",!0),this.Hc=xj(b[7]||"")):this.a=new _.yj(null)};
|
|
53
|
+
sj=function(a,b,c){a.Gb=c?xj(b,!0):b;a.Gb&&(a.Gb=a.Gb.replace(/:$/,""))};tj=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Bd=b}else a.Bd=null};_.uj=function(a,b,c){b instanceof _.yj?a.a=b:(c||(b=zj(b,Aj)),a.a=new _.yj(b))};xj=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};zj=function(a,b,c){return typeof a===_.tg?(a=encodeURI(a).replace(b,Bj),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};
|
|
54
|
+
Bj=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.yj=function(a){this.f=a||null};vj=function(a){var b=new _.yj;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.h=a.h}return b};Dj=function(a,b){for(var c=_.w(Cj[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=_.w(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a===_.Q?"":null};
|
|
55
|
+
_.Fj=function(a,b){for(var c=Ej[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===_.Q?"":null};_.Ij=function(a,b,c){return a.map(function(d){d=_.Gj(d)||"";return(d=_.Hj[b][d])?d:b===_.Q?c&&"vtt"!==c?Xc:_.zg:null}).filter(Boolean)[0]||null};_.Gj=function(a){a=(new _.rj(a)).Pa.split(".");return 1>=a.length?null:a.pop()};_.Jj=function(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d};
|
|
56
|
+
_.S=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.O(_.P,4,4023,"Required attribute missing: "+b);return a?a.value:c||null};_.Kj=function(a,b){return _.S(a,b,void 0,{required:!0})};_.Lj=function(a,b){this.name=a;this.value=b};
|
|
57
|
+
_.Mj=function(a,b,c,d,e,f,g,h,l,m,n,p,q,u,v,z,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;u=void 0===u?[]:u;v=void 0===v?null:v;z=void 0===z?"":z;this.position=a;this.startTime=b;this.endTime=c;this.Ja=g;this.eb=d;this.Da=e;this.pa=f;this.keyInfo=(void 0===h?null:h)||null;this.qd=_.N.R(l)?!1:!!l;this.timescale=m;this.horizontalTiles=n;this.verticalTiles=p;this.durationPerTile=q;this.a=u||[];this.h=!1;this.initSegment=v;this.ye=z;this.Ta=A};
|
|
58
|
+
_.Nj=function(a,b,c,d,e,f,g,h,l,m,n,p,q,u,v){u=void 0===u?[]:u;_.Mj.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,u,void 0===v?null:v);this.oa=0};_.Pj=function(a,b){a=_.Oj(a);b=_.Oj(b);return a.split("-")[0]===b.split("-")[0]};_.Oj=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Qj.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};Rj=function(a){if(null!==a&&void 0!==a)return Number(a)};
|
|
59
|
+
Sj=function(a){return a.reduce(function(b,c){return b+c},0)};_.Tj=function(a){if(typeof a!==_.tg)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:{je:a,Ge:b,Go:a*b}};_.Uj=function(a,b){for(var c=_.w(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};Vj=function(){};
|
|
60
|
+
Zj=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(Wj(a)===Wj(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;for(var c=_.Xj(a),d=_.Xj(b),e=_.w(Yj(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!==d[f])return!1;return!0};_.Xj=function(a,b,c){c=void 0===c?Infinity:c;return ak(a,void 0===b?0:b,c,Uint8Array)};bk=function(a,b,c){c=void 0===c?Infinity:c;return ak(a,void 0===b?0:b,c,Uint16Array)};
|
|
61
|
+
ck=function(a,b,c){c=void 0===c?Infinity:c;return ak(a,void 0===b?0:b,c,Uint32Array)};_.dk=function(a,b,c){c=void 0===c?Infinity:c;return ak(a,void 0===b?0:b,c,Int32Array)};_.ek=function(a,b,c){c=void 0===c?Infinity:c;return ak(a,void 0===b?0:b,c,DataView)};fk=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};
|
|
62
|
+
ak=function(a,b,c,d){var e=d.BYTES_PER_ELEMENT||1,f=Wj(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)};Wj=function(a){return a instanceof ArrayBuffer?a:a.buffer};gk=function(){};_.ik=function(a,b){b=void 0===b?!0:b;var c=_.hk(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")};
|
|
63
|
+
_.jk=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};_.kk=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};_.lk=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};
|
|
64
|
+
_.mk=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};nk=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};_.hk=function(a){a=_.T.fromCharCode(_.Xj(a));return btoa(a)};_.ok=function(a){this.f=a;this.a=0};
|
|
65
|
+
_.pk=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
|
+
_.qk=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.O(_.P,4,4016,{invalidTag:b});var d=c[1],e=c[2];c=[];var f;if(e){e=new _.ok(e);var g;(g=_.pk(e,/^([^,=]+)(?:,|$)/g))&&g[1]&&(f=g[1].trim());for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=_.pk(e,h);)c.push(new _.Lj(g[1],g[2]||g[3]||""))}return new _.Jj(a,d,c,f)};_.sk=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:_.th(rk).concat()}};
|
|
67
|
+
tk=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||_.th(rk).concat()};uk=function(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b};
|
|
68
|
+
_.wk=function(a,b){_.N.ga(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});var c={uris:a.uris||[],type:a.type||_.vk,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:_.th(rk).concat(),requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&
|
|
70
|
+
tk(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(xk(c))return Ak(a);throw Bk(a);};xk=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=_.T.ce(a.data,!0)}catch(d){b=null}_.ai("HTTP error text:",b);var c=a.request;return new _.O(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.P: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.pj=this.Bf=this.done=!1;this.error=this.value=null;var a,b,c=new Promise(function(d,e){a=function(f){this.done=this.Bf=!0;this.value=f;d(f)};b=function(f){this.done=this.pj=!0;this.error=f;e(f)}});c.Bf=!1;c.done=!1;c.pj=!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)}))};_.Rk=function(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.Jk;this.a={};this.headers=new Map;this.l=0;this.a.data=Lk;!window.fetch||!window.AbortController||_.Mk(6)||_.Nk()&&68<_.Ok().browserVersion.major?(this.a.http=Pk,this.a.https=Pk):(this.a.http=Qk,this.a.https=Qk)};Sk=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return c=_.T,_.y(e,a.fetch(b),2);d=e.f;return e["return"](c.Si(c.da(d.data)))})};
|
|
75
|
+
Tk=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return _.y(e,Sk(a,b),2);c=e.f;try{d=JSON.parse(c);if(null==d||typeof d!==_.ff)throw Error("Not an object");return e["return"](d)}catch(f){throw new _.mj("Failed to parse JSON response","json-failed");}})};
|
|
76
|
+
Uk=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.F(2);break}e=_.wk(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";_.C(g,4);return _.y(g,a.fetch(e).T,6);case 6:_.Hh(g,2);break;case 4:if(f=_.E(g),1002===f.code||1003===f.code)return g["return"](!1);case 2:return g["return"](!0)}})};
|
|
77
|
+
Vk=function(a,b){for(var c=_.w(a.headers),d=c.next();!d.done;d=c.next()){var e=_.w(d.value);d=e.next().value;e=e.next().value;b.headers[d]||(b.headers[d]=e)}};Wk=function(a,b){var c=new _.rj(b.uris[b.uriIndex]),d=c.Gb;d||(d=location.protocol,d=d.slice(0,-1),sj(c,d),b.uris[b.uriIndex]=c.toString());var e=a.a[d];if(!e)throw new _.O(_.P,1,1E3,{url:c.toString()});return function(f){return e(f)}};
|
|
78
|
+
_.Xk=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=[]};_.Yk=function(a){return a&&a!==_.Lg?a:null};
|
|
79
|
+
bl=function(a){if(!a)throw new _.O(_.P,3,3101,mb+a);if(!_.N.ga(a))throw new _.O(_.P,3,3101,mb+a+". Track type must be a string!");switch(a.toLowerCase()){case _.Zk:return _.Zk;case _.U:return _.U;case _.$k:return _.$k;case al:return al}throw new _.O(_.P,3,3101,"Unknown track type: "+a+".");};
|
|
80
|
+
el=function(a,b){a=bl(a);var c=_.Yk(b.kind),d=b.id;d||(d=String(_.dl++));d=new _.Xk(d,c===_.Ze?al:a);d.kind=c;d.label=_.Yk(b.label);d.language=_.Yk(b.language);d.originalLanguage=b.originalLanguage||d.language;return d};fl=function(a){return"@@scheme:"+(a.scheme||"")+("@@value:"+a.value)+("@@id:"+(a.id||"")+"@@type:"+(a.type||""))+("@@protocol:"+(a.protocol||""))};_.gl=function(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Md=this.bandwidth=this.height=this.width=null;this.a=!1};
|
|
81
|
+
_.hl=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;_.T.startsWith(this.path,
|
|
82
|
+
"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash};_.il=function(a){return a.scheme+"//"+(a.a+(a.port?":"+a.port:"")+a.path+a.h+a.f)};_.jl=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)},""):""};
|
|
83
|
+
_.kl=function(a){var b={};a=a||"";a=a.substring(a.indexOf("?")+1);a=_.w(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};ll=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};
|
|
84
|
+
ml=function(a){this.f=a;this.g=new _.K("clpp.native.hls.HlsMetadataParser");this.a=nj(this.h.bind(this),function(b,c){return b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata})};
|
|
85
|
+
pl=function(a,b,c){var d,e,f,g,h;return _.I(function(l){if(1==l.a)return _.y(l,nl(a,b,c),2);d=l.f;e=d.mimeType;f=d.renditions;g=new _.Xk("dummy",_.$k);h=f.map(function(m,n){var p=new _.gl("R"+n,g);p.bandwidth=m.bandwidth;p.Md=m.Md;p.codec=m.codec;p.width=m.width;p.height=m.height;return p});ol(h);return l["return"]({renditions:h,mimeType:e||void 0})})};
|
|
86
|
+
rl=function(a){a=a.split("\n").filter(function(c){return c.trim().startsWith("#EXT-X-MEDIA:")}).map(function(c){return ql(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};
|
|
87
|
+
ql=function(a){function b(d){return(d=c.getAttribute(d))?d.value:void 0}var c=_.qk(0,a);a=b(_.$b);a=null!=a?{AUDIO:_.U,VIDEO:_.$k,SUBTITLES:_.Zk}[a]:void 0;return{type:a,groupId:b(_.fb),name:b(_.wb),language:b(_.pb),ip:b("AUTOSELECT"),"default":b("DEFAULT"),tp:b("FORCED"),yh:b("CHARACTERISTICS"),uri:b(_.bc)}};ol=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.");};
|
|
88
|
+
sl=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return c=_.wk(b),_.y(e,Sk(a.f,c),2);d=e.f;return e["return"](d)})};nl=function(a,b,c){var d,e,f,g;return _.I(function(h){if(1==h.a)return d=tl(b),e=ul(b,c),f=d[0]?d[0].codec:null,_.y(h,vl(a,e,f),2);g=h.f;return h["return"]({mimeType:g,renditions:d})})};vl=function(a,b,c){var d,e;return _.I(function(f){if(1==f.a)return b&&c?_.y(f,sl(a,b),2):f["return"](null);d=f.f;e=[wl(d,b),xl(d,b)].filter(Boolean);return f["return"](_.Ij(e,_.r,c))})};
|
|
89
|
+
tl=function(a){return a.split("\n").filter(function(b){return b.trim().startsWith("#EXT-X-STREAM-INF:")}).map(function(b){var c=_.qk(0,b);if(c.getAttribute(_.ic))throw Error("Playlist contains alternative video streams.");var d=_.S(c,_.Qb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.S(c,_.pa);e=e?Number(e):null;var f=_.S(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.S(c,_.ta);c=_.Fj(_.r,c?c.split(","):[]);return{bandwidth:e,Md:f,codec:c,width:b,height:d,mimeType:null}})};
|
|
90
|
+
ul=function(a,b){var c=a.split("\n").filter(function(d){return d.trim().endsWith(".m3u8")})[0];return c?ll(c,b):null};wl=function(a,b){var c=a.split("\n").find(function(d){return!d.startsWith("#")&&0<d.trim().length});return c?ll(c,b):null};xl=function(a,b){var c=a.split("\n").find(function(d){return d.startsWith("#EXT-X-MAP:")});return c?(c=_.S(_.qk(0,c),_.bc))?ll(c,b):null:null};_.zl=function(a,b,c){for(var d=_.w(_.yl),e=d.next();!e.done;e=d.next())if(e=e.value,e.probe(b,c))return e.create(a);return null};
|
|
91
|
+
_.Al=function(a){a=_.yl.indexOf(a);0<=a&&_.yl.splice(a,1)};_.Bl=function(){};El=function(a,b){var c=Cl;Dl.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,plugin:b})};_.Il=function(a,b){for(var c=_.w([Fl,Gl,Hl,Cl]),d=c.next();!d.done;d=c.next())if(d=Dl.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};_.Jl=function(a,b){var c=a;b&&(c+=';codecs\x3d"'+b+'"');return c.replace(/\s/g,"")};_.Kl=function(a){return a.split(";")[0]};
|
|
92
|
+
_.Ll=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(","):""};Ml=function(){};_.Nl=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Mk=function(a){return _.Ol("Tizen"+(a?" "+String(a):""))};_.Nk=function(){return _.Ol("Web0S")};_.Ql=function(){return _.Nk()&&79===_.Pl().major};_.Rl=function(){return _.Ol("CrKey")};
|
|
93
|
+
_.Sl=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Mk()};_.Tl=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Sl()&&1<navigator.maxTouchPoints};_.Ul=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};_.Ol=function(a){return(navigator.userAgent||"").includes(a)};
|
|
94
|
+
Xl=function(){if(Vl)return Vl;Wl||(Wl=new _.li(function(){Vl=null}));(Vl=document.querySelector(_.r)||document.querySelector(_.cd))||(Vl=document.createElement(_.r));Wl.fa(1);return Vl};Zl=function(a,b){try{return parseInt(b,10)}catch(c){Yl.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};
|
|
95
|
+
$l=function(a){var b={major:-1,name:_.Ng};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Zl(a,c[0]));2<=c.length&&(b.minor=Zl(a,c[1]));3<=c.length&&(b.patch=Zl(a,c[2]));4<=c.length&&(b.build=Zl(a,c[3]));return b};am=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};
|
|
96
|
+
km=function(){var a=bm();if(!a)return cm;var b=a.match(/^.+?(?=\))/);if(!b)return cm;b=b[0];if(am(b,["iphone","ipad"]))return dm;if(am(b,["android"]))return em;if(am(b,["macintosh"]))return fm;if(am(b,["windows nt"]))return gm;if(am(b,["tizen"]))return hm;if(am(b,["web0s"]))return im;if(am(b,["linux"]))return jm;Yl.warn("Unable to identify OS from user agent: "+a);return cm};
|
|
97
|
+
_.Pl=function(){var a=bm(),b=["ie","edge","opera","firefox","safari",zd];var c=km();for(var d=lm[c],e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return $l(c[1]);return $l("")};bm=function(){var a=window.navigator.userAgent;return a=a.toLowerCase()};
|
|
98
|
+
_.Ok=function(){var a=km();var b=km();var c=lm[b];if(c){c=bm().match(c.os_version)[1];c=$l(c);if(b===gm)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=$l("");a:{c=bm();var d=["ie","edge","opera","firefox","safari",zd],e=km();e=lm[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=mm}return{os:a,osVersion:b,browser:c,browserVersion:_.Pl()}};
|
|
99
|
+
nm=function(){this.g=new _.K("clpp.native.TrackManager");this.m=null;this.f=new _.vi;this.h=[];this.B=0;this.o={};this.C=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.J=this.Dg.bind(this,_.Zk);this.L=this.Fg.bind(this,_.Zk);this.K=this.Eg.bind(this,_.Zk);this.M=this.Dg.bind(this,_.$k);this.U=this.Fg.bind(this,_.$k);this.P=this.Eg.bind(this,_.$k);this.G=this.Dg.bind(this,_.U);this.I=this.Fg.bind(this,_.U);this.H=this.Eg.bind(this,_.U);this.j=null};
|
|
100
|
+
pm=function(a,b){var c,d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){c=a.m.getConfiguration();d=_.zl(c,b.mimeType,_.zg);if(!d)return a.g.warn("Track MIME type is not supported",b),n["return"]();e=_.wk(b.url);return _.y(n,a.m.getNetworkEngine().fetch(e).T,2)}(f=n.f)&&f.data&&(g="External_"+a.B++,a.o[g]=b,h=d.a(_.Xj(f.data)),l=URL.createObjectURL(new Blob([h])),m={url:l,kind:b.kind,language:b.language,label:b.label,mimeType:_.zg},om(a,m,g));_.B(n)})};rm=function(a,b,c){return qm(a)&&b===_.$k&&!!c.enableHlsVideoTrackInfo};
|
|
101
|
+
sm=function(a,b,c){return qm(a)&&(b===_.U||b===_.Zk)&&!!c.enableMetadata};qm=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.tm&&!a.url.endsWith(".m3u8"))&&_.Sl()};um=function(a,b,c){var d,e;return _.I(function(f){if(1==f.a)return(d=a.m.getLoadedSource())&&a.j?_.y(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}));_.B(f)})};
|
|
102
|
+
vm=function(a,b,c){var d,e,f,g;return _.I(function(h){if(1==h.a)return(d=a.m.getLoadedSource())&&a.j?_.y(h,a.j.a(d.url,c),2):h["return"]();e=h.f;e.Pc&&(f=b.type+":"+b.label,(g=e.Pc.get(f))&&g.yh&&(b.accessibility=g.yh.split(",").map(function(l){return l.trim()}).map(function(l){return{value:l,type:b.type,protocol:"HLS"}})));_.B(h)})};
|
|
103
|
+
om=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);_.T.empty(b.url)?e.src=URL.createObjectURL(new Blob([])):e.src=b.url;d.appendChild(e);a.C.push(e)}}};wm=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 _.U:return c.audioTracks;case _.$k:return c.videoTracks;case _.Zk:return c.textTracks;default:return null}};
|
|
104
|
+
xm=function(a,b){var c=wm(a,b);c&&(c=Array.from(c),b===_.Zk&&(c=c.filter(function(d){return d.kind!==_.Ze})));return c};ym=function(a,b){return a.h.filter(function(c){return c.type===b})};zm=function(a,b){var c=a.a.get(b)||null;return c&&c.renditions[0]};Am=function(a,b){var c=a.l.get(b);return c&&c.renditions[0]};
|
|
105
|
+
Cm=function(a,b,c){var d=xm(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 _.Zk:var g="mode";e=_.jg;f=_.ee;break;case _.U:g="enabled";break;case _.$k:g="selected"}if(g){d=_.w(d);for(var h=d.next();!h.done;h=d.next())h=h.value,h[g]=Bm(c,h,c.type)?e:
|
|
106
|
+
f}}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&d&&b===_.Zk){g=_.w(d);for(h=g.next();!h.done;h=g.next())h.value.mode=_.ee;a.a.set(b,null)}b===_.U?a.m.trigger(new _.L(_.jd)):b===_.Zk&&a.m.trigger(new _.L(_.Bg))};Dm=function(a){return a.enabled||a.selected||a.mode===_.jg||a.mode===_.Fe};
|
|
107
|
+
Em=function(a,b,c){c=_.Ui(c).filter(function(e){return e});a.g.info("Find preferred tracks for",b,c);var d=ym(a,b);c.some(function(e){var f=_.Oj(e);return(e=d.find(function(g){g=_.Oj(g.language||"");return _.Pj(f,g)}))?(a.g.info("Will select track with id",e.id),Cm(a,b,e),!0):!1})};Fm=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};
|
|
108
|
+
Bm=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.N.qa(a,{kind:_.Yk(b.kind),language:_.Yk(b.language),label:_.Yk(b.label)},["kind","language","label"])};_.Gm=function(a,b){this.length=(this.f=a)?a.length:0;this.a=[];this.type=void 0===b?"total":b};_.Hm=function(){this.ae=new ui(this);this.Yd=[]};Jm=function(a){return a.name===Fb&&Im.some(function(b){return a.message.startsWith(b)})};Km=function(){};
|
|
109
|
+
_.Om=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Tl()&&(a=360);var b=_.sk();b.maxAttempts=3;a={source:"",license:Lm,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.sk(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
|
|
110
|
+
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Mm(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.sk()},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.Ve,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,
|
|
111
|
+
xmlParser:_.Nm,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,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,
|
|
112
|
+
chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.Tf},restrictions:Mm(),tizen:{sideStreamText:_.Mk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.ce,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.jc,cropTimeline:!1},
|
|
113
|
+
yospace:{enabled:!1}};if(_.Mk()||_.Nk())a.ads.hls.enable=!1;if(_.Ol("Edge/")||_.Mk())a.streaming.gapDetectionThreshold=.5;_.Nk()&&(a.streaming.stallEnabled=!1);_.Ql()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Mk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};
|
|
113
114
|
return a};
|
|
114
|
-
_.
|
|
115
|
-
c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));c=_.N.
|
|
116
|
-
!_.N.
|
|
117
|
-
if(!_.N.R(c.drm)){if(c.drm.env&&!_.N.
|
|
118
|
-
7,7100,"config.streaming.bufferingGoal is not a number");if(!_.N.xa(d.rebufferingGoal)||_.N.isNaN(d.rebufferingGoal))throw new _.
|
|
119
|
-
7,7100,"config.streaming.smallGapLimit is not a number");if(!_.N.xa(d.durationBackoff)||_.N.isNaN(d.durationBackoff))throw new _.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
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 _.
|
|
123
|
-
_.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
_.
|
|
128
|
-
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.
|
|
129
|
-
|
|
130
|
-
_
|
|
131
|
-
serverCertificate:void 0===f?g.serverCertificate:null===f?null:typeof f===_.
|
|
132
|
-
return c};_.
|
|
133
|
-
_.
|
|
134
|
-
_.
|
|
135
|
-
_.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
_.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
_.
|
|
143
|
-
a=["assetId","variantId"];b.f=_.
|
|
144
|
-
|
|
145
|
-
_.
|
|
146
|
-
_.T.
|
|
147
|
-
_.
|
|
148
|
-
_.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
(d.audioCapabilities.push(l),g=!0));if(e.videoCapabilities)for(e=_.w(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,_.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
c=_.T.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this.a)&&(h.push(m),e=!0));l||(e=b.canPlayType(_.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
a.f=null}})).
|
|
164
|
-
|
|
165
|
-
_.
|
|
166
|
-
_.
|
|
167
|
-
e=_.
|
|
168
|
-
_.
|
|
169
|
-
_
|
|
170
|
-
e=_.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
_.
|
|
115
|
+
_.Qm=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];if(!b)return _.Om();c=[_.Om()];var d=!1;b=_.w(b);for(var e=b.next();!e.done;e=b.next())e=e.value,null!==e&&void 0!==e&&(_.N.ga(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&&
|
|
116
|
+
c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));c=_.N.ua.apply(null,c);_.N.ga(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(_.P,7,7100,"config.volume is not a number");if(!_.N.R(c.preferredTextLanguage)&&!_.N.ga(c.preferredTextLanguage)&&!Array.isArray(c.preferredTextLanguage))throw new _.O(_.P,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.N.R(c.preferredAudioLanguage)&&
|
|
117
|
+
!_.N.ga(c.preferredAudioLanguage)&&!Array.isArray(c.preferredAudioLanguage))throw new _.O(_.P,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.N.R(c.preferredAudioCodec)&&!_.N.ga(c.preferredAudioCodec)&&!Array.isArray(c.preferredAudioCodec))throw new _.O(_.P,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.N.R(c.preferredVideoCodec)&&!_.N.ga(c.preferredVideoCodec)&&!Array.isArray(c.preferredVideoCodec))throw new _.O(_.P,7,7100,"config.preferredVideoCodec is not a string or an array");
|
|
118
|
+
if(!_.N.R(c.drm)){if(c.drm.env&&!_.N.ga(c.drm.env))throw new _.O(_.P,7,7100,"config.drm.env is not a string");if(c.drm.offlineId&&!_.N.ga(c.drm.offlineId))throw new _.O(_.P,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(_.P,
|
|
119
|
+
7,7100,"config.streaming.bufferingGoal is not a number");if(!_.N.xa(d.rebufferingGoal)||_.N.isNaN(d.rebufferingGoal))throw new _.O(_.P,7,7100,"config.streaming.rebufferingGoal is not a number");if(d.rebufferingGoal>d.bufferingGoal)throw new _.O(_.P,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.N.xa(d.bufferBehind)||_.N.isNaN(d.bufferBehind))throw new _.O(_.P,7,7100,"config.streaming.bufferBehind is not a number");if(!_.N.xa(d.smallGapLimit)||_.N.isNaN(d.smallGapLimit))throw new _.O(_.P,
|
|
120
|
+
7,7100,"config.streaming.smallGapLimit is not a number");if(!_.N.xa(d.durationBackoff)||_.N.isNaN(d.durationBackoff))throw new _.O(_.P,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(_.P,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Pm(c.restrictions);Pm(c.abr.restrictions);c.abr.initialRestrictions&&Pm(c.abr.initialRestrictions)}return c};
|
|
121
|
+
Mm=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}};
|
|
122
|
+
Pm=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);
|
|
123
|
+
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(_.P,7,7100,"Restrictions contain NaN");};Rm=function(a){return typeof a===_.ff&&!Array.isArray(a)&&"source"in a};
|
|
124
|
+
_.Sm=function(a){_.Hm.call(this);this.log=new _.K(a);this.configuration=this.kb=_.Om();this.ba=this.G=null;this.qe=this.Pg=!1;this.kh=new _.K("clpp.video.events");this.Nd=null;this.ff=-1;this.Gj=this.io.bind(this);this.Lg=new _.Rk;this.P=new _.vi;this.Kg=this.cd=this.sd=this.U=null};_.Um=function(a){return _.Tm.get(a)||null};_.Wm=function(a){_.Tm.get(a.id())?Vm.warn("Component already in use."):_.Tm.set(a.id(),a)};
|
|
125
|
+
Xm=function(a){return Array.from(_.Tm.values()).find(function(b){return b instanceof a})||null};Ym=function(a){for(var b=_.w(_.Tm.values()),c=b.next();!c.done;c=b.next())a(c.value)};Zm=function(a){Ym(function(b){b.o(a)})};$m=function(a){Ym(function(b){b.h(a)})};an=function(){Ym(function(){})};bn=function(){Ym(function(){})};cn=function(a){if(null!==Xm(a))return null;a=new a;a.f();_.Wm(a);Vm.info("Installed component:",a.id());return a};
|
|
126
|
+
dn=function(a){if(a=Xm(a))a.a(),_.Tm["delete"](a.id()),Vm.info("Uninstalled component:",a.id())};en=function(){this.a=this.f=null;this.g=new _.K("clpp.drm.csl")};fn=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[lh]=a.f),a.a&&(b.headers[mh]=a.a))};
|
|
127
|
+
gn=function(a,b){if(b.request&&3===b.request.type){a.f=b.headers[lh];a.a=b.headers[mh];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(_.T.da(_.jk(c))),{delay:c.renewalPeriod,ep:{maxAttempts:c.retryCount,baseDelay:1E3*c.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}}return null};_.jn=function(a){_.hn[a.J]=a};
|
|
128
|
+
_.ln=function(a){var b={attemptParameters:_.sk(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Sa:{},widevineVersion:_.Xd};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!==
|
|
129
|
+
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.tg&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){var c=_.hn[a.env]||null;if(!c)throw _.ai(_.Da,_.Nb+a.env+_.aa),new _.O(_.P,6,6015,_.Ea+a.env+"' is missing.");b.Sa=_.kn(c,a.customData)||{};_.T.startsWith(a.env.toLowerCase(),te)&&(b.enforceSingleSession=!0)}return b};
|
|
130
|
+
nn=function(a){a=mn[a];if(!a)return null;var b=_.Ok();return b.os===em&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};_.on=function(a){this.J=a;this.f={}};
|
|
131
|
+
_.kn=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[_.Xd];g&&(c[_.Xd]={licenseUrl:g.licenseUrl,videoRobustness:qj(d,g.videoRobustness),audioRobustness:qj(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:pj(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:pj(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1),
|
|
132
|
+
serverCertificate:void 0===f?g.serverCertificate:null===f?null:typeof f===_.tg?nn(f):f});(g=a.f[_.Sd])&&(c[_.Sd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;e=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Vd])&&(c[_.Vd]={licenseUrl:g.licenseUrl,videoRobustness:d||g.videoRobustness,audioRobustness:e||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});
|
|
133
|
+
return c};_.pn=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};_.rn=function(a,b,c){var d=c||0;c=b.byteLength-d;var e=_.Xj(a.f.buffer);b=_.Xj(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.qn()}};_.W=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.qn()}};_.qn=function(){throw new _.O(_.P,3,3E3);};_.sn=function(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0};_.tn=function(a){return a.a<a.f.byteLength};
|
|
134
|
+
_.vn=function(a){try{var b=a.f.getUint8(a.a);a.a+=1;return b}catch(c){_.un()}};_.wn=function(a){try{var b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(c){_.un()}};_.xn=function(a){try{var b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(c){_.un()}};_.yn=function(a){try{var b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(c){_.un()}};
|
|
135
|
+
_.zn=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){_.un()}if(2097151<c)throw new _.O(_.P,3,3001);a.a+=8;return c*Math.pow(2,32)+b};An=function(a,b){for(var c=new Uint8Array(b),d=0;d<b;d++)c[d]=_.vn(a);return c};_.Bn=function(a,b){a.a+b>a.f.byteLength&&_.un();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.Xj(c)};
|
|
136
|
+
_.un=function(){throw new _.O(_.P,3,3E3,"Buffer read out of bounds.");};_.Cn=function(){this.h=[];this.f=[];this.a=!1;this.g=new _.K("clpp.mp4")};_.Dn=function(a){for(;_.tn(a.reader)&&!a.parser.a;)a.parser.yf(a.start+a.headerSize,a.reader,a.partialOkay)};_.En=function(a){for(var b=_.xn(a.reader);0<b&&!a.parser.a;--b)a.parser.yf(a.start+a.headerSize,a.reader,a.partialOkay)};_.Fn=function(a){return function(b){var c=b.reader.Wa()-b.reader.getPosition();a(_.Bn(b.reader,c))}};
|
|
137
|
+
Gn=function(a){for(var b=0,c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Hn=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.In=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Kn=function(){};Ln=function(a){var b="";try{b=_.T.ce(a)}catch(c){}return b};_.Mn=function(a){a=Ln(a);var b="";a.length&&(b=(new _.hl(a)).a);return b};
|
|
138
|
+
Nn=function(a){if(!a)return null;var b=null;try{var c=JSON.parse(_.T.da(a)),d=_.jk(c.sinf[0]);(new _.Cn).N(_.mg,_.Dn).N("schi",_.Dn).N("tenc",function(e){e.reader.skip(6);_.vn(e.reader)&&(e.reader.skip(1),b=_.lk(_.Bn(e.reader,16)));e.parser.stop()}).parse(d)}catch(e){}return b};
|
|
139
|
+
On=function(a,b,c){if(!c||!c.byteLength)throw new _.O(_.P,6,6102);var d;typeof b===_.tg?d=_.T.Ef(b,!0):d=b;a=_.T.Ef(Ln(a),!0);b=new _.pn(12+a.byteLength+d.byteLength+c.byteLength,!0);_.W(b,a.byteLength);_.rn(b,_.Xj(a));_.W(b,d.byteLength);_.rn(b,_.Xj(d));_.W(b,c.byteLength);_.rn(b,_.Xj(c));return _.Xj(b.buffer)};_.Pn=function(a){var b=_.Xj(a.body);b=_.ik(b);a.headers[Ba]=bd;a.body=_.T.ib("spc\x3d"+b).buffer};
|
|
140
|
+
_.Qn=function(a){try{var b=_.T.da(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=fk(_.jk(b))};
|
|
141
|
+
Wn=function(){var a=Rn;if(a===Sn)return"https://lic.drmtoday.com";if(a===Tn)return"https://lic.staging.drmtoday.com";if(a===Un)return"https://lic-demo.staging.drmtoday.com";if(a===Vn)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};$n=function(a){var b=Wn();if(a===_.Xd)return b+Xn;if(a===_.Vd)return b+Yn;if(a===_.Sd)return b+Zn;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
|
|
142
|
+
ao=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
|
|
143
|
+
_.co=function(a,b,c){b=Ln(b);c=c&&c.customData?c.customData:{};b=new _.hl(ao(b));var d=_.kl(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.T.pf(""+a)&&(d.assetId=a,bo.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.T.pf(""+e)&&(d.variantId=e,bo.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],bo.debug("KeyId found in FPS SKD. Removing other parameters")):
|
|
144
|
+
a=["assetId","variantId"];b.f=_.jl(d,!1,a);"/"!==b.path||b.j.includes(b.a+"/")||(b.path="");b=_.il(b);return c.fpsContentId=b};_.fo=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(Ga)?c.customData&&(_.eo(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)):bo.warn(xb)};
|
|
145
|
+
go=function(a,b,c){_.fo(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.rj(b.uris[0]);c.a.add(_.sf,a);b.uris[0]=c.toString()};
|
|
146
|
+
_.ho=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.fo(a,b,c,!1);b.headers[Ba]=bd;c={spc:_.hk(b.body)};if((a=a.drm)&&a.env.startsWith(Ha)&&d){a={};var e=_.kl((new _.hl(ao(d))).f);d=e.keyId;if(e=e.assetId)bo.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(bo.info("Applying keyId from HLS manifest."),a.keyId=d);a.keyId&&(bo.info("Adding keyID to FPS payload:",a.keyId),c.keyId=a.keyId);a.assetId&&(bo.info("Adding assetID to FPS payload:",a.assetId),c.assetId=a.assetId)}b.body=
|
|
147
|
+
_.T.Dd(_.jl(c,!0))};_.io=function(a,b){bo.debug("Clearing response data");if(200===b.status){var c=_.T.da(b.data).trim();"\x3cckc\x3e"===c.substr(0,5)&&"\x3c/ckc\x3e"===c.substr(-6)&&(c=c.slice(5,-6));b.data=_.jk(c).buffer}};_.jo=function(a,b){var c=a.drm;if(!c||!c.env.startsWith(Ga))bo.warn(xb);else if(c.customData&&c.customData.merchant&&!c.env.startsWith(Ha)){var d=new _.rj(b.uris[0]),e=d.Pa;e.endsWith("/")||(e+="/");e+=c.customData.merchant;d.Pa=e;b.uris[0]=d.toString()}};
|
|
148
|
+
_.ko=function(a,b){try{var c=_.Xj(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));bo.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){bo.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
|
|
149
|
+
_.eo=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.Kc(d)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(d)));(c=c.customData.authToken)&&(a.headers["x-dt-auth-token"]=c)}};mo=function(a){var b={},c=a?a[nh]:void 0;a=lo[a?a[nh]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
|
|
150
|
+
no=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 bo.warn("Unable to parse DRMtoday License Info header (x-dt-li)",c),null}};_.oo=function(a){this.f=a;this.a=void 0};po=function(){this.size=0;this.a=void 0;this.g=new _.K("clpp.drm.eme.MediaKeyStatusMap")};qo=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
|
|
151
|
+
so=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ro.value().get(b),c.one(a,b,d))};to=function(){this.a=this.f=null};
|
|
152
|
+
uo=function(a,b){this.keySystem=a;if(a.startsWith(_.Sd))for(var c=_.w(b),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.persistentState===_.ag)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:_.of,distinctiveIdentifier:_.of,initDataTypes:e.initDataTypes,sessionTypes:[yg],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=_.w(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])&&
|
|
153
|
+
(d.audioCapabilities.push(l),g=!0));if(e.videoCapabilities)for(e=_.w(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,_.Yg));d=g?d:null}if(d){this.a=d;return}}c=Error(fc);c.name=Gb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;};
|
|
154
|
+
vo=function(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.vi;this.j=0;this.g=new _.K(Hd);this.g.info("Created Media Keys for "+a)};
|
|
155
|
+
wo=function(a,b){a.f=b;_.yi(a.a);if(!b)return Promise.resolve();a.a.on(b,we,function(c){_.ai("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,jh,function(c){a.g.debug("Handle webkitNeedKey event");c=_.Xj(c.initData);if(_.ek(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");
|
|
156
|
+
c=_.T.Ic(c.subarray(4),!0);c=_.T.ib(c);var d=new Event(we);d.initDataType="skd";d.initData=fk(c);a.f.dispatchEvent(d)});so(b,HTMLMediaElement.HAVE_METADATA,a.a,function(){return b.webkitSetMediaKeys(a.h)});return Promise.resolve()};xo=function(a,b){_.Hm.call(this);this.a=null;this.o=a;this.f=this.h=null;this.j=new _.vi;this.sessionId=b;this.expiration=NaN;this.closed=new _.Gk;this.l=!1;this.keyStatuses=new po;this.g=new _.K(Hd)};yo=function(a,b){qo(a.keyStatuses,b);a.dispatchEvent(new _.L(Je))};
|
|
157
|
+
zo=function(){};Ao=function(){this.a=null;this.g=new _.K("clpp.drm.eme.StandardEmeManager")};Bo=function(){};Co=function(){this.f=this.a=null;this.h="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.h="webkit")};
|
|
158
|
+
Do=function(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.pf&&(this.a=fh,a=!1);var e=!1;d=_.w(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=_.w(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=_.w(f.videoCapabilities),n=g.next();!n.done;n=g.next())m=n.value,m.contentType&&(l=!0,b.canPlayType(m.contentType,
|
|
159
|
+
this.a)&&(h.push(m),e=!0));l||(e=b.canPlayType(_.Yg,this.a)||b.canPlayType("video/webm",this.a));f.persistentState!==_.ag||a||(e=!1);if(e){this.f=f;return}}b=fc;if(c===_.pf||c===_.Xd)b="None of the requested configurations were supported.";c=Error(b);c.name=Gb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;};Eo=function(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.vi;this.j=[];this.l=new Map};
|
|
160
|
+
No=function(a,b){a.a=b;_.yi(a.f);b&&(a.f.on(b,a.h+"needkey",function(c){var d=new Event(we);d.initDataType=_.vd;d.initData=fk(c.initData);a.a.dispatchEvent(d)}),a.f.on(b,a.h+"keymessage",function(c){var d=Fo(a,c.sessionId);if(d){var e=void 0===d.keyStatuses.getStatus();c=new _.L(_.Ye,{messageType:e?Me:Le,message:c.message});_.ai("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);d.dispatchEvent(c)}else _.bi("Session not found",c.sessionId)}),a.f.on(b,a.h+"keyadded",function(c){(c=
|
|
161
|
+
Fo(a,c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",function(c){var d=Fo(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?Mo(d,_.qf):1===e?Mo(d,"expired"):Mo(d,_.Ie))}}))};
|
|
162
|
+
Fo=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};Oo=function(a,b,c,d){_.Hm.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 po};
|
|
163
|
+
Qo=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if(a.l===_.tf)if(c)var d=_.Xj(_.T.ib("LOAD_SESSION|"+c));else{var e=_.T.ib("PERSISTENT|"),f=new Uint8Array(e.byteLength+b.byteLength);f.set(e,0);f.set(_.Xj(b),e.byteLength);d=f}else d=_.Xj(b)}catch(h){return Promise.reject(h)}a.f=new _.Gk;var g=Po(a,"generateKeyRequest");try{a.j[g](a.h,d)}catch(h){if(h.name!==nb)return a.f=null,Promise.reject(h);(new _.li(function(){try{a.j[g](a.h,d)}catch(l){a.f.reject(l),
|
|
164
|
+
a.f=null}})).fa(.01)}return a.f};Ro=function(a,b,c){if(a.a)a.a.then(function(){return Ro(a,b,c)})["catch"](function(){return Ro(a,b,c)});else{a.a=b;if(a.h===fh){var d=_.T.da(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=_.jk(e.keys[0].k);e=_.jk(e.keys[0].kid)}else d=_.Xj(c),e=null;var f=Po(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};Mo=function(a,b){qo(a.keyStatuses,b);a.dispatchEvent(new _.L(Je))};
|
|
165
|
+
Po=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};So=function(){};To=function(){};Uo=function(){};Vo=function(){};Yo=function(a,b){var c=Wo;if(a){var d=c.find(function(e){return e.a()===a});if(d)return Xo.info(nc+d.a()),d.create();Xo.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(function(e){return e.a()===b})))return Xo.info(nc+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");Xo.info(nc+c.a());return c.create()};
|
|
166
|
+
_.Zo=function(){};$o=function(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c};ap=function(){$o.apply(this,arguments)};_.cp=function(a){var b=_.kk(a);b=parseInt(b.byteLength,10).toString(16);b=_.kk("12"+b+a);return new ap(bp,a,b)};
|
|
167
|
+
_.dp=function(a){function b(u){switch(u){case 0:do if(!_.tn(d))throw Error("not enough data to skip!");while(_.vn(d)&128);break;case 1:d.skip(8);break;case 2:d.skip(c());break;case 3:for(;4!==(u=c()&7);)b(u);break;case 5:d.skip(4);break;default:throw Error("invalid wire type "+u);}}function c(){for(var u=_.vn(d),v=(u&127)>>>0,z=7;128<=u&&28>=z;)u=_.vn(d),v=(v|(u&(28>z?127:15))<<z)>>>0,z+=7;return 28<z?-1:v}var d=new _.sn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.xn(d);var e=_.xn(d);
|
|
168
|
+
e=_.Hn(e);var f=_.xn(d),g=f>>>24;f&=16777215;var h=_.Bn(d,16);h=_.lk(h);if(0<g){var l=_.xn(d);d.skip(16*l)}l=_.xn(d);for(var m=[],n=null;_.tn(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=An(d,q);2===p?m.push(q):4===p&&(n=q)}else b(q)}_.ai("Parsed WV PSSH Box","size",a,"name",e,Ug,g,"flags",f,"size",l,"systemId",h,"contentId (base64)",n?_.hk(n):"","keyIds",m.map(function(u){return _.lk(u)}));return 0<m.length?_.cp(_.lk(m[0])):null};
|
|
169
|
+
_.ep=function(a,b,c,d,e,f){f=void 0===f?null:f;$o.call(this,a,b,d);this.version=e;this.h=c;this.l=f};
|
|
170
|
+
_.kp=function(a){var b=_.fp;a:{var c=new _.sn(new DataView(a.buffer),!0);_.xn(c);for(_.wn(c);_.tn(c);)if(1===_.wn(c)){var d=_.wn(c);c=_.Bn(c,d);break a}c=null}c||(c=a);a=_.T.Ic(c,!0);d=b.we(a,"WRMHEADER");a=d.getAttribute(Ug)||"";d=b.Ma(d,"DATA");var e=b.Ma(d,"LA_URL");b=e?b.sa(e):"";e=_.fp;var f=e.Ma(d,"KID");if(f)if(f=e.sa(f)){var g=e.Ma(d,ra);e=g?e.sa(g):null;e={value:f,Zf:e}}else e=null;else e=null;d=e?[e]:(e=gp(d))?[e]:(d=hp(d))?d:null;e=d&&d[0]||{};d=e.Zf;e=_.jk(void 0===e.value?"":e.value);
|
|
171
|
+
e=_.ip(e);e=_.lk(e);return new _.ep(_.jp,e,b,c,a,d)};_.ip=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=_.Xj(a);a.set(b,0);return a};gp=function(a){var b=_.fp;a=b.Ma(a,"PROTECTINFO");if(!a)return null;var c=b.Ma(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(ra);c=c.getAttribute("ALGID");return{value:b,Zf:a,Vj:c}};
|
|
172
|
+
hp=function(a){var b=_.fp;a=b.Ma(a,"PROTECTINFO");if(!a)return null;a=b.Ma(a,"KIDS");if(!a)return null;a=b.Z(a,"KID");if(!a.length)return null;b=[];a=_.w(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;if(c=d.getAttribute("VALUE")){var e=d.getAttribute(ra);d=d.getAttribute("ALGID");b.push({value:c,Zf:e,Vj:d})}}return b.length?b:null};_.mp=function(a){lp&&performance.mark(a)};
|
|
173
|
+
_.op=function(a,b,c){lp&&(b=performance.measure(a,b,c),null!=b&&np.info('Step: "'+a+'" took '+b.duration.toFixed(0)+" ms."))};pp=function(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Cn).aa("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.Wh("No pssh box found!")};
|
|
174
|
+
_.tp=function(a,b){var c=this;this.D=a;this.Zb=b;this.K=new Set;this.C=this.J=this.l=null;this.ca=!1;this.a=null;this.L=qp;this.B=new _.vi;this.P=new en;this.h=new Map;this.M=[];this.I=new _.Gk;this.Lb=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.ja=new Map;this.ea=new _.li(function(){return rp(c)});this.j=!1;this.Ea=new _.Gk;this.H=!1;this.ha=[];this.kb=!1;this.Y=0;this.g=new _.K("clpp.drm.DrmEngine");this.ya=(new _.li(function(){sp(c)})).Kb(1);this.I["catch"](function(){});
|
|
174
175
|
this.A=this.G=!1;this.U=null};
|
|
175
|
-
|
|
176
|
-
if(2!=m.a)return _.
|
|
177
|
-
_.
|
|
178
|
-
|
|
179
|
-
periodId:null})}if(e=
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
_.
|
|
184
|
-
(c=
|
|
185
|
-
throw e;}})};_.
|
|
186
|
-
|
|
187
|
-
_.
|
|
188
|
-
_.
|
|
189
|
-
".")),
|
|
190
|
-
_.
|
|
191
|
-
_.
|
|
192
|
-
_.
|
|
193
|
-
!0}return!1};
|
|
194
|
-
|
|
195
|
-
_.
|
|
196
|
-
p){return function(q){var u={robustness:q||"",contentType:n.
|
|
197
|
-
p.
|
|
198
|
-
_.
|
|
199
|
-
q+'".'),Promise.reject();var u=Object.assign({},n,{label:q,distinctiveIdentifier:_.
|
|
200
|
-
if(1===b.size&&b.has(""))return Promise.reject(new _.
|
|
201
|
-
(e=b.get(g))&&(c(!0,e,g),c(!1,e,g));e={};for(var h=_.w([!0,!1]),l=h.next();!l.done;e={
|
|
202
|
-
q.next())a.K.add(n.value.contentType.toLowerCase());p=_.w(p);for(n=p.next();!n.done;n=p.next())a.K.add(n.value.contentType.toLowerCase());p=m.keySystem;n=b.get(_
|
|
203
|
-
_.
|
|
204
|
-
if(m instanceof _.
|
|
205
|
-
|
|
176
|
+
vp=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.ea.stop();a.ea=null;b=Array.from(a.h.keys());c=_.w(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,e.pd&&e.pd.stop();a.h.clear();return _.y(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),_.C(m,2),_.y(m,up(h),4);
|
|
177
|
+
if(2!=m.a)return _.Hh(m,0);l=_.E(m);a.g.warn("Error while closing session",l);_.B(m)})})})),2);case 2:if(!a.C){g.F(3);break}_.C(g,4);return _.y(g,a.l.Sd(null),6);case 6:_.Hh(g,5);break;case 4:f=_.E(g),a.g.warn("Error while resetting media keys",f);case 5:a.C=null;case 3:a.l=null,a.a=null,a.K.clear(),a.J=null,a.M=[],a.f=null,a.w=null,a.D=null,a.Y=0,a.U=null,_.B(g)}})};
|
|
178
|
+
_.yp=function(a,b,c){c=void 0===c?[]:c;a.L=wp;a.M=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 _.xp(a,b)};
|
|
179
|
+
Ep=function(a,b){var c=b.some(function(g){return 0<g.drmInfos.length});if(!c){var d=_.N.lh(a.f.Sa);zp(b,d)}var e=a.f.Sa[_.Sd];d=b.some(function(g){return g.drmInfos.some(function(h){return h.keySystem===_.Sd})});if(!1!==a.f.hp&&_.Sl()&&!d&&e){var f=_.w(b);for(d=f.next();!d.done;d=f.next())d.value.drmInfos.push({keySystem:_.Sd,licenseServerUri:e.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],
|
|
180
|
+
periodId:null})}if(e=Ap(a))for(f=_.w(b),d=f.next();!d.done;d=f.next())d.value.drmInfos=[e];d=Bp(b);Cp(a,d);d=_.w(d);for(e=d.next();!e.done;e=d.next())Dp(e.value,a.f.Sa);return c};_.xp=function(a,b){var c=Ep(a,b),d=Bp(b);d=_.w(d);for(var e=d.next();!e.done;e=d.next())Fp(a,e.value,a.f.Sa);d=Gp(a,b);if(!d.size)return a.ca=!0,Promise.resolve();_.mp(ie);d=_.Hp(a,d);return(c?d:d["catch"](function(){})).then(function(){_.mp(he);_.op("DRM queryMediaKeys_()",ie,he)})};
|
|
181
|
+
Bp=function(a){var b=[];a=_.w(a);for(var c=a.next();!c.done;c=a.next()){c=_.w(c.value.drmInfos);for(var d=c.next();!d.done;d=c.next())b.push(d.value)}return b};Cp=function(a,b){for(var c=_.w(b),d=c.next();!d.done;d=c.next())d=d.value,""===d.licenseServerUri||a.f.Sa[d.keySystem]||(a.f.Sa[d.keySystem]={licenseUrl:""})};
|
|
182
|
+
Ip=function(a){var b;return _.I(function(c){switch(c.a){case 1:if(a.l.cf())return c["return"]();if(!a.U){c.F(2);break}return _.y(c,a.U,3);case 3:return c["return"]();case 2:return _.C(c,4),a.U=a.l.Sd(a.J),_.y(c,a.U,6);case 6:_.Hh(c,0);break;case 4:b=_.E(c);if(a.j)return c["return"]();a.w(new _.O(_.P,6,6003,b.message,b));_.B(c)}})};
|
|
183
|
+
Kp=function(a,b){return _.I(function(c){if(1==c.a)return a.g.info("Handle encrypted event for type "+b.initDataType),_.y(c,Ip(a),2);if(!b.initData)return c["return"]();_.Jp(a,b.initDataType,_.Xj(b.initData));_.B(c)})};
|
|
184
|
+
_.Qp=function(a,b){if(!a.J)return wi(a.B,b,function(){a.w(new _.O(_.P,6,6010))}),Promise.resolve();a.C=b;a.l.Te(b);a.B.one(a.C,_.vf,function(){return Lp(a)});a.B.on(a.C,_.eh,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.Rd()!==Mp||a.M.length)d=Ip(a);c=Promise.resolve();_.Nk()&&38===_.Pl().major||(a.a&&a.a.keySystem!==_.pf&&!a.a.serverCertificate&&
|
|
185
|
+
(c=Np(a)),c=c.then(function(){return _.Op(a)}));return Promise.all([d,c]).then(function(){a.j||(_.Pp(a),a.B.on(a.C,we,function(e){return Kp(a,e)}))})["catch"](function(e){if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.Xd&&1>a.Y&&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.Y++,_.Qp(a,b);1<=a.Y&&a.g.info("Could not get valid widevine server certificate. Giving up");
|
|
186
|
+
throw e;}})};_.Op=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.F(0);_.C(d,3);return _.y(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."),_.Hh(d,0);c=_.E(d);throw new _.O(_.P,6,6004,{browserError:c.message});})};
|
|
187
|
+
Np=function(a){var b=a.keySystem(),c=a.f.Sa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();var e=a.D.getConfiguration();return Rp(a,e).then(function(){var f=c.modifiers,g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.wk([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=xd;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.Eb.fetch(f).T}).then(function(f){a.a.serverCertificate=
|
|
188
|
+
_.Xj(f.data)})["catch"](function(f){var g=f.data.headers;g=Object.assign({message:cb,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},mo(g));throw new _.O(_.P,6,6100,g,f);})};Rp=function(a,b){var c,d;return _.I(function(e){c=a.D.ud();return c?(d=b&&b.drm&&b.drm.customData)?_.y(e,c(d),0):e["return"]():e["return"]()})};Sp=function(a,b){if(!a)return!1;for(var c=0;c<b.Ze.length;c++)if(_.mk(a,b.Ze[c]))return!0;return!1};
|
|
189
|
+
_.Pp=function(a){for(var b=a.a?a.a.initData||[]:[],c=_.w(b),d=c.next();!d.done;d=c.next()){d=d.value;var e=!_.Mk(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.Sd)){var f=a.h.values();f=_.w(f);for(var g=f.next();!g.done;g=f.next())g=g.value,_.mk(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+
|
|
190
|
+
".")),Sp(d.initData,g)||(g.Ze.push(d.initData),d.keyId&&!g.wb.includes(d.keyId)&&g.wb.push(d.keyId),a.o.get(d.keyId)||a.o.set(d.keyId,rg)),e=!1)}!e||a.H&&a.L===wp||(_.Tp(a,d.keyId,d.initData)&&(e=!1),e&&(a.g.info("Request new media key session on create"),Up(a,d.keyId,d.periodId,d.initDataType,d.initData)))}c=_.w(a.M);for(d=c.next();!d.done;d=c.next())_.Vp(a,d.value);b.length||a.M.length||(a.A||a.g.info(Fa),a.A=!0,a.G=!1,a.I.resolve());return a.I};
|
|
191
|
+
_.Jp=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.H||a.L!==wp)){var e=a.keySystem();if(!e.startsWith(_.Sd)&&b===_.vd){var f=new pp(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.C.webkitCurrentPlaybackTargetIsWireless||
|
|
192
|
+
_.Mk(2)||a.keySystem().startsWith(_.Sd)||!_.Tp(a,d,c,!0))&&Up(a,d,null,b,c)}};
|
|
193
|
+
_.Tp=function(a,b,c,d){d=void 0===d?!1:d;for(var e=_.w(a.h.keys()),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.h.get(f);if(_.mk(c,g.initData))return b?g.wb.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.wb.push(b),a.o.get(b)||a.o.set(b,rg),d&&a.g.info(Yb+(f.sessionId+"'Adding Key ID ")+(b+" to session meta-data."))):d&&a.g.info(Yb+(f.sessionId+"'")),!0;if(Sp(c,g))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
|
|
194
|
+
!0}return!1};Wp=function(a){var b=Infinity;a=a.h.keys();a=_.w(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};
|
|
195
|
+
Gp=function(a,b){var c=new Set(Bp(b)),d=a.H?_.ag:_.of,e=a.H?[_.tf]:[yg],f=new Map,g=_.w(c);for(c=g.next();!c.done;c=g.next())c=c.value,f.set(c.keySystem,{initDataTypes:[_.vd],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.of,persistentState:d,sessionTypes:e,label:c.keySystem,drmInfos:[]});d={};e=_.w(b);for(c=e.next();!c.done;d={If:d.If,Gd:d.Gd,Qf:d.Qf,Hd:d.Hd},c=e.next()){c=c.value;g=c.audio;var h=c.video;d.If=g?_.Xp(g):"";d.Gd=null;g&&"ac-3"===g.codecs.toLowerCase()&&_.Mk()&&(d.Gd=
|
|
196
|
+
_.Xp(g,_.ve));d.Qf=h?_.Xp(h):"";d.Hd=null;h&&"ac-3"===h.codecs.toLowerCase()&&_.Mk()&&(d.Hd=_.Xp(h,_.ve));var l={},m=_.w(c.drmInfos);for(c=m.next();!c.done;l={jb:l.jb},c=m.next())c=c.value,l.jb=f.get(c.keySystem),l.jb.drmInfos.push(c),c.initData&&c.initData.length&&(l.jb.initDataTypes=_.th(new Set(c.initData.map(function(n){return n.initDataType}))).concat()),c.distinctiveIdentifierRequired&&(l.jb.distinctiveIdentifier=_.ag),c.persistentStateRequired&&(l.jb.persistentState=_.ag),g&&_.Ui(c.audioRobustness).forEach(function(n,
|
|
197
|
+
p){return function(q){var u={robustness:q||"",contentType:n.If};p.jb.audioCapabilities.find(function(v){return v.robustness===u.robustness&&v.contentType===u.contentType})||p.jb.audioCapabilities.push(u);n.Gd&&p.jb.audioCapabilities.push({robustness:q||"",contentType:n.Gd})}}(d,l)),h&&_.Ui(c.videoRobustness).forEach(function(n,p){return function(q){var u={robustness:q||"",contentType:n.Qf};p.jb.videoCapabilities.find(function(v){return v.robustness===u.robustness&&v.contentType===u.contentType})||
|
|
198
|
+
p.jb.videoCapabilities.push(u);n.Hd&&p.jb.videoCapabilities.push({robustness:q||"",contentType:n.Hd})}}(d,l))}return f};_.Xp=function(a,b){var c=_.Jl(a.mimeType,b||a.codecs);if(_.Il(c,a.type)){var d=a.type,e=_.Il(c,d);e&&(e=e(),c=e.convertCodecs(d,c),e.destroy())}return c};
|
|
199
|
+
_.Hp=function(a,b){function c(m,n,p){n.drmInfos.some(function(q){return!!q.licenseServerUri})===m&&(f=f["catch"](function(){if(a.j)return null;if(p===_.Vd){if(_.Nl()&&!a.f.Sa[p].useLegacySystem)return n.label=Wd,a.l.$b(Wd,[n])["catch"](function(){a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");n.label=_.Vd;Yp(n);return a.l.$b(p,[n])});Yp(n)}if(p===_.Xd&&a.f.widevineVersion!==_.Xd){var q=a.f.widevineVersion;if(!q.startsWith(_.Xd))return a.g.error('Invalid "widevineVersion" value "'+
|
|
200
|
+
q+'".'),Promise.reject();var u=Object.assign({},n,{label:q,distinctiveIdentifier:_.of,persistentState:_.of});return a.l.$b(q,[u])["catch"](function(){return a.l.$b(p,[n])})}return a.l.$b(p,[n])["catch"](function(v){a:{if(p===_.Xd&&Zp(n)){var z=_.Ok();if(Zp(n)&&z.os===em&&z.browser===zd){a.g.warn("requestMediaKeySystemAccess() failed",v);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Yp(n);v=a.l.$b(p,[n]);break a}}throw v;}return v})}))}
|
|
201
|
+
if(1===b.size&&b.has(""))return Promise.reject(new _.O(_.P,6,6E3));null===a.l&&(a.l=Yo(a.f.emeApi,a.Zb));for(var d=_.w(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=a.f.preferredDrmSystem;if(!g)if(e=_.Ok(),e.os===gm&&10<=e.osVersion.major&&"edge"===e.browser)g=_.Vd;else if("safari"===e.browser)g=_.Sd;else if(e.browser===zd||"firefox"===e.browser)g=_.Xd;g&&
|
|
202
|
+
(e=b.get(g))&&(c(!0,e,g),c(!1,e,g));e={};for(var h=_.w([!0,!1]),l=h.next();!l.done;e={Pf:e.Pf},l=h.next())e.Pf=l.value,b.forEach(function(m){return function(n,p){p!==g&&c(m.Pf,n,p)}}(e));f=f["catch"](function(){throw new _.O(_.P,6,6001,"Failed to get MediaKeySystemAccess.");});f=f.then(function(m){if(a.j)return null;a.K.clear();var n=m.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",n);var p=n.videoCapabilities||[],q=_.w(n.audioCapabilities||[]);for(n=q.next();!n.done;n=
|
|
203
|
+
q.next())a.K.add(n.value.contentType.toLowerCase());p=_.w(p);for(n=p.next();!n.done;n=p.next())a.K.add(n.value.contentType.toLowerCase());p=m.keySystem;n=b.get(_.$p(m.keySystem));q=[];var u=[],v=[],z=[];aq(n.drmInfos,q,u,v,z);1<u.length&&_.Wh("Multiple unique server certificates found! Only the first will be used.");1<q.length&&_.Wh("Multiple unique license server URIs found! Only the first will be used.");a.a={keySystem:p,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===
|
|
204
|
+
_.ag,persistentStateRequired:n.persistentState===_.ag,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:u[0],initData:v,keyIds:z,periodId:null};if(!a.a.licenseServerUri)throw new _.O(_.P,6,6012,a.a.keySystem);return m.createMediaKeys()}).then(function(m){a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.J=m,a.ca=!0)})["catch"](function(m){if(!a.j){a.a=null;a.K.clear();
|
|
205
|
+
if(m instanceof _.O)throw m;throw new _.O(_.P,6,6002,{browserError:m.message});}});d.reject();return f};
|
|
206
|
+
Ap=function(a){a=_.N.lh(a.f.Sa[_.pf]||{});if(0===a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=_.kk(f),h=_.kk(e);g={kty:"oct",kid:_.ik(g,!1),k:_.ik(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.T.ib(d),initDataType:"keyids"}];return{keySystem:_.pf,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
206
207
|
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
|
-
break;case 4:if(l)return a.g.warn("Skip creating a new session for "+h),
|
|
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=F.f;if(!q)return F["return"]();u=
|
|
222
|
-
!1,a.I.resolve()))});H.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
url:p.data.url,status:p.data.status,response:p.data.response},q?{headers:q}:{},u);z=new _.
|
|
226
|
-
|
|
227
|
-
response:m.data.response},n?{headers:n}:{},p);u=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.M||a.m.isLive()||a.f!==_.
|
|
252
|
-
|
|
253
|
-
_.
|
|
254
|
-
_.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
onEvent:function(h){h instanceof _.L?a.dispatchEvent(h):a.log.debug(_.
|
|
260
|
-
codecs:"",encrypted:!0,keyId:null,language:_.
|
|
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=_.w(f);for(g=f.next();!g.done;g=f.next())g=g.value,c.classList.remove(g),_.
|
|
273
|
-
(this.a.set(e),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
Fs=function(a){
|
|
320
|
-
Js=function(a){
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
null;
|
|
344
|
-
|
|
345
|
-
_.
|
|
346
|
-
a.
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
b
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
St=function(a
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
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
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
_.
|
|
400
|
-
if(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
_.
|
|
417
|
-
|
|
418
|
-
_.
|
|
419
|
-
_.
|
|
420
|
-
_.
|
|
421
|
-
_.
|
|
422
|
-
_.
|
|
423
|
-
|
|
424
|
-
_.
|
|
425
|
-
|
|
208
|
+
_.Vp=function(a,b){try{a.g.debug("Attempting to load an offline session",b);var c=a.J.createSession(_.tf)}catch(f){var d=new _.O(_.P,6,6005,{browserError:f.message});a.w(d);return Promise.reject(d)}a.B.on(c,_.Ye,a.dj.bind(a));a.B.on(c,Je,a.Zi.bind(a));var e={initData:null,loaded:!1,wg:Infinity,yc:null,sb:new _.Gk,periodId:null,Ze:[],keyId:null,wb:[],initDataType:null,Fc:null,sessionContext:{ldlDelay:0,customData:{}}};e.sb["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",
|
|
209
|
+
b,f);if(!f)return a.h["delete"](c),a.w(new _.O(_.P,6,6013)),null;e.loaded=!0;bq(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(_.P,6,6005,{browserError:f.message})))})};cq=function(a,b,c,d){if(!b&&c!==_.mg)return!1;d=b||Nn(d);a=_.w(a.h.values());for(var e=a.next();!e.done;e=a.next())if(e=e.value,b&&e.keyId===b||b&&e.wb.includes(b)||c===_.mg&&(e.keyId||Nn(e.initData))===d)return!0;return!1};
|
|
210
|
+
Up=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,u,v,z,A,H,G,D,F,M,R,la,V,za,Ia,Aa;_.I(function(Ca){switch(Ca.a){case 1:if(!e.length)return a.g.warn("Empty init data"),Ca["return"]();h=b;if(!h)try{h=dq(a,d,e,f)}catch(La){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:La,initDataType:d,
|
|
211
|
+
initData:e}),a.f.ignoreUnrecognizedInitData)return Ca["return"]()}if(g){Ca.F(2);break}if(!cq(a,h,d,e)){Ca.F(2);break}l=!0;if("skd"!==d||a.f.enableSessionCacheForSkd){Ca.F(4);break}m=_.w(a.h.keys());n=m.next();case 5:if(n.done){Ca.F(4);break}p=n.value;q=a.h.get(p);if(!h||q.keyId!==h){Ca.F(6);break}a.g.warn("Close and re-open session for "+h);_.C(Ca,9);return _.y(Ca,p.close(),11);case 11:_.Hh(Ca,10);break;case 9:u=_.E(Ca),a.g.warn("Unable to close session",u);case 10:l=!1;case 6:n=m.next();Ca.F(5);
|
|
212
|
+
break;case 4:if(l)return a.g.warn("Skip creating a new session for "+h),Ca["return"]();case 2:try{z=a.H?_.tf:yg,v=a.J.createSession(z),a.D.onEvent(new _.L(qe,{keySystem:a.keySystem()})),a.g.info("Created new "+z+" session for Key ID: '"+h+"'. Init data type: "+(d+"."))}catch(La){return a.w(new _.O(_.P,6,6005,{browserError:La.message})),Ca["return"]()}a.B.on(v,_.Ye,a.dj.bind(a));a.B.on(v,Je,a.Zi.bind(a));A={Fc:f,Ze:[],initData:e,initDataType:d,keyId:h,wb:h?[h]:[],loaded:!1,wg:Infinity,periodId:c,yc:null,
|
|
213
|
+
sb:new _.Gk,sessionContext:{ldlDelay:0,customData:{}}};A.sb["catch"](function(){});f&&(H=a.h.get(f),A.sessionContext=H.sessionContext);a.h.set(v,A);h&&!a.o.get(h)&&a.o.set(h,rg);if(e)for(G=0;G<a.a.initData.length;G++)D=a.a.initData[G],D.keyId&&!A.wb.includes(D.keyId)&&_.mk(D.initData,e)&&(A.keyId||(A.keyId=D.keyId),A.wb.push(D.keyId),a.o.get(D.keyId)||a.o.set(D.keyId,rg));F=_.N;M=F.Vb;R=a.D.getConfiguration();la=a.keySystem();V=a.f.Sa[la];Ia=(za=V.modifiers)&&za.transformInitData;M(Ia)||(Ia=eq);try{e=
|
|
214
|
+
Ia({playerConfig:R,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:V,sessionContext:A.sessionContext,emeApi:a.l.Rd()})}catch(La){return Aa=La,La instanceof _.O||(Aa=new _.O(_.P,6,6016,La)),A.sb&&A.sb.reject(La),a.w(Aa),Ca["return"]()}a.g.info("Generate License Request for key ID: '"+h+"'");v.generateRequest(d,e.buffer)["catch"](function(La){if(!a.j){var zb=null;La.errorCode&&La.errorCode.systemCode&&(zb=La.errorCode.systemCode,0>zb&&(zb+=Math.pow(2,32)),zb="0x"+zb.toString(16));a.w(new _.O(_.P,
|
|
215
|
+
6,6006,{browserError:La.message,error:La,extended:zb},La))}});_.B(Ca)}})};
|
|
216
|
+
dq=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.Sa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.N.Vb(g)||(g=fq);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(G){a.g.warn("Unable to extract Content ID from SKD",G)}m=""}return m}if(b===_.mg)return Nn(c)||"";if(b===_.vd){m=a.keySystem();try{if(m.match(/^com\.widevine\.alpha/)){var n=
|
|
217
|
+
_.dp(c);if(n)return n.a}else if(gq(m)){e=new _.sn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);f=_.xn(e);var p=_.xn(e);g=_.Hn(p);var q=_.xn(e);c=q>>>24;l=q&16777215;h=_.Bn(e,16);var u=_.lk(h);if(0<c){var v=_.xn(e);e.skip(16*v)}var z=_.xn(e),A=_.Bn(e,z),H=_.kp(A);_.ai("Parsed PR PSSH Box","size",f,"name",g,Ug,c,"flags",l,"size",z,"systemId",u,"keyId",H.a);if(H)return H.a}}catch(G){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:G,keySystem:m}),G;}}return""};
|
|
218
|
+
fq=function(a,b){var c=_.Mn(b);_.ai("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+c);return c};
|
|
219
|
+
eq=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===hq){a=_.N.Vb;d=d.serverCertificate;e=e&&e.modifiers&&e.modifiers.extractContentId;a(e)||(e=fq);a="";try{a=e(b,c,f)}catch(h){throw new _.O(_.P,6,6103);}if(!a.length)throw new _.O(_.P,6,6101,"Content ID is an empty string");c=On(c,a,d)}return c};
|
|
220
|
+
nq=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,u,v,z,A,H,G,D;return _.I(function(F){switch(F.a){case 1:c=b.target;d=a.h.get(c);if(!d)return a.g.error("Session metadata not found for "+c.sessionId+"."),F["return"]();e=a.a.licenseServerUri;if(!iq(a,b)){F.F(2);break}return _.y(F,jq(a,e,b,c,d),3);case 3:return F["return"]();case 2:f=a.Lb;if(!(0<f)){F.F(4);break}a.g.info("Delaying license request by "+f+" s.");return _.y(F,mi(f),5);case 5:if(a.j)return F["return"]();case 4:g=a.keySystem();h=a.f.Sa[g];"individualization-request"===
|
|
221
|
+
b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);l=_.wk([e],a.f.attemptParameters);l.type=3;l.body=b.message;l.method=_.Ib;l.licenseRequestType=b.messageType===Me&&d.Fc?Le:b.messageType;l.sessionId=c.sessionId;if(l.licenseRequestType===Le)a.D.onEvent(new _.L(pe));gq(a.a.keySystem)&&kq(a,l);fn(a.P,l);m=String(Math.floor(b.timeStamp));return _.y(F,lq(a,l,d,m,e,c.sessionId,b.messageType,f),6);case 6:n=F.f;if(!n)return F["return"]();p=gn(a.P,n);return _.y(F,mq(a,c,n.data,d,m),
|
|
222
|
+
7);case 7:q=F.f;if(!q)return F["return"]();u=Wp(a);v=p?Date.now()+1E3*p.delay:Number.NaN;a.D.onEvent(new _.L(_.se,{keySystem:g,expirationTime:u,expectedRenewalTime:v}));d.yc&&d.yc.resolve();d.Fc&&(z=d.Fc,a.g.info("Closing expired session '"+z.sessionId+"'"),up(z)["catch"](function(){a.g.warn("Unable to close expired session in time")}),(A=a.h.get(d.Fc))&&A.pd&&A.pd.stop(),a.h["delete"](d.Fc),d.Fc=null);H=new _.li(function(){a.j||(d.loaded=!0,d.sb&&d.sb.resolve(),bq(a)&&(a.A||a.g.info(Fa),a.A=!0,a.G=
|
|
223
|
+
!1,a.I.resolve()))});H.fa(5);null!==d.initData&&(0<d.sessionContext.ldlDelay||p&&(_.T.startsWith(g,_.Sd)||_.T.startsWith(g,_.Vd)))&&(G=new _.li(function(){!a.j&&a.P&&(a.g.info("Updating CSL Sessions"),gq(g)?Up(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.Sd)&&c.update(_.T.ib("renew")))}),d.pd=G,D=p?p.delay:d.sessionContext.ldlDelay,G.fa(D));_.B(F)}})};
|
|
224
|
+
jq=function(a,b,c,d,e){var f,g,h;return _.I(function(l){if(1==l.a)return f=_.wk([b],a.f.attemptParameters),f.type=3,f.body=c.message,f.method=_.Ib,f.licenseRequestType=xd,f.sessionId=d.sessionId,_.y(l,oq(a,f,e,b,d.sessionId,c.messageType),2);g=l.f;if(!g)return l["return"]();h=String(Math.floor(c.timeStamp));return _.y(l,mq(a,d,g.data,e,h),0)})};iq=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};
|
|
225
|
+
lq=function(a,b,c,d,e,f,g,h){var l,m,n,p,q,u,v,z,A,H,G,D;return _.I(function(F){switch(F.a){case 1:return a.g.info("License request for SID:'"+(f+"'/KID:'"+c.keyId+"' from msg '")+(g+"'.")),_.y(F,pq(a,b,c.sessionContext),2);case 2:return a.g.debug("Sending DRM license request to",e,b),a.D.onEvent(new _.L(ne,{delay:h})),l=Date.now(),_.mp(ge+d+ha),m=null,_.C(F,3),_.y(F,a.D.Eb.fetch(b).T,5);case 5:m=F.f;_.Hh(F,4);break;case 3:n=_.E(F);if(a.j)return F["return"](null);p=n;q=p.data.headers;u=mo(q);v=Object.assign({message:"Error while fetching DRM license!",
|
|
226
|
+
url:p.data.url,status:p.data.status,response:p.data.response},q?{headers:q}:{},u);z=new _.O(_.P,6,6007,v,p);qq(a,z,c);return F["return"](null);case 4:_.mp(ge+d+".end");_.op(ge+d,ge+d+ha,ge+d+".end");A=Date.now()-l;if(H=no(m.headers))a.Lb=H.delay||0;G="";H&&H.requestId&&(G=" RID:"+H.requestId);D=m.data.byteLength;a.g.info("License response for SID:'"+(f+"'/KID:'")+(c.keyId+"' ")+(D+" bytes in ")+(A+"ms"+G));return a.j?F["return"](null):F["return"](m)}})};
|
|
227
|
+
oq=function(a,b,c,d,e,f){var g,h,l,m,n,p,q,u,v,z,A,H;return _.I(function(G){switch(G.a){case 1:return a.g.info("WV Server certificate request for SID:'"+(e+" from msg '"+f+"'.")),_.y(G,pq(a,b,c.sessionContext),2);case 2:return a.g.debug("Sending Widevine certificate request to",d,b),g=Date.now(),h=null,_.C(G,3),_.y(G,a.D.Eb.fetch(b).T,5);case 5:h=G.f;_.Hh(G,4);break;case 3:l=_.E(G);if(a.j)return G["return"](null);m=l;n=m.data.headers;p=mo(n);q=Object.assign({message:cb,url:m.data.url,status:m.data.status,
|
|
228
|
+
response:m.data.response},n?{headers:n}:{},p);u=new _.O(_.P,6,6100,q,m);qq(a,u,c);return G["return"](null);case 4:return v=Date.now()-g,z=no(h.headers),A="",z&&z.requestId&&(A=" RID:"+z.requestId),H=h.data.byteLength,a.g.info("WV Server certificate response for SID:'"+(e+"' ")+(H+" bytes in ")+(v+"ms"+A)),a.j?G["return"](null):G["return"](h)}})};
|
|
229
|
+
mq=function(a,b,c,d,e){var f,g;return _.I(function(h){switch(h.a){case 1:return _.mp(le+e+ha),_.C(h,2),_.y(h,b.update(c),4);case 4:_.Hh(h,3);break;case 2:f=_.E(h);if(a.j)return h["return"](!1);if(f===Vb)return a.g.info("Ignore update for closed sessions"),h["return"](!1);g=new _.O(_.P,6,6008,{browserError:f.message});qq(a,g,d);return h["return"](!1);case 3:return _.mp(le+e+".end"),_.op(le+e,le+e+ha,le+e+".end"),a.j?h["return"](!1):h["return"](!0)}})};
|
|
230
|
+
qq=function(a,b,c){a.j||(a.w(b),c.yc&&c.yc.reject(b),c.sb&&c.sb.reject(b))};
|
|
231
|
+
kq=function(a,b){var c=_.T.Ic(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(_.Tg).textContent;b.body=_.jk(c.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[Ba]="text/xml; charset\x3dutf-8"};
|
|
232
|
+
pq=function(a,b,c){var d,e,f,g,h,l;return _.I(function(m){if(1==m.a)return d=a.D.getConfiguration(),_.y(m,Rp(a,d),2);e=a.keySystem();h=(g=(f=a.f.Sa[e])&&f.modifiers)&&g.licenseRequest;l=g&&g.licenseResponse;h?b.requestModifiers.push(function(n){return h(d,n,c)}):e.startsWith(_.Sd)&&b.requestModifiers.push(function(n){return _.Pn(n)});l?b.responseModifiers.push(function(n){return l(d,n,c)}):e.startsWith(_.Sd)&&b.responseModifiers.push(function(n){return _.Qn(n)});_.B(m)})};
|
|
233
|
+
rp=function(a){var b=a.o,c=a.ja;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(_.P,6,6014));a.D.Bg(_.N.mh(c));a.A||a.g.info(Fa);a.A=!0;a.G=!1};Lp=function(a){var b;return _.I(function(c){if(1==c.a)return _.mp(ke),b=a.ha.map(function(d){return nq(a,d)}),a.kb=!0,a.ha=[],_.y(c,Promise.all(b),2);_.mp(je);_.op("drm.onPlay",ke,je);_.B(c)})};gq=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
|
|
234
|
+
_.$p=function(a){return gq(a)?_.Vd:a};_.sq=function(a,b){return a.length&&b.length?0<_.rq(a,b).length:!0};
|
|
235
|
+
_.rq=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={Jd:e.Jd},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.Jd=_.th(g.keyIds||[]).concat();f.keyIds&&f.keyIds.length&&f.keyIds.forEach(function(l){return function(m){l.Jd.includes(m)||l.Jd.push(m)}}(e));c.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,
|
|
236
|
+
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.Jd,periodId:g.periodId});break}return c};
|
|
237
|
+
sp=function(a){a.h.forEach(function(b,c){var d=b.wg,e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Ag(c.sessionId,e),b.wg=e)})};bq=function(a){a=a.h.values();return _.Uj(a,function(b){return b.loaded})};
|
|
238
|
+
zp=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=_.w(a),e=d.next();!e.done;e=d.next())e.value.drmInfos=c};Yp=function(a){for(var b=_.w(a.audioCapabilities||[]),c=b.next();!c.done;c=b.next())delete c.value.robustness;a=_.w(a.videoCapabilities||[]);for(b=a.next();!b.done;b=a.next())delete b.value.robustness};
|
|
239
|
+
Zp=function(a){return(a.audioCapabilities||[]).some(tq)||(a.videoCapabilities||[]).some(tq)};tq=function(a){return null!=a.robustness&&""!==a.robustness};
|
|
240
|
+
aq=function(a,b,c,d,e){var f={};a=_.w(a);for(var g=a.next();!g.done;f={La:f.La},g=a.next()){f.La=g.value;b.includes(f.La.licenseServerUri)||b.push(f.La.licenseServerUri);f.La.serverCertificate&&(c.some(function(m){return function(n){return _.mk(n,m.La.serverCertificate)}}(f))||c.push(f.La.serverCertificate));if(f.La.initData){var h=_.w(f.La.initData);for(g=h.next();!g.done;g=h.next())g.value.periodId=f.La.periodId;h={};var l=_.w(f.La.initData);for(g=l.next();!g.done;h={Je:h.Je},g=l.next())h.Je=g.value,
|
|
241
|
+
d.some(function(m){return function(n){var p=m.Je;return n.keyId&&n.keyId===p.keyId&&n.periodId===p.periodId?!0:!1}}(h))||d.push(h.Je)}if(f.La.keyIds)for(g=0;g<f.La.keyIds.length;++g)e.includes(f.La.keyIds[g])||e.push(f.La.keyIds[g])}};
|
|
242
|
+
Fp=function(a,b,c){var d=_.$p(b.keySystem);c=c[d];d===_.pf&&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)};
|
|
243
|
+
Dp=function(a,b){var c=b[_.$p(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))};
|
|
244
|
+
up=function(a){var b,c;return _.I(function(d){if(1==d.a)return b=new Promise(function(e){(new _.li(e)).fa(1)}),_.y(d,Promise.race([a.close().then(function(){return!0}),b.then(function(){return!1})]),2);(c=d.f)||_.Wh("Timeout waiting for session close");_.B(d)})};_.wq=function(a,b){a&&b&&(_.uq.set(a,b),_.vq.info("Registered TextDisplayerFactory: '"+a+"'"))};
|
|
245
|
+
_.xq=function(a,b){var c=b.find(function(d){return(d=_.uq.get(d))?d.a(a):!1});if(null==c)return _.vq.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.vq.info("Chosen the text displayer: "+c);return _.uq.get(c)};yq=function(){this.a=null;this.f=[]};_.zq=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})}};
|
|
246
|
+
Aq=function(a,b){var c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(var d=_.w(a.f),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state===b?e.duration:0;return c};Bq=function(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=_.w(a.f),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.a&&c.push(b(a.a));return c};Cq=function(){this.h=this.f=this.j=null;this.a=[]};Dq=function(a){return a.a.map(function(b){return _.N.nb(b)})};
|
|
247
|
+
_.Eq=function(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new yq;this.f=new Cq};_.Fq=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:[]}};
|
|
248
|
+
Jq=function(a){this.g=new _.K("clpp.StateManager");this.m=a;this.a=new _.vi;this.f=_.Gq;this.A=_.Hq;this.I=0;this.w=-1;this.L=this.o=this.J=this.B=0;this.j=this.h=this.G=!1;this.H=0;this.l=null;this.K=0;this.M=_.Sl();this.C=!1;this.J=Date.now();Iq(this)};Kq=function(a,b){return Object.keys(b)[a]};
|
|
249
|
+
Mq=function(a,b){var c={type:_.qg};b===_.od||b===_.nd?(c.reason=a.w,b===_.od?c.timeSinceLastStateChangeMS=a.I:c.bufferedTimeMS=a.B):(a.f===_.Lq&&(c.reason=a.w),a.A===_.Lq&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.I);return c};
|
|
250
|
+
Qq=function(a,b){if(a.f===b)return!1;var c=Date.now(),d=a.f===_.Lq;a.A=a.f;a.f=b;a.A===_.Nq&&(a.J=c,a.o=0);a.o||(a.o=a.J||c);a.I=c-a.o;a.o=c;b===_.Lq?(a.L=a.o,a.w=a.h?1:2,a.g.info("Buffering started. Reason: "+Kq(a.w-1,_.Oq)),c=Mq(a,_.od),a.ab(_.od,c)):d&&(a.B=a.o-a.L,a.g.info("Buffering finished. Reason: "+Kq(a.w-1,_.Oq)+". Buffering time: "+a.B+" ms"),c=Mq(a,_.nd),a.ab(_.nd,c));c=Kq(a.A,_.Pq);d=Kq(a.f,_.Pq);a.g.info(_.Mb+c+" -\x3e "+d);a.ab(_.qg,Mq(a,""));return!0};
|
|
251
|
+
Vq=function(a,b){if(a.f===_.Rq)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.h||(a.j=!1,Qq(a,_.Nq));else if(b!==_.Gg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ga(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.f===_.Gq,g=typeof a.l===_.k&&2>=a.l&&a.j;e=a.h||
|
|
252
|
+
f||e||g;!a.M||a.m.isLive()||a.f!==_.Lq||e||(f=b===_.hg&&4===a.l,(g=a.A===_.Sq)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Qq(a,_.Lq):c?f=Qq(a,_.Tq):a.G&&(f=Qq(a,_.Uq));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.h+", waiting: "+a.j+", playing: "+a.G+", paused: "+c+", readyState: "+a.l+", rate: "+a.K+", buffer: "+a.H+", ended: "+d+". Changed state: "+f+", Current state: "+Kq(a.f,_.Pq))}}};
|
|
253
|
+
Iq=function(a){function b(d){return Vq(a,d.type)}a.g.debug("Start watching for video events for "+a.m.namespace());var c=a.m;a.a.on(c,_.ye,function(){a.h||(a.j=!1,Qq(a,_.Nq))});a.a.on(c,pd,b);a.a.on(c,_.Kf,function(){a.G=!0;a.j=!1;Vq(a,_.Kf)});a.a.on(c,_.rf,function(){a.G=!1;a.j=!1;Vq(a,_.rf)});a.a.on(c,_.Gg,b);a.a.on(c,_.Xf,b);a.a.on(c,_.hg,function(d){a.h=!1;a.j=!1;Vq(a,d.type)});a.a.on(c,_.ig,function(d){a.h=!0;Vq(a,d.type)});a.a.on(c,og,b);a.a.on(c,_.dh,function(){a.j=!0;Vq(a,_.dh)});a.a.on(c,
|
|
254
|
+
_.ze,function(d){(d=d&&d.detail)&&d.severity&&d.severity===_.P&&Qq(a,_.Rq)});a.a.on(c,_.Te,b);a.a.on(c,qd,function(){a.C=!0;Vq(a,qd)});a.a.on(c,_.Sg,function(d){a.h=!0;Vq(a,d.type)});a.a.on(c,_.Rg,function(d){a.h=!1;a.j=!1;Vq(a,d.type)})};Wq=function(a){a=(new _.rj(a)).Pa;if(!a)return null;a=a.toUpperCase();return _.T.endsWith(a,".MPD")?_.Wc:_.T.endsWith(a,".M3U8")?_.tm:_.T.endsWith(a,".MP4")?_.Yg:_.T.endsWith(a,".MP3")?"audio/mp3":_.T.endsWith(a,"MANIFEST")||_.T.endsWith(a,".ISM")?_.ad:null};
|
|
255
|
+
_.Yq=function(a){var b;Rm(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(function(e){return typeof e===_.tg||"url"in e});a=[];for(var c=0;c<b.length;c++){var d=Xq(b[c]);d&&a.push(d)}return a};
|
|
256
|
+
Xq=function(a){var b=null;_.N.ga(a)&&(a={url:a});typeof a===_.ff&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.N.R(a.drmProtected)||typeof a.drmProtected!==_.md||(b.drmProtected=a.drmProtected),_.N.R(a.isLive)||typeof a.isLive!==_.md||(b.isLive=a.isLive),_.N.R(a.name)||typeof a.name!==_.tg||(b.name=a.name),_.N.R(a.mc)||typeof a.mc!==_.tg||(b.mc=a.mc),_.N.R(a.audioMimeType)||typeof a.audioMimeType!==_.tg||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Wq(a.url),b.type?
|
|
257
|
+
Zq.debug("Detect media type "+b.type+" for "+a.url):Zq.warn("Unable to detect media type for "+a.url));return b};$q=function(){_.Sm.call(this,Jd);this.w=this.H=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.vi;this.C=this.B=this.f=this.I=null};
|
|
258
|
+
br=function(a,b){if(a.w)throw new _.O(_.P,7,7E3);a.a||(a.h.on(b,_.ze,function(){var c=ar(a);if(c)a.onError(c)}),a.h.on(b,_.bg,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 _.L(_.ld,{detail:{width:c,height:d}}))}),a.a=b)};cr=function(a){var b=_.Sl()?hq:void 0;return new _.tp(a,b)};
|
|
259
|
+
er=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(_.P,7,7E3)));b=a.ba[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=_.dr;d=_.ln(a.configuration.drm);a.log.debug("Drm configuration: ",d);e=a.getNetworkEngine();a.o=cr({Eb:e,onError:function(h){return a.onError(h)},Bg:function(){},Ag:function(h,l){a.trigger(new _.L(_.me,
|
|
260
|
+
{expirationTime:l}))},onEvent:function(h){h instanceof _.L?a.dispatchEvent(h):a.log.debug(_.dc,h.type)},getConfiguration:function(){return a.getConfiguration()},ud:function(){return a.ud()}});a.o.f=d;f={id:0,language:_.Lg,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,
|
|
261
|
+
Ja:0,mimeType:_.Yg,codecs:"",encrypted:!0,keyId:null,language:_.Lg,originalLanguage:_.Lg,label:null,type:c.VIDEO,primary:!1,frameRate:void 0,yp:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,fp:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0};return _.y(g,_.yp(a.o,[f]),2)}return _.y(g,_.Qp(a.o,a.a),0)})};
|
|
262
|
+
fr=function(a,b){so(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){a.getState()!==_.Rq&&a.seek(b)["catch"](function(c){a.log.warn("Error while seeking to start position.",c)})})};ar=function(a){if(null===a.ba||!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(_.P,3,3016,{code:b,rp:c,message:a.a.error.message})};
|
|
263
|
+
gr=function(a){if(a.w)return new _.Hk(Promise.reject(new _.O(_.P,7,7E3)),function(){});var b=a.ba[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&fr(a,c);if(d.preload!==_.ef)a.h.one(d,_.Te,function(){var g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Mk()||_.Nk())&&d.load();var f=new _.Gk;a.h.one(d,og,function(){var g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.li(function(){f.reject(new _.O(_.P,3,3100,{message:"Unable to load media source successfully from "+
|
|
264
|
+
b.url,uri:b.url},d.error))})).fa(g))});so(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,function(){return f.resolve()});d.error?f.reject(ar(a)):d.preload===_.ef&&(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,_.ze,function(){f.reject(ar(a))});
|
|
265
|
+
return new _.Hk(f,function(){var g=new _.O(_.P,7,7001);f.reject(g);return Promise.resolve()})};
|
|
266
|
+
hr=function(a,b){so(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){if(a.isLive()&&a.getState()!==_.Rq){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)}))}})};
|
|
267
|
+
ir=function(a,b){var c=!1;a.h.on(b,_.ig,function(){c=b.paused});a.h.on(b,_.hg,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())})};jr=function(){};_.mr=function(a){0<=kr.indexOf(a)?lr.warn("Factory '"+a.name()+"' is already registered"):(kr.push(a),lr.info("Factory '"+a.name()+"' has been registered."))};
|
|
268
|
+
nr=function(a,b){var c=kr.find(function(d){return d.a(a,b)})||null;c&&lr.info("Chosen ads manager: "+c.name());return c};or=function(){};pr=function(){};qr=function(a,b,c,d,e,f){this.w=this.o=this.l=!1;this.C=a;this.h=b;this.f=c;this.a=d;this.j=0;this.B=e+":"+b;this.G=e;this.videoEl=null;this.A=f};rr=function(a){this.a=a.map(function(b){return{videoId:b.getSurface().getMedia().id,player:b,Qe:!0,ready:Promise.resolve()}});this.g=new _.K("clpp.plist.PlayerPool")};
|
|
269
|
+
_.sr=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};_.tr=function(a,b){a.classList.add(b)};_.ur=function(a,b){if(a&&typeof b===_.ff)for(var c in b)a.style[c]=b[c]};_.vr=function(a){return document.createElement(a)};wr=function(){this.a=null;this.h=new Set;this.f=null;this.set(null)};xr=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
|
|
270
|
+
yr=function(a,b){var c=new MutationObserver(function(){var d=Array.from(a.h.values());Wi(Array.from(b.classList),Array.from(d))||b.classList.add.apply(b.classList,_.th(d))});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};
|
|
271
|
+
Cr=function(a,b){this.g=new _.K("clpp.PlayerSurface");this.w=_.N.ua(zr,b);this.f=new wr;this.h=null;this.a=new wr;this.l=Ar;Ar+=1;this.o="clpp-video-"+this.l;this.j=new _.vi;if(null==a)throw new _.O(_.P,7,7102,"No Media element was provided");if(a instanceof Element)var c=a;else if(c=document.getElementById(a),!c)throw new _.O(_.P,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
|
|
272
|
+
HTMLMediaElement))throw new _.O(_.P,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(_.P,7,7006,"Container element is not a direct parent of media element");e=d.containerEl}else{e=document.createElement(_.fe);c.parentNode?c.parentNode.replaceChild(e,
|
|
273
|
+
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=_.w(f);for(g=f.next();!g.done;g=f.next())g=g.value,c.classList.remove(g),_.tr(e,g);e.style.cssText=c.style.cssText;c.removeAttribute(_.vg);f=_.w([_.kh,_.Ee]);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+_.Wf);_.Mk()||c.removeAttribute(g)}e.appendChild(c)}e&&
|
|
274
|
+
(this.a.set(e),xr(this.a,"clpp-container"),xr(this.a,this.o),xr(this.f,_.Ad),xr(this.f,"clpp-video"));d.webOSStartupPatch&&Br(this,c,e)}};Br=function(a,b,c){(_.Nk()&&53===_.Pl().major||_.Nk()&&68===_.Pl().major||_.Ql())&&!b.hasAttribute(ae)&&(b.style.opacity="0",b.setAttribute(ae,""),a.j.one(b,ue,function(){b.removeAttribute(ae);b.style.opacity="1";c&&(c.style.opacity="1")}))};
|
|
275
|
+
Hr=function(a){var b=this;this.h=a;this.w=!!a.sideAdContainer;this.j=[];this.a=a.oj;this.G=Dr(a);this.B=[];var c=Er(this,this.G,this.h.Il);this.o=new rr(c);this.f=null;this.A=!1;this.l=new Map;this.H=a.toggleVisible;this.g=new _.K("clpp.interstitial.MultiController");this.C=!1;Fr(this).forEach(function(d){return Gr(b,d,!1)})};
|
|
276
|
+
Lr=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,u,v;return _.I(function(z){if(1==z.a){a.g.info("Crop ads by playout limit",b);c=Ir(a);d=a.getCurrentItem();if(!c||!d||!d.lb||null==c.V)return z["return"]();e=a.j.filter(function(A){return!A.primary});f=Math.max.apply(Math,_.th(e.map(function(A){return A.xb})));if(b>f)return a.g.info("Playout limit is greater than ad pod duration, ignored."),z["return"]();g=d.player.getPosition()+(d.xb-d.duration);h=e.sort(function(A,H){return H.xb-A.xb})[0];l=c.V;m=b<=g;
|
|
277
|
+
if(!m)return z.F(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 _.y(z,Jr(a,c.id,_.vf),3)}if(2!=z.a)return h.Ha&&h.Ha(),p=d.lb,a.a.trigger(new _.L(_.Nc,{ad:p})),a.a.trigger(new _.L(_.Ac,{ad:p})),a.a.trigger(new _.L(_.xc,{id:d.Oa})),z["return"]();a.g.warn("Limiting playout of ads to",b);q=e.find(function(A){return b<=A.xb&&b>=A.xb-A.duration});if(!q)return a.g.warn("Cannot find ad hit by limit"),z["return"]();
|
|
278
|
+
u=b-(q.xb-q.duration);q.lb.a=u;v=f-b;c.V-=v;a.g.info("Last ad is now ",q.lb.Cb(),"with cropped duration",u,"and primary will resume at",c.V.toFixed(1),"instead of",l.toFixed(1));h.Ha&&(q.Ha=h.Ha);q.transition={uf:{position:u,itemId:c.id,V:c.V}};Kr(a,q);_.B(z)})};Nr=function(a){var b;return _.I(function(c){if(1==c.a)return(b=a.f)?"loaded"===b.state?c.F(2):_.y(c,b.yd,2):c["return"]();if(4!=c.a)return _.y(c,b.player.play(),4);b.state=_.Kf;Mr(b);_.B(c)})};
|
|
279
|
+
Or=function(a,b){a.g.info("Add items",b);a.j=a.j.concat(b.map(function(c){return Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),yd:Promise.resolve()})}))};Pr=function(a,b){0!==a.j.length&&(b?(a.g.info("Remove items",b),a.j=a.j.filter(function(c){return!b.includes(c.id)})):(a.g.info("Remove all items"),a.j=[]))};
|
|
280
|
+
Jr=function(a,b,c){var d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:if(a.A)return a.g.warn("Cannot "+c+" item while busy (ID: "+b+")"),l["return"]();d=Qr(a,b);if(!d)return a.g.warn("Item not found (ID: "+b+")"),l["return"]();a.g.info(c+" item (ID: "+b+")");a.A=!0;if(e=a.f)e.player.isPaused()||(a.w?e.primary?Rr(a,e.Oa,Sr):e.player.pause():e.player.pause()),e.primary?Rr(a,e.Oa,Sr):Rr(a,e.Oa,Tr);(f=a.l.has(b))&&a.l["delete"](b);_.C(l,2,3);if(c===_.vf)return(g=e&&d.primary)?_.y(l,Ur(a,d),10):f?
|
|
281
|
+
_.y(l,Vr(a,d),10):_.y(l,Wr(a,d),10);if(f){a.g.error("Loading preloaded items is not supported");l.F(6);break}return _.y(l,Xr(a,d),6);case 10:Mr(d);case 6:Kr(a,d);d.primary?Rr(a,d.Oa,Tr):Rr(a,d.Oa,Sr);d.lb&&Yr(a,d,d.lb);if(d.Ha)d.player.one(_.ye,d.Ha);d.$i&&d.$i(d.player.getDuration());case 3:_.Ih(l);a.A=!1;e&&Zr(a,e);$r(a);as(a,d.next);_.Jh(l);break;case 2:throw h=_.E(l),a.g.error("Item failed to "+c+" (ID: "+b+")"),h;}})};bs=function(a,b){var c=Ir(a);c?c.V=b:a.g.error("Failed to get primary item. Cannot configure resume position.")};
|
|
282
|
+
Ir=function(a){return a.j.find(function(b){return!!b.primary})||null};Qr=function(a,b){return a.j.find(function(c){return c.id===b})||null};
|
|
283
|
+
Kr=function(a,b){var c=b.transition;if(c&&!c.ro){if(c.Ha){var d=c.Ha,e=function(){a.g.info("Transition onEnded to (ID: "+d+")");a.play(d)};b.player.one(_.ye,e);b.disposers.push(function(){b.player.off(_.ye,e)})}c.uf&&cs(a,b,function(){var f=a.f.lb;f&&(b.disposers.forEach(function(g){return g()}),b.disposers=[],a.a.trigger(new _.L(_.Nc,{ad:f})),a.a.trigger(new _.L(_.Ac,{ad:f})),a.a.trigger(new _.L(_.xc,{id:b.Oa})))});c.ro=!0}};
|
|
284
|
+
cs=function(a,b,c){function d(){b.player.off(_.Gg,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&&(d(),e())}var g=b.transition.uf,h=null;g.V&&bs(a,g.V);b.player.on(_.Gg,f);b.disposers.push(function(){null!=h&&(cancelAnimationFrame(h),
|
|
285
|
+
h=null)});b.disposers.push(d)};ds=function(a){a.f&&(a.f.disposers.forEach(function(b){return b()}),a.f.disposers=[],a.f.lb&&Yr(a,a.f,a.f.lb),Kr(a,a.f),$r(a),as(a,a.f.next))};Fr=function(a){return[a.a].concat(_.th(a.o.a.map(function(b){return b.player})))};$r=function(a){return Promise.all(Array.from(a.l.keys()).map(function(b){return es(a,b)}))};
|
|
286
|
+
Dr=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.oj.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};es=function(a,b){var c;return _.I(function(d){if(1==d.a){c=a.l.get(b);if(!c)return d.F(0);a.g.info("Stop preloading item (ID: "+b+")");return c.player?_.y(d,fs(a,c.player),3):d.F(3)}a.l["delete"](b);_.B(d)})};gs=function(a){return _.I(function(b){if(1==b.a)return a.f?_.y(b,Zr(a,a.f),3):b.F(0);Gr(a,a.a,!0);_.B(b)})};
|
|
287
|
+
Zr=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.w||Gr(a,c,!1),d.F(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=hs;return b.Ng?(a.g.info("Release player (ID: "+b.id+") after delay "+(b.Ng+" ms.")),_.y(d,new Promise(function(e){setTimeout(function(){return _.I(function(f){if(1==f.a)return _.y(f,fs(a,c),2);Gr(a,c,!1);a.a.trigger(new _.L("ad-hls-released"));
|
|
288
|
+
e();_.B(f)})},b.Ng)}),0)):_.y(d,fs(a,c),5)}Gr(a,c,!1);return d.F(0)})};Wr=function(a,b){return _.I(function(c){if(1==c.a)return _.y(c,Xr(a,b),2);if(3!=c.a)return _.y(c,b.player.play(),3);b.state=_.Kf;_.B(c)})};Xr=function(a,b){var c;return _.I(function(d){if(1==d.a)return _.y(d,is(a,!!b.primary),2);if(3!=d.a)return c=d.f,a.f=b,b.role=js,a.f.player=c,a.f.videoEl=c.getSurface().getMedia(),Gr(a,c,!0),b.state="loading",b.yd=ks(c,b.config),_.y(d,b.yd,3);b.state="loaded";_.B(d)})};
|
|
289
|
+
Vr=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!==Sf){d.F(2);break}a.g.info(kc);_.C(d,3);return _.y(d,b.preloadPromise,5);case 5:_.Hh(d,2);break;case 3:_.E(d);case 2:a.f=b;b.role=js;Gr(a,c,!0);if(b.state===Rf)return _.y(d,c.play(),7);if(b.state!==Qf){d.F(7);break}return _.y(d,ks(c,b.config),7);case 7:b.state=_.Kf,_.B(d)}})};
|
|
290
|
+
Yr=function(a,b,c){function d(){a.a.trigger(new _.L(_.Nc,{ad:c}));a.a.trigger(new _.L(_.Ac,{ad:c}));c.h===c.f&&a.a.trigger(new _.L(_.xc,{id:b.Oa}))}function e(){a.a.trigger(new _.L(_.yc,{ad:c}))}function f(){a.a.trigger(new _.L(_.Kc,{ad:c}))}function g(){l.isEnded()||a.a.trigger(new _.L(_.Ic,{ad:c}))}function h(){var m=l.getPosition(),n=c.getDuration();c.j=m;a.a.trigger(new _.L(_.Jc,{ad:c}));!c.l&&m>=n/4&&(c.l=!0,a.a.trigger(new _.L(_.Bc,{ad:c})));!c.o&&m>=n/2&&(c.o=!0,a.a.trigger(new _.L(_.Hc,{ad:c})));
|
|
291
|
+
!c.w&&m>=3*n/4&&(c.w=!0,a.a.trigger(new _.L(_.Oc,{ad:c})))}var l=b.player;l.on(_.Gg,h);l.on(_.rf,g);l.on(_.Kf,f);l.on(_.od,e);l.one(_.ye,d);b.disposers.push(function(){l.off(_.Gg,h);l.off(_.rf,g);l.off(_.Kf,f);l.off(_.od,e);l.off(_.ye,d)});1===c.h&&a.a.trigger(new _.L(_.wc,{id:b.Oa}));c.videoEl=l.getSurface().getMedia();a.a.trigger(new _.L(_.Fc,{ad:c}));a.a.trigger(new _.L(_.Mc,{ad:c}))};
|
|
292
|
+
Ur=function(a,b){return _.I(function(c){switch(c.a){case 1:if(!b.player)return c["return"]();if(b.state!==Sf){c.F(2);break}a.g.info("Wait for seek to finish");_.C(c,3);return _.y(c,b.preloadPromise,5);case 5:_.Hh(c,2);break;case 3:_.E(c);case 2:if(!b.V){c.F(6);break}return _.y(c,b.player.seek(b.V,!0),6);case 6:a.f=b;b.role=js;Gr(a,b.player,!0);b.state="loading";if(a.w){Rr(a,b.Oa,Tr);c.F(8);break}return _.y(c,b.player.play(),8);case 8:b.state=_.Kf,_.B(c)}})};
|
|
293
|
+
fs=function(a,b){return _.I(function(c){return b===a.a?c.F(0):_.y(c,a.o.release(b),0)})};is=function(a,b){var c;return _.I(function(d){if(1==d.a)return b?d["return"](a.a):_.y(d,a.o.get(),2);c=d.f;if(!c)throw Error("No player available");return d["return"](c)})};as=function(a,b){var c;_.I(function(d){if(0===b.length)return d["return"]();a.g.info("Preload items (IDs: "+b+")");c=a.j.filter(function(e){return b.includes(e.id)})||[];return _.y(d,Promise.all(c.map(function(e){return ls(a,e)})),0)})};
|
|
294
|
+
ls=function(a,b){var c,d,e,f,g;return _.I(function(h){switch(h.a){case 1:if(!b.primary){h.F(2);break}b.state=Sf;a.l.set(b.id,b);if(!b.V||a.w){h.F(3);break}c=b.player;a.g.info("Preparing to resume at",b.V);Rr(a,b.Oa,Sr);return _.y(h,c.seek(b.V,!0),3);case 3:return b.state=Rf,h["return"]();case 2:return d=b.id,_.y(h,is(a,!1),5);case 5:e=h.f;b.player=e;b.videoEl=e.getSurface().getMedia();b.role=hs;b.state=Sf;_.C(h,6);a.l.set(d,b);b.config.autoplay&&(a.g.warn("Autoplay should not be used for preloaded streams. Force disabling autoplay (ID: "+
|
|
295
|
+
(d+")")),b.config.autoplay=!1);if(f=a.a.getBandwidthEstimate())b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=f;b.preloadPromise=ks(e,b.config);return _.y(h,b.preloadPromise,8);case 8:b.state=Rf;_.Hh(h,0);break;case 6:g=_.E(h),7001===g.code?(a.g.info("Preload aborted (ID: "+d+")"),b.state=Pf):(a.g.warn("Preload failed (ID: "+d+")",g),b.state=Qf),_.B(h)}})};
|
|
296
|
+
Gr=function(a,b,c){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(Xb+b),d.classList.add(Dd),d.classList.remove("clpp-hide")):(a.g.debug(kb+b),d.classList.remove(Dd),d.classList.add("clpp-hide")),a.H&&a.H(d,c))};
|
|
297
|
+
Er=function(a,b,c){return Array.from({length:2}).map(function(d,e){var f=document.createElement(_.r);b.appendChild(f);var g=a.h.ob.create();f=new Cr(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.B.push(h);return g})};
|
|
298
|
+
Rr=function(a,b,c){a.a.getConfiguration().muted||a.C?(a.a.setMuted(!0),ms(a,!0)):(a.h.onAudioDecision&&(c=a.h.onAudioDecision(b)),c===Tr?(a.a.setMuted(!1),ms(a,!0)):c===Sr?(a.a.setMuted(!0),ms(a,!1)):a.g.warn("Audio decision not supported",c))};ms=function(a,b){a.j.filter(function(c){return!c.primary&&c.player}).forEach(function(c){return c.player.setMuted(b)})};ns=function(a){a.B.forEach(function(b){return a.G.removeChild(b)});a.B=[];Gr(a,a.a,!0)};
|
|
299
|
+
ks=function(a,b){return _.I(function(c){return 1==c.a?_.y(c,a.release(),2):_.y(c,a.load(b),0)})};Mr=function(a){if(a.lb){var b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.lb.a=b}a.wf&&a.wf()};
|
|
300
|
+
us=function(a){_.Hm.call(this);var b=this;this.h=_.N.ua({bo:.5},a);this.g=new _.K("clpp.interstitial.Player");this.j=a.player;this.j.setSeekInterceptor(function(c,d){d||os(b,c);var e=ps(b,c);if(e){if(qs(e))return b.g.info("Seeking into an interstitial",e.ia),rs(b,e)["catch"](function(){b.j.seek(c)}),!1}else{var f=ss(b,c);f&&!f.Nl&&(b.g.info("Trigger interstitial due to jump over it",f,"will resume at",c),rs(b,f,c)["catch"](function(){f.Nl=new Date;b.j.seek(c)}))}return!0});this.a=new Hr({Il:this.h.config,
|
|
301
|
+
oj:a.player,preloadMedia:!0,ob:a.ob,sideAdContainer:this.h.sideAdContainer,onAudioDecision:this.h.onAudioDecision});this.l=[];this.f=[];this.o=!1;ts(this,a.player)};vs=function(a){return(a=a.a.getCurrentItem())&&!a.primary?a.player:null};
|
|
302
|
+
xs=function(a){var b,c,d;_.I(function(e){var f=a.a;Or(f,[{id:Uf,primary:!0,config:f.a.getConfiguration(),next:[],xb:0,duration:0,Oa:null}]);var g=Ir(f);if(!g)throw Error("Failed to find primary item");f.f=g;g.role=js;g.player=f.a;g.videoEl=g.player.getSurface().getMedia();Gr(f,g.player,!0);b=a.j;c=b.getConfiguration();d=!c.autoplay;a.o=ws(a,d,b.isLive(),!1);if(a.o){f=a.a;g=f.o;if(g=g.a[0]?g.a[0].player:null)f.w||Gr(f,f.a,!1),Gr(f,g,!0);return e.F(0)}return c.autoplay?_.y(e,Nr(a.a),0):e.F(0)})};
|
|
303
|
+
os=function(a,b){var c=a.j.getPosition();b>=c||a.f.filter(function(d){return 1===d.xe&&!d.once&&d.Ri&&d.startTime>b}).forEach(function(d){d.gh=!0})};
|
|
304
|
+
ws=function(a,b,c,d){var e=ys(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=Zi(a.f.map(function(n){return n.ia}),e.map(function(n){return n.id}));zs(a,f.ko);var g=new Set(f.Tj);f=e.filter(function(n){return g.has(n.id)})}if(!As(a,f))return!1;var h=[],l=[],m=[];f.forEach(function(n){var p=n.customAttributes.CUE||[];p.includes(_.Ib)?l.push(n):!d&&p.includes("PRE")?h.push(n):!c&&n.startTime<a.h.bo?h.push(n):m.push(n)});1<h.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):
|
|
305
|
+
h[0]&&Bs(a,h[0],b);m.forEach(function(n){return Cs(a,n,1)});1<l.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):l[0]&&Cs(a,l[0],2);Ds(a,e);a.g.info("Interstitials changed",a.f);return 0<h.length};
|
|
306
|
+
Ds=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.f.forEach(function(h){var l=b.find(function(n){return n.id===h.ia});if(l){var m=l.customAttributes[rc];null==h.sc&&null!=m&&(a.g.info(gc,l.id,"Playout limit",m),h.sc=m)}}),g["return"]();d=b.find(function(h){return h.id===c.Oa});if(!d)return g["return"]();e=d.customAttributes[rc];if(null==e)return g["return"]();f=a.f.find(function(h){return h.ia===d.id});if(!f||null!=f.sc)return g["return"]();
|
|
307
|
+
a.g.info(gc,d.id,"Playout limit",e);f.sc=e;return _.y(g,Lr(a.a,e),0)})};zs=function(a,b){var c=new Set(b);a.f.forEach(function(d){c.has(d.ia)&&!qs(d)&&a.g.warn("Removing an interstitial in active state",d)});a.f=a.f.filter(function(d){return!c.has(d.ia)})};ys=function(a){return a.j.getTimelineCues().filter(function(b){return b.schemeIdUri===Td&&b.customAttributes})};
|
|
308
|
+
rs=function(a,b,c){var d;return _.I(function(e){if(1==e.a)return _.y(e,Es(a,b),2);d=e.f;if(!d)throw Error("Failed to bind");return _.y(e,Fs(a,b,1,!1,c),0)})};
|
|
309
|
+
Cs=function(a,b,c){var d=b.customAttributes[qc],e=b.customAttributes[pc],f=b.customAttributes[tc],g=b.customAttributes[rc],h=b.customAttributes[sc]||[];b.customAttributes[vc]||(b.customAttributes[vc]=null==f||0<f?"RANGE":"POINT");var l=b.id,m=b.startTime,n=b.endTime,p=Gs,q=null==f?null:Math.max(0,b.startTime+f),u="POINT"===b.customAttributes[vc],v=!h.includes("SKIP");h=!h.includes("JUMP");var z=b.customAttributes[oc];if(z)try{var A=JSON.parse(atob(z))}catch(H){A=null}else A=null;b={ia:l,startTime:m,
|
|
310
|
+
endTime:n,state:p,nh:e,oh:d,Fa:null,V:q,po:f,sc:g,xe:c,Cm:u,dk:v,ck:h,xj:A,Ri:null!=f&&0>f,once:(b.customAttributes.CUE||[]).includes("ONCE"),uj:!1,gh:!0};a.f.push(b);return b};
|
|
311
|
+
Bs=function(a,b,c){var d,e,f,g,h;_.I(function(l){switch(l.a){case 1:return d=Cs(a,b,0),_.y(l,Es(a,d),2);case 2:e=l.f;f=d.Fa?d.Fa.length:0;if(e&&0<f){_.C(l,9);var m=Fs(a,d,0,c);a.g.info("Preroll interstitial "+d.ia+" scheduled");return _.y(l,m,11)}if(e){a.g.warn("Preroll interstitial has no assets, skipping");l.F(5);break}a.g.error("Preroll interstitial failed, skipping");return _.y(l,gs(a.a),5);case 5:if(c){l.F(0);break}return _.y(l,Nr(a.a),0);case 11:_.Hh(l,0);break;case 9:g=_.E(l);a.g.error("Preroll interstitial failed.",
|
|
312
|
+
g);if(h=Ir(a.a))return _.y(l,a.a.play(h.id),0);l.F(0)}})};Hs=function(a){a.l.forEach(function(b){return b()});a.l=[]};
|
|
313
|
+
ts=function(a,b){function c(){ws(a,!1,!0,!0)}function d(){var e,f,g,h,l;return _.I(function(m){switch(m.a){case 1:e=b.getPosition();f=Is(a,e);if(!f){m.F(2);break}a.g.info(lb+f.ia+" coming up at "+(f.startTime+" s"));return _.y(m,Es(a,f),3);case 3:(g=m.f)&&Js(a,f,b);case 2:h=Ks(a);if(!(h&&h.state===Gs&&b.getDuration()-e<a.h.resolutionOffsetSec)){m.F(0);break}return _.y(m,Es(a,h),5);case 5:if(l=m.f)if(h.Fa&&0!==h.Fa.length){var n=a.a.getCurrentItem();if(n){var p=Ls(a,h,2);if(0!==p.length){var q=p[0].id;
|
|
314
|
+
n.next=[q];n.transition={Ha:q};Ms(a,h,p);a.g.info("Postroll interstitial "+h.ia+" scheduled")}}}else a.g.warn("Postroll interstitial has no assets, ignoring.");_.B(m)}})}b.addEventListener(_.Gg,d);a.l.push(function(){b.removeEventListener(_.Gg,d)});b.addEventListener(_.Fg,c);a.l.push(function(){b.removeEventListener(_.Fg,c)})};Ks=function(a){return a.f.find(function(b){return 2===b.xe})||null};
|
|
315
|
+
As=function(a,b){for(var c=b.sort(function(n,p){return n.startTime-p.startTime}),d=a.h.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.h.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[qc];
|
|
316
|
+
n.customAttributes[pc]||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};Is=function(a,b){return a.f.find(function(c){var d=c.startTime-b;return 1===c.xe&&qs(c)&&0<d&&d<=a.h.resolutionOffsetSec})||null};
|
|
317
|
+
ps=function(a,b){return a.f.find(function(c){return!c.Cm&&1===c.xe&&b>c.startTime&&b<c.endTime})||null};ss=function(a,b){var c=a.j.getPosition();return a.f.filter(function(d){return 1===d.xe&&!d.ck}).sort(function(d,e){return e.startTime-d.startTime}).find(function(d){return d.startTime>c&&d.startTime<b})||null};
|
|
318
|
+
Es=function(a,b){var c,d,e,f;return _.I(function(g){switch(g.a){case 1:b.state=Ns;if(!b.nh){b.oh?(b.Fa=[{URI:b.oh,DURATION:b.endTime-b.startTime}],a.ab(new _.L(Ec,{id:b.ia,detail:Os(b)})),b.state=Ps):b.state=Qs;g.F(2);break}_.C(g,3);a.g.info("Load X-ASSET-LIST for "+b.ia);a.ab(new _.L(Cc));return _.y(g,Rs(a,b.nh),5);case 5:c=g.f;b.Fa=c.ASSETS;b.Fa&&0!==b.Fa.length||a.g.info(lb+b.ia+" has no assets, will be smoothly skipped");null==b.V&&(d=Sj(b.Fa.map(function(h){return h.DURATION})),e=null==b.sc?
|
|
319
|
+
d:Math.min(b.sc,d),b.V=b.startTime+e);b.state=Ps;a.ab(new _.L(Dc));a.ab(new _.L(Ec,{id:b.ia,detail:c}));_.Hh(g,2);break;case 3:f=_.E(g),a.g.error("Failed to load X-ASSET-LIST",f),b.state=Qs;case 2:return g["return"](b.state===Ps)}})};Ss=function(a,b){var c=a.h.$n;if(c){var d=new URL(b);d.searchParams.set("_HLS_primary_id",c);return d.toString()}return b};
|
|
320
|
+
Fs=function(a,b,c,d,e){var f,g,h,l;return _.I(function(m){f=a.a.getCurrentItem();if(!f)return m["return"]();g=Ls(a,b,c);if(0===g.length)return m["return"]();Ms(a,b,g);h=0===c&&a.j.isLive();h||(l=e||b.V)&&bs(a.a,l);return d?_.y(m,a.a.load(g[0].id),0):_.y(m,a.a.play(g[0].id),0)})};
|
|
321
|
+
Js=function(a,b,c){if(b.Fa)if(0===b.Fa.length){var d=function(){c.isLive()?a.g.info("Skipping empty live interstitial "+b.ia):null!=b.V&&0!==b.po?c.seek(b.V):a.g.info("Empty VOD interstitial "+b.ia+", continuing to next segment")};c.one(_.Dg,d);a.l.push(function(){c.off(_.Dg,d)});a.g.info(lb+b.ia+" scheduled to be skipped")}else{var e=a.a.getCurrentItem();if(e){var f=Ls(a,b,1);if(0!==f.length){var g=f[0].id;null!=b.V&&bs(a.a,b.V);e.next=[g];e.transition={uf:{position:b.startTime,itemId:g,V:b.V}};
|
|
322
|
+
Ms(a,b,f);a.g.info(lb+b.ia+" scheduled for "+(b.startTime+" s"))}}}};Ms=function(a,b,c){Or(a.a,c);ds(a.a);b.state=Ts;a.ab(new _.L(_.Gc,{detail:null}))};
|
|
323
|
+
Ls=function(a,b,c){var d=0,e=b.Fa.map(function(h,l){var m=b.ia+"-"+l;d+=h.DURATION;return{id:m,config:{source:{url:Ss(a,h.URI),type:_.tm}},duration:h.DURATION,xb:d,Oa:b.ia,next:[],lb:new qr(c,l+1,b.Fa.length,h.DURATION,b.ia,b.dk)}});e.forEach(function(h,l){var m=l===e.length-1;m&&2===c||(m?(h.next=[Uf],h.transition={Ha:Uf}):(m=m?Uf:h.Oa+"-"+(l+1),h.next=[m],h.transition={Ha:m}))});e.forEach(function(h){h.wf=function(){a.g.info("Playing interstitial asset "+h.id,h)}});if(null!=b.sc&&(e=Us(a,b,e),0===
|
|
324
|
+
e.length))return[];var f=e[0].wf;e[0].wf=function(){b.uj=!0;b.Ri&&(b.gh=!1);a.g.info("Playing interstitial "+c+" "+b.ia+" with "+(b.Fa.length+" assets and will resume primary content ")+((b.V?"at "+b.V.toFixed(1)+" s":"after interstitial ended")+"."),e);f()};e[0].$i=function(h){null==b.V&&(b.V=b.startTime+h,bs(a.a,b.V),a.g.info("Primary content will resume at",b.V));b.state=Vs};var g=e[e.length-1];g.Ha=function(){b.state=Ws;Pr(a.a,e.map(function(h){return h.id}));2===c&&gs(a.a)};g.Ng=a.h.adReleaseDelayMs;
|
|
325
|
+
return e};Us=function(a,b,c){var d=b.sc;a.g.info("Playout limit for "+b.ia+" is "+(d+" s"));b=c[c.length-1].xb;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.xb-f.duration<=d});e.forEach(function(f){f.lb.f=e.length});a=e[e.length-1];c=d-(a.xb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Ha=Uf:a.transition.uf={position:c,itemId:Uf,V:null};a.maxDuration=c;return e};
|
|
326
|
+
Rs=function(a,b){var c,d,e,f,g,h;return _.I(function(l){if(1==l.a){c=a.a.af();if(!c)throw Error("No player found");d=c.getNetworkEngine();e=_.wk(Ss(a,b));return _.y(l,Tk(d,e),2)}f=l.f;g=Xs(f);if(!g)throw new _.mj("Invalid X-ASSET-LIST list response");h=f;return l["return"](h)})};Xs=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(function(b){return typeof b.URI===_.tg&&typeof b.DURATION===_.k}):!1};qs=function(a){return a.gh&&!(a.once&&a.uj)&&[Gs,Ws].includes(a.state)};
|
|
327
|
+
Os=function(a){var b={URI:a.Fa[0].URI,DURATION:a.Fa[0].DURATION};a.xj&&(b[oc]=a.xj);return{ASSETS:[b]}};Ys=function(){this.a=null};Zs=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)})}};
|
|
328
|
+
at=function(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.vi;this.h=null;this.f=!0;$s(this)};$s=function(a){a.a.on(window,"offline",function(){bt(a,!1)});a.a.on(window,"online",function(){a.f||ct(a)});a.a.on(a.m,og,function(){return dt(a)});a.a.on(a.m,"suspend",function(){return dt(a)});a.a.on(a.m,_.dh,function(){return dt(a)});a.a.on(a.m,_.Kf,function(){a.f||ct(a)});a.a.on(a.m,_.Vf,function(){a.f||ct(a)});a.a.on(a.m,_.qg,function(){switch(a.m.getState()){case _.Lq:dt(a);break;default:dt(a)}})};
|
|
329
|
+
ct=function(a){a.m.getConfiguration().connectivityCheck&&(et(a),a.h=(new _.li(function(){return ft(a)})).fa(5))};dt=function(a){a.f&&ct(a)};et=function(a){a.h&&(a.h.stop(),a.h=null)};ft=function(a){var b,c;return _.I(function(d){if(1==d.a)return(b=a.m.getConfiguration().connectivityCheck)&&a.m?_.y(d,Uk(a.j,b.url,b.attemptParameters,b.method),2):d["return"]();c=d.f;bt(a,c);_.B(d)})};bt=function(a,b){et(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.L(nf,{online:a.f})))};
|
|
330
|
+
ht=function(){for(var a=0;a<gt.length;++a)gt[a].hd()};_.it=function(a,b){b=b||0;for(var c={priority:b,hd:a},d=0;d<gt.length;d++)if(gt[d].priority<b){gt.splice(d,0,c);return}gt.push(c)};jt=function(a,b){a.onError(b);a.release().then(function(){return a.destroy()})};kt=function(a,b,c){var d=_.T.da;this.h=a;this.f=b;JSON.parse(d(_.jk(a)));this.a=JSON.parse(d(_.jk(b)));this.j=c};
|
|
331
|
+
mt=function(a){var b=lt,c=_.T.ib,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=_.jk(f);return l.verify(m,n,q.buffer,p.buffer)}).then(function(n){n?g():h(new _.mj("Signature Verification failed",Kg))})["catch"](h)}else g()})};nt=function(a){this.f=a;this.a=null;this.g=new _.K("clpp.utils.LicenseKey")};
|
|
332
|
+
ot=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 kt(b[0],b[1],b[2]);a.a=b}return a.a};
|
|
333
|
+
pt=function(a){var b,c,d;return _.I(function(e){if(1==e.a)return b=ot(a),_.C(e,2),_.y(e,mt(b),4);if(2!=e.a)return _.Hh(e,0);if((c=_.E(e))&&c.code===Kg)throw c;var f=window.location.href,g=new _.rj(f);d=g.Gb||g.bb?g:new _.rj("//"+f);if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(d.bb))return e["return"]();throw c;})};
|
|
334
|
+
qt=function(a){switch((a.ba[0]||{src:"",type:""}).type){case _.Wc:a="dash";break;case _.ad:a="ss";break;case _.tm:a="hls";break;case _.Yg:a="mp4";break;default:a=""}return a};rt=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?""+a.customData.userId:""};st=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?""+a.customData.assetId:""};tt=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?""+a.customData.sessionId:""};
|
|
335
|
+
vt=function(a){var b=a.configuration,c="no";b.drm&&!_.N.qa(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(te)||ut(a).endsWith("drmtoday.com"))&&(c=te);return c};wt=function(a){a=a.drmInfo;var b="";if(a)switch(a.keySystem){case _.Xd:b="wv";break;case _.Vd:b="pr";break;case _.Sd:b="fps"}return b};xt=function(a){a=a.drmInfo;var b=!1;a&&(b=a.persistentStateRequired);return b.toString()};
|
|
336
|
+
yt=function(a){a=a.drmInfo;var b="";if(a)switch(a.videoRobustness){case ib:case gb:b="L1";break;case hb:b="L2";break;case _.Ub:case _.Tb:b="L3"}return b};ut=function(a){a=a.drmInfo;return(new _.rj(a&&a.licenseServerUri||"")).bb};
|
|
337
|
+
Bt=function(a,b){var c="ie"===_.Ok().browser,d=b.configuration,e=_.th(Array.from(_.Tm.keys())).concat(_.th(b.nj));d={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ia,"CL-USER-ID":rt(d),"CL-ASSET-ID":st(d),"CL-SESSION-ID":tt(d),"CL-PLAYBACK-TYPE":b.isLive?zt:At,"CL-CONTENT-TYPE":qt(b),"CL-PLUGINS":e.join(" "),"CL-DRM":vt(b),"CL-DRM-CDM":wt(b),"CL-DRM-SEC-LEVEL":yt(b),"CL-DRM-OFFLINE":xt(b),"CL-DRM-IP":ut(b)};c&&(e=window.localStorage.getItem("cl_et"))&&(d["CL-ETAG"]=e);e=_.wk(["https://downloads.castlabs.com/r/register/"]);
|
|
338
|
+
e.method="GET";e.headers=d;return(new _.Rk).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=ot(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;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.";
|
|
339
|
+
break;default:f=Promise.resolve();break a}a.g.error(qb+l);f=Promise.reject(new _.O(_.P,7,g,l))}}return f})};Dt=function(a){this.m=a;this.f=a.getNetworkEngine();this.h=Ct(this);this.f.fd(this.h);this.a=null};
|
|
340
|
+
Ct=function(a){return function(b){var c=b.headers,d=b=null,e=_.N.pi(c,"cmsd-dynamic");c=_.N.pi(c,"cmsd-static");e&&(b=Et(e),a.a=b);if(c)try{e={};var f=c.split(",");for(c=0;c<f.length;c++){var g=Ft(f[c]),h=g.key,l=g.value;Object.keys(Gt).includes(h)&&(e[Gt[h]]=l)}d=_.N.Kc(e)?e:null}catch(m){Ht.error("CmsdManager parseCmsdStaticHeader_ failed:",m),d=null}(b||d)&&a.m.trigger(new _.L("cmsd-event",{qp:b,Ep:d}))}};
|
|
341
|
+
Et=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=Ft(c[e]),g=f.key;f=f.value;Object.keys(It).includes(g)&&(d[It[g]]=f)}return d}).filter(function(c){return _.N.Kc(c)});return 0<b.length?b:null}catch(c){return Ht.error("CmsdManager parseCmsdDynamicHeader_ failed:",c),null}};
|
|
342
|
+
Ft=function(a){var b=a.split("\x3d"),c=b[0];b=b[1];if(!c)throw new _.mj("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 _.mj("Parsing CMSD, not recognized value type of "+a);};
|
|
343
|
+
X=function(a,b,c){_.Hm.call(this);var d=this;ht();this.g=new _.K("clpp.Player");if(!a)throw new _.O(_.P,7,7102);this.ya=new _.vi;this.f=this.C=b||_.Om();this.l=null;void 0===this.f.license&&(this.f.license=Lm,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(_.P,7,7101,"No license provided in configuration!");this.j=new Cr(a,c);this.H=this.A=this.a=this.G=
|
|
344
|
+
null;this.J=new _.Rk;this.h=null;this.ha=[];this.ja=!0;this.L={};this.Ea=null;this.Y=!0;this.ca=this.U=!1;this.M=this.sd=null;this.fg=!1;this.kb=new at(this);this.B=null;this.on(_.qg,function(){d.getState()===_.Rq&&(d.a?d.a.unload():Promise.resolve())});this.on(_.Sc,this.Ui.bind(this));this.on(_.Rc,this.Ui.bind(this));this.on(_.Fg,function(){return Jt(d)});Kt(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
|
|
345
|
+
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=_.w(Lt);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)}}Mt(this,a);this.P=_.qa;Zm(this)};
|
|
346
|
+
_.Nt=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};Kt=function(a,b){a.G=new nt(b);pt(a.G)["catch"](function(c){setTimeout(function(){a.g.error(qb+c);a.trigger(new _.L(_.ze,{detail:new _.O(_.P,7,7101)}));a.destroy()},1E3)})};
|
|
347
|
+
Ot=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 nt(a.f.license)),_.C(e,2),a.g.debug("Verifying license remotely"),_.y(e,Bt(a.G,b),4);if(2!=e.a)return a.g.debug("License verified remotely"),_.Hh(e,0);c=_.E(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(jt,1E3,d,c);_.B(e)})};
|
|
348
|
+
Mt=function(a,b){a.ha=b;for(var c=_.w(a.ha),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.id();e&&(a.L[e]=d)}a.Qc("onPlayerCreated")};
|
|
349
|
+
Pt=function(a){var b,c;return _.I(function(d){switch(d.a){case 1:if(a.Y)return a.g.debug("The player is already released. No-op"),d["return"](new Promise(function(e){return e()}));a.ya.off(document,bh);a.trigger(new _.L(_.Zf));a.j&&a.j.release();if(!a.h){d.F(2);break}return _.y(d,a.h.Dc(),3);case 3:a.h=null;case 2:if(!a.B){d.F(4);break}return _.y(d,a.B.release(),5);case 5:a.B=null;case 4:if(a.a)return b=null,c=a.a.on(_.qg,function(e){b=e}),d["return"](a.Qc(_.lf).then(function(){a.a.stopForwardingEventsTo(a);
|
|
350
|
+
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(_.qg,c);a.trigger(new _.L(Yf))}));a.trigger(new _.L(Yf));return d["return"](new Promise(function(e){return e()}))}})};
|
|
351
|
+
Rt=function(a,b,c){if(a.P===_.Hb)b=Qt(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.ca){a.ca=!1;if(b){for(var d=a=null,e=0;e<b.length;e++);e=Object.values(_.di);for(var f=0;f<b.length;f++)for(var g=0;g<e.length;g++){var h={ob: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?(_.fi.debug("Player Factory '"+a.ob.a()+"' can play",b[d]),b=new ci(a.ob,d)):(_.fi.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
|
|
352
|
+
null;if(!b)throw new _.O(_.P,7,7003,"No player factory compatible with given sources found!");c=b.ob;a=c.create();b={ob:c,player:a,sourceIndex:b.sourceIndex}}else b={ob:a.A,player:a.a,sourceIndex:0};return b};Qt=function(a,b){var c=hi(function(d){return d.f(_.Hb)&&a.every(function(e){return 2===d.canPlay(e,b)})});if(!c)throw new _.O(_.P,7,7003,"No compatible player implementing playlist mode found!");return{ob:c,player:c.create(),sourceIndex:0}};
|
|
353
|
+
Tt=function(a){var b;return _.I(function(c){if(1==c.a){if(!a.a)return a.g.warn(Kb),c["return"]();b=a.a;if(!b.Ch)return a.g.warn(Ob),c["return"]();a.trigger(new _.L(Ue));return _.y(c,b.Ch(),2)}return _.y(c,_.St(a),0)})};
|
|
354
|
+
_.Xt=function(a,b,c){var d,e;return _.I(function(f){if(1==f.a){if(a.U)throw new _.O(_.P,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.O(_.P,7,7E3,"No surface associated with this player!");_.mp(Bf);return _.y(f,a.release(),2)}if(3!=f.a){d=c||_.Yq(b);if(!b||0===d.length)throw new _.O(_.P,7,7003,Bb);a.Ea=d;a.f=_.Qm(a.C,b,{source:d});a.Y=!1;e=Rt(a,d,a.f);_.Nt(a,e.player,e.ob);Ut(a,a.a);a.a&&a.a.setSourceIndex(e.sourceIndex);Vt(a);a.a&&a.a.setCdnErrorCallback(a.M);Wt(a,a.f);a.B=new Dt(a);
|
|
355
|
+
a.a.setCmsdManager(a.B);if(a.f.pauseWhenInBackground)a.ya.on(document,bh,function(){document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});$m(a);return _.y(f,a.Qc("onContentWillLoad",a.f.source[e.sourceIndex]),3)}_.mp(Af);_.op("player.beforeLoad",Bf,Af);_.B(f)})};
|
|
356
|
+
_.Yt=function(a){return _.I(function(b){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.L(Ue));return _.y(b,Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()]),0)})};Ut=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=Zs()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.H=c};Zt=function(a){a.H&&(a.g.info("Playback session ended, ID:",a.H),a.H=null,a.a&&a.a.setPlaybackSessionId(null))};
|
|
357
|
+
au=function(a){var b,c,d,e;_.I(function(f){if(1==f.a){b=[];if(a.f.remoteTextTracks)for(c=_.w(a.f.remoteTextTracks),d=c.next();!d.done;d=c.next())e=d.value,b.push(a.getTrackManager().addTextTrack(e));return _.y(f,Promise.all(b),2)}$t(a);_.B(f)})};
|
|
358
|
+
$t=function(a){var b=_.Ui(a.f.preferredTextLanguage).filter(function(f){return f}),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ma().filter(function(f){return c?f.kind===_.Be:f.kind!==_.Be});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().ra();e&&e.language?(e=_.Oj(e.language||""),b.push(e)):(e=a.getTrackManager().Na())&&e.language&&(e=_.Oj(e.language||""),b.push(e));0===
|
|
359
|
+
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=_.Oj(f);if(f=d.find(function(h){h=_.Oj(h.language||"");return _.Pj(h,g)}))return a.getTrackManager().$a(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};
|
|
360
|
+
_.St=function(a){var b;return _.I(function(c){if(1==c.a)return _.mp(xf),Ot(a,{configuration:a.getConfiguration(),ba:a.wi(),drmInfo:a.getDrmInfo(),nj:Object.keys(a.L),isLive:a.isLive()}),au(a),an(),_.y(c,a.Qc(_.hf),2);if(3!=c.a)return a.f.autoplay?(b=a.h?a.h.gd():!0)?_.y(c,a.play(),3):c.F(3):c.F(3);_.mp(wf);_.op("player.afterLoad",xf,wf);_.B(c)})};Wt=function(a,b){var c=nr(a,b);c&&(a.h=c.create(a))};
|
|
361
|
+
Jt=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(function(c){return c.schemeIdUri===Td})){var b=a.f.mse.sendPlaybackSessionIdHeader?a.H:null;a.h=new Ys;a.h.kd(a.a,a.A,b)}};Vt=function(a){a.a&&a.a.setDrmCustomDataModifier(function(b){return _.I(function(c){if(!a.sd||!a.fg)return c.F(0);a.fg=!1;return _.y(c,a.sd(b),0)})})};_.bu=function(a){a&&(0<=Lt.indexOf(a)||Lt.push(a))};
|
|
362
|
+
cu=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.C=_.N.ua(this.C,a);this.f=_.N.ua(this.f,a);this.I=0;this.o=[];this.ea=!1;this.w=null;this.K=[]};du=function(a){a.K.forEach(function(b){return b()});a.K=[]};
|
|
363
|
+
eu=function(a,b){function c(f){a.I=a.o.findIndex(function(g){return g.id===f.id})}a.addEventListener(_.eg,c);a.K.push(function(){a.removeEventListener(_.eg,c)});if(b.endTime){var d=b.endTime,e=function(){a.getPosition()>=d&&(a.removeEventListener(_.Gg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.L(_.dg)),a.pause())};a.addEventListener(_.Gg,e);a.K.push(function(){a.removeEventListener(_.Gg,e)})}};
|
|
364
|
+
hu=function(a,b){var c,d;return _.I(function(e){switch(e.a){case 1:return _.C(e,2),_.mp(Gf),a.P=_.Hb,a.ja=!1,c=b.slice(1).map(function(f){return{config:f,ba:_.Yq(f)}}),_.y(e,_.Xt(a,b[0]),4);case 4:return c.forEach(function(f){fu(a,f.config,f.ba)}),a.trigger(new _.L(Ue)),_.y(e,a.a.setupPlaylist(b),5);case 5:return _.y(e,_.St(a),6);case 6:c.forEach(function(f){gu(a,f.config,f.ba)});_.mp(Ef);_.op("player.setupPlaylist",Gf,Ef);_.Hh(e,0);break;case 2:d=_.E(e);if(a.l)throw a.g.info(rb),new _.O(_.P,7,7E3);
|
|
365
|
+
throw d;}})};iu=function(a,b){var c,d;return _.I(function(e){if(1==e.a)return _.C(e,2),_.mp(zf),c=_.Yq(b),fu(a,b,c),_.y(e,a.a.appendLoad(b),4);if(2!=e.a)return gu(a,b,c),_.mp(yf),_.op("player.appendLoad",zf,yf),_.Hh(e,0);d=_.E(e);if(a.l)throw a.g.info(rb),new _.O(_.P,7,7E3,{id:b.id});throw d;})};gu=function(a,b,c){Ot(a,{configuration:b,ba:c,drmInfo:a.getDrmInfo(),nj:Object.keys(a.L),isLive:c[0].isLive})};
|
|
366
|
+
fu=function(a,b,c){if(0===c.length)throw new _.O(_.P,7,7003,{message:Bb,id:b.id});if(1<c.length)throw new _.O(_.P,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(_.P,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};
|
|
367
|
+
lu=function(a){_.Hm.call(this);var b=this;this.h=_.N.ua({transition:_.rf,preloadMedia:!1},a);this.j=[];this.a=0;var c=ju(a.anchorId,this.h.config);this.w=new rr(c);this.f=null;this.l=!1;this.o=new Map;this.A=a.toggleVisible;this.g=new _.K(Kd);this.w.a.forEach(function(d){return ku(b,d.player,!1)})};nu=function(a){return Promise.all(Array.from(a.o.keys()).map(function(b){return mu(a,b)}))};
|
|
368
|
+
mu=function(a,b){var c;return _.I(function(d){if(1==d.a){c=a.o.get(b);if(!c)return d.F(0);a.g.info("Stop preloading item (index: "+b+")");return c.player?_.y(d,ou(a,c),3):d.F(3)}a.o["delete"](b);_.B(d)})};qu=function(a,b){return _.I(function(c){if(1==c.a)return a.g.info("Stop current playback (index: "+b.index+")"),b.player.pause(),ku(a,b.player,!1),_.y(c,ou(a,b),2);b.player=null;b.videoEl=null;b.role=pu;_.B(c)})};
|
|
369
|
+
ou=function(a,b){return _.I(function(c){b.disposers.forEach(function(d){return d()});b.disposers=[];return b.player?_.y(c,a.w.release(b.player),0):c.F(0)})};tu=function(a,b){var c;return _.I(function(d){if(1==d.a)return _.y(d,a.w.get(),2);if(3!=d.a)return c=d.f,a.f=b,b.role=ru,a.f.player=c,a.f.videoEl=c.getSurface().getMedia(),ku(a,c,!0),_.y(d,c.load(b.config),3);su(a,b);return b.config.autoplay?d.F(0):_.y(d,c.play(),0)})};
|
|
370
|
+
uu=function(a,b){return _.I(function(c){switch(c.a){case 1:if(!b.player)return c["return"]();if(b.state!==Sf){c.F(2);break}a.g.info(kc);_.C(c,3);return _.y(c,b.preloadPromise,5);case 5:_.Hh(c,2);break;case 3:_.E(c);case 2:a.f=b;b.role=ru;ku(a,b.player,!0);if(b.state===Rf)return _.mp(Of),a.h.preloadMedia?_.y(c,b.player.play(),11):_.y(c,Tt(b.player),11);if(b.state!==Qf){c.F(7);break}return _.y(c,b.player.load(b.config),7);case 11:_.mp(Nf),_.op("playlist.next",Of,Nf);case 7:if(su(a,b),b.config.autoplay)c.F(0);
|
|
371
|
+
else return _.y(c,b.player.play(),0)}})};su=function(a,b){if(a.h.autoplayNext){var c=function(){a.g.info("Automatically transition to next item");a.mj()};b.player.on(_.ye,c);var d=b.player;b.disposers.push(function(){d.off(_.ye,c)})}};wu=function(a){var b;return _.I(function(c){b=a.a+1;a.g.info("Preload following item (index: "+b+")");return _.y(c,vu(a,b),0)})};xu=function(a){var b;return _.I(function(c){b=a.a-1;a.g.info("Preload preceding item (index: "+b+")");return _.y(c,vu(a,b),0)})};
|
|
372
|
+
yu=function(a){var b;_.I(function(c){if(0===a.a)return _.y(c,wu(a),0);if(a.a===a.j.length-1)return _.y(c,xu(a),0);b=[a.a-1,a.a+1];a.g.info("Preload items (indices: "+b+")");return _.y(c,Promise.all(b.map(function(d){return vu(a,d)})),0)})};
|
|
373
|
+
vu=function(a,b){var c,d,e;return _.I(function(f){switch(f.a){case 1:return _.y(f,a.w.get(),2);case 2:return c=f.f,d=a.j[b],d.player=c,d.videoEl=c.getSurface().getMedia(),d.role=pu,d.state=Sf,a.trigger(new _.L(Og)),_.C(f,3),a.o.set(b,d),a.h.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),_.y(f,d.preloadPromise,5);case 5:d.state=
|
|
374
|
+
Rf;a.trigger(new _.L(Og));_.Hh(f,0);break;case 3:e=_.E(f),7001===e.code?(a.g.info("Preload aborted (index: "+b+")"),d.state=Pf):(a.g.warn("Preload failed (index: "+b+")",e),a.trigger(new _.L(_.ze,{detail:e})),d.state=Qf),a.trigger(new _.L(Og)),_.B(f)}})};ku=function(a,b,c){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(Xb+b),d.classList.add(Dd)):(a.g.info(kb+b),d.classList.remove(Dd)),a.A&&a.A(d,c))};
|
|
375
|
+
zu=function(a){var b;return _.I(function(c){if(1==c.a)return _.y(c,a.w.destroy(),2);b=document.getElementById(a.h.anchorId);if(!b)return c["return"]();b.classList.remove(Cd);b.innerHTML="";_.B(c)})};
|
|
376
|
+
ju=function(a,b){var c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(Cd);return Array.from({length:3}).map(function(){var d=document.createElement(_.r);d.classList.add("clpp-mc-playlist-video-el");var e=document.createElement(_.fe);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new X(d,b)})};
|
|
377
|
+
_.Bu=function(a){if(Au.has(a))return Au.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Au.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Au.set(a,b),b):!1};Cu=function(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)};
|
|
378
|
+
Du=function(a,b){var c=b.replace(/mp2t/i,"mp4");a===_.cd&&(c=c.replace(_.r,_.cd));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};Eu=function(){};_.Fu=function(){};
|
|
379
|
+
Gu=function(a,b,c,d,e){_.on.call(this,jb);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.K(Gd);_.T.empty(this.l)?this.g.warn(_.mc):this.gb(_.Xd,{licenseUrl:this.l,videoRobustness:[_.Ub,void 0],audioRobustness:[_.Tb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.ve.bind(this)}});_.T.empty(this.j)?this.g.warn(_.Jb):this.gb(_.Vd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.ve.bind(this)}});
|
|
380
|
+
_.T.empty(this.h)?this.g.warn(_.eb):_.T.empty(this.a)?this.g.warn(_.db):this.gb(_.Sd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Xi.bind(this),licenseResponse:this.Yi.bind(this),certificateRequest:this.ve.bind(this),extractContentId:this.ci.bind(this)}})};Hu=function(){};Iu=function(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if(typeof Event===_.De)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)};
|
|
381
|
+
Ju=function(a){a=a.target;if(a.webkitPresentationMode===uf){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)};Ku=function(){return this.webkitSupportsPresentationMode(uf)?(this.webkitSetPresentationMode(uf),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};
|
|
382
|
+
Lu=function(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};Mu=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Nu=function(a,b,c){return new window.TextTrackCue(a,b,c)};
|
|
383
|
+
Ou=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Qu=function(a,b,c){if("input"===a)switch(this.type){case "range":a=yd}Pu.call(this,a,b,c)};Su=function(){this.a=Ru()};Tu=function(a){return Ru()-a.a};Uu=function(a){var b=new Su;b.a=a.a;return b};Ru=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};_.Vu=function(a){var b=[];a=_.w(a);for(var c=a.next();!c.done;c=a.next()){c=_.w(c.value.variants);for(var d=c.next();!d.done;d=c.next())b.push(d.value)}return b};
|
|
384
|
+
Wu=function(a){var b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0};Xu=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};_.Yu=function(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null};_.$u=function(){this.a=new Blob([Zu],{type:_.Yg})};_.av=function(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d};_.bv=function(){this.a=[];this.f=-1;this.h=null};
|
|
385
|
+
_.dv=function(a,b,c,d){var e,f;return _.I(function(g){if(1==g.a)return _.C(g,2),_.y(g,cv(a,b,c,d),4);if(2!=g.a)return e=g.f,g["return"](new e);f=_.E(g);f.a(_.P);throw f;})};
|
|
386
|
+
cv=function(a,b,c,d){var e,f,g,h;return _.I(function(l){if(1==l.a){if(d){if(e=_.ev[d.toLowerCase()])return l["return"](e);_.Wh("Could not determine manifest type using MIME type ",d)}if(f=_.fv(a)){if(g=_.gv[f])return l["return"](g);_.Wh("Could not determine manifest type for extension ",f)}else _.Wh("Could not find extension for ",a);return d?l.F(2):_.y(l,hv(a,b,c),3)}if(2!=l.a&&(d=l.f)){if(h=_.ev[d])return l["return"](h);_.Wh("Could not determine manifest type using MIME type",d)}throw new _.O(_.P,
|
|
387
|
+
4,4E3,{url:a});})};hv=function(a,b,c){var d,e,f;return _.I(function(g){if(1==g.a)return d=_.wk(a),tk(d,c),d.type=1,d.method="HEAD",_.y(g,b.fetch(d).T,2);e=g.f;f=e.headers["content-type"];return g["return"](f?f.toLowerCase():"")})};_.fv=function(a){a=(new _.rj(a)).Pa.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};iv=function(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Su};
|
|
388
|
+
kv=function(a,b,c){return b.read().then(function(d){var e=d.done;d=d.value;null!=d&&(jv(a,d),Ek(c,d.byteLength,Tu(a.h)),a.h.a=Ru());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 kv(a,b,c)})})};jv=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};
|
|
389
|
+
Pk=function(a){var b=a.uris[a.uriIndex],c=new lv,d=new Su,e=Uu(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=Tu(e));p.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!l&&(p=p.getResponseHeader(ya),Dk(a,p),l=!0)};c.onload=function(p){p=p.target;var q=(p.getAllResponseHeaders()||"").trim().split("\r\n"),u={};
|
|
390
|
+
q=_.w(q);for(var v=q.next();!v.done;v=q.next())v=v.value.split(": "),u[v[0].toLowerCase()]=v.slice(1).join(": ");try{var z=Tu(e);m||Ek(a,p.response?p.response.length:0,z);var A=_.Ck(u,p.response,p.status,b,p.responseURL,a,z,g);a.rateLimitBps?Fk(a.rateLimitBps,Tu(e),a.bytesLoaded).then(function(){h.resolve(A)}):h.resolve(A)}catch(H){h.reject(H)}};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(),u={};if(q){q=
|
|
391
|
+
_.w(q.trim().split("\r\n"));for(var v=q.next();!v.done;v=q.next())v=v.value.split(": "),u[v[0].toLowerCase()]=v.slice(1).join(": ")}p=_.Ck(u,p.response,p.status,b,p.responseURL,a,Tu(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=Tu(d);d.a=Ru();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,
|
|
392
|
+
request:a,abort:function(){c.abort();h.reject(new _.O(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};mv=function(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Wu(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Su};
|
|
393
|
+
pv=function(a,b,c,d){return b.read().then(function(e){var f=e.done;e=e.value;d&&e&&(d(e.byteLength,Tu(a.w)),a.w.a=Ru());if(f)return f=nv(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){Xu(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=ov(a);for(f=[];e;)f.push(e),e=ov(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],
|
|
394
|
+
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 pv(a,b,c,d)})})};ov=function(a){if(0<=a.o&&a.f<a.o)return null;for(var b=qv(a);null!==b;){if(b.name===_.We){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=qv(a)}return null};
|
|
395
|
+
qv=function(a){var b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=rv(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=rv(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(_.P,3,3E3);}if(2097151<e)throw new _.O(_.P,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};
|
|
396
|
+
rv=function(a){var b=a.l.getUint32(a.a,!1);a.a+=4;return b};nv=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};uv=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;sv(this)};vv=function(a,b,c){a.o=setTimeout(b,c)};
|
|
397
|
+
sv=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=wv(e.request.baseDelay,1E3));var f=a.f*(1+(2*Math.random()-1)*wv(e.request.fuzzFactor,.5));a.f*=wv(e.request.backoffFactor,2);if(0<f)return(new Promise(function(g,h){a.l=h;vv(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});
|
|
398
|
+
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 sv(a);g&&e.a(_.P);a.w.reject(e)}else a.w.reject(e)})};wv=function(a,b){return null===a||void 0===a?b:a};
|
|
399
|
+
Qk=function(a){var b=new xv,c;for(c in a.headers)b.append(c.toLowerCase(),a.headers[c]);var d=new yv,e={Qd:!1,Aj:!1};b={T:zv(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.Qd||(e.Qd=!0,d.abort());return Promise.resolve()}};if(a=a.timeout){var f=window.setTimeout(function(){e.Aj=!0;d.abort()},a);b.T=b.T["finally"](function(){window.clearTimeout(f)})}return b};
|
|
400
|
+
zv=function(a,b,c,d){var e,f,g,h,l,m,n,p,q,u,v,z,A,H,G,D,F;return _.I(function(M){switch(M.a){case 1:return e=Av,f=new Su,g=Uu(f),_.C(M,2),_.y(M,e(a,c),4);case 4:h=M.f;l=uk(h.headers);m={uri:h.url,data:null,headers:l,status:h.status,timeMs:0,responseStartMs:Tu(g),request:b};if(xk(h.status)){M.F(5);break}n=m;return _.y(M,h.arrayBuffer(),6);case 6:throw n.data=M.f,m.timeMs=Tu(f),Bk(m);case 5:p=h.headers.get(ya);Dk(b,p);q=p?parseInt(p,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type)return A=
|
|
401
|
+
h.body.getReader(),H=new mv(q,!b.disableMergedFragments),G=function(R,la){if(d.Qd)return null;la&&la.data&&(Ek(b,la.data.byteLength,Tu(g)),g.a=Ru());return b.onFragment&&la?b.rateLimitBps?Fk(b.rateLimitBps,Tu(f),b.bytesLoaded).then(function(){return b.onFragment(la)}):b.onFragment(la):null},D=m,_.y(M,pv(H,A,G,b.onProgress),12);u=h.body.getReader();v=new iv(q);return _.y(M,kv(v,u,b),9);case 9:z=M.f;if(!b.rateLimitBps){M.F(10);break}return _.y(M,Fk(b.rateLimitBps,Tu(f),z.byteLength),10);case 10:m.data=
|
|
402
|
+
z;M.F(8);break;case 12:D.data=M.f;case 8:if(d.Qd)throw Error("Request was aborted");m.timeMs=Tu(f);return M["return"](Ak(m));case 2:F=_.E(M);if(d.Qd)throw new _.O(1,1,7001,{url:a,request:b});if(d.Aj)throw new _.O(1,1,1003,{url:a,request:b});if(F&&1001===F.code)throw F;_.bi("Error while fetching data:",F);throw new _.O(1,1,1002,{url:a,error:F,request:b,status:-1},F);}})};
|
|
403
|
+
Lk=function(a){try{var b=a.uris[a.uriIndex],c=_.Bv(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()}}}};
|
|
404
|
+
_.Bv=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.bi("Bad data URI, failed to parse scheme"),new _.O(_.P,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.bi("Bad data URI, failed to extract encoding and MIME type"),new _.O(_.P,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?_.jk(a).buffer:_.T.ib(a).buffer,contentType:c}};
|
|
405
|
+
_.Dv=function(a,b){var c=_.Jl(_.Kl(a),_.Ll(a));_.Cv[c]=b};_.Ev=function(a){a=_.Jl(_.Kl(a),_.Ll(a));return _.Cv[a]||null};_.Fv=function(a){a=_.Jl(_.Kl(a),_.Ll(a));delete _.Cv[a]};
|
|
406
|
+
_.Gv=function(a){a=a.getConfiguration();a=_.N.nb(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.tg?a.backgroundColor:null;this.U=typeof a.windowColor===_.tg?a.windowColor:null;this.M=typeof a.fontColor===_.tg?a.fontColor:null;this.P=typeof a.fontFamily===_.tg?a.fontFamily:null;this.I=typeof a.fontSize===_.tg?a.fontSize:null;this.B=typeof a.fontSizePercent===_.k?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.tg?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
|
|
407
|
+
_.tg&&(this.o=a.edgeType)};_.$v=function(a){if(!a.o)return null;var b=a.H;switch(a.o){case Hv:return"-2px -2px 0 "+b+", -1px -1px 0 "+b;case Iv:return"2px 2px 0 "+b+", 1px 1px 0 "+b;case Rv:return"-1px 0 "+b+", 0 1px "+b+", 1px 0 "+b+", 0 -1px "+b;case Zv:return"2px 2px 3px "+b+", 2px 2px 4px "+b+", 2px 2px 5px "+b;default:return _.ef}};aw=function(a){this.f=a;this.a=null;this.g=new _.K("clpp.text.Mp4TextParser")};
|
|
408
|
+
_.cw=function(a){_.Gv.call(this,a);this.l=a.getSurface().getMedia();this.f="clpp-video-"+bw++;this.h=document.createElement(_.vg);this.j=this.w=!1;_.tr(this.l,this.f);document.head.appendChild(this.h);this.Xb()};dw=function(){};_.ew=function(){};_.qh=[];uh=typeof Object.create==_.De?Object.create:function(a){function b(){}b.prototype=a;return new b};
|
|
409
|
+
if(typeof Object.setPrototypeOf==_.De)fw=Object.setPrototypeOf;else{var gw;a:{var hw={Pj:!0},iw={};try{iw.__proto__=hw;gw=iw.Pj;break a}catch(a){}gw=!1}fw=gw?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
|
|
410
|
+
var vh=fw,zh=typeof Object.defineProperties==_.De?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},xh="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Ah.prototype.toString=function(){return this.a};var yh=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new Ah("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}();
|
|
411
|
+
Dh.prototype.A=function(a){this.f=a};Dh.prototype["return"]=function(a){this.h={"return":a};this.a=this.j};Dh.prototype.F=function(a){this.a=a};
|
|
412
|
+
Qh("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=xh.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=
|
|
413
|
+
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 _.ff:var h=null!=g;break a;case _.De:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
414
|
+
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(l){this.h(l);return}typeof h==_.De?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();
|
|
415
|
+
g.Re(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,u){return typeof q==_.De?function(v){try{m(q(v))}catch(z){n(z)}}:u}var m,n,p=new b(function(q,u){m=q;n=u});this.Re(l(g,m),l(h,n));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Re=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: "+
|
|
416
|
+
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=_.w(g),n=m.next();!n.done;n=m.next())d(n.value).Re(h,l)})};b.all=function(g){var h=_.w(g),l=h.next();return l.done?d([]):new b(function(m,n){function p(v){return function(z){q[v]=z;u--;0==u&&m(q)}}var q=[],u=0;do q.push(void 0),u++,d(l.value).Re(p(q.length-1),n),l=h.next();while(!l.done)})};return b});var Sh=this||self;
|
|
417
|
+
Sh.a=!0;_.N={Mj:20,nb:function(a){var b=_.N.R,c=_.N.Ii,d=_.N.ua;return b(a)||c(a)?a:d(a)}};_.J("clpp.utils.obj.cloneItem",_.N.nb);_.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.Pi(c,{merging:b[d]},1));return c.merging||null};_.J("clpp.utils.obj.merge",_.N.ua);_.N.Kc=function(a){for(var b in a)if(void 0!==a[b])return!0;return!1};
|
|
418
|
+
_.N.Pi=function(a,b,c){var d=_.N.R,e=_.N.Ii,f=_.N.Pi,g=_.N.Vb,h=_.N.Fm,l=_.N.qg,m=_.N.Am,n=_.N.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<_.N.Mj&&(a[p]=f(a[p],n,c));return a};_.N.Ii=function(a){a=typeof a;return a===_.tg||a===_.k||a===_.md};_.N.Am=function(a){return a instanceof Element};_.N.R=function(a){return null===a||"undefined"===typeof a};_.N.xd=function(a){return typeof a===_.ff};
|
|
419
|
+
_.N.Vb=function(a){return typeof a===_.De};_.N.ga=function(a){return typeof a===_.tg};_.N.xa=function(a){return typeof a===_.k};_.N.Di=function(a){return typeof a===_.md};_.N.qg=function(a){var b=_.N.xd,c=_.N.R;if(c(a)||!b(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};_.N.Fm=function(a){var b=_.N.xd,c=_.N.Vb;return!!(b(a)&&a.buffer&&a.buffer instanceof ArrayBuffer&&c(a.subarray))};
|
|
420
|
+
_.N.qa=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.xd(a)||!_.N.xd(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};
|
|
421
|
+
_.N.isNaN=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:function(b){return b!==b})(a)};_.N.Bm=function(a,b,c){return a>=b&&a<=c};_.N.lh=function(a){for(var b=new Map,c=_.w(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b};_.N.mh=function(a){var b={};a.forEach(function(c,d){b[d]=c});return b};
|
|
422
|
+
_.N.pi=function(a,b){for(var c=b.toLowerCase(),d=_.w(Object.entries(a)),e=d.next();!e.done;e=d.next()){var f=_.w(e.value);e=f.next().value;f=f.next().value;if(e.toLowerCase()===c)return f}return null};_.N.Ki=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===_.ff&&e&&typeof e===_.ff){if(!_.N.Ki(d,e))return!1}else if(void 0!==d&&void 0!==e&&d!==e)return!1}return!0};
|
|
423
|
+
_.N.Li=function(a,b){if(!_.N.Ki(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===_.ff&&e&&typeof e===_.ff&&_.N.Li(d,e))return!0}return!1};var Xh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.J("clpp.log.Level",Xh);var Uh=0,Th={},jw=[];_.J("clpp.log.getLoggers",function(){return _.N.nb(Th)});_.J("clpp.log.addInterceptor",function(a){a&&jw.push(a)});_.J("clpp.log.removeInterceptor",function(a){a&&(a=jw.indexOf(a),0<=a&&jw.splice(a,1))});_.J("clpp.log.getTagLevel",Vh);_.J("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Th[a]});_.J("clpp.log.setTagLevel",function(a,b){a&&(_.N.ga(b)&&(b=Yh(b)),Th[a]=b)});
|
|
424
|
+
_.J("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.N.ga(a)&&(a=Yh(a));Uh=a});_.J("clpp.log.getLogLevel",function(){return Uh});_.t=_.K.prototype;
|
|
425
|
+
_.t.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=Vh(this.tag);if(0<=d){if(d<c)return}else if(Uh<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):
|
|
426
|
+
1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);d=_.w(jw);for(var e=d.next();!e.done;e=d.next())e=e.value,e.call(e,c,arguments)}};_.t.info=function(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)};_.t.debug=function(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)};_.t.warn=function(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)};
|
|
427
|
+
_.t.error=function(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)};_.t.Cl=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.Cl;_.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 Zh=new _.K("clpp");_.J("clpp.log.info",_.$h);
|
|
428
|
+
_.J("clpp.log.debug",_.ai);_.J("clpp.log.warn",_.Wh);_.J("clpp.log.error",_.bi);(function(){var a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();_.fi=new _.K("clpp.players");_.di={};_.J("clpp.events.ERROR",_.ze);_.J("clpp.events.LOADEDMETADATA",_.Te);_.J("clpp.events.BUFFERING_ENDED",_.nd);_.J("clpp.events.BUFFERING_STARTED",_.od);_.J("clpp.events.STATE_CHANGED",_.qg);_.J("clpp.events.AUDIO_TRACK_CHANGED",_.jd);_.J("clpp.events.TEXT_TRACK_CHANGED",_.Bg);_.J("clpp.events.VIDEO_TRACK_CHANGED",_.$g);_.J("clpp.events.BITRATE_CHANGED",_.ld);_.J("clpp.events.TRACKS_ADDED",_.Hg);_.J("clpp.events.LOAD_START",Ue);_.J("clpp.events.RELEASING",_.Zf);_.J("clpp.events.RELEASED",Yf);
|
|
429
|
+
_.J("clpp.events.DESTROYING","destroying");_.J("clpp.events.DESTROYED","destroyed");_.J("clpp.events.VIDEO_BUFFER_CHANGED",_.Zg);_.J("clpp.events.AUDIO_BUFFER_CHANGED",_.id);_.J("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.J("clpp.events.DRM_SESSION_CREATED",qe);_.J("clpp.events.DRM_SESSION_UPDATE",_.se);_.J("clpp.events.DRM_SESSION_PERSISTED",_.re);_.J("clpp.events.DRM_RENEWAL_STARTED",pe);_.J("clpp.events.DRM_EXPIRATION_UPDATE",_.me);_.J("clpp.events.DRM_LICENSE_REQUESTED",ne);
|
|
430
|
+
_.J("clpp.events.AUTOPLAY_NOT_ALLOWED",_.kd);_.J("clpp.events.PLAY",_.vf);_.J("clpp.events.SEEKING",_.ig);_.J("clpp.events.SEEKED",_.hg);_.J("clpp.events.USER_SEEKING",_.Sg);_.J("clpp.events.USER_SEEKED",_.Rg);_.Oq={SEEKING:1,NO_DATA:2};_.J("clpp.events.BufferingReasons",_.Oq);_.J("clpp.events.ADS_TIMELINE_CHANGED",_.Qc);_.J("clpp.events.AD_LOADED",_.Gc);_.J("clpp.events.AD_BREAK_STARTED",_.wc);_.J("clpp.events.AD_STARTED",_.Mc);_.J("clpp.events.AD_BUFFERING",_.yc);_.J("clpp.events.AD_PROGRESS",_.Jc);
|
|
431
|
+
_.J("clpp.events.AD_FIRST_QUARTILE",_.Bc);_.J("clpp.events.AD_MIDPOINT",_.Hc);_.J("clpp.events.AD_THIRD_QUARTILE",_.Oc);_.J("clpp.events.AD_PAUSED",_.Ic);_.J("clpp.events.AD_RESUMED",_.Kc);_.J("clpp.events.AD_SKIPPED",_.Lc);_.J("clpp.events.AD_CLICKED",_.zc);_.J("clpp.events.AD_IMPRESSION",_.Fc);_.J("clpp.events.AD_COMPLETED",_.Ac);_.J("clpp.events.AD_STOPPED",_.Nc);_.J("clpp.events.AD_BREAK_STOPPED",_.xc);_.J("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Cc);
|
|
432
|
+
_.J("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Dc);_.J("clpp.events.AD_HLS_RESOLVED",Ec);_.J("clpp.events.SIMID_CREATIVE_STARTED",_.kg);_.J("clpp.events.SIMID_CREATIVE_STOPPED",_.lg);_.J("clpp.events.CASTING_STARTED",_.sd);_.J("clpp.events.CASTING_ENDED","castingended");_.J("clpp.events.CAST_STATUS_CHANGED",_.td);_.J("clpp.events.AIRPLAY_STATUS_CHANGED",_.Tc);_.J("clpp.events.AIRPLAY_CASTING_STARTED",_.Sc);_.J("clpp.events.AIRPLAY_CASTING_ENDED",_.Rc);_.J("clpp.events.TIMELINE_CUE_ADDED",_.Cg);
|
|
433
|
+
_.J("clpp.events.TIMELINE_CUE_ENTER",_.Dg);_.J("clpp.events.TIMELINE_CUE_EXIT",_.Eg);_.J("clpp.events.TIMELINE_CUES_CHANGED",_.Fg);_.J("clpp.events.MPD_TYPE_CHANGED",_.cf);_.J("clpp.events.LIVE_TURNED_STATIC",_.Qe);_.J("clpp.events.VIMOND_RESPONSE",_.ah);_.J("clpp.events.PLAYLIST_ITEM_CHANGED",_.Lf);_.J("clpp.events.PLAYLIST_MODIFIED",_.Mf);_.J("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.gg);_.J("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.eg);_.J("clpp.events.SC_PLAYLIST_ENDED",_.dg);
|
|
434
|
+
_.J("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.fg);_.J("clpp.events.CDN_SWITCH_SUCCESS",_.ud);_.J("clpp.events.ONLINE_STATUS_CHANGED",nf);_.J("clpp.events.CMSD_EVENT","cmsd-event");_.J("clpp.events.YOSPACE_SESSION_STARTED",_.ph);_.J("clpp.events.YOSPACE_SESSION_ENDED",_.oh);_.J("clpp.events.CONTENT_STEERING_CHANGE",_.Zd);_.J("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.$d);_.ji.prototype.fa=function(a){return ki(this,a,!1)};_.ji.prototype.Kb=function(a){return ki(this,a,!0)};_.ji.prototype.stop=function(){this.a&&(this.a(),this.a=null)};_.li.prototype.Zg=function(){this.stop();this.f();return this};_.li.prototype.fa=function(a){var b=this;this.stop();this.a=(new _.ji(function(){b.f()})).fa(a);return this};_.li.prototype.Kb=function(a){var b=this;this.stop();this.a=(new _.ji(function(){b.f()})).Kb(a);return this};_.li.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};_.J("clpp.utils.Timer",_.li);_.li.prototype.stop=_.li.prototype.stop;_.li.prototype.tickEvery=_.li.prototype.Kb;_.li.prototype.tickAfter=_.li.prototype.fa;
|
|
435
|
+
_.li.prototype.tickNow=_.li.prototype.Zg;_.t=ni.prototype;_.t.load=function(a){var b=this;return _.I(function(c){return b.Nc?_.y(c,ri(b,function(d){return _.I(function(e){return _.y(e,d.load(a),0)})}),0):(b.Ca.warn("No main player, cannot load."),c["return"]())})};_.t.xo=function(a){this.j=a;this.Ca.info("Looping set to",a)};_.t.Sj=function(a){this.f.push(a)};
|
|
436
|
+
_.t.Rj=function(a){if(this.Nc)this.Ca.warn("Main player already set.");else{this.Nc=a;var b=this.Pm.bind(this),c=this.Qm.bind(this),d=this.hk.bind(this);a.on(_.qg,b);a.on(_.Gg,c);a.on(_.ye,d);this.h.push(function(){a.off(_.qg,b);a.off(_.Gg,c);a.on(_.ye,d)})}};_.t.clear=function(){this.Nc=null;this.f=[];this.h.forEach(function(a){return a()});this.h=[]};
|
|
437
|
+
_.t.hk=function(){var a=this;return _.I(function(b){if(!a.j)return b.F(0);a.Ca.info("Looping playback.");return _.y(b,ri(a,function(c){return _.I(function(d){return 1==d.a?_.y(d,c.seek(0),2):_.y(d,c.play(),0)})}),0)})};
|
|
438
|
+
_.t.Pm=function(a){var b=this;this.a||(a=a.detail.currentState,a===_.Uq?(this.Ca.info("Mirroring playing."),qi(this,function(c){return _.I(function(d){return _.y(d,c.play(),0)})})):[_.Tq,_.Lq,_.Rq].includes(a)&&(this.Ca.info("Mirroring paused/buffering/error."),qi(this,function(c){var d,e;return _.I(function(f){if(1==f.a)return d=Math.round(b.Nc.getPosition())-.1,_.y(f,c.seek(d),2);if(3!=f.a)return _.y(f,mi(.2),3);e=c.getState();return e!==_.Uq&&e!==_.Lq?f.F(0):_.y(f,c.pause(),0)})})))};
|
|
439
|
+
_.t.Qm=function(){var a=this;this.a||qi(this,function(b){var c,d,e,f,g,h,l;return _.I(function(m){switch(m.a){case 1:if(!b.isPaused()){m.F(2);break}return _.y(m,b.play(),2);case 2:c=a.Nc.getPosition();d=b.getPosition();e=c-d;f=Math.abs(e);g=b.getPlaybackRate();h=b.getState();if(h!==_.Uq||.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.F(4);break}b.setPlaybackRate(1);return _.y(m,b.seek(c),5);case 5:return m["return"]();case 4:if(g===
|
|
440
|
+
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);_.B(m)}})})};_.J(Ed,ni);ni.prototype.clear=ni.prototype.clear;ni.prototype.addMainPlayer=ni.prototype.Rj;ni.prototype.addSecondaryPlayer=ni.prototype.Sj;
|
|
441
|
+
ni.prototype.setLoop=ni.prototype.xo;ni.prototype.load=ni.prototype.load;_.si.prototype.push=function(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]};_.si.prototype.get=function(a){return(a=this.a[a])?a.slice():[]};_.si.prototype.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};_.si.prototype.clear=function(){this.a={}};ti.prototype.ab=function(a){try{this.hd.handleEvent?this.hd.handleEvent(a):this.hd.call(this.a,a)}catch(b){_.bi("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}};_.L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};_.L.prototype.stopImmediatePropagation=function(){this.f=!0};_.L.prototype.stopPropagation=function(){};_.t=ui.prototype;
|
|
442
|
+
_.t.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].ab(a),b[c].jo&&this.a.remove(a.type,b[c]),!a||!a.f);c++);};_.t.on=function(a,b,c){this.a.push(a,new ti(a,b,c||this.f));return b};_.t.one=function(a,b,c){this.a.push(a,new ti(a,b,c||this.f,!0));return b};_.t.off=function(a,b){var c=this.a.get(a),d=!1;if(c)for(var e=0;e<c.length;e++)c[e].hd===b&&(d=this.a.remove(a,c[e])||d);return d};_.t.clear=function(){this.a.clear()};_.vi.prototype.release=function(){_.yi(this)};_.vi.prototype.on=function(a,b,c,d){a=new zi(a,b,c,void 0===d?!1:d);this.a.push(b,a)};_.vi.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)};_.vi.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||(xi(f),this.a.remove(b,f))}};Ai.prototype.release=function(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)};Ai.prototype.destroy=function(){var a=this;return _.I(function(b){a.release();_.B(b)})};Ai.prototype.getTimelineCues=function(){return Array.from(this.a.values()).sort(function(a,b){return a.startTime-b.startTime})};_.fj.prototype.qa=function(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===a.payloadType};_.J("clpp.text.Cue",_.fj);_.fj.positionAlign={LEFT:_.Oe,RIGHT:_.Pe,CENTER:_.wd,AUTO:"auto"};_.$i="text";_.fj.payloadType={TEXT:_.$i,VTT_XML:_.ch,TTML_XML:_.Jg};_.aj=_.wd;_.kw={LEFT:_.Ke,RIGHT:_.cg,CENTER:_.aj,START:_.Ke,END:_.cg};_.fj.textAlign=_.kw;var ej="ltr";_.fj.direction={HORIZONTAL_LEFT_TO_RIGHT:ej,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.bj="horizontal-tb";
|
|
443
|
+
_.fj.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.bj,VERTICAL_LEFT_TO_RIGHT:_.Vg,VERTICAL_RIGHT_TO_LEFT:_.Wg};_.cj=0;_.fj.lineInterpretation={LINE_NUMBER:_.cj,PERCENTAGE:1};_.dj=_.pg;_.lw={CENTER:_.wd,START:_.dj,END:_.xe};_.fj.lineAlign=_.lw;_.J("clpp.text.CueRegion",_.ij);_.gj=1;_.ij.units={PX:0,PERCENTAGE:_.gj,LINES:2};var hj="";_.ij.scrollMode={NONE:hj,UP:"up"};_.ij.displayAlign={BEFORE:"flex-end",CENTER:_.wd,AFTER:"flex-start"};
|
|
444
|
+
_.ij.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Pd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};jj.prototype.destroy=function(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()};jj.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,_.Pc,function(c){return kj(b,c)}),this.a.on(this.f,yd,function(){for(var c=b.f,d=0;d<c.length;d++){var e=c[d];e.mode===_.jg&&(e.mode=_.Fe)}}))};
|
|
445
|
+
jj.prototype.o=function(a){var b=new _.fj(a.startTime,a.endTime,a.text,_.ch);if(_.N.ga(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Vg;break;case "rl":b.writingMode=_.Wg}_.N.xa(a.size)&&(b.size=a.size);if(_.N.ga(a.align))switch(a.align){case _.Ke:case _.pg:b.textAlign=_.Ke;break;case _.wd:b.textAlign=_.aj;break;case _.cg:case _.xe:b.textAlign=_.cg}_.N.xa(a.position)&&(b.position=a.position);if(_.N.ga(a.positionAlign))switch(a.positionAlign){case _.Oe:b.positionAlign=_.Oe;break;case _.wd:b.positionAlign=
|
|
446
|
+
_.wd;break;case _.Pe:b.positionAlign=_.Pe}_.N.xa(a.line)&&(b.line=a.line);if(_.N.ga(a.lineAlign))switch(a.lineAlign){case _.pg:b.lineAlign=_.dj;break;case _.wd:b.lineAlign=_.wd;break;case _.xe:b.lineAlign=_.xe}_.N.Di(a.snapToLines)&&(b.lineInterpretation=a.snapToLines?_.cj:1);return b};_.x(_.O,Error);_.O.prototype.a=function(a){this.severity!==a&&(this.severity=a,this.message=lj(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);_.P=2;_.O.Severity={RECOVERABLE:1,FATAL:_.P};_.O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
|
|
447
|
+
_.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,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,INVALID_MP4:2011,
|
|
426
448
|
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,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
|
|
427
449
|
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,DASH_PSSH_BAD_ENCODING:4007,
|
|
428
450
|
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,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
|
|
@@ -431,90 +453,83 @@ HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEAT
|
|
|
431
453
|
NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,
|
|
432
454
|
INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,
|
|
433
455
|
YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,
|
|
434
|
-
SESSIONS_INVALID_CONFIGURATION:15E3};_.x(_.
|
|
435
|
-
_.t.resolve=function(a){var b=new _.
|
|
436
|
-
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.
|
|
437
|
-
_.
|
|
438
|
-
"
|
|
456
|
+
SESSIONS_INVALID_CONFIGURATION:15E3};_.x(_.mj,Error);var wj=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;_.t=_.rj.prototype;_.t.Gb="";_.t.Tc="";_.t.bb="";_.t.Bd=null;_.t.Pa="";_.t.Hc="";_.t.toString=function(){var a=[],b=this.Gb;b&&a.push(zj(b,mw,!0),":");if(b=this.bb){a.push("//");var c=this.Tc;c&&a.push(zj(c,mw,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Bd;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.bb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zj(b,"/"==b.charAt(0)?nw:ow,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Hc)&&a.push("#",zj(b,pw));return a.join("")};
|
|
457
|
+
_.t.resolve=function(a){var b=new _.rj(this);"data"===b.Gb&&(b=new _.rj);var c=!!a.Gb;c?sj(b,a.Gb):c=!!a.Tc;c?b.Tc=a.Tc:c=!!a.bb;c?b.bb=a.bb:c=null!=a.Bd;var d=a.Pa;if(c)tj(b,a.Bd);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.bb&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
|
|
458
|
+
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Pa=d:c=""!==a.a.toString();c?_.uj(b,vj(a.a)):c=!!a.Hc;c&&(b.Hc=a.Hc);return b};var mw=/[#\/\?@]/g,ow=/[#\?:]/g,nw=/[#\?]/g,Aj=/[#\?@]/g,pw=/#/g;_.yj.prototype.a=null;_.yj.prototype.h=null;
|
|
459
|
+
_.yj.prototype.add=function(a,b){if(!this.a&&(this.a={},this.h=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.h&&this.h++;return this};
|
|
460
|
+
_.yj.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var Cj;_.Q="text";_.dr={VIDEO:_.r,AUDIO:_.cd,TEXT:_.Q,So:_.Uc,IMAGE:_.He,Oj:_.wg};_.qw=1/15;Cj={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/]};Cj[_.Q]=[/^vtt$/,/^wvtt/,/^stpp/];var Ej={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Hj={text:{mp4:Xc,m4s:Xc,m4i:Xc,cmft:Xc,vtt:_.zg,ttml:_.$c},video:{mp4:_.Yg,m4s:_.Yg,m4i:_.Yg,m4v:_.Yg,cmfv:_.Yg,ts:_.Xg},audio:{mp4:_.gd,m4s:_.gd,m4i:_.gd,m4a:_.gd,cmfa:_.gd,ts:_.Xg,aac:_.dd,ec3:_.fd,ac3:_.ed},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Jj.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};_.Jj.prototype.getAttribute=function(a){var b=this.attributes.filter(function(c){return c.name===a});return b.length?b[0]:null};_.Jj.prototype.hasAttribute=function(a){return null!=this.getAttribute(a)};_.Mj.prototype.getPosition=function(){return this.position};_.Mj.prototype.he=function(){return this.pa?this.pa-this.Da+1:null};_.Mj.prototype.f=_.rh(0);_.x(_.Nj,_.Mj);var Qj=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",
|
|
461
|
+
"cs"],["dan","da"],["deu","de"],[_.fe,"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",
|
|
439
462
|
"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",
|
|
440
463
|
"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",
|
|
441
464
|
"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",
|
|
442
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var
|
|
443
|
-
_.J("clpp.utils.strings.fromUtf8",_.T.
|
|
444
|
-
_.T.
|
|
445
|
-
_.T.
|
|
446
|
-
c;throw Error("Unable to detect text encoding");};_.J("clpp.utils.strings.fromBytesAutoDetect",_.T.
|
|
447
|
-
_.J("clpp.utils.strings.toUtf16",_.T.
|
|
448
|
-
_.T.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",_.T.endsWith);_.T.
|
|
449
|
-
_.T.
|
|
450
|
-
_.T.
|
|
451
|
-
_.T.
|
|
452
|
-
d+'".');c.add(d)})},
|
|
453
|
-
d.getAttribute(_
|
|
454
|
-
_.w(_.Y.
|
|
455
|
-
_.
|
|
456
|
-
_.
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
c
|
|
461
|
-
|
|
462
|
-
b})},
|
|
463
|
-
a),null;b=d?c-b:-b;var g=new Date(f);f=g.getTime()/1E3+b;e={id:e,startTime:f,startDate:g};c=
|
|
464
|
-
a),null;g=Object.assign(g,h)}_.N.
|
|
465
|
-
c.value;break;case
|
|
466
|
-
_.t.fetch=function(a){var b=this;if(this.w)return new
|
|
467
|
-
d.next())c.push(e.value);a.responseModifiers=c;d=c=new _.
|
|
468
|
-
{
|
|
469
|
-
1,1007,null,n);});l={};var m=_.w(this.j);for(e=m.next();!e.done;l={
|
|
470
|
-
_.J("clpp.net.NetworkEngine",_.
|
|
471
|
-
_.
|
|
472
|
-
h.message);case 6:return _.C(n,9),_.y(n,
|
|
473
|
-
_.t.
|
|
474
|
-
_.
|
|
475
|
-
_.
|
|
476
|
-
_.
|
|
477
|
-
_.
|
|
478
|
-
var Kl=null,Jl=null,Ml=new _.K(Fd),Tl="android",Sl="ios",Yl="linux",Ul="osx",Vl="windows",Wl="tizen",Xl="webos",Rl=_.yg,am=_.yg,$l={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,
|
|
465
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Yj=function rw(a){var c;return _.Ph(rw,function(d){1==d.a&&(c=0);if(3!=d.a)return c<a?_.y(d,c,3):d.F(0);c++;return d.F(2)})};_.J("clpp.utils.BufferUtils",Vj);Vj.toArrayBuffer=fk;Vj.toDataView=_.ek;Vj.toInt32Array=_.dk;Vj.toUint32Array=ck;Vj.toUint16Array=bk;Vj.toUint8Array=_.Xj;Vj.equal=Zj;_.T={};_.T.Ca=new _.K("clpp.utils.strings");_.T.Lj=16E3;_.T.fromCharCode=function(a){for(var b=_.T.Lj,c="",d=0;d<a.length;d+=b)c+=String.fromCharCode.apply(null,a.subarray(d,d+b));return c};_.T.da=function(a){if(!a)return"";a=_.Xj(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(bb);return a}a=escape(_.T.fromCharCode(a));try{return decodeURIComponent(a)}catch(b){throw Error(bb);}};
|
|
466
|
+
_.J("clpp.utils.strings.fromUtf8",_.T.da);
|
|
467
|
+
_.T.Ic=function(a,b,c){if(!a)return"";var d=_.T.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=_.Xj(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(_.Xj(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 _.T.fromCharCode(c)};
|
|
468
|
+
_.T.ce=function(a,b){if(_.N.ga(a))return a;var c="",d=!!b,e=_.Xj(a);239===e[0]&&187===e[1]&&191===e[2]?c=_.T.da(e):254===e[0]&&255===e[1]?c=_.T.Ic(e.subarray(2),!1):255===e[0]&&254===e[1]&&(c=_.T.Ic(e.subarray(2),!0));var f=function(g,h){return g.byteLength<=h||32<=g[h]&&126>=g[h]}.bind(null,e);_.T.Ca.debug("Unable to find byte-order-mark, making an educated guess.");0===e[0]&&0===e[2]?c=_.T.Ic(a,!1):0===e[1]&&0===e[3]?c=_.T.Ic(a,!0):f(0)&&f(1)&&f(2)&&f(3)&&(c=_.T.da(a));if(c)return d&&(c=escape(c)),
|
|
469
|
+
c;throw Error("Unable to detect text encoding");};_.J("clpp.utils.strings.fromBytesAutoDetect",_.T.ce);_.T.ib=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",_.T.ib);_.T.Ef=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};
|
|
470
|
+
_.J("clpp.utils.strings.toUtf16",_.T.Ef);_.T.Dd=function(a,b){var c=b||1,d=a.length,e=new ArrayBuffer(d*c),f;4===c?f=ck(e):2===c?f=bk(e):f=_.Xj(e);for(c=0;c<d;c++)f[c]=a.charCodeAt(c);return e};_.J("clpp.utils.strings.toByteArray",_.T.Dd);_.T.startsWith=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.J("clpp.utils.strings.startsWith",_.T.startsWith);
|
|
471
|
+
_.T.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",_.T.endsWith);_.T.pf=function(a){return!!(a&&0<a.length)};_.T.empty=function(a){return!a||0===a.length};_.T.kp=function(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()};_.T.np=function(a){return a.replace(/-(\w)/g,function(b,c){return c.toUpperCase()})};
|
|
472
|
+
_.T.Vf=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",_.T.Vf);
|
|
473
|
+
_.T.Kl=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",_.T.Kl);
|
|
474
|
+
_.T.Ml=function(a,b){for(var c in b)if(b[c]===a)return c;return""};_.T.sm=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",_.T.sm);_.T.Lo=function(a){_.T.wj.innerHTML=a;return _.T.wj.textContent};_.T.wj=document.createElement("span");_.T.Wg=function(a){a=a.replace(/<[^>]+>/gi,"");a=_.T.Lo(a);return a=a.replace(/<[^>]+>/gi,"")};_.T.Si=function(a){return a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")};_.J("clpp.utils.Uint8ArrayUtils",gk);gk.toStandardBase64=_.hk;gk.concat=nk;gk.equal=_.mk;gk.toHex=_.lk;gk.fromHex=_.kk;gk.fromBase64=_.jk;gk.toBase64Url=_.ik;_.Y={ac:function(a,b){return a.filter(function(c){return c.name===b})},Bj:function(a){var b=/^[a-zA-Z0-9_-]+$/,c=new Set;a.forEach(function(d){var e=_.S(d,"VALUE"),f=_.S(d,_.wb),g=_.S(d,"IMPORT"),h=_.S(d,"QUERYPARAM");if(1!==[f,g,h].filter(Boolean).length||f&&null==e)throw new _.O(_.P,4,4044,{message:"Invalid tag.",text:d.toString()});d=f||g||h;if(c.has(d))throw new _.O(_.P,4,4044,'EXT-X-DEFINE redefined variable "'+d+'".');if(!b.test(d))throw new _.O(_.P,4,4044,'EXT-X-DEFINE invalid variable name "'+
|
|
475
|
+
d+'".');c.add(d)})},jg:function(a,b){var c=Array.isArray(b)?b:[b];return a.filter(function(d){d=_.Kj(d,_.$b);return c.includes(d)})},wd:function(a,b){return a.some(function(c){return c.name===b})},cb: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(_.P,4,4024,{missingTag:b});return a},si:function(a,b){return _.Y.cb(a,b,{required:!0})},em:function(a,b,c){c=void 0===c?0:c;return(a=_.Y.cb(a,b))?Number(a.value):c},sp:function(a,b,c){return a.filter(function(d){var e=
|
|
476
|
+
d.getAttribute(_.$b);d=d.getAttribute(_.fb);return e.value===b&&d.value===c})},Vn:function(a){var b=_.Y.cb(a,"EXT-X-TILES");if(!b)return{je:1,Ge:1,durationPerTile:null};a=_.S(b,"LAYOUT")||"1x1";b=_.S(b,_.Ja);a=_.Tj(a);return{je:a.je,Ge:a.Ge,durationPerTile:b?Number(b):null}},Vd:function(a,b,c){c=void 0===c?!0:c;a=new _.rj(a);b=new _.rj(b);b=a.resolve(b).toString();return c?b:decodeURI(b)},Ei:function(a){return/^#(?!EXT)/m.test(a)},Hm:function(a,b){Array.isArray(a)||(a=[a]);a.forEach(function(c){for(var d=
|
|
477
|
+
_.w(_.Y.Cf(c)),e=d.next();!e.done;e=d.next())b(e.value,c)})},Cf:function(a){var b=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)},tm:function(a){return a.some(function(b){return _.Y.wd(b.$,Qa)})},Zj:function(a){return _.Y.Cf(a).filter(_.Y.Ci)},jj:function(a){if(_.Y.cb(a,Qa))return _.jc;a=_.Y.cb(a,Wa);if(!a)return"LIVE";if(a.value===
|
|
478
|
+
_.jc)return _.jc;if("EVENT"===a.value)return"EVENT";throw new _.O(_.P,4,4044,"Invalid EXT-X-PLAYLIST-TYPE value: "+a.value);},Th:function(a){a={AUDIO:_.cd,VIDEO:_.r,SUBTITLES:_.Q,"CLOSED-CAPTIONS":_.Q}[a.toUpperCase()];if(!a)throw new _.O(_.P,4,4044,"EXT-X-MEDIA tag has an invalid TYPE attribute.");return a},Bl:function(a){var b=_.Kj(a,_.$b).toUpperCase();if(_.Y.Th(b)!==_.Q)return null;a=a.getAttribute("FORCED");a=!(!a||!a.value||"YES"!==a.value.toUpperCase());var c=_.wg;b===_.sa&&(c=_.rd);a&&(c=
|
|
479
|
+
_.Be);return c},gj:function(a,b,c){c=void 0===c?!1:c;var d=0,e=null;if(a){d=a.split("@");a=Number(d[0]);if(0>=a)throw new _.O(_.P,4,4044,"Byte range length must be positive.");if(d[1]){if(d=Number(d[1]),0>d)throw new _.O(_.P,4,4044,"Byte range start byte must not be negative.");}else{if(c)throw new _.O(_.P,4,4044,"Invalid byte range, offset is required but missing.");if(null==b)throw new _.O(_.P,4,4044,"Invalid byte range, cannot calculate offset based on previous byte ranges.");d=b+1}e=d+a-1}return{Da:d,
|
|
480
|
+
pa:e}},ij:function(a,b){var c=_.Y.cb(a,Ma);return _.Y.gj(c?c.value:null,b)},Qn:function(a){a=_.Y.si(a,"EXTINF").value.split(",");return{duration:Number(a[0]),title:a[1]||null}},kj:function(a,b){function c(f){return null==f?null:Number(f)}b=void 0===b?{}:b;var d={wh:!1,ek:!1,fk:null,um:null,lj:null},e=_.Y.cb(a,Za,{required:b.rj});if(!e)return d;d.wh="YES"===_.S(e,"CAN-BLOCK-RELOAD");d.ek="YES"===_.S(e,"CAN-SKIP-DATERANGES");d.fk=c(_.S(e,"CAN-SKIP-UNTIL"));d.um=c(_.S(e,"HOLD-BACK"));d.lj=c(_.S(e,"PART-HOLD-BACK",
|
|
481
|
+
void 0,{required:b.rj}));return d},hj:function(a,b,c){c=void 0===c?!1:c;a=_.S(a,"BYTERANGE");return _.Y.gj(a,b,c)},Tn:function(a){var b=_.Y.ac(a,_.Ta),c=_.Y.ac(a,_.$a);a=_.Y.ac(a,"EXT-X-IMAGE-STREAM-INF");return{Pc:{rh:_.Y.jg(b,[_.ja,_.ic]),closedCaptions:_.Y.jg(b,_.sa),Eo:_.Y.jg(b,_.Sb)},He:c,og:a}},Dl:function(a,b){var c=_.Y.ij(a.$,null);return new _.Nj(0,0,0,function(){return[a.a]},c.Da,c.pa,0,b)},lg:function(a,b){if(null==a)return null;var c=Object.assign({},a);null==c.iv&&(c.iv=nk(new Uint8Array(12),
|
|
482
|
+
new Uint8Array([b>>24&255,b>>16&255,b>>8&255,b&255])));return c},lm:function(a){var b=a.S;a=b[0].startTime;b=b[b.length-1].endTime;return{rc:a,jf:b,duration:b-a}},im:function(a){var b=Infinity,c=Infinity;_.Y.Zj(a).forEach(function(d){d=_.Y.lm(d);b=Math.min(b,d.rc);c=Math.min(c,d.duration)});return{rc:b,duration:c}},Ci:function(a){return a.type===_.cd||a.type===_.r},Ol:function(a){return a.filter(_.Y.Ci)},gm:function(a){return a.map(function(b){return _.Y.im(b).duration}).reduce(function(b,c){return b+
|
|
483
|
+
c},0)},am:function(a,b){return a&&b?_.sq(a.drmInfos,b.drmInfos)?_.rq(a.drmInfos,b.drmInfos):null:a?a.drmInfos:b?b.drmInfos:null},Fl:function(a,b){return(b?b.ec():"")+" - "+(a?a.ec():"")},Vh:function(a){return(a.video?a.video.zc:"")+" - "+(a.audio?a.audio.zc:"")},Sn:function(a,b,c,d,e){if(b===_.jc)return{delay:0,Fe:0};b=_.Y.cb(a,Va);if(c&&b)return e=Number(_.Kj(b,"PART-TARGET")),null!=d?{delay:d,Fe:e}:{delay:_.Y.kj(a,{rj:!0}).lj,Fe:e};a=_.Y.si(a,ab);a=Number(a.value);e=e||a;return null!=d?{delay:d,
|
|
484
|
+
Fe:e}:{delay:3*a,Fe:e}},Xe:function(a,b){return a+":"+b},Io:function(a){var b=_.Y.Xe,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},mi:function(a){return _.Oj(a||_.Lg)},Mn:function(a){var b=new Map;a=_.w(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=_.S(c,_.pb);d=_.Y.mi(d);var e=_.Kj(c,_.fb);c=_.Kj(c,"INSTREAM-ID");b.has(e)||b.set(e,new Map);b.get(e).set(c,d)}return b},Jl:function(a){return a.filter(function(b){return"mp4a.40.34"!==
|
|
485
|
+
b})},Wn:function(a){if(!a.hasAttribute("FRAME-RATE")&&!a.hasAttribute(_.Qb))return null;var b=_.S(a,"FRAME-RATE");a=_.S(a,_.Qb);var c=_.w(a?a.split("x"):[null,null]);a=c.next().value;c=c.next().value;return{frameRate:Rj(b),width:Rj(a),height:Rj(c)}},Gm:function(a){return a.name!==_.Ta?!0:_.S(a,_.$b)===_.Sb},Nn: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.",
|
|
486
|
+
a),null;b=d?c-b:-b;var g=new Date(f);f=g.getTime()/1E3+b;e={id:e,startTime:f,startDate:g};c=Rj(_.S(a,_.Ja));void 0!==c&&0<=c&&(e.duration=c);d=Rj(_.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.Ln(a)||{};var m=_.S(a,"CUE");m&&(g.CUE=m.split(","));if(h===Td){h=_.Y.Rn(a);if(null===h)return _.Y.g.warn("Invalid interstitial attributes, ignoring the EXT-X-DATERANGE tag.",
|
|
487
|
+
a),null;g=Object.assign(g,h)}_.N.Kc(g)&&(e.customAttributes=g);e.endTime=l?l.getTime()/1E3+b:c?f+c:d?f+d:f;e.type=_.Pi;return e},Ln:function(a){var b=a.attributes;if(null==b)return null;a={};b=_.w(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.Kc(a)?a:null},Rn:function(a){var b=a.attributes;if(null==b)return null;a={};b=_.w(b);for(var c=b.next();!c.done;c=b.next())switch(c=c.value,c.name){case qc:a[qc]=c.value;break;case pc:a[pc]=
|
|
488
|
+
c.value;break;case tc:a[tc]=Rj(c.value);break;case rc:a[rc]=Rj(c.value);break;case "X-SNAP":a["X-SNAP"]=c.value.split(",");break;case sc:a[sc]=c.value.split(",")}return a[qc]&&a[pc]||!a[qc]&&!a[pc]?(_.Y.g.warn("Invalid EXT-X-DATERANGE Interstitial attributes X-ASSET-URI, X-ASSET-LIST"),null):_.N.Kc(a)?a:null},ei:function(a,b){if(!a)return null;var c=a.zc;return b.find(function(d){return d.ec()===c})||null},ii:function(a){return(a=_.S(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}};_.Y.g=new _.K("clpp.hls.Utils");_.sw=new Set([_.Pa,Qa,"EXT-X-I-FRAMES-ONLY",_.Ua,Va,Wa,Za,ab]);_.tw=new Set(["EXTINF",Ma,_.Oa,_.Ra,_.Sa,_.Ya]);_.uw=new Set(["EXT-X-PART",_.Xa]);_.vw=new Set([_.Na]);var rk=[403,401];_.J("clpp.net.DEFAULT_FATAL_STATUS_CODES",rk);_.J("clpp.net.makeRequest",_.wk);_.vk=6;_.J("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.vk,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=_.w(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)};_.t=_.Rk.prototype;_.t.zo=function(a){0<a?_.Wh("Rate limit set to "+a+"bps"):_.Wh("Rate limit disabled");this.l=a};_.t.release=function(){return this.o.destroy()};_.t.destroy=function(){this.w=!0;this.f=[];this.h=[];return this.o.destroy()};_.t.Sf=function(a){this.f.push(a)};_.t.fd=function(a){this.h.push(a)};_.t.Og=function(a){this.f=this.f.filter(function(b){return b!==a})};_.t.ze=function(a){this.h=this.h.filter(function(b){return b!==a})};
|
|
489
|
+
_.t.fetch=function(a){var b=this;if(this.w)return new uv(Promise.reject(new _.O(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);for(var c=[],d=_.w(this.f),e=d.next();!e.done;e=d.next())c.push(e.value);if(a.requestModifiers)for(d=_.w(a.requestModifiers),e=d.next();!e.done;e=d.next())c.push(e.value);a.requestModifiers=c;Vk(this,a);c=[];d=_.w(this.h);for(e=d.next();!e.done;e=d.next())c.push(e.value);if(a.responseModifiers)for(d=_.w(a.responseModifiers),e=d.next();!e.done;e=
|
|
490
|
+
d.next())c.push(e.value);a.responseModifiers=c;d=c=new _.Gk;try{var f={},g=_.w(a.requestModifiers);for(e=g.next();!e.done;f={Lf:f.Lf},e=g.next())f.Lf=e.value,d=d.then(function(n){return function(p){if(h.a)throw new _.O(_.P,1,7001,p?{url:p.uris[p.uriIndex],request:p}:null);return n.Lf(p)||p}}(f))["catch"](function(n){if(n instanceof _.O)throw n;throw new _.O(_.P,1,1006,null,n);});d=d.then(function(n){return{request:n,plugin:Wk(b,n)}});var h=new uv(d);g={};var l=_.w(a.responseModifiers);for(e=l.next();!e.done;g=
|
|
491
|
+
{Le:g.Le},e=l.next())g.Le=e.value,h.then(function(n){return function(p){function q(){if(h.a)throw new _.O(_.P,1,7001,p?{url:p.request.uris[p.request.uriIndex],request:p.request}:null);}q();var u=n.Le(p)||p;q();return u}}(g))["catch"](function(n){return function(p){if(p instanceof _.O&&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 _.O)throw n;throw new _.O(_.P,
|
|
492
|
+
1,1007,null,n);});l={};var m=_.w(this.j);for(e=m.next();!e.done;l={Mf:l.Mf},e=m.next())l.Mf=e.value,h["catch"](function(n){return function(p){p instanceof _.O&&p.data&&p.data.response||n.Mf({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 _.O)throw n;throw new _.O(_.P,1,1007,null,n);});_.Kk(this.o,h);c.resolve(a);return h}catch(n){return new uv(Promise.reject(n))}};
|
|
493
|
+
_.J("clpp.net.NetworkEngine",_.Rk);_.Rk.prototype.fetch=_.Rk.prototype.fetch;_.Rk.prototype.removeResponseModifier=_.Rk.prototype.ze;_.Rk.prototype.removeRequestModifier=_.Rk.prototype.Og;_.Rk.prototype.addResponseModifier=_.Rk.prototype.fd;_.Rk.prototype.addRequestModifier=_.Rk.prototype.Sf;_.Rk.prototype.setRateLimit=_.Rk.prototype.zo;var al;_.Xk.prototype.qa=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&&Xi(this.roles,a.roles)&&Xi(this.accessibility,a.accessibility,fl)};_.Xk.prototype.toString=function(){return"Track type: "+this.type+" id: "+this.id+"\n renditions size: "+this.renditions.length};_.J("clpp.Track",_.Xk);
|
|
494
|
+
_.Xk.prototype.toString=_.Xk.prototype.toString;_.J("clpp.Rendition",_.gl);_.dl=1;_.$k=_.r;_.U=_.cd;_.Zk="text";al=_.Ze;_.ww={VIDEO:_.$k,AUDIO:_.U,TEXT:_.Zk,METADATA:al};_.Xk.Type=_.ww;_.J("clpp.utils.url.queryString",_.jl);ml.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,_.C(n,2),_.y(n,sl(c,a),4);case 4:d=n.f;_.Hh(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.F(7);break}return _.y(n,pl(c,d,a),8);case 8:g=n.f,f.renditions=g.renditions,f.mimeType=g.mimeType;case 7:_.Hh(n,6);break;case 5:h=_.E(n),c.g.warn("Failed to parse video metadata from HLS playlist.",
|
|
495
|
+
h.message);case 6:return _.C(n,9),_.y(n,rl(d),11);case 11:l=n.f;f.Pc=l;_.Hh(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)}})};_.yl=[];_.t=_.Bl.prototype;_.t.Yf=function(){return!0};_.t.Ul=function(a){return this.getVideoTracks().find(function(b){return _.N.qa(b,a,a&&Object.keys(a))})};_.t.Ql=function(a){return this.getAudioTracks().find(function(b){return _.N.qa(b,a,a&&Object.keys(a))})};_.t.Sl=function(a){return this.ma().find(function(b){return _.N.qa(b,a,a&&Object.keys(a))})};_.t.Tl=function(a){return this.getVideoTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.N.qa(b,a,a&&Object.keys(a))})};
|
|
496
|
+
_.t.Pl=function(a){return this.getAudioTracks().flatMap(function(b){return b.renditions}).find(function(b){return _.N.qa(b,a,a&&Object.keys(a))})};_.t.Rl=function(a){return this.ma().flatMap(function(b){return b.renditions}).find(function(b){return _.N.qa(b,a,a&&Object.keys(a))})};_.J("clpp.TrackManager",_.Bl);_.Bl.prototype.isAbrEnabled=_.Bl.prototype.wa;_.Bl.prototype.addTextTrack=_.Bl.prototype.addTextTrack;_.Bl.prototype.findTextRendition=_.Bl.prototype.Rl;_.Bl.prototype.findAudioRendition=_.Bl.prototype.Pl;
|
|
497
|
+
_.Bl.prototype.findVideoRendition=_.Bl.prototype.Tl;_.Bl.prototype.findTextTrack=_.Bl.prototype.Sl;_.Bl.prototype.findAudioTrack=_.Bl.prototype.Ql;_.Bl.prototype.findVideoTrack=_.Bl.prototype.Ul;_.Bl.prototype.setTextRendition=_.Bl.prototype.Ib;_.Bl.prototype.setAudioRendition=_.Bl.prototype.Hb;_.Bl.prototype.setVideoRendition=_.Bl.prototype.ub;_.Bl.prototype.setTextTrack=_.Bl.prototype.$a;_.Bl.prototype.setAudioTrack=_.Bl.prototype.Ka;_.Bl.prototype.setVideoTrack=_.Bl.prototype.Jb;
|
|
498
|
+
_.Bl.prototype.getTextTrack=_.Bl.prototype.Ba;_.Bl.prototype.getAudioTrack=_.Bl.prototype.ra;_.Bl.prototype.getVideoTrack=_.Bl.prototype.Na;_.Bl.prototype.getLoadingTextRendition=_.Bl.prototype.Ob;_.Bl.prototype.getLoadingAudioRendition=_.Bl.prototype.Nb;_.Bl.prototype.getLoadingVideoRendition=_.Bl.prototype.Bb;_.Bl.prototype.getTextRendition=_.Bl.prototype.Za;_.Bl.prototype.getAudioRendition=_.Bl.prototype.Va;_.Bl.prototype.getVideoRendition=_.Bl.prototype.na;_.Bl.prototype.getTextTracks=_.Bl.prototype.ma;
|
|
499
|
+
_.Bl.prototype.getAudioTracks=_.Bl.prototype.getAudioTracks;_.Bl.prototype.getVideoTracks=_.Bl.prototype.getVideoTracks;_.Bl.prototype.canSelectVideoTracks=_.Bl.prototype.Yf;var Dl=new Map,Cl=1,Hl=2,Gl=3,Fl=4;_.xw=(new Map).set(_.Md,_.Md).set("frameRate","framerate").set("bandwidth","bitrate").set(_.kh,_.kh).set(_.Ee,_.Ee).set("channelsCount","channels");_.J(Ld,Ml);Ml.getInfo=_.Ok;
|
|
500
|
+
var Wl=null,Vl=null,Yl=new _.K(Ld),em="android",dm="ios",jm="linux",fm="osx",gm="windows",hm="tizen",im="webos",cm=_.Ng,mm=_.Ng,lm={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,
|
|
479
501
|
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,
|
|
480
502
|
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},
|
|
481
|
-
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}};_.x(
|
|
482
|
-
_.t.
|
|
483
|
-
a)}));n.kind&&"captions"===n.kind&&(n.mimeType=_.
|
|
484
|
-
5):M.F(5)}if(2!=M.a)return c.g.debug(a+" Track added",n),c.m.trigger(new _.L(_.
|
|
485
|
-
_.t.
|
|
486
|
-
_.t.
|
|
487
|
-
_.t.load=function(){this.A=!1;var a=
|
|
488
|
-
_.t.getVideoTracks=function(){return
|
|
489
|
-
_.t.
|
|
490
|
-
_.t.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,
|
|
491
|
-
_.t.
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
_.t.
|
|
495
|
-
_.t.
|
|
496
|
-
_.
|
|
497
|
-
_.t.stopForwardingEventsTo=function(a){a&&(a=this.
|
|
498
|
-
_.
|
|
499
|
-
_.
|
|
500
|
-
_.
|
|
501
|
-
_.
|
|
502
|
-
_.
|
|
503
|
-
_.
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
_.t.
|
|
507
|
-
_.t.
|
|
508
|
-
_.t.
|
|
509
|
-
_.t.
|
|
510
|
-
|
|
511
|
-
q=.1>=Math.abs(a-p),u=.25<p-a,v=d.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,z=n.type===_.$f,A=n.type===_.Nf,H=n.type===_.tg,G=A&&v;u=z||q&&G||H&&u;b.log.debug("Checking seeking state after "+n.type+" event. Seek completed:",u,"Current Time:",p,"Target Time:",a,"Native Event:",z,"Time reached",q,"Timeupdate:",H,"Progress:",A,"ReadyState:",v,"Progress Ready:",G);u?(b.Kg=!1,b.me=!1,b.M.off(d,_.$f,l),b.M.off(d,_.tg,l),b.M.off(d,_.Nf,l),b.Xi(),b.trigger(new _.L(_.Cg)),f()):A&&c===p&&(b.log.debug("Seek seemed to have been ignored. Trying again"),
|
|
512
|
-
d.currentTime=a)}function m(){b.trigger(new _.L(_.Dg));b.M.on(d,_.$f,l);b.M.on(d,_.tg,l);b.M.on(d,_.Nf,l);b.log.info("Seeking to "+a+". Delta "+e);b.Kg=!0;b.me=!0;d.currentTime=a}b.getState()===_.uq?(b.log.debug("Player is in IDLE state. Postpone seek."),b.M.one(b,_.ig,function(){switch(b.getState()){case _.zq:case _.Iq:case _.Hq:b.log.debug("Valid seek state reached.");h();break;default:b.log.warn("Invalid seek target state. Aborting seek"),g()}})):h()})};
|
|
513
|
-
_.t.getVolume=function(){var a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null};_.t.setVolume=function(a){var b=this.C.getMedia();b?_.N.xa(a)?0>a||1<a?this.log.warn(ta+a+".\n Value must be between 0 and 1."):b.volume=a:this.log.warn(ta+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")};_.t.isMuted=function(){return this.C.getMedia().muted};
|
|
514
|
-
_.t.setMuted=function(a){var b=this.C.getMedia();typeof a===_.hd&&(b.muted=a)};_.t.getDuration=function(){return this.getMediaDuration()};_.t.getMediaDuration=function(){return this.aa?this.C.getMedia().duration:-1};_.t.getTrackManager=function(){return this.Hd};_.t.getPlaybackRate=function(){var a=this.C.getMedia();return a&&a.playbackRate||1};_.t.setPlaybackRate=function(a){var b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)};_.t.setSourceIndex=function(a){this.af=a};_.t.getSourceIndex=function(){return this.af};
|
|
515
|
-
_.t.getLoadedSource=function(){return this.aa&&-1!==this.af?this.aa[this.af]:null};_.t.getPeriods=function(){return[]};_.t.getNetworkEngine=function(){return this.Hg};_.t.setNetworkEngine=function(a){this.Hg=a};_.t.setCmsdManager=function(a){this.Gg=a};_.t.getTextDisplayer=function(){return this.U};_.t.getTimelineCues=function(){return[]};_.t.getCueTimeline=function(){return null};_.t.resetAbr=function(){};
|
|
516
|
-
_.t.Rn=function(a){var b=this.getSurface().getMedia(),c=this.getPosition(),d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.tg||a.type===_.Nf)this.eh.debug(d);else{var e="";switch(a.type){case _.Pf:e="Rate: "+this.getPlaybackRate();break;case ne:e="Duration: "+this.getDuration();break;case "volumechange":e="Volume: "+this.getVolume()+" Muted: "+this.isMuted();break;case _.of:case _.zf:case "suspend":case _.Rg:case gg:case _.ag:case _.$f:case _.tg:case _.Nf:case kd:case ld:b=
|
|
517
|
-
this.getBufferInfo().Ea(c);e="State "+this.getSurface().getMedia().readyState+" Buffer: "+b;break;case _.Uf:null!=b&&(e="Size: "+b.videoWidth+"x"+b.videoHeight)}e&&(d+=". "+e);this.eh.info(d)}a.type!==_.se&&this.trigger(new _.L(a.type,{detail:a}))};_.t.Xi=function(){};var Lm;Lm=new _.K("clpp.Components");_.Jm=new Map;_.J("clpp.install",function(a){Tm(a)});_.J("clpp.uninstall",function(a){Um(a)});Vm.prototype.release=function(){this.a=this.f=null};_.J("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Rb,SW_SECURE_DECODE:_.Sb,HW_SECURE_CRYPTO:eb,HW_SECURE_DECODE:fb,HW_SECURE_ALL:db});_.J("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.J("clpp.drm.KeySystem",{NONE:_.Ye,CLEAR_KEY:_.hf,WIDEVINE:_.Qd,PLAYREADY:_.Od,FAIRPLAY:_.Kd,PRIMETIME:_.Jd});_.Ym={};_.J("clpp.drm.registerDrmEnvironment",_.Zm);var bn={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,
|
|
503
|
+
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}};_.x(nm,_.Bl);_.t=nm.prototype;_.t.Yf=function(){return!_.Sl()};
|
|
504
|
+
_.t.Dg=function(a,b){var c=this,d,e,f,g,h,l,m,n,p,q,u,v,z,A,H,G,D,F;return _.I(function(M){if(1==M.a){if(!b)return c.g.warn(yb),M["return"]();d=b.track;if(!d)return c.g.warn(Cb),M["return"]();e=a===_.U;f=a===_.$k;g=a===_.Zk;h=e||f;l=b.target;if(m=c.h.find(function(R){return Bm(R,d,a)}))return c.g.warn("Track from event already exists",d,m),M["return"]();n=el(a,d);p=Dm(d);if(g){if(d.kind===_.Ze)return M["return"]();void 0!==d.id?q=c.o[d.id]:(u=Object.values(c.o),q=u.find(function(R){return Bm(n,R,
|
|
505
|
+
a)}));n.kind&&"captions"===n.kind&&(n.mimeType=_.Vc);q&&(n.src=q.url,n.mimeType=q.mimeType)}else if(m=c.h.find(function(R){return R.type===a&&_.N.qa(R,n,["kind","label","language"])}))return m.id=d.id,p&&(c.g.debug(Wb+a+" track active"),c.a.set(a,m)),c.g.debug("Track from event seems to already exists, flipped native track to",d),M["return"]();_.C(M,2);v=new _.gl(n.id,n);n.renditions.push(v);c.h.push(n);z=c.m.getConfiguration().safari;return rm(c,a,z)?_.y(M,um(c,n,z),5):sm(c,a,z)?_.y(M,vm(c,n,z),
|
|
506
|
+
5):M.F(5)}if(2!=M.a)return c.g.debug(a+" Track added",n),c.m.trigger(new _.L(_.Hg)),A=ym(c,a).length,H=!(!l||!l.length),G=l&&l.length||0,D=function(){c.g.debug(Wb+a+" track active. Native track active: "+(p+". Number of tracks: ")+A,d);c.a.set(a,n)},p?D():1===A&&h&&(f?D():H&&1!==G||D()),_.Hh(M,0);F=_.E(M);c.g.error("Error while converting track data",F);_.B(M)})};
|
|
507
|
+
_.t.Fg=function(a,b){if(b){var c=b.track;if(!c)this.g.warn(Cb);else if(a===_.Zk&&c.kind!==_.Ze){var d=this.h.find(function(e){return Bm(e,c,a)});d&&(this.h.splice(this.h.indexOf(d),1),(this.a.get(a)||null)===d&&(this.a.set(a,null),Fm(this)),this.g.debug(a+" Track removed, id: ",d.id))}}else this.g.warn(yb)};
|
|
508
|
+
_.t.Eg=function(a,b){this.g.debug(a+" Track changed",b);a===_.Zk&&Fm(this);var c=xm(this,a);if(c)for(var d={Zc:0};d.Zc<c.length;d={Zc:d.Zc},++d.Zc)if(Dm(c[d.Zc])){if(d=this.h.find(function(e){return function(f){return Bm(f,c[e.Zc],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===_.U?this.m.trigger(new _.L(_.jd)):a===_.Zk&&this.m.trigger(new _.L(_.Bg));break}};_.t.initialize=function(a){this.m=a;this.j=new ml(a.getNetworkEngine())};
|
|
509
|
+
_.t.load=function(){this.A=!1;var a=wm(this,_.Zk);a&&(this.f.on(a,_.Pc,this.J),this.f.on(a,$f,this.L),this.f.on(a,yd,this.K));if(a=wm(this,_.U))this.f.on(a,_.Pc,this.G),this.f.on(a,$f,this.I),this.f.on(a,yd,this.H);if(a=wm(this,_.$k))this.f.on(a,_.Pc,this.M),this.f.on(a,$f,this.U),this.f.on(a,yd,this.P);this.f.one(this.m,qd,this.fl.bind(this))};_.t.release=function(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()};_.t.destroy=function(){this.release();this.m=null};
|
|
510
|
+
_.t.getVideoTracks=function(){return ym(this,_.$k)};_.t.getAudioTracks=function(){return ym(this,_.U)};_.t.ma=function(){return ym(this,_.Zk)};_.t.na=function(){var a=this,b=this.a.get(_.$k)||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};_.t.Va=function(){return zm(this,_.U)};_.t.Za=function(){return zm(this,_.Zk)};_.t.Bb=function(){return Am(this,_.$k)};
|
|
511
|
+
_.t.Nb=function(){return Am(this,_.U)};_.t.Ob=function(){return Am(this,_.Zk)};_.t.Na=function(){return this.a.get(_.$k)||null};_.t.ra=function(){return this.a.get(_.U)||null};_.t.Ba=function(){return this.a.get(_.Zk)||null};_.t.Jb=function(a){Cm(this,_.$k,a)};_.t.Ka=function(a){Cm(this,_.U,a)};_.t.$a=function(a){Cm(this,_.Zk,a)};_.t.ub=function(a){Cm(this,_.$k,a&&a.track)};_.t.Hb=function(a){Cm(this,_.U,a&&a.track)};_.t.Ib=function(a){Cm(this,_.Zk,a&&a.track)};
|
|
512
|
+
_.t.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,om(b,a,c),d.F(0)):_.y(d,pm(b,a),0)})};_.t.wa=function(){return 1>=this.getVideoTracks().flatMap(function(a){return a.renditions}).length};
|
|
513
|
+
_.t.fl=function(){var a=this,b,c,d;return _.I(function(e){if(1==e.a){b=a.m.getConfiguration();Em(a,_.U,b.preferredAudioLanguage);c=xm(a,_.Zk);if(c.some(function(f){return Dm(f)}))return e.F(2);d=wm(a,_.Zk);return _.y(e,new Promise(function(f){a.f.one(d,yd,f);(new _.li(f)).fa(1)}),2)}if(a.A)return e["return"]();Em(a,_.Zk,b.preferredTextLanguage);_.B(e)})};nm.prototype.isAbrEnabled=nm.prototype.wa;nm.prototype.addTextTrack=nm.prototype.addTextTrack;nm.prototype.setTextRendition=nm.prototype.Ib;
|
|
514
|
+
nm.prototype.setAudioRendition=nm.prototype.Hb;nm.prototype.setVideoRendition=nm.prototype.ub;nm.prototype.setTextTrack=nm.prototype.$a;nm.prototype.setAudioTrack=nm.prototype.Ka;nm.prototype.setVideoTrack=nm.prototype.Jb;nm.prototype.getTextTrack=nm.prototype.Ba;nm.prototype.getAudioTrack=nm.prototype.ra;nm.prototype.getVideoTrack=nm.prototype.Na;nm.prototype.getLoadingTextRendition=nm.prototype.Ob;nm.prototype.getLoadingAudioRendition=nm.prototype.Nb;nm.prototype.getLoadingVideoRendition=nm.prototype.Bb;
|
|
515
|
+
nm.prototype.getTextRendition=nm.prototype.Za;nm.prototype.getAudioRendition=nm.prototype.Va;nm.prototype.getVideoRendition=nm.prototype.na;nm.prototype.getTextTracks=nm.prototype.ma;nm.prototype.getAudioTracks=nm.prototype.getAudioTracks;nm.prototype.getVideoTracks=nm.prototype.getVideoTracks;nm.prototype.canSelectVideoTracks=nm.prototype.Yf;_.t=_.Gm.prototype;_.t.start=function(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(ac);};_.t.end=function(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(ac);};_.t.Ua=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)};_.t.la=function(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-1)};
|
|
516
|
+
_.t.Tb=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};
|
|
517
|
+
_.t.Ga=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.la();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};_.t.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",_.Gm);_.Gm.prototype.bufferedAheadOf=_.Gm.prototype.Ga;
|
|
518
|
+
_.Gm.prototype.isBuffered=_.Gm.prototype.Tb;_.Gm.prototype.bufferEnd=_.Gm.prototype.la;_.Gm.prototype.bufferStart=_.Gm.prototype.Ua;_.Gm.prototype.end=_.Gm.prototype.end;_.Gm.prototype.start=_.Gm.prototype.start;_.t=_.Hm.prototype;_.t.addEventListener=function(a,b){this.on(a,b)};_.t.removeEventListener=function(a,b){this.off(a,b)};_.t.on=function(a,b,c){return this.ae.on(a,b,c)};_.t.one=function(a,b,c){return this.ae.one(a,b,c)};_.t.off=function(a,b){return this.ae.off(a,b)};_.t.forwardEventsTo=function(a){a&&(0<=this.Yd.indexOf(a)||this.Yd.push(a))};_.t.dispatchEvent=function(a){this.trigger(a);return a.defaultPrevented};
|
|
519
|
+
_.t.stopForwardingEventsTo=function(a){a&&(a=this.Yd.indexOf(a),0<=a&&this.Yd.splice(a,1))};_.t.trigger=function(a){this.ae.trigger(a);for(var b=_.w(this.Yd),c=b.next();!c.done;c=b.next())c.value.dispatchEvent(a)};_.Hm.prototype.off=_.Hm.prototype.off;_.Hm.prototype.one=_.Hm.prototype.one;_.Hm.prototype.on=_.Hm.prototype.on;_.Hm.prototype.removeEventListener=_.Hm.prototype.removeEventListener;_.Hm.prototype.addEventListener=_.Hm.prototype.addEventListener;var Im=["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",_.wa);_.tm="application/x-mpegurl";_.J("clpp.Type",{DASH:_.Wc,HLS:_.tm,SMOOTH_STREAMING:_.ad,MP4:_.Yg,MP3:"audio/mp3"});_.Qi="scte35";_.Pi="hls-daterange";_.J("clpp.TimelineCueType",{SCTE35:_.Qi,DASH_CALLBACK:_.df,HLS_DATERANGE:_.Pi,UNKNOWN:_.Ng});_.J("clpp.SpeedUpMode",{DECODER:_.ce,SEEK:"seek"});_.J("clpp.CodecSwitchingStrategy",{PREVENT:_.Tf,SMOOTH:_.ng});_.J("clpp.utils.PlayerConfiguration",Km);Km.create=_.Qm;var yw=["abort",pd,qd,ue,"emptied",we,_.ye,_.ze,"interruptbegin","interruptend",_.Se,_.Te,Ue,"mozaudioavailable",_.rf,_.vf,_.Kf,_.Vf,_.Xf,_.hg,_.ig,og,"suspend",_.Gg,"volumechange",_.dh,_.eh,_.bg,jh,ih,gh,hh];_.x(_.Sm,_.Hm);_.t=_.Sm.prototype;_.t.init=function(a,b){this.configuration=this.kb=b;this.G=a;this.log.info("Initializing Player surface");var c=this.G.getMedia();this.log.info("Attaching media element listeners");for(var d=_.w(yw),e=d.next();!e.done;e=d.next())e=e.value,this.P.on(c,e,this.Gj,e!==_.ze);this.Nd||(this.Nd=this.Wh());this.Nd.initialize(this);this.G.showMediaElement()};_.t.release=function(){this.U&&(this.U.destroy(),this.U=null);return Promise.resolve()};
|
|
520
|
+
_.t.destroy=function(){this.P.release();return this.Lg.release()};_.t.canPlay=function(a,b){return _.di[this.namespace()].canPlay(a,b)};_.t.getTimeline=function(){return null};_.t.setupPlaylist=function(){return Promise.reject(_.Eb)};_.t.appendLoad=function(){return Promise.reject(_.Eb)};_.t.seekWith=function(){return Promise.reject(_.Eb)};_.t.detach=function(){return Promise.resolve()};_.t.setSeekInterceptor=function(){};_.t.setPlaybackSessionId=function(){};_.t.getBandwidthEstimate=function(){return null};
|
|
521
|
+
_.t.play=function(){var a=this;if(!this.ba)return Promise.reject("No sources specified yet. You need to load content before calling play.");var b=this.G.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||""};Jm(d)?(a.trigger(new _.L(_.kd)),a.log.warn(_.oa)):d.name===Fb&&a.log.warn('Unrecognized "NotAllowedError" on play(). '+(c.name+": "+c.message));throw c;})};
|
|
522
|
+
_.t.pause=function(){var a=this;return this.ba?new Promise(function(b,c){var d=a.getState();if(d!==_.Lq&&d!==_.Nq&&d!==_.Uq&&d!==_.Tq)c(new _.O(_.P,7,3201,"The player state does not allow pause."));else if(a.G.getMedia().pause(),a.getState()===_.Uq)a.P.one(a,_.qg,function(){b()});else b()}):Promise.reject(new _.O(_.P,7,3201,"No sources specified yet. You need to load content before calling pause."))};_.t.isPaused=function(){return this.G.getMedia().paused};_.t.isEnded=function(){return this.G.getMedia().ended};
|
|
523
|
+
_.t.getConfiguration=function(){return this.configuration};_.t.setDrmCustomDataModifier=function(a){this.sd=a};_.t.setCdnErrorCallback=function(a){this.cd=a};_.t.ud=function(){return this.sd};_.t.getSurface=function(){return this.G};_.t.getBufferInfo=function(a){var b=this.getSurface().getMedia();return new _.Gm(b?b.buffered:void 0,a)};_.t.getPosition=function(){return this.getMediaPosition()};
|
|
524
|
+
_.t.getMediaPosition=function(){var a=this.G.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0};
|
|
525
|
+
_.t.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.G.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.P.one(d,_.Te,m)}function l(n){var p=b.getMediaPosition(),
|
|
526
|
+
q=.1>=Math.abs(a-p),u=.25<p-a,v=d.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,z=n.type===_.hg,A=n.type===_.Vf,H=n.type===_.Gg,G=A&&v;u=z||q&&G||H&&u;b.log.debug("Checking seeking state after "+n.type+" event. Seek completed:",u,"Current Time:",p,"Target Time:",a,"Native Event:",z,"Time reached",q,"Timeupdate:",H,"Progress:",A,"ReadyState:",v,"Progress Ready:",G);u?(b.Pg=!1,b.qe=!1,b.P.off(d,_.hg,l),b.P.off(d,_.Gg,l),b.P.off(d,_.Vf,l),b.ej(),b.trigger(new _.L(_.Rg)),f()):A&&c===p&&(b.log.debug("Seek seemed to have been ignored. Trying again"),
|
|
527
|
+
d.currentTime=a)}function m(){b.trigger(new _.L(_.Sg));b.P.on(d,_.hg,l);b.P.on(d,_.Gg,l);b.P.on(d,_.Vf,l);b.log.info("Seeking to "+a+". Delta "+e);b.Pg=!0;b.qe=!0;d.currentTime=a}b.getState()===_.Gq?(b.log.debug("Player is in IDLE state. Postpone seek."),b.P.one(b,_.qg,function(){switch(b.getState()){case _.Lq:case _.Uq:case _.Tq:b.log.debug("Valid seek state reached.");h();break;default:b.log.warn("Invalid seek target state. Aborting seek"),g()}})):h()})};
|
|
528
|
+
_.t.getVolume=function(){var a=this.G.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null};_.t.setVolume=function(a){var b=this.G.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 !")};_.t.isMuted=function(){return this.G.getMedia().muted};
|
|
529
|
+
_.t.setMuted=function(a){var b=this.G.getMedia();typeof a===_.md&&(b.muted=a)};_.t.getDuration=function(){return this.getMediaDuration()};_.t.getMediaDuration=function(){return this.ba?this.G.getMedia().duration:-1};_.t.getTrackManager=function(){return this.Nd};_.t.getPlaybackRate=function(){var a=this.G.getMedia();return a&&a.playbackRate||1};_.t.setPlaybackRate=function(a){var b=this.G.getMedia();void 0!==a&&b&&(b.playbackRate=a)};_.t.setSourceIndex=function(a){this.ff=a};_.t.getSourceIndex=function(){return this.ff};
|
|
530
|
+
_.t.getLoadedSource=function(){return this.ba&&-1!==this.ff?this.ba[this.ff]:null};_.t.getPeriods=function(){return[]};_.t.getNetworkEngine=function(){return this.Lg};_.t.setNetworkEngine=function(a){this.Lg=a};_.t.setCmsdManager=function(a){this.Kg=a};_.t.getTextDisplayer=function(){return this.U};_.t.getTimelineCues=function(){return[]};_.t.getCueTimeline=function(){return null};_.t.resetAbr=function(){};
|
|
531
|
+
_.t.io=function(a){var b=this.getSurface().getMedia(),c=this.getPosition(),d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.Gg||a.type===_.Vf)this.kh.debug(d);else{var e="";switch(a.type){case _.Xf:e="Rate: "+this.getPlaybackRate();break;case ue:e="Duration: "+this.getDuration();break;case "volumechange":e="Volume: "+this.getVolume()+" Muted: "+this.isMuted();break;case _.vf:case _.Kf:case "suspend":case _.dh:case og:case _.ig:case _.hg:case _.Gg:case _.Vf:case pd:case qd:b=
|
|
532
|
+
this.getBufferInfo().Ga(c);e="State "+this.getSurface().getMedia().readyState+" Buffer: "+b;break;case _.bg:null!=b&&(e="Size: "+b.videoWidth+"x"+b.videoHeight)}e&&(d+=". "+e);this.kh.info(d)}a.type!==_.ze&&this.trigger(new _.L(a.type,{detail:a}))};_.t.ej=function(){};var Vm;Vm=new _.K("clpp.Components");_.Tm=new Map;_.J("clpp.install",function(a){cn(a)});_.J("clpp.uninstall",function(a){dn(a)});en.prototype.release=function(){this.a=this.f=null};_.J("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Tb,SW_SECURE_DECODE:_.Ub,HW_SECURE_CRYPTO:hb,HW_SECURE_DECODE:ib,HW_SECURE_ALL:gb});_.J("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.J("clpp.drm.KeySystem",{NONE:_.ef,CLEAR_KEY:_.pf,WIDEVINE:_.Xd,PLAYREADY:_.Vd,FAIRPLAY:_.Sd,PRIMETIME:_.Qd});_.hn={};_.J("clpp.drm.registerDrmEnvironment",_.jn);var mn={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,
|
|
518
533
|
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,
|
|
519
534
|
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,
|
|
520
535
|
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,
|
|
@@ -528,102 +543,104 @@ this.getBufferInfo().Ea(c);e="State "+this.getSurface().getMedia().readyState+"
|
|
|
528
543
|
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,
|
|
529
544
|
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,
|
|
530
545
|
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,
|
|
531
|
-
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]};_.
|
|
532
|
-
_.t.
|
|
533
|
-
a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.
|
|
534
|
-
for(var
|
|
535
|
-
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"},
|
|
536
|
-
|
|
537
|
-
{licenseUrl
|
|
538
|
-
|
|
539
|
-
_.t.generateRequest=function(a,b){var c=this;if(this.l)return Promise.reject(
|
|
540
|
-
e);c.f&&(
|
|
541
|
-
c.f=null;else switch(c.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
542
|
-
_.t.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(),_.
|
|
543
|
-
|
|
544
|
-
_.t
|
|
545
|
-
|
|
546
|
-
_.t.
|
|
547
|
-
|
|
548
|
-
_.t.close=function(){_.
|
|
549
|
-
|
|
550
|
-
_.t.
|
|
551
|
-
_.t.
|
|
552
|
-
b.a.keySystem.startsWith(_.
|
|
553
|
-
_.
|
|
554
|
-
_.t.unload=function(){var a=this,b;return _.I(function(c){if(
|
|
555
|
-
_.t.release=function(){var a=this;return _.
|
|
556
|
-
_.t.destroy=function(){var a=this;if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return _.
|
|
557
|
-
_.t.getTrackManager=function(){return this.
|
|
558
|
-
_.t.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"](
|
|
559
|
-
b.U=e.create(b);b.U.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.
|
|
560
|
-
|
|
561
|
-
_.t.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};_.t.getSeekRange=function(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.
|
|
562
|
-
_.t.getStats=function(){if(!this.f||!this.a)return _.
|
|
563
|
-
_.t.getTimelineCues=function(){return this.l?this.l.getTimelineCues():[]};_.t.getCueTimeline=function(){return null}
|
|
564
|
-
_.
|
|
565
|
-
|
|
566
|
-
_.t.
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
_.t.
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
_.t.showMediaElement=function(){var a=this.getMedia();a?a.classList.remove(
|
|
576
|
-
_.t.removeElementFromContainer=function(a){var b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)};_.t.hide=function(a){_.
|
|
577
|
-
|
|
578
|
-
_.t.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.g.info("Destroy"),_.y(b,a.release(),2);if(3!=b.a)return _.y(b,a.o.destroy(),3);
|
|
579
|
-
|
|
580
|
-
_.t.
|
|
581
|
-
|
|
582
|
-
_.t.
|
|
583
|
-
_.t.
|
|
584
|
-
_.t.
|
|
585
|
-
_.t.
|
|
586
|
-
_.t.
|
|
587
|
-
_.t.
|
|
588
|
-
_.t.
|
|
589
|
-
_.t.
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
X.prototype.
|
|
593
|
-
X.prototype.
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
_.t.
|
|
601
|
-
|
|
602
|
-
_.t.
|
|
603
|
-
_.t.
|
|
604
|
-
_.t.
|
|
605
|
-
a.l=!
|
|
606
|
-
_.t.
|
|
607
|
-
a.
|
|
608
|
-
|
|
609
|
-
_.
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
546
|
+
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]};_.on.prototype.gb=function(a,b){this.f[a]=b};_.J("clpp.drm.DrmEnvironment",_.on);_.on.prototype.setDrmSystem=_.on.prototype.gb;_.pn.prototype.getPosition=function(){return this.a};_.pn.prototype.Wa=function(){return this.f.byteLength};_.pn.prototype.seek=function(a){(0>a||a>=this.f.byteLength)&&_.qn();this.a=a};_.sn.prototype.getPosition=function(){return this.a};_.sn.prototype.Wa=function(){return this.f.byteLength};_.sn.prototype.skip=function(a){this.a+a>this.f.byteLength&&_.un();this.a+=a};_.sn.prototype.seek=function(a){if(0>a||a>=this.f.byteLength)throw _.un();this.a=a};_.J("clpp.utils.dataview.DataViewReader",_.sn);_.t=_.Cn.prototype;_.t.N=function(a,b){var c=Gn(a);this.h[c]=zw;this.f[c]=b;return this};_.t.aa=function(a,b){var c=Gn(a);this.h[c]=Aw;this.f[c]=b;return this};_.t.stop=function(){this.a=!0};_.t.parse=function(a,b){var c=_.Xj(a);c=new _.sn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);for(this.a=!1;_.tn(c)&&!this.a;)this.yf(0,c,b)};
|
|
547
|
+
_.t.yf=function(a,b,c){var d=b.getPosition(),e=_.xn(b),f=_.xn(b),g=!1;this.g.debug("Parsing MP4 box",_.Hn(f));switch(e){case 0:e=b.Wa()-d;break;case 1:e=_.zn(b),g=!0}var h=this.f[f];if(h){var l=null,m=null;this.h[f]===Aw&&(m=_.xn(b),l=m>>>24,m&=16777215);f=b.getPosition()-d;var n=d+e;c&&n>b.Wa()&&(n=b.Wa());n-=b.getPosition();b=0<n?_.Bn(b,n):new Uint8Array(0);b=new _.sn(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+
|
|
548
|
+
a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Wa()-b.getPosition()),b.skip(a)};_.J("clpp.utils.Mp4Parser",_.Cn);_.Cn.typeToString=_.Hn;_.Cn.allData=_.Fn;_.Cn.sampleDescription=_.En;_.Cn.children=_.Dn;_.Cn.prototype.parseNext=_.Cn.prototype.yf;_.Cn.prototype.parse=_.Cn.prototype.parse;_.Cn.prototype.stop=_.Cn.prototype.stop;_.Cn.prototype.fullBox=_.Cn.prototype.aa;_.Cn.prototype.box=_.Cn.prototype.N;_.Cn.headerSize=_.In;var zw=0,Aw=1;_.J("clpp.utils.FairplayUtils",Kn);Kn.parseFairPlayResponse=_.Qn;Kn.formatFairPlayRequest=_.Pn;Kn.createFairplayPayload=On;Kn.extractContentId=_.Mn;Kn.extractExtXKeyUri=Ln;var bo=new _.K("clpp.drm.DrmToday"),Sn="PRODUCTION",Tn="STAGING",Un="DEMO",Vn="TEST",Bw={PRODUCTION:Sn,STAGING:Tn,DEMO:Un,TEST:Vn};_.J("clpp.drm.DrmToday.Environment",Bw);_.J("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
|
|
549
|
+
for(var Xn="/license-proxy-widevine/cenc/",Yn="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Zn="/license-server-fairplay/",lo={"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",
|
|
550
|
+
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"},Cw={video:[gb,ib,hb,_.Ub,_.Tb],audio:[gb,
|
|
551
|
+
ib,hb,_.Ub,_.Tb]},Dw={video:["3000","2000","150"],audio:["2000","150"]},Ew=_.w(Object.keys(Bw)),Fw=Ew.next();!Fw.done;Fw=Ew.next()){var Rn=Fw.value,Gw=Ga;Rn!==Sn&&(Gw+="_"+Rn);var Hw=new _.on(Gw),Iw=null;switch(Rn){case Sn:case Tn:case Un:Iw=nn("V2");break;case Vn:Iw=null}Hw.gb(_.Xd,{licenseUrl:$n(_.Xd),videoRobustness:Cw.video,audioRobustness:Cw.audio,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:Iw,modifiers:{licenseRequest:_.fo,licenseResponse:_.ko}});Hw.gb(_.Sd,
|
|
552
|
+
{licenseUrl:$n(_.Sd),certificateUrl:Wn()+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.ho,licenseResponse:_.io,extractContentId:_.co,certificateRequest:_.jo}});Hw.gb(_.Vd,{licenseUrl:$n(_.Vd),videoRobustness:Dw.video,audioRobustness:Dw.audio,modifiers:{licenseRequest:go}});_.jn(Hw)};_.oo.prototype.value=function(){void 0===this.a&&(this.a=this.f());return this.a};_.t=po.prototype;_.t.getStatus=function(){return this.a};_.t.forEach=function(a){this.a&&a(this.a,Jw.value())};_.t.get=function(a){if(this.has(a))return this.a};_.t.has=function(a){var b=Jw.value();return this.a&&Zj(a,b)?!0:!1};_.t.entries=function(){};_.t.keys=function(){};_.t.values=function(){};var Jw=new _.oo(function(){return fk(new Uint8Array([0]))});var ro=new _.oo(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,_.Te],[HTMLMediaElement.HAVE_CURRENT_DATA,_.Se],[HTMLMediaElement.HAVE_FUTURE_DATA,pd],[HTMLMediaElement.HAVE_ENOUGH_DATA,qd]])});_.t=to.prototype;_.t.Te=function(a){this.f=a};_.t.Sd=function(a){var b=this.a;b&&b!==a&&wo(b,null);return(this.a=a)?wo(a,this.f):Promise.resolve()};_.t.cf=function(){return this.a};_.t.$b=function(a,b){_.ai("AppleEmeManager.requestMediaKeySystemAccess");try{var c=new uo(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}};_.t.Rd=function(){return hq};uo.prototype.createMediaKeys=function(){var a=new vo(this.keySystem);return Promise.resolve(a)};
|
|
553
|
+
uo.prototype.getConfiguration=function(){_.ai("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a};vo.prototype.createSession=function(a){a=void 0===a?yg:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==yg)throw new TypeError("Session type "+a+ba);return new xo(this.h,"__session_"+this.j++)};vo.prototype.setServerCertificate=function(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)};_.x(xo,_.Hm);_.t=xo.prototype;
|
|
554
|
+
_.t.generateRequest=function(a,b){var c=this;if(this.l)return Promise.reject(Vb);this.g.debug("generateRequest");this.h=new _.Gk;try{var d=this.o.createSession(_.Yg,_.Xj(b));this.a=d;this.sessionId=d.sessionId||this.sessionId||"";this.j.on(d,ih,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 _.L(_.Ye,{messageType:void 0===f||f===rg?Me:Le,message:fk(e.message.buffer)});c.dispatchEvent(e)});this.j.on(d,gh,function(e){c.g.debug("onWebkitKeyAdded_",
|
|
555
|
+
e);c.f&&(yo(c,"usable"),c.f.resolve(),c.f=null)});this.j.on(d,hh,function(){var e=c.keyStatuses.getStatus();if(c.a&&c.a&&c.a.error&&c.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&e===rg)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),
|
|
556
|
+
c.f=null;else switch(c.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:yo(c,"output-not-allowed");break;default:yo(c,_.Ie)}});yo(this,rg)}catch(e){this.h.reject(e)}return this.h};_.t.load=function(){this.g.debug(_.Re);return Promise.reject(Error("MediaKeySession.load not yet supported"))};_.t.update=function(a){if(this.l)return Promise.reject(Vb);this.g.debug(Og);this.f=new _.Gk;try{this.a.update(_.Xj(a))}catch(b){this.f.reject(b)}return this.f};
|
|
557
|
+
_.t.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(),_.yi(this.j)}catch(a){this.closed.reject(a)}return this.closed};_.t.remove=function(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))};zo.prototype.a=function(){return hq};zo.prototype.f=function(){return!!window.WebKitMediaKeys};
|
|
558
|
+
zo.prototype.create=function(){return new to};_.t=Ao.prototype;_.t.Te=function(a){this.a=a};_.t.Sd=function(a){return this.a?this.a.setMediaKeys(a):Promise.reject(vb)};_.t.cf=function(){return this.a&&this.a.mediaKeys};
|
|
559
|
+
_.t.$b=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)})};_.t.Rd=function(){return Mp};Bo.prototype.a=function(){return Mp};
|
|
560
|
+
Bo.prototype.f=function(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)};Bo.prototype.create=function(){return new Ao};_.t=Co.prototype;_.t.Te=function(a){this.a=a};_.t.Sd=function(a){_.ai("WebkitEmeManager.setMediaKeys");if(!this.a)return Promise.reject(vb);var b=this.f;b&&b!==a&&No(b,null);(this.f=a)&&No(a,this.a);return Promise.resolve()};_.t.cf=function(){return this.f};_.t.$b=function(a,b){_.ai("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.a)var c=this.a;else{var d=document.getElementsByTagName(_.r);c=d.length?d[0]:document.createElement(_.r)}var e=new Do(this.h,c,a,b);return Promise.resolve(e)}catch(f){return Promise.reject(f)}};
|
|
561
|
+
_.t.Rd=function(){return Kw};Do.prototype.createMediaKeys=function(){return Promise.resolve(new Eo(this.h,this.a))};Do.prototype.getConfiguration=function(){return this.f};Eo.prototype.createSession=function(a){a=void 0===a?yg:a;if(a!==yg&&a!==_.tf)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=nb,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Oo(this.h,this.a,this.o,a);this.j.push(a);return a};
|
|
562
|
+
Eo.prototype.setServerCertificate=function(){return Promise.resolve(!1)};_.x(Oo,_.Hm);_.t=Oo.prototype;_.t.ready=function(){_.ai("WebkitEmeManager.MediaKeySession.ready");Mo(this,"usable");this.a&&this.a.resolve();this.a=null};_.t.generateRequest=function(a,b){_.ai("WebkitEmeManager.MediaKeySession.generateRequest");return Qo(this,b,null)};_.t.load=function(a){_.ai(lc);return this.l===_.tf?Qo(this,null,a):Promise.reject(Error(Db))};_.t.update=function(a){_.ai(lc);var b=new _.Gk;Ro(this,b,a);return b};
|
|
563
|
+
_.t.close=function(){_.ai("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.tf){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Po(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};_.t.remove=function(){_.ai("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.tf?Promise.reject(Error(Db)):this.close()};So.prototype.a=function(){return Kw};
|
|
564
|
+
So.prototype.f=function(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)};So.prototype.create=function(){return new Co};_.t=To.prototype;_.t.Te=function(){};_.t.Sd=function(a){_.ai("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))};_.t.cf=function(){return null};_.t.$b=function(){_.ai("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))};_.t.Rd=function(){return Lw};Uo.prototype.a=function(){return Lw};Uo.prototype.f=function(){return!0};Uo.prototype.create=function(){return new To};_.J(Id,Vo);var Xo=new _.K(Id),Wo=[];Wo=[new Bo,new zo,new So,new Uo].filter(function(a){return a.f()});var Mp="STANDARD",hq="APPLE",Kw="WEBKIT",Lw="NOP";Vo.Apis={STANDARD:Mp,APPLE:hq,WEBKIT:Kw,NOP:Lw};_.t=_.Zo.prototype;_.t.Ma=function(a,b){var c=this.Z(a,b);return 1!==c.length?null:c[0]};_.t.bc=_.rh(2);_.t.Z=function(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName===b})};_.t.Gc=_.rh(4);_.t.getAttributeNS=function(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null};_.t.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};
|
|
565
|
+
_.t.W=_.rh(6);_.t.we=function(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,_.Ag)}catch(e){}if(!d)return null;c=d.documentElement;return b&&c.tagName!==b||0<d.getElementsByTagName("parsererror").length?null:c};_.t.$e=_.rh(8);_.t.nd=_.rh(10);_.t.zf=_.rh(12);_.t.removeChild=function(a,b){a.removeChild(b)};_.t.lf=_.rh(14);_.t.kf=_.rh(16);_.t.Af=_.rh(18);_.t.Ee=_.rh(20);_.fp=new _.Zo;_.Mw=new _.K("clpp.xml.Parser");_.Nm="dom";var bp;_.jp=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];bp=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];_.x(ap,$o);_.x(_.ep,$o);var lp=!!(performance&&performance.mark&&performance.measure),np=new _.K("clpp.perf");pp.prototype.j=function(a){if(1<a.version)_.Wh("Unrecognized PSSH version found!");else{var b=_.lk(_.Bn(a.reader,16)),c=[];if(0<a.version)for(var d=_.xn(a.reader),e=0;e<d;++e){var f=_.lk(_.Bn(a.reader,16));c.push(f)}d=_.xn(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.Wa()&&_.Wh("Mismatch between box size and data size!")}};_.t=_.tp.prototype;_.t.destroy=function(){var a=this;return _.I(function(b){if(1==b.a){if(a.j)return _.y(b,a.Ea,0);a.j=!0;return _.y(b,vp(a),4)}a.Ea.resolve();return b.F(0)})};_.t.keySystem=function(){return this.a?_.$p(this.a.keySystem):""};_.t.getDrmInfo=function(){return this.a};_.t.dj=function(a){var b=this;return _.I(function(c){return b.H&&b.L===wp?c["return"]():!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.kb?_.y(c,nq(b,a),0):(b.ha.push(a),c.F(0))})};
|
|
566
|
+
_.t.Zi=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===_.tg){var l=h;h=g;g=l}if(gq(b.a.keySystem)&&16===h.byteLength&&_.Nl()){l=_.ek(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!==rg&&(d.loaded=!0);d&&d.sb&&d.sb.resolve();"expired"===g&&(e=!0);l=_.Xj(h);var q=_.lk(l);"00"===q&&d&&d.keyId?q=d.keyId:
|
|
567
|
+
b.a.keySystem.startsWith(_.Sd)&&16!==l.byteLength&&(q=_.T.fromCharCode(l));(l=q||"")?b.g.info(ob+q+"': "+g):b.g.info("Key status global keys: "+g);b.o.set(l,g);d&&!d.keyId&&b.h.forEach(function(u,v){v===c||u.keyId!==q||u.loaded||(u.loaded=!0)})});d&&d.loaded&&d.wb.forEach(function(g){b.o.get(g)===rg&&(b.g.warn(ob+g+ea),b.o.set(g,_.qf))});for(a=0;a<this.a.initData.length;a++){var f=this.a.initData[a];f.keyId&&this.o.get(f.keyId)===rg&&_.mk(f.initData,d.initData)&&(this.g.warn(ob+f.keyId+ea),this.o.set(f.keyId,
|
|
568
|
+
_.qf))}a=c.expiration-Date.now();(0>a||e&&1E3>a)&&d&&!d.yc&&(this.g.debug("Session has expired",c.sessionId),(a=this.h.get(c))&&a.pd&&a.pd.stop(),this.h["delete"](c),c.close()["catch"](function(){}));bq(this)&&(this.I.resolve(),1!==this.h.size||e?this.ea.fa(.5):rp(this))};var wp=0,qp=3;_.uq=new Map;_.vq=new _.K("clpp.text");_.Eq.prototype.getStats=function(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Aq(this.a,_.Uq),pauseTime:Aq(this.a,_.Tq),bufferingTime:Aq(this.a,_.Lq),stateHistory:Bq(this.a),switchHistory:Dq(this.f)}};Jq.prototype.ab=function(a,b){this.m&&this.m.trigger(new _.L(a,{detail:b}))};Jq.prototype.getState=function(){return Mq(this,"")};Jq.prototype.destroy=function(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()};_.J("clpp.utils.media.detectType",Wq);var Zq=new _.K("clpp.sources");_.x($q,_.Sm);_.t=$q.prototype;_.t.init=function(a,b){_.Sm.prototype.init.call(this,a,b);this.j=new Jq(this);Qq(this.j,_.Gq)};_.t.namespace=function(){return Jd};
|
|
569
|
+
_.t.unload=function(){var a=this,b;return _.I(function(c){if(a.ba){a.log.debug("Releasing player with source",a.ba);a.B&&(a.B.stop(),a.B=null);(b=a.getTrackManager())&&b.release();a.A&&(a.A.destroy(),a.A=null);a.U&&(a.U.destroy(),a.U=null);a.l&&a.l.release();a.o&&(a.o.destroy(),a.o=null);_.yi(a.h);a.f&&(a.f=new _.Eq);a.C=null;a.ba=null;a.H=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.O(_.P,7,7E3);if(a.a){var d=a.a;a.h.off(d,_.ze);a.h.off(d,_.bg);a.a=null}}_.B(c)})};
|
|
570
|
+
_.t.release=function(){var a=this;return _.Sm.prototype.release.call(this).then(function(){return a.unload()}).then(function(){a.j&&Qq(a.j,_.Gq)})};
|
|
571
|
+
_.t.destroy=function(){var a=this;if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return _.Sm.prototype.destroy.call(this).then(function(){return a.release()}).then(function(){a.log.debug(Ka);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})};_.t.getDrmInfo=function(){return this.o?this.o.getDrmInfo():null};
|
|
572
|
+
_.t.getTrackManager=function(){return this.Nd};
|
|
573
|
+
_.t.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(_.P,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.G.getMedia();b.I=Date.now()/1E3;b.f=new _.Eq;b.h.on(b,_.qg,function(){b.f&&_.zq(b.f.a,b.getState())});Qq(b.j,_.Sq);b.ba=_.Yq(a);b.configuration=_.Qm(b.kb,a);b.log.debug(_.sb,b.configuration);b.log.debug(_.Lb,b.ba);e=_.xq(b.configuration,
|
|
574
|
+
[_.Ge,"native"]);b.U=e.create(b);b.U.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Um(_.xg)&&!_.Ul()&&(b.A=new jj(b),b.A.start(d));b.l?b.l.release():b.l=new Ai(b);d.textTracks&&Ci(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,pd,function(){b.trigger(new _.L(_.Hg))});null==b.configuration.startTime&&hr(b,d);_.Sl()&&ir(b,d);
|
|
575
|
+
_.C(h,2);br(b,d);return _.y(h,er(b),4);case 4:return _.y(h,gr(b).T,5);case 5:_.Hh(h,0);break;case 2:g=_.E(h),b.H=!1,b.onError(g),_.B(h)}})};_.t.onError=function(a){this.H||(a.severity===_.P&&null!==this.j&&Qq(this.j,_.Rq),this.trigger(new _.L(_.ze,{detail:a})))};_.t.Wh=function(){return new nm};_.t.getState=function(){return null!==this.j?this.j.getState().currentState:_.Hq};
|
|
576
|
+
_.t.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};_.t.getSeekRange=function(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.C=a={start:a.start(0),end:a.end(a.length-1)};if(this.C)return this.C}return{start:0,end:0}};_.t.isLive=function(){return this.a&&this.a.src?Infinity===this.a.duration:!1};
|
|
577
|
+
_.t.getStats=function(){if(!this.f||!this.a)return _.Fq();this.f&&_.zq(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.C=Number(a.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.na())a.bandwidth&&(this.f.w=a.bandwidth),a.Md&&(this.f.h=a.Md);return this.f.getStats()};
|
|
578
|
+
_.t.getTimelineCues=function(){return this.l?this.l.getTimelineCues():[]};_.t.getCueTimeline=function(){return null};jr.prototype.a=function(){return Jd};jr.prototype.canPlay=function(a,b){var c=a.type||"",d=c===_.Wc,e=c===_.ad,f=c===_.tm;return _.Rl()||d||e||f&&!_.Sl()?0:""!==Xl().canPlayType(c)?f&&_.Sl()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0};jr.prototype.f=function(a){return a===_.qa};jr.prototype.create=function(){return new $q};
|
|
579
|
+
_.gi(new jr);_.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 lr=new _.K("clpp.ads"),kr=[];_.t=or.prototype;_.t.load=function(){};_.t.start=function(){};_.t.kd=function(){};_.t.resume=function(){};_.t.pause=function(){};_.t.skip=function(){};_.t.getVolume=function(){};_.t.setVolume=function(){};_.t.getPosition=function(){};_.t.Dc=function(){};_.t.gd=function(){};_.J("clpp.ads.IAdsManager",or);or.prototype.getPosition=or.prototype.getPosition;or.prototype.setVolume=or.prototype.setVolume;or.prototype.getVolume=or.prototype.getVolume;or.prototype.skip=or.prototype.skip;
|
|
580
|
+
or.prototype.pause=or.prototype.pause;or.prototype.resume=or.prototype.resume;_.t=pr.prototype;_.t.yb=function(){};_.t.zb=function(){};_.t.Db=function(){};_.t.getId=function(){};_.t.getCreativeId=function(){};_.t.cc=function(){};_.t.getApiFramework=function(){};_.t.getAdSystem=function(){};_.t.getAdvertiserName=function(){};_.t.getTitle=function(){};_.t.getDuration=function(){};_.t.getPosition=function(){};_.t.getSkipTimeOffset=function(){};_.t.gc=function(){};_.t.Ab=function(){};_.t.getMediaUrl=function(){};_.t.qb=function(){};_.t.pb=function(){};_.t.Xa=function(){};
|
|
581
|
+
_.t.Ya=function(){};_.t.getPodIndex=function(){};_.t.Pb=function(){};_.t.Cb=function(){};_.t.rb=function(){};_.t.getWrapperAdIds=function(){};_.t.getWrapperAdSystems=function(){};_.t.getWrapperCreativeIds=function(){};_.t.fc=function(){};_.t.canSeek=function(){};_.J("clpp.ads.IAd",pr);pr.prototype.canSeek=pr.prototype.canSeek;pr.prototype.getVideoElement=pr.prototype.fc;pr.prototype.getWrapperCreativeIds=pr.prototype.getWrapperCreativeIds;pr.prototype.getWrapperAdSystems=pr.prototype.getWrapperAdSystems;
|
|
582
|
+
pr.prototype.getWrapperAdIds=pr.prototype.getWrapperAdIds;pr.prototype.getSequenceLength=pr.prototype.rb;pr.prototype.getPositionInSequence=pr.prototype.Cb;pr.prototype.getPodTimeOffset=pr.prototype.Pb;pr.prototype.getPodIndex=pr.prototype.getPodIndex;pr.prototype.getPodType=pr.prototype.Ya;pr.prototype.getMediaBitrate=pr.prototype.Xa;pr.prototype.getMediaHeight=pr.prototype.pb;pr.prototype.getMediaWidth=pr.prototype.qb;pr.prototype.getMediaUrl=pr.prototype.getMediaUrl;
|
|
583
|
+
pr.prototype.getClickThroughUrl=pr.prototype.Ab;pr.prototype.isBumper=pr.prototype.gc;pr.prototype.getSkipTimeOffset=pr.prototype.getSkipTimeOffset;pr.prototype.getPosition=pr.prototype.getPosition;pr.prototype.getDuration=pr.prototype.getDuration;pr.prototype.getTitle=pr.prototype.getTitle;pr.prototype.getAdvertiserName=pr.prototype.getAdvertiserName;pr.prototype.getAdSystem=pr.prototype.getAdSystem;pr.prototype.getApiFramework=pr.prototype.getApiFramework;pr.prototype.getSourceId=pr.prototype.cc;
|
|
584
|
+
pr.prototype.getCreativeId=pr.prototype.getCreativeId;pr.prototype.getId=pr.prototype.getId;pr.prototype.getTechnology=pr.prototype.Db;pr.prototype.getAdManagerVersion=pr.prototype.zb;pr.prototype.getAdManagerName=pr.prototype.yb;_.t=qr.prototype;_.t.yb=function(){return""};_.t.zb=function(){return""};_.t.Db=function(){return 2};_.t.getId=function(){return this.B};_.t.getCreativeId=function(){return""};_.t.cc=function(){return this.G};_.t.getApiFramework=function(){return null};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return""};_.t.getDuration=function(){return this.a};_.t.getPosition=function(){return this.j};_.t.getSkipTimeOffset=function(){return-1};
|
|
585
|
+
_.t.canSeek=function(){return this.A};_.t.gc=function(){return!1};_.t.Ab=function(){return null};_.t.getMediaUrl=function(){return null};_.t.qb=function(){return 0};_.t.pb=function(){return 0};_.t.Xa=function(){return 0};_.t.Ya=function(){return this.C};_.t.getPodIndex=function(){return 0};_.t.Pb=function(){return 0};_.t.Cb=function(){return this.h};_.t.rb=function(){return this.f};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};
|
|
586
|
+
_.t.fc=function(){return this.videoEl};qr.prototype.getVideoElement=qr.prototype.fc;qr.prototype.getWrapperCreativeIds=qr.prototype.getWrapperCreativeIds;qr.prototype.getWrapperAdSystems=qr.prototype.getWrapperAdSystems;qr.prototype.getWrapperAdIds=qr.prototype.getWrapperAdIds;qr.prototype.getSequenceLength=qr.prototype.rb;qr.prototype.getPositionInSequence=qr.prototype.Cb;qr.prototype.getPodTimeOffset=qr.prototype.Pb;qr.prototype.getPodIndex=qr.prototype.getPodIndex;qr.prototype.getPodType=qr.prototype.Ya;
|
|
587
|
+
qr.prototype.getMediaBitrate=qr.prototype.Xa;qr.prototype.getMediaHeight=qr.prototype.pb;qr.prototype.getMediaWidth=qr.prototype.qb;qr.prototype.getMediaUrl=qr.prototype.getMediaUrl;qr.prototype.getClickThroughUrl=qr.prototype.Ab;qr.prototype.isBumper=qr.prototype.gc;qr.prototype.canSeek=qr.prototype.canSeek;qr.prototype.getSkipTimeOffset=qr.prototype.getSkipTimeOffset;qr.prototype.getPosition=qr.prototype.getPosition;qr.prototype.getDuration=qr.prototype.getDuration;qr.prototype.getTitle=qr.prototype.getTitle;
|
|
588
|
+
qr.prototype.getAdvertiserName=qr.prototype.getAdvertiserName;qr.prototype.getAdSystem=qr.prototype.getAdSystem;qr.prototype.getApiFramework=qr.prototype.getApiFramework;qr.prototype.getSourceId=qr.prototype.cc;qr.prototype.getCreativeId=qr.prototype.getCreativeId;qr.prototype.getId=qr.prototype.getId;qr.prototype.getTechnology=qr.prototype.Db;qr.prototype.getAdManagerVersion=qr.prototype.zb;qr.prototype.getAdManagerName=qr.prototype.yb;rr.prototype.has=function(){return this.a.some(function(a){return a.Qe})};rr.prototype.get=function(){var a=this,b;return _.I(function(c){if(1==c.a){b=a.a.find(function(d){return d.Qe});if(!b)throw Error("No available players in the pool");b.Qe=!1;return _.y(c,b.ready,2)}return c["return"](b.player)})};
|
|
589
|
+
rr.prototype.release=function(a){var b=this,c=this.a.find(function(d){return d.player===a});if(!c)return Promise.resolve();c.Qe=!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};rr.prototype.destroy=function(){var a=this;return _.I(function(b){return _.y(b,Promise.all(a.a.map(function(c){return c.player.destroy()})),0)})};_.J("clpp.utils.dom.createHTMLElement",_.vr);wr.prototype.set=function(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=yr(this,a)};wr.prototype.get=function(){return this.a};_.t=Cr.prototype;_.t.getMedia=function(){return this.f.get()};_.t.getContainer=function(){return this.a.get()};_.t.getSafeContainer=function(){return this.a};_.t.getId=function(){return this.l};_.t.getUniqueCssClass=function(){return this.o};_.t.getCastElement=function(){return this.h};_.t.isFullscreen=function(){return!!document.fullscreenElement};_.t.hideMediaElement=function(){var a=this.getMedia();a?_.tr(a,Bd):this.g.debug("No media element available that could be hidden")};
|
|
590
|
+
_.t.showMediaElement=function(){var a=this.getMedia();a?a.classList.remove(Bd):this.g.debug("No media element available that could be shown")};_.t.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&&_.tr(a,_.Ad);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)};
|
|
591
|
+
_.t.removeElementFromContainer=function(a){var b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)};_.t.hide=function(a){_.tr(a,Bd)};_.t.show=function(a){a.classList.remove(Bd)};_.t.release=function(){this.j.release()};Cr.prototype.removeElementFromContainer=Cr.prototype.removeElementFromContainer;Cr.prototype.addElementToContainer=Cr.prototype.addElementToContainer;Cr.prototype.getCastElement=Cr.prototype.getCastElement;
|
|
592
|
+
Cr.prototype.getContainer=Cr.prototype.getContainer;Cr.prototype.getMedia=Cr.prototype.getMedia;var zr={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Ar=1;_.t=Hr.prototype;_.t.getCurrentItem=function(){return this.f};_.t.af=function(){return this.f?this.f.player:null};_.t.ni=function(){return Array.from(this.l.values())};_.t.le=function(){return 0<this.l.size};_.t.play=function(a){return Jr(this,a,_.vf)};_.t.load=function(a){return Jr(this,a,_.Re)};_.t.release=function(){var a=this;return _.I(function(b){if(1==b.a)return _.y(b,Promise.all([$r(a),a.f?Zr(a,a.f):Promise.resolve()]),2);a.f=null;a.A=!1;Pr(a);_.B(b)})};
|
|
593
|
+
_.t.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.g.info("Destroy"),_.y(b,a.release(),2);if(3!=b.a)return _.y(b,a.o.destroy(),3);ns(a);_.B(b)})};_.t.isMuted=function(){return this.C};var hs="preload",js=_.Ve,Tr="primary",Sr="ad";_.x(us,_.Hm);_.t=us.prototype;_.t.destroy=function(){var a=this;return _.I(function(b){Hs(a);a.f=[];a.o=!1;a.j.setSeekInterceptor(null);return _.y(b,a.a.destroy(),0)})};_.t.Sb=function(){return this.o};_.t.setMuted=function(a){var b=this.a;(b.C=a)?(b.a.setMuted(!0),ms(b,!0)):(a=(a=b.getCurrentItem())?a.Oa:null,Rr(b,a,a?Sr:Tr))};_.t.isMuted=function(){return this.a.isMuted()};_.t.isLive=function(){var a=this.a.af();return a?a.isLive():null};_.t.ab=function(a){this.j.trigger(a)};
|
|
594
|
+
var Gs=0,Ns=1,Ps=2,Qs=3,Ts=4,Vs=5,Ws=6;_.t=Ys.prototype;_.t.load=function(){return Promise.resolve()};_.t.start=function(){return Promise.resolve()};_.t.kd=function(a,b,c){var d=a.getConfiguration();a=Object.assign({},{config:d,player:a,ob:b},d.ads.hls||{},{$n:c});this.a=new us(a);xs(this.a)};_.t.setMuted=function(a){this.a&&this.a.setMuted(a)};_.t.isMuted=function(){return this.a?this.a.isMuted():!0};_.t.resume=function(){var a=vs(this.a);a&&a.play()};_.t.pause=function(){var a=vs(this.a);a&&a.pause()};_.t.skip=function(){};
|
|
595
|
+
_.t.getVolume=function(){var a=vs(this.a);return a?a.getVolume()||0:0};_.t.setVolume=function(a){var b=vs(this.a);if(b)return b.setVolume(a)};_.t.getPosition=function(){var a=vs(this.a);return a?a.getPosition():-1};_.t.gd=function(){return!this.a.Sb()};_.t.Dc=function(){return this.a.destroy()};Ys.prototype.getPosition=Ys.prototype.getPosition;Ys.prototype.setVolume=Ys.prototype.setVolume;Ys.prototype.getVolume=Ys.prototype.getVolume;Ys.prototype.skip=Ys.prototype.skip;Ys.prototype.pause=Ys.prototype.pause;
|
|
596
|
+
Ys.prototype.resume=Ys.prototype.resume;at.prototype.release=function(){this.a.release();et(this);this.m=null};_.J("clpp.polyfill.installAll",ht);var gt=[];_.J("clpp.polyfill.register",_.it);var lt={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Lm="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var At="vod",zt="live";var It,Gt,Ht;Dt.prototype.release=function(){this.a=null;this.f.ze(this.h)};_.Nw="maxSuggestedBitrateKbps";It={du:"duress",etp:_.Ae,mb:_.Nw,rd:"responseDelay",rtt:"roundTripTime"};Gt={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:Ug};Ht=new _.K("clpp.net.CmsdManager");_.x(X,_.Hm);_.t=X.prototype;_.t.on=function(a,b,c){return _.Hm.prototype.on.call(this,a,b,c)};_.t.one=function(a,b,c){return _.Hm.prototype.one.call(this,a,b,c)};_.t.off=function(a,b){return _.Hm.prototype.off.call(this,a,b)};_.t.onError=function(a){if(null!==this.a)this.a.onError(a);else this.trigger(new _.L(_.ze,{detail:a}))};_.t.ge=function(a){a=this.L[a];void 0===a&&(a=null);return a};_.t.getSurface=function(){return this.j};_.t.getConfiguration=function(){return _.N.nb(this.f)};
|
|
597
|
+
_.t.getDrmInfo=function(){return this.a?this.a.getDrmInfo():null};_.t.detach=function(){return this.a?this.a.detach():Promise.resolve()};_.t.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=Pt(this);return this.l["finally"](function(){Zt(a);a.g.debug("Player released");a.l=null})};
|
|
598
|
+
_.t.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(Ka);a.trigger(new _.L("destroying"));return a.Qc(_.kf)}).then(function(){a.a&&a.a.stopForwardingEventsTo(a);a.ae.clear();a.kb.release();if(a.a)return a.a.destroy()}).then(function(){return a.J.destroy()}).then(function(){bn();a.a=null;a.A=null;a.trigger(new _.L("destroyed"))})};
|
|
599
|
+
_.t.load=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:_.C(f,2);_.mp(Df);b.P=_.qa;b.ja=!0;c=_.Yq(a);d=Rm(a)?a:{};if(d.license)throw new _.O(_.P,7,7100,"License cannot be passed into the load method.");return _.y(f,_.Xt(b,d,c),4);case 4:return _.y(f,_.Yt(b),5);case 5:return _.y(f,_.St(b),6);case 6:_.mp(Cf);_.op("player.load",Df,Cf);_.Hh(f,0);break;case 2:e=_.E(f);Zt(b);if(b.l)throw b.g.info(rb),new _.O(_.P,7,7E3);throw e;}})};
|
|
600
|
+
_.t.preload=function(a){var b=this,c;return _.I(function(d){if(1==d.a)return _.y(d,_.Xt(b,a),2);if(!b.a)return b.g.warn(Kb),d["return"]();c=b.a;return c.preload?_.y(d,c.preload(b.f),0):(b.g.warn(Ob),d["return"]())})};_.t.Qc=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];if(!this.ja)return Promise.resolve();var e=this;d=this.ha.map(function(f){var g=f[a];return g.call.apply(g,[f,e].concat(_.th(c)))}).filter(function(f){return f instanceof Promise});return Promise.all(d)};
|
|
601
|
+
_.t.use=function(a){(a=cn(a))&&a.o(this)};_.t.remove=function(a){return(this.getState()<=_.Gq||this.Y)&&null!==Xm(a)?(dn(a),this.ca=!0):!1};_.t.play=function(){return this.a?!this.h||this.h instanceof Ys||this.a.namespace()===_.Fd?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")};_.t.pause=function(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")};
|
|
602
|
+
_.t.getTrackManager=function(){return this.a&&this.a.getTrackManager()};_.t.getBufferInfo=function(a){return this.a?this.a.getBufferInfo(a):new _.Gm};_.t.getState=function(){return this.a?this.a.getState():_.Gq};_.t.getPeriods=function(){return this.a?this.a.getPeriods():[]};_.t.isEnded=function(){return this.a&&this.a.isEnded()||!1};_.t.isPaused=function(){return this.a&&this.a.isPaused()||!1};_.t.getPosition=function(){return this.a?this.a.getPosition():0};
|
|
603
|
+
_.t.seek=function(a){return this.getState()===_.Rq?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")};_.t.getPresentationStartTime=function(){return this.a?this.a.getPresentationStartTime():null};_.t.getSeekRange=function(){return this.a?this.a.getSeekRange():{start:0,end:0}};_.t.Jc=function(){var a=this.a;return a&&a.Jc?a.Jc():null};_.t.getVolume=function(){return this.a?this.a.getVolume():null};_.t.setVolume=function(a){this.a&&this.a.setVolume(a)};
|
|
604
|
+
_.t.getDuration=function(){return this.a?this.a.getDuration():-1};_.t.getAdsManager=function(){return this.h};_.t.namespace=function(){return this.a&&this.a.namespace()||"Undefined"};_.t.getPlaybackRate=function(){return this.a?this.a.getPlaybackRate():1};_.t.setPlaybackRate=function(a,b){this.a&&this.a.setPlaybackRate(a,b)};_.t.isMuted=function(){return this.h&&this.h instanceof Ys?this.h.isMuted():this.a&&this.a.isMuted()||!1};
|
|
605
|
+
_.t.setMuted=function(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof Ys&&this.h.setMuted(a)};_.t.getNetworkEngine=function(){return this.J};_.t.setNetworkEngine=function(a){this.J=a};_.t.getTextDisplayer=function(){return this.a&&this.a.getTextDisplayer()};_.t.isLive=function(){return!!this.a&&this.a.isLive()};_.t.getStats=function(){return this.a?this.a.getStats():null};_.t.wi=function(){return Object.freeze(this.Ea)};_.t.getLoadedSource=function(){return this.a&&this.a.getLoadedSource()};
|
|
606
|
+
_.t.getTimelineCues=function(){return this.a?this.a.getTimelineCues():[]};_.t.getCueTimeline=function(){return this.a?this.a.getCueTimeline():null};_.t.resetAbr=function(){this.a&&this.a.resetAbr()};_.t.setDrmCustomDataModifier=function(a){this.sd=a;Vt(this)};_.t.setCdnErrorCallback=function(a){this.M=a;this.a&&this.a.setCdnErrorCallback(this.M)};_.t.Ui=function(){this.fg=!0};_.J("clpp.Player",X);X.registerPlugin=_.bu;X.prototype.setCdnErrorCallback=X.prototype.setCdnErrorCallback;
|
|
607
|
+
X.prototype.setDrmCustomDataModifier=X.prototype.setDrmCustomDataModifier;X.prototype.resetAbr=X.prototype.resetAbr;X.prototype.getTimelineCues=X.prototype.getTimelineCues;X.prototype.getLoadedSource=X.prototype.getLoadedSource;X.prototype.getSources=X.prototype.wi;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;
|
|
608
|
+
X.prototype.setMuted=X.prototype.setMuted;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.Jc;X.prototype.getSeekRange=X.prototype.getSeekRange;
|
|
609
|
+
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;
|
|
610
|
+
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.ge;X.prototype.off=X.prototype.off;X.prototype.one=X.prototype.one;X.prototype.on=X.prototype.on;_.Gq=0;_.Sq=1;_.Lq=2;_.Uq=3;_.Tq=4;_.Nq=5;_.Rq=6;_.Hq=7;
|
|
611
|
+
_.Pq={IDLE:_.Gq,PREPARING:_.Sq,BUFFERING:_.Lq,PLAYING:_.Uq,PAUSED:_.Tq,ENDED:_.Nq,ERROR:_.Rq,UNSET:_.Hq};X.State=_.Pq;var Lt=[];_.x(cu,X);_.t=cu.prototype;
|
|
612
|
+
_.t.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(_.P,7,7008,"Cannot call open() while "+c.w+fa);if(0!==a)throw new _.O(_.P,7,7007,"The index parameter only supports the value of 0.");if(0===b.length)throw new _.O(_.P,7,7003,Bb);if(b.some(function(p){return!p.id||!p.source}))throw new _.O(_.P,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(_.P,7,
|
|
613
|
+
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(_.P,7,7100,"Unsupported `playlist.timeline` config value!");h=e.startTime;if(null!=h&&(typeof h!==_.k||0>h))throw new _.O(_.P,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(_.P,7,7100,"Invalid `playlist.endTime` config value!");m=e.content;if("DVR"===m&&!l)throw new _.O(_.P,7,
|
|
614
|
+
7100,"`playlist.endTime` config value is required for DVR content!");}_.Gh(n);du(c);c.w="open";return _.y(n,hu(c,b),4)}2!=n.a&&(c.I=0,c.o=b,c.ea=!0,eu(c,b[0].playlist||{}));_.Ih(n);c.w=null;return _.Jh(n)})};
|
|
615
|
+
_.t.Qj=function(a){var b=this,c;return _.I(function(d){if(1==d.a){if(b.w)throw new _.O(_.P,7,7008,"Cannot call addItem() while "+b.w+fa);if(!b.ea)throw new _.O(_.P,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.O(_.P,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(_.P,7,7100,"A config with this `id` already exists in the playlist!");_.Gh(d);b.w="addItem";b.o.push(a);return _.y(d,
|
|
616
|
+
iu(b,a),2)}_.Ih(d);b.w=null;return _.Jh(d)})};_.t.getCurrentItem=function(){return this.o[this.I]||null};_.t.getCurrentItemIndex=function(){return this.I};_.t.jm=function(){return _.th(this.o).concat()};_.t.he=function(){return this.o.length};_.t.getTimeline=function(){return this.a?this.a.getTimeline():null};_.t.seekWith=function(a){return this.a?this.a.seekWith(a):Promise.resolve()};_.t.release=function(){this.o=[];this.I=0;this.ea=!1;return X.prototype.release.call(this)};
|
|
617
|
+
_.t.destroy=function(){du(this);return X.prototype.destroy.call(this)};_.t.setCdnErrorCallback=function(){throw new _.O(1,7,7009,"CDN switching is not supported!");};_.J("clpp.plist.ScPlaylist",cu);cu.prototype.setCdnErrorCallback=cu.prototype.setCdnErrorCallback;cu.prototype.destroy=cu.prototype.destroy;cu.prototype.release=cu.prototype.release;cu.prototype.seekWith=cu.prototype.seekWith;cu.prototype.getTimeline=cu.prototype.getTimeline;cu.prototype.getSize=cu.prototype.he;
|
|
618
|
+
cu.prototype.getPlaylist=cu.prototype.jm;cu.prototype.getCurrentItemIndex=cu.prototype.getCurrentItemIndex;cu.prototype.getCurrentItem=cu.prototype.getCurrentItem;cu.prototype.addItem=cu.prototype.Qj;cu.prototype.open=cu.prototype.open;_.x(lu,_.Hm);_.t=lu.prototype;_.t.fe=function(){return this.f};_.t.af=function(){return this.f?this.f.player:null};_.t.li=function(){return this.o.get(this.a+1)||null};_.t.oi=function(){return this.o.get(this.a-1)||null};_.t.ni=function(){return[this.oi(),this.li()].filter(Boolean)};_.t.vo=function(a){if(0<this.j.length)throw Error("Cannot re-set items in the playlist");this.g.info("Set items",a);this.j=a.map(function(b,c){return{config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}})};
|
|
619
|
+
_.t.uo=function(a){if(0===this.j.length)throw Error(Ab);if(0>a||a>this.j.length-1)throw Error("Index out of bounds");this.a=a};_.t.le=function(){return this.a<this.j.length-1};_.t.yi=function(){return 0<this.a};
|
|
620
|
+
_.t.Yn=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.j.length)return a.g.warn(Ab),d["return"]();a.l=!0;a.g.info("First (index: "+a.a+")");b=a.j[a.a];_.C(d,2,3);a.g.info("First loading (index: "+a.a+")");return _.y(d,tu(a,b),5);case 5:a.g.info("First playing (index: "+a.a+")");case 3:_.Ih(d);a.l=!1;yu(a);_.Jh(d);break;case 2:throw c=_.E(d),a.g.error("First failed (index: "+a.a+")"),c;}})};
|
|
621
|
+
_.t.mj=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.le())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.h.transition===_.rf&&b.player.pause();mu(a,a.a+-2);a.o["delete"](a.a);c=a.j[a.a];_.C(e,2,3);a.g.info("Next loading (index: "+a.a+")");return _.y(e,uu(a,c),5);case 5:a.g.info("Next playing (index: "+a.a+")");case 3:_.Ih(e);
|
|
622
|
+
a.l=!1;b&&qu(a,b);yu(a);_.Jh(e);break;case 2:throw d=_.E(e),a.g.error("Next failed (index: "+a.a+")"),d;}})};
|
|
623
|
+
_.t.Zn=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.yi())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.h.transition===_.rf&&b.player.pause();mu(a,a.a+2);a.o["delete"](a.a);c=a.j[a.a];_.C(e,2,3);a.g.info("Previous loading (index: "+a.a+")");return _.y(e,uu(a,c),5);case 5:a.g.info("Previous playing (index: "+
|
|
624
|
+
a.a+")");case 3:_.Ih(e);a.l=!1;b&&qu(a,b);yu(a);_.Jh(e);break;case 2:throw d=_.E(e),a.g.error("Previous failed (index: "+a.a+")"),d;}})};_.t.destroy=function(){var a=this;return _.I(function(b){return 1==b.a?(a.g.info("Destroy"),_.y(b,Promise.all([nu(a),a.f?qu(a,a.f):Promise.resolve()]),2)):_.y(b,zu(a),0)})};_.J(Kd,lu);lu.prototype.destroy=lu.prototype.destroy;lu.prototype.playPrev=lu.prototype.Zn;lu.prototype.playNext=lu.prototype.mj;lu.prototype.playFirst=lu.prototype.Yn;lu.prototype.hasPrev=lu.prototype.yi;
|
|
625
|
+
lu.prototype.hasNext=lu.prototype.le;lu.prototype.setIndex=lu.prototype.uo;lu.prototype.setItems=lu.prototype.vo;lu.prototype.getPreloading=lu.prototype.ni;lu.prototype.getPrev=lu.prototype.oi;lu.prototype.getNext=lu.prototype.li;lu.prototype.getCurrentPlayer=lu.prototype.af;lu.prototype.getCurrent=lu.prototype.fe;var pu="preload",ru=_.Ve;var Au=new Map;_.t=Cu.prototype;_.t.destroy=function(){this.a.dispose();this.a=null};_.t.reset=function(){this.a=new muxjs.mp4.Transmuxer(this.f)};_.t.isSupported=function(a,b){var c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.dd;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Bu(hd);if(b)return _.Bu(Du(b,a));c=Du(_.cd,a);d=Du(_.r,a);return _.Bu(c)||_.Bu(d)};_.t.isMuxed=function(a,b){return 1<this.demuxMimeTypes(a,b).size};
|
|
626
|
+
_.t.demuxMimeTypes=function(a,b){var c=new Map;c.set(a,b);try{var d=_.Kl(b),e=_.Ll(b).split(","),f=new Map,g=Dj(_.cd,e),h=Dj(_.r,e);g&&f.set(_.cd,this.convertCodecs(_.cd,_.Jl(d,g)));h&&f.set(_.r,this.convertCodecs(_.r,_.Jl(d,h)));return f}catch(l){return c}};_.t.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]===_.dd?hd:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Du(a,b):b};_.t.getOriginalMimeType=function(){return this.h};
|
|
627
|
+
_.t.transmux=function(a){function b(){g={video:nk.apply(gk,_.th(d)),captions:f,audio:nk.apply(gk,_.th(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===Ow?d.push(l):h.type===Pw&&e.push(l)}var d=[],e=[],f=[],g=null;a=_.Xj(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(_.P,3,3018);return g};
|
|
628
|
+
El(_.dd,function(){return new Cu(_.dd)});El(_.Xg,function(){return new Cu(_.Xg)});var Pw=_.cd,Ow=_.r;Eu.prototype.getCuePoints=function(){};Eu.prototype.Sb=function(){};Eu.prototype.Rb=function(){};_.J("clpp.ads.IAdsTimeline",Eu);Eu.prototype.hasPostroll=Eu.prototype.Rb;Eu.prototype.hasPreroll=Eu.prototype.Sb;Eu.prototype.getCuePoints=Eu.prototype.getCuePoints;_.Fu.prototype.f=function(){};_.Fu.prototype.a=function(){};_.Fu.prototype.h=function(){};_.Fu.prototype.o=function(){};_.x(Gu,_.on);Gu.prototype.ve=function(a,b){for(var c=a.drm.customData.headers||{},d=_.w(Object.keys(c)),e=d.next();!e.done;e=d.next())e=e.value,b.headers[e]=c[e]};Gu.prototype.ci=function(a,b){var c=Ln(b);switch(this.o){case Qw:return c;case Rw:return(new _.hl(c)).a;default:throw Error("Unknown content ID strategy");}};Gu.prototype.Xi=function(a,b){b.headers[Ba]=bd;this.ve(a,b);var c={spc:_.hk(b.body)};b.body=_.T.Dd(_.jl(c,!0))};
|
|
629
|
+
Gu.prototype.Yi=function(a,b){var c=_.T.da(b.data).trim(),d="\x3c/ckc\x3e"===c.substr(-6);"\x3cckc\x3e"===c.substr(0,5)&&d&&(c=c.slice(5,-6));b.data=_.jk(c).buffer};_.J(Gd,Gu);Gu.prototype.onFairPlayLicenseResponse=Gu.prototype.Yi;Gu.prototype.onFairPlayLicenseRequest=Gu.prototype.Xi;Gu.prototype.extractFairPlayContentId=Gu.prototype.ci;Gu.prototype.onLicenseRequest=Gu.prototype.ve;Gu.prototype.constructor=Gu.prototype.constructor;Gu.NAME=jb;var Rw="hostname",Qw="full-skd";
|
|
630
|
+
Gu.FairPlayContentIdStrategy={HOSTNAME:Rw,FULL_SKD:Qw};_.x(Hu,_.Fu);Hu.prototype.h=function(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===jb){a=a.drm.customData;if(!a)throw new _.O(_.P,7,7100,_.Yd);a=new Gu(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Qw);_.jn(a)}};Hu.prototype.a=function(){delete _.hn.HeaderDrm};Hu.prototype.id=function(){return"headerdrm"};_.J("clpp.drm.HeaderDrmComponent",Hu);_.it(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=_.Xj(c),e=new Uint8Array(this,a,b-a);d.set(e);return c})});_.it(function(){_.ai("mathRound.install")});_.it(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;Ce in document||(Object.defineProperty(document,Ce,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
631
|
+
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Iu);document.addEventListener("webkitfullscreenerror",Iu);document.addEventListener("mozfullscreenchange",Iu);document.addEventListener("mozfullscreenerror",Iu);document.addEventListener("MSFullscreenChange",Iu);document.addEventListener("MSFullscreenError",Iu)}});_.it(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.ai("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ku,document.exitPictureInPicture=Lu,document.addEventListener("webkitpresentationmodechanged",Ju,!0))}});_.it(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Mu)}});_.it(function(){if(window.VTTCue)_.$h("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.$h(hc),window.VTTCue=Nu;else if(6===a)_.$h("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Ou;else{try{var b=!!Nu(1,2,"")}catch(c){b=!1}b&&(_.$h(hc),window.VTTCue=Nu)}}else _.bi("VTTCue not available.")});var Pu;_.it(function(){_.ai("InputEvent.install");_.Ol("Trident/")&&HTMLInputElement.prototype.addEventListener!==Qu&&(_.$h("Patching input event support on IE."),Pu=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Qu)});_.it(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});_.it(function(){_.ai("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}}});_.Yu.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)};_.Yu.prototype.stop=function(){this.a&&(this.a.disconnect(),this.a=null)};_.$u.prototype.canPlay=function(a){function b(f){e.stop();d.resolve(f)}var c=document.createElement(_.r);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 _.li(function(){b(a)})).fa(.25);void 0!==c?c.then(function(){return b(!0)})["catch"](function(f){f&&f.message&&f.message===Gb?b(!0):b(!1)}):b(!0);return d};
|
|
632
|
+
var Zu=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,
|
|
616
633
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
617
634
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
618
635
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
619
636
|
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,
|
|
620
637
|
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,
|
|
621
|
-
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]);_.t=_.
|
|
622
|
-
_.t.getFontSizePercent=function(){return null===this.B?
|
|
623
|
-
_.
|
|
624
|
-
_.
|
|
625
|
-
|
|
626
|
-
_.t.
|
|
638
|
+
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]);_.t=_.av.prototype;_.t.getDuration=function(){return this.a};_.t.getId=function(){return this.id};_.t.dc=function(){return this.f};_.t.pe=function(){return this.h};_.t.qa=function(a){return this.getId()===a.getId()&&this.dc()===a.dc()&&this.getDuration()===a.getDuration()&&this.pe()===a.pe()};_.J("clpp.media.TimelineWindow",_.av);_.av.prototype.isDynamic=_.av.prototype.pe;_.av.prototype.getStart=_.av.prototype.dc;_.av.prototype.getId=_.av.prototype.getId;_.av.prototype.getDuration=_.av.prototype.getDuration;_.Sw=new _.K("clpp.media.TimestampParser");_.t=_.bv.prototype;_.t.nm=function(a){return this.a[a]||null};_.t.om=function(){return this.a.length};_.t.pm=function(){return this.a};_.t.ji=function(){return this.a[this.f]||null};_.t.bm=function(){return this.f};_.J("clpp.media.Timeline",_.bv);_.bv.prototype.getCurrentWindowIndex=_.bv.prototype.bm;_.bv.prototype.getCurrentWindow=_.bv.prototype.ji;_.bv.prototype.getWindows=_.bv.prototype.pm;_.bv.prototype.getWindowCount=_.bv.prototype.om;_.bv.prototype.getWindow=_.bv.prototype.nm;_.ev={};_.gv={};var lv=window.XMLHttpRequest;_.x(uv,_.Hk);uv.prototype.then=function(a,b){this.T=this.T.then(a,b);return this};uv.prototype["catch"]=function(a){this.T=this.T["catch"](a);return this};uv.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(){})};var Av=window.fetch,yv=window.AbortController,xv=window.Headers;_.Cv={};_.t=_.Gv.prototype;_.t.getBackgroundColor=function(){return this.K};_.t.setBackgroundColor=function(a){this.K=a;this.Xb()};_.t.getWindowColor=function(){return this.U};_.t.setWindowColor=function(a){this.U=a;this.Xb()};_.t.getFontFamily=function(){return this.P};_.t.setFontFamily=function(a){this.P=a;this.Xb()};_.t.getFontColor=function(){return this.M};_.t.setFontColor=function(a){this.M=a;this.Xb()};_.t.getFontSize=function(){return this.I};_.t.setFontSize=function(a){this.I=a;this.Xb()};
|
|
639
|
+
_.t.getFontSizePercent=function(){return null===this.B?Tw:this.B};_.t.setFontSizePercent=function(a){this.B=a;this.Xb()};_.t.getEdgeColor=function(){return this.H};_.t.setEdgeColor=function(a){this.H=a;this.Xb()};_.t.getEdgeType=function(){return this.o};_.t.setEdgeType=function(a){this.o=a;this.Xb()};_.Gv.prototype.setEdgeType=_.Gv.prototype.setEdgeType;_.Gv.prototype.getEdgeType=_.Gv.prototype.getEdgeType;_.Gv.prototype.setEdgeColor=_.Gv.prototype.setEdgeColor;_.Gv.prototype.getEdgeColor=_.Gv.prototype.getEdgeColor;
|
|
640
|
+
_.Gv.prototype.setFontSizePercent=_.Gv.prototype.setFontSizePercent;_.Gv.prototype.getFontSizePercent=_.Gv.prototype.getFontSizePercent;_.Gv.prototype.setFontSize=_.Gv.prototype.setFontSize;_.Gv.prototype.getFontSize=_.Gv.prototype.getFontSize;_.Gv.prototype.setFontColor=_.Gv.prototype.setFontColor;_.Gv.prototype.getFontColor=_.Gv.prototype.getFontColor;_.Gv.prototype.setFontFamily=_.Gv.prototype.setFontFamily;_.Gv.prototype.getFontFamily=_.Gv.prototype.getFontFamily;
|
|
641
|
+
_.Gv.prototype.setWindowColor=_.Gv.prototype.setWindowColor;_.Gv.prototype.getWindowColor=_.Gv.prototype.getWindowColor;_.Gv.prototype.setBackgroundColor=_.Gv.prototype.setBackgroundColor;_.Gv.prototype.getBackgroundColor=_.Gv.prototype.getBackgroundColor;var Tw=1/15;var Hv="raised",Iv="depressed",Zv="dropshadow",Rv="uniform";_.J("clpp.text.EdgeType",{NONE:_.ef,RAISED:Hv,DEPRESSED:Iv,DROP_SHADOW:Zv,UNIFORM:Rv});aw.prototype.parseInit=function(a){try{var b=_.Ev(_.Yc);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=_.Ev(_.Zc);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(_.P,2,2011);}};
|
|
642
|
+
aw.prototype.parseMedia=function(a,b){if(!this.a)throw new _.O(_.P,2,2011);return this.a.parseMedia(a,b)};_.Dv(Xc,aw);_.x(_.cw,_.Gv);_.t=_.cw.prototype;_.t.append=function(){};_.t.remove=function(){return!0};_.t.isTextVisible=function(){return this.w};_.t.setTextVisibility=function(a){this.w=a};
|
|
643
|
+
_.t.Xb=function(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.$v(this)},b=Object.keys(a).map(function(c){return null!==a[c]?c+":"+a[c]+";":""}).join("");this.h.textContent="."+this.f+"::cue {"+b+"}"}};_.t.destroy=function(){this.l.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()};var bw=0;dw.prototype.a=function(){return!0};dw.prototype.create=function(a){return new _.cw(a)};_.wq("native",new dw);_.t=_.ew.prototype;_.t.onPlayerCreated=function(){};_.t.onContentWillLoad=function(){return Promise.resolve()};_.t.onContentLoaded=function(a,b){for(var c=1;c<arguments.length;++c);return Promise.resolve()};_.t.onPlayerWillDestroy=function(){};_.t.onPlayerWillRelease=function(){};}.call(g,this));
|
|
627
644
|
g.clpp._ = _;
|
|
628
645
|
if (typeof(module)!="undefined"&&module.exports) {module.exports=g.clpp;}
|
|
629
646
|
else if (typeof(define)!="undefined" && define.amd) {define(function(){return g.clpp;});}
|