@castlabs/prestoplay 6.32.0 → 6.33.0-beta.1
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 +29 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +19 -19
- package/cjs/cl.cast.js +129 -127
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +620 -625
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +101 -101
- package/cjs/cl.externs.js +45 -41
- package/cjs/cl.freewheel.js +25 -25
- package/cjs/cl.hls.js +76 -76
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +26 -26
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +359 -352
- package/cjs/cl.muxdata.js +14 -14
- package/cjs/cl.onboard.js +4 -4
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +16 -16
- package/cjs/cl.smooth.js +71 -71
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +72 -72
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +35 -35
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +14 -14
- package/cl.cast.js +101 -102
- package/cl.conviva.js +27 -27
- package/cl.core.js +497 -503
- package/cl.crypto.js +9 -9
- package/cl.dash.js +89 -89
- package/cl.externs.js +50 -42
- package/cl.freewheel.js +20 -20
- package/cl.hls.js +82 -82
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +20 -20
- package/cl.mediatailor.js +2 -2
- package/cl.mse.js +305 -303
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +5 -4
- package/cl.persistent.js +11 -11
- package/cl.playlist.js +5 -5
- package/cl.simid.js +14 -14
- package/cl.smooth.js +61 -61
- 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 +30 -30
- package/package.json +1 -1
- package/typings.d.ts +32 -24
package/cl.core.js
CHANGED
|
@@ -1,357 +1,354 @@
|
|
|
1
|
-
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
_.
|
|
10
|
-
_.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_.
|
|
15
|
-
_.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
_.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Wh=function(a
|
|
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
|
-
a.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
_.
|
|
78
|
-
|
|
79
|
-
_.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
c)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
_.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
_.
|
|
140
|
-
_.
|
|
141
|
-
_.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
_.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
7100,"config.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
a.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
_
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
{const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
_.
|
|
200
|
-
_.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
_.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
a
|
|
212
|
-
|
|
213
|
-
xp=function(a){
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
c
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
_.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
_.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
b.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
a
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
_.
|
|
254
|
-
_.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
a
|
|
265
|
-
|
|
1
|
+
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,fa,ma,pa,ta,wa,ya,za,Aa,Fa,Ga,Ha,Ia,Ja,La,Ma,Ra,Ta,Ua,Va,Wa,Za,$a,db,gb,lb,ob,pb,sb,vb,zb,Ab,Bb,Eb,Fb,Jb,Kb,Nb,Rb,Yb,Zb,$b,zc,Hc,Pc,Qc,Xc,Yc,Zc,cd,dd,ed,fd,hd,id,jd,kd,ld,qd,sd,vd,Bd,Cd,Dd,Ed,Gd,Hd,Id,Ld,Nd,Pd,Vd,de,fe,ge,ne,Je,Qe,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,ef,ff,gf,hf,jf,kf,mf,rf,tf,Jf,Mf,Sf,eg,hg,ng,Cg,Dg,Eg,Fg,Gg,Ig,Jg,Kg,Qg,Rg,Ug,Vg,$g,Xg,hh,ih,kh,nh,ph,xh,Bh,Gh,Hh,Ih,Jh,Lh,Oh,Ph,Qh,Th,Rh,Vh,Xh,Wh,Zh,ai,$h,bi,ci,di,gi,hi,ki,xi,Ci,Di,Ei,Fi,Ji,Oi,Ni,Zi,Ri,Qi,jj,kj,lj,nj,
|
|
2
|
+
qj,rj,sj,Gj,Bj,Ij,Jj,Kj,Mj,Nj,Lj,Qj,Rj,Sj,Pj,tj,uj,xj,yj,zj,Aj,Cj,Dj,Ej,Fj,Zj,ak,Hj,Oj,bk,Wj,Vj,Yj,Tj,ek,fk,gk,hk,ik,kk,jk,nk,ok,pk,sk,tk,uk,wk,xk,yk,zk,Ak,Bk,Ck,Dk,Gk,Hk,Ek,Pk,Qk,Rk,Ok,Zk,Fk,Sk,Tk,Uk,Vk,Wk,Xk,Yk,al,Jk,$k,Kk,Ik,Lk,bl,dl,fl,hl,el,il,Mk,Nk,ll,ml,ql,rl,pl,tl,ol,nl,xl,yl,Al,Bl,zl,Cl,El,Fl,Gl,Il,Hl,Kl,Ll,Ul,ul,Xl,Wl,Vl,jl,sl,Zl,$l,am,Yl,cm,dm,hm,pm,um,wm,xm,Hm,Mm,Pm,Rm,Sm,Tm,Wm,bn,dn,en,fn,gn,hn,jn,kn,ln,mn,nn,on,tn,An,xn,Cn,Hn,Jn,Ln,Nn,On,Pn,Qn,Sn,ao,Tn,Un,Wn,co,Zn,Gn,go,ho,fo,eo,lo,
|
|
3
|
+
jo,io,so,to,xo,ro,yo,wo,zo,Ao,uo,vo,Bo,Go,Ho,Co,Fo,Eo,Do,Io,Oo,Ro,To,Uo,Yo,$o,Vo,Xo,Zo,ap,bp,cp,ep,fp,kp,mp,np,op,qp,rp,sp,tp,up,vp,lp,xp,zp,Ap,Bp,Cp,Dp,pp,wp,yp,Fp,Gp,Hp,Qp,Sp,Yp,bq,dq,gq,kq,mq,pq,rq,sq,tq,wq,uq,vq,xq,yq,zq,Cq,Jq,Kq,Oq,Rq,Sq,Uq,Wq,Xq,Yq,Zq,Pq,Vq,$q,ar,br,cr,lr,er,mr,dr,fr,gr,nr,sr,ur,wr,vr,yr,qr,Fr,Cr,Er,Dr,tr,Gr,Hr,Ir,Jr,Kr,Lr,Mr,Nr,Tr,Ur,Vr,Yr,$r,as,bs,Xr,ds,es,fs,gs,js,ks,ls,hs,is,ms,ns,qs,xs,ys,Bs,Ds,Es,Cs,zs,ps,ts,rs,ss,Hs,Ms,Qs,Rs,Ts,Zs,$s,at,bt,ct,dt,et,ft,ht,st,wt,Sg,Tg;
|
|
4
|
+
_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.33.0-beta.1";fa="APPLE";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ka="Already released. No-op";_.la="Autoplay is not allowed due to browser policy.";ma="Autoplay should not be used for preloaded streams. ";_.na="BANDWIDTH";_.oa="BASIC";pa="CHECKSUM";_.qa="CODECS";_.ra="Cannot retrieve buffer information due to platform limitations";_.sa="CastlabsPlayer";
|
|
5
|
+
ta="Content-Length";_.ua="Content-Type";_.va="Could not find configured DRM environment.";wa="DRM licenses loaded";ya="Destroying player";za="Error while decoding string!";Aa="Error while fetching certificate!";_.Ba="FairPlay Certificate URL is not defined";_.Da="FairPlay License URL is not defined";_.Ea="GROUP-ID";Fa="HW_SECURE_ALL";Ga="HW_SECURE_CRYPTO";Ha="HW_SECURE_DECODE";Ia="HeaderDrm";Ja="InvalidStateError";_.Ka="LANGUAGE";La="License verification failed: ";Ma="Load interrupted while a player release is pending";
|
|
6
|
+
_.Na="Loading player with configuration";_.Oa="MaxHeight";_.Qa="MaxWidth";Ra="Missing media element";_.Sa="NAME";Ta="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ua="No items in the playlist";Va="No sources provided!";Wa="Not a persistent session.";_.Ya="Not supported";Za="NotAllowedError";$a="NotSupportedError";_.ab="PLAYLIST";_.bb="POST";_.cb="PlayReady License URL is not defined";db="Player not ready yet.";_.eb="Player sources";_.fb="Please make sure ";
|
|
7
|
+
gb="Preloading is not supported by this player.";_.hb="QualityLevel";_.ib="RESOLUTION";_.jb="Representation";lb="STANDARD";_.mb="SW_SECURE_CRYPTO";_.nb="SW_SECURE_DECODE";ob="Session is closed";pb="Skipping Session creation. License for init data was already requested in ";_.qb="SmoothStreamingMedia";_.rb="TYPE";sb="The index is not in the allowed range.";_.ub="URI";vb="Unable to translate ";_.xb="Unhandled/ignored event";_.yb="Unregistering listeners";zb="Unsupported keySystem";Ab="Updating playout limit for interstitial";
|
|
8
|
+
Bb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Cb="VIDEO";_.Db="VOD";Eb="Wait for preloading to finish";Fb="WebkitEmeManager.MediaKeySession.load";_.Gb="Widevine License URL is not defined";Jb="Will create EME Manager: ";Kb="X-AD-CREATIVE-SIGNALING";_.Lb="X-ASSET-LIST";_.Mb="X-ASSET-URI";Nb="X-GROUPED-ASSET-LIST";_.Ob="X-PLAYOUT-LIMIT";_.Pb="X-RESTRICT";_.Qb="X-RESUME-OFFSET";Rb="X-TIMELINE-OCCUPIES";_.Sb="ad-break-started";_.Tb="ad-break-stopped";_.Ub="ad-buffering";_.Vb="ad-clicked";
|
|
9
|
+
_.Wb="ad-completed";_.Xb="ad-first-quartile";Yb="ad-hls-asset-list-request";Zb="ad-hls-asset-list-response";$b="ad-hls-resoled";_.ac="ad-impression";_.bc="ad-loaded";_.cc="ad-midpoint";_.dc="ad-paused";_.ec="ad-progress";_.hc="ad-resumed";_.jc="ad-skipped";_.kc="ad-started";_.lc="ad-stopped";_.mc="ad-third-quartile";_.nc="addtrack";_.oc="ads-timeline-changed";_.pc="airplay-casting-ended";_.qc="airplay-casting-started";_.rc="airplay-status-changed";_.sc="application/cea-608";_.tc="application/dash+xml";
|
|
10
|
+
_.uc="application/mp4";_.xc='application/mp4; codecs\x3d"stpp"';_.yc='application/mp4; codecs\x3d"wvtt"';zc="application/octet-stream";_.Ac="application/ttml+xml";_.Bc="application/vnd.ms-sstr+xml";_.Cc="application/x-www-form-urlencoded";_.q="audio";_.Dc="audio/aac";_.Ec="audio/ac3";_.Fc="audio/eac3";_.Gc="audio/mp4";Hc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Ic="audiobufferchanged";_.Jc="audiotrackchanged";_.Kc="autoplaynotallowed";_.Lc="bitratechanged";_.Mc="boolean";_.Nc="bufferingended";_.Oc="bufferingstarted";
|
|
11
|
+
Pc="canplay";Qc="canplaythrough";_.Rc="castingstarted";_.Sc="caststatuschanged";_.Tc="castvisibilitychanged";_.Uc="cdn-switch-success";_.Vc="cenc";_.Wc="center";Xc="certificate-request";Yc="change";Zc="chrome";_.$c="clpp-fill";cd="clpp-hidden";dd="clpp-mc-playlist";ed="clpp-visible";fd="clpp.PlayerFleet";_.gd="clpp.cast.CastSender";hd="clpp.drm.HeaderDrm";id="clpp.drm.eme.AppleEmeManager";jd="clpp.native.Player";kd="clpp.playlist.McPlaylist";ld="clpp.utils.Platform";_.md="codecs";_.nd="column-reverse";
|
|
12
|
+
_.od="com.adobe.primetime";_.pd="com.apple.fps";qd="com.apple.quicktime.HLS";_.rd="com.microsoft.playready";sd="com.microsoft.playready.recommendation";_.td="com.widevine.alpha";_.ud="config.drm.customData is not defined";vd="controls";_.wd="cuechange";_.xd="decoder";_.yd="destroy()";_.zd="disabled";_.Ad="div";Bd="drm.mediaKeys.end";Cd="drm.mediaKeys.start";Dd="drm.onPlay.end";Ed="drm.onPlay.start";_.Fd="drmexpirationupdate";Gd="drmlicenserequested";Hd="drmrenewalstarted";Id="drmsessioncreated";
|
|
13
|
+
_.Jd="drmsessionpersisted";_.Kd="drmsessionupdate";Ld="drmtoday";Nd="durationchange";_.Od="ec-3";Pd="encrypted";_.Qd="end";_.Rd="ended";_.Sd="error";_.Td="estimatedThroughputKbps";_.Ud="forced";Vd="fullscreenElement";_.Wd="function";_.Xd="height";_.Yd="hidden";_.Zd="hls-daterange";_.$d="html";_.ae="https://";_.be="image";_.ce="internal-error";de="keystatuseschange";_.ee="left";fe="license-renewal";ge="license-request";_.he="line-left";_.ie="line-right";_.je="live-turned-static";_.ke="load";_.le="loadeddata";
|
|
14
|
+
_.me="loadedmetadata";ne="loadstart";_.oe="main";_.pe="mdat";_.qe="mdia";_.re="message";_.se="metadata";_.te="mimeType";_.ue="minf";_.ve="moov";_.ze="mpd-type-changed";_.Ae="mpeg-dash-callback-event";_.Be="none";_.r="number";_.Ce="object";_.De="onBitrateChanged()";_.Ee="onContentLoaded";_.Fe="onPlayerError()";_.Ge="onPlayerWillDestroy";_.He="onPlayerWillRelease";_.Ie="onStateChanged()";Je="online-status-changed";_.Ke="optional";_.Le="org.w3.clearkey";_.Me="output-restricted";_.Ne="pause";_.Oe="persistent";
|
|
15
|
+
_.Pe="persistent-license";Qe="picture-in-picture";_.Re="play";Se="player.afterLoad.end";Te="player.afterLoad.start";Ue="player.appendLoad.end";Ve="player.appendLoad.start";We="player.beforeLoad.end";Xe="player.beforeLoad.start";Ye="player.open.end";Ze="player.open.start";$e="player.setupPlaylist.end";af="player.setupPlaylist.start";_.bf="playing";_.cf="playlist-item-changed";_.df="playlist-modified";ef="playlist.next.end";ff="playlist.next.start";gf="preload-aborted";hf="preload-failed";jf="preloaded";
|
|
16
|
+
kf="preloading";_.lf="prevent";mf="primary-content";_.nf="progress";_.pf="px";_.qf="ratechange";rf="released";_.sf="releasing";tf="removetrack";_.uf="required";_.vf="resize";_.wf="right";_.xf="sc-playlist-ended";_.yf="sc-playlist-item-changed";_.zf="sc-playlist-live-turned-static";_.Af="sc-playlist-timeline-changed";_.Bf="scte35";_.Cf="seeked";_.Df="seeking";_.Ef="showing";_.Ff="simid-creative-started";_.Gf="simid-creative-stopped";_.Hf="sinf";_.If="smooth";Jf="stalled";_.Kf="start";_.Lf="statechanged";
|
|
17
|
+
Mf="status-pending";_.Nf="stbl";_.Of="string";_.Pf="stsd";_.Qf="style";_.Rf="subtitles-htmlcue";Sf="temporary";_.Tf="text";_.Uf="text/vtt";_.Vf="text/xml";_.Wf="texttrackchanged";_.Xf="timeline-cue-added";_.Yf="timeline-cue-enter";_.Zf="timeline-cue-exit";_.$f="timeline-cues-changed";_.ag="timeupdate";_.bg="tracksadded";_.cg="trak";_.dg="ttml-xml";eg="unauthenticated";_.fg="und";_.gg="unknown";hg="update";_.ig="urn:scte:scte35";_.jg="urn:scte:scte35:2014";_.kg="user-seeked";_.lg="user-seeking";
|
|
18
|
+
_.mg="value";ng="version";_.og="vertical-lr";_.pg="vertical-rl";_.t="video";_.qg="video/mp2t";_.rg="video/mp4";_.sg="videobufferchanged";_.tg="videotrackchanged";_.xg="vimond-response";_.yg="visibilitychange";_.zg="vtt-xml";_.Ag="waiting";_.Bg="waitingforkey";Cg="webkit-org.w3.clearkey";Dg="webkitkeyadded";Eg="webkitkeyerror";Fg="webkitkeymessage";Gg="webkitneedkey";_.Hg="width";Ig="x-dt-csl-tracking-token";Jg="x-dt-follow-up-token";Kg="x-dt-resp-code";_.Lg="yospace-session-ended";_.Mg="yospace-session-started";
|
|
19
|
+
_.Pg=function(a){return function(){return _.Og[a].apply(this,arguments)}};Qg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Rg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Qg(a)}};Ug=function(a,b){if(b){var c=Sg;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&Tg(c,a,{configurable:!0,writable:!0,value:b})}};
|
|
20
|
+
Vg=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())})};_.v=function(a){return Vg(a())};_.w=function(a,b){a=a.split(".");var c=Wg;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};
|
|
21
|
+
_.Zg=function(a){return _.z(a)||Xg(a)?a:_.Yg(a)};_.Yg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=$g(b,{merging:a[c]},1));return b.merging||null};_.ah=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
|
|
22
|
+
$g=function(a,b,c){const d=c+1;if(_.z(a)||!_.bh(a))a={};for(const e in b)c=b[e],Xg(c)||_.z(c)||_.ch(c)||c instanceof Element?a[e]=c:c instanceof Date?a[e]=c:_.bh(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.ch(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=$g([],c,d):!_.z(c)&&_.dh(c)&&20>d&&(a[e]=$g(a[e],c,d));return a};Xg=function(a){a=typeof a;return a===_.Of||a===_.r||a===_.Mc};_.z=function(a){return null===a||"undefined"===typeof a};_.bh=function(a){return typeof a===_.Ce};
|
|
23
|
+
_.ch=function(a){return typeof a===_.Wd};_.eh=function(a){return typeof a===_.Of};_.fh=function(a){return typeof a===_.r};_.dh=function(a){if(_.z(a)||!_.bh(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
|
|
24
|
+
_.gh=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||!_.bh(a)||!_.bh(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.z(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.z(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.z(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
|
|
25
|
+
hh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};ih=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.jh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};kh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};nh=function(a){return a&&0<=lh[a]?lh[a]:mh};
|
|
26
|
+
ph=function(a){if(!a)return _.B("clpp.log",vb+a+ca),-1;const b=oh[a.toUpperCase()];return void 0===b?(_.B("clpp.log",vb+a+ca),-1):b};_.rh=function(a){qh.info.apply(qh,arguments)};_.sh=function(a){qh.debug.apply(qh,arguments)};_.B=function(a){qh.warn.apply(qh,arguments)};_.th=function(a){qh.error.apply(qh,arguments)};_.wh=function(a){if(a){var b=a.a();b in _.uh?_.vh.warn("Player-Factory '"+b+"' already registered"):(_.uh[b]=a,_.vh.info("Registered Player-Factory: '"+b+"'"))}};
|
|
27
|
+
xh=function(a){return Object.values(_.uh).find(a)||null};_.Ah=function(a){0<=yh.indexOf(a)?zh.warn(`Factory '${a.name()}' is already registered`):(yh.push(a),zh.info(`Factory '${a.name()}' has been registered.`))};Bh=function(a,b){const c=yh.find(d=>d.a(a,b))||null;c&&zh.info(`Chosen ads manager: ${c.name()}`);return c};_.Dh=function(a){return _.Ch.get(a)||null};_.Fh=function(a){_.Ch.get(a.id())?Eh.warn("Component already in use."):_.Ch.set(a.id(),a)};
|
|
28
|
+
Gh=function(a){return Array.from(_.Ch.values()).find(b=>b instanceof a)||null};Hh=function(a){for(const b of _.Ch.values())a(b)};Ih=function(a){Hh(b=>{b.playerConstructed(a)})};Jh=function(a){Hh(b=>{b.beforeLoad(a)})};_.Kh=function(a){Hh(b=>{b.drmConfigurationResolved(a)})};Lh=function(a){Hh(b=>{b.afterLoad(a)})};Oh=function(a){if(null!==Gh(a))return null;a=new a;a.install();_.Fh(a);Eh.info("Installed component:",a.id());return a};
|
|
29
|
+
Ph=function(a){if(a=Gh(a))a.uninstall(),_.Ch.delete(a.id()),Eh.info("Uninstalled component:",a.id())};Qh=function(a,b,c,d){a=`${a===_.D?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.eh(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};_.Sh=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Rh(b[c]);a.a.clear()};
|
|
30
|
+
Th=function(a,b,c){var d=[Pd,"msneedkey",Gg,"needkey"];const e=f=>{for(const g of d)a.off(b,g,e);c(f)};for(const f of d)a.on(b,f,e)};Rh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};_.Uh=function(a){return Array.isArray(a)?a:[a]};Vh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};Xh=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 Wh(a,b)&&Wh(b,a)};
|
|
31
|
+
Wh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.Yh=function(a,b={}){if(b.eg){const c=[];for(const d of a)c.some(e=>b.eg(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};Zh=function(a,b){const c=new Set(a),d=new Set(b);return{Oi:a.filter(e=>!d.has(e)),Lj:a.filter(e=>d.has(e)),uh:b.filter(e=>!c.has(e))}};
|
|
32
|
+
ai=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if($h(a)===$h(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.G(a);b=_.G(b);for(let d=0;d<a.byteLength;d++)if(c[d]!==b[d])return!1;return!0};$h=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.G=function(a,b=0,c=Infinity){return bi(a,b,c,Uint8Array)};
|
|
33
|
+
bi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=$h(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)};ci=function(a,b=0,c=Infinity){return bi(a,b,c,Uint16Array)};di=function(a,b=0,c=Infinity){return bi(a,b,c,Uint32Array)};_.ei=function(a,b=0,c=Infinity){return bi(a,b,c,Int32Array)};_.fi=function(a,b=0,c=Infinity){return bi(a,b,c,DataView)};
|
|
34
|
+
gi=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};hi=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
|
|
35
|
+
_.ii=function(a){if(!a)return"";a=_.G(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(za);return a}a=escape(hi(a));try{return decodeURIComponent(a)}catch(b){throw Error(za);}};
|
|
36
|
+
ki=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw ji.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.G(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.G(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return hi(c)};
|
|
37
|
+
_.li=function(a,b){if(_.eh(a))return a;let c="";b=!!b;const d=_.G(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.ii(d):254===d[0]&&255===d[1]?c=ki(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=ki(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);ji.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=ki(a,!1):0===d[1]&&0===d[3]?c=ki(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.ii(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
|
|
38
|
+
};_.mi=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.ni=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
|
|
39
|
+
_.oi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=di(d):2===c?e=ci(d):e=_.G(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.pi=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.qi=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.ri=function(a){return!!(a&&0<a.length)};_.si=function(a){return!a||0===a.length};
|
|
40
|
+
_.ti=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(hh(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(b){return""}};_.ui=function(a,b){for(const c in b)if(b[c]===a)return c;return""};_.wi=function(a){a=a.replace(/<[^>]+>/gi,"");vi.innerHTML=a;a=vi.textContent;return a=a.replace(/<[^>]+>/gi,"")};
|
|
41
|
+
xi=function(a){if(null===a||void 0===a||""===a)return null;a=Number(a);return isNaN(a)?null:a};_.yi=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};_.zi=function(a,b){a.classList.add(b)};_.Ai=function(a,b){if(a&&typeof b===_.Ce)for(const c in b)a.style[c]=b[c]};_.Bi=function(a){return document.createElement(a)};
|
|
42
|
+
Ci=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());Wh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Di=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};Ei=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};
|
|
43
|
+
Fi=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Ji=function(){if(Gi)return Gi;Hi||(Hi=new _.Ii(()=>{Gi=null}));(Gi=document.querySelector(_.t)||document.querySelector(_.q))||(Gi=document.createElement(_.t));Hi.la(1);return Gi};_.Ki=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Li=function(a){return(navigator.userAgent||"").includes(a)};_.Mi=function(a){return _.Li("Tizen"+(a?" "+String(a):""))};
|
|
44
|
+
Oi=function(a){const b={major:-1,name:_.gg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Ni(a,c[0]));2<=c.length&&(b.minor=Ni(a,c[1]));3<=c.length&&(b.patch=Ni(a,c[2]));4<=c.length&&(b.build=Ni(a,c[3]));return b};_.Pi=function(){return _.Li("Web0S")};_.Ti=function(){const a=Qi();const b=["ie","edge","opera","firefox","safari",Zc];var c=Ri();const d=Si[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Oi(c[1]);return Oi("")};_.Ui=function(){return _.Li("CrKey")};
|
|
45
|
+
_.Vi=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Mi()};_.Wi=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Vi()&&1<navigator.maxTouchPoints};_.Xi=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};Ni=function(a,b){try{return parseInt(b,10)}catch(c){Yi.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};
|
|
46
|
+
Zi=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};Ri=function(){const a=Qi();if(!a)return $i;var b=a.match(/^.+?(?=\))/);if(!b)return $i;b=b[0];if(Zi(b,["iphone","ipad"]))return aj;if(Zi(b,["android"]))return bj;if(Zi(b,["macintosh"]))return cj;if(Zi(b,["windows nt"]))return dj;if(Zi(b,["tizen"]))return ej;if(Zi(b,["web0s"]))return fj;if(Zi(b,["linux"]))return gj;Yi.warn("Unable to identify OS from user agent: "+a);return $i};
|
|
47
|
+
Qi=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
|
|
48
|
+
_.ij=function(){var a=Ri();var b=Ri();var c=Si[b];if(c){c=Qi().match(c.os_version)[1];c=Oi(c);if(b===dj)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=Oi("");a:{c=Qi();const e=["ie","edge","opera","firefox","safari",Zc];var d=Ri();d=Si[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=hj}return{os:a,osVersion:b,browser:c,browserVersion:_.Ti()}};
|
|
49
|
+
jj=function(a,b,c){b.hasAttribute(vd)||(b.style.opacity="0",b.setAttribute(vd,""),a.j.one(b,Nd,()=>{b.removeAttribute(vd);b.style.opacity="1";c&&(c.style.opacity="1")}))};kj=function(a){if(a.La){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.La.h=b}a.Be&&a.Be()};lj=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Pg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
|
|
50
|
+
nj=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.t);b.appendChild(f);d=a.ka.nb.create();f=new mj(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};qj=function(a){return[a.a,...a.o.a.map(b=>b.player)]};
|
|
51
|
+
rj=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(ed),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(ed),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};sj=function(a){return a.h.find(b=>!!b.primary)||null};
|
|
52
|
+
Gj=function(a,b,c){return _.v(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=tj(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.l?e.primary?uj(a,e,vj):e.player.pause():a.a.isLive()||e.player.pause()),e.primary?uj(a,e,vj):uj(a,e,wj));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Re?(e&&d.primary?yield xj(a,d):f?yield yj(a,d):yield zj(a,d),kj(d)):f?a.g.error("Loading preloaded items is not supported"):yield Aj(a,d);Bj(a,d);d.primary?
|
|
53
|
+
uj(a,d,wj):uj(a,d,vj);d.La&&Cj(a,d,d.La);if(d.Ea)d.player.one(_.Rd,d.Ea);e&&Dj(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=sj(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield xj(a,h))}finally{a.w=!1,Ej(a),Fj(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
|
|
54
|
+
Bj=function(a,b){const c=b.transition;if(c&&!c.Wg){if(c.Ea){const d=c.Ea,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Rd,e);b.disposers.push(()=>{b.player.off(_.Rd,e)})}c.ze&&Hj(a,b,()=>{const d=a.f.La;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.H(_.lc,{ad:d})),a.a.trigger(new _.H(_.Wb,{ad:d})),a.a.trigger(new _.H(_.Tb,{id:b.Yb})))});c.Wg=!0}};
|
|
55
|
+
Ij=function(a,b){return _.v(function*(){a.g.info("Crop ads by playout limit",b);var c=sj(a),d=a.getCurrentItem();if(c&&d&&d.La&&null!=c.Y){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.vb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.vb-d.duration),h=e.sort((l,m)=>m.vb-l.vb)[0],k=c.Y;b<=g?(c.Y-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.Y.toFixed(1)} instead of `+`${k.toFixed(1)}`),
|
|
56
|
+
yield Gj(a,c.id,_.Re),h.Ea&&h.Ea(),c=d.La,a.a.trigger(new _.H(_.lc,{ad:c})),a.a.trigger(new _.H(_.Wb,{ad:c})),a.a.trigger(new _.H(_.Tb,{id:d.Yb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.vb&&b>=l.vb-l.duration))?(e=b-(d.vb-d.duration),d.La.h=e,c.Y-=f-b,a.g.info("Last ad is now ",d.La.fb(),"with cropped duration",e,"and primary will resume at",c.Y.toFixed(1),"instead of",k.toFixed(1)),h.Ea&&(d.Ea=h.Ea),d.transition={ze:{position:e,itemId:c.id,Y:c.Y}},Bj(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
|
|
57
|
+
Jj=function(a){return _.v(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.jd),yield b.player.play(),b.state=_.bf,kj(b))})};Kj=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),jd:Promise.resolve()})))};
|
|
58
|
+
Mj=function(a,b){return _.v(function*(){a.g.info("Remove items",b);const c=[],d=[];for(const e of a.h)b.includes(e.id)?d.push(e):c.push(e);a.h=c;yield Promise.all(d.map(e=>{e.disposers.forEach(f=>f());e.disposers=[];return Lj(a,e.id)}))})};Nj=function(a){return _.v(function*(){yield Mj(a,a.h.map(b=>b.id))})};Lj=function(a,b){return _.v(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield Oj(a,c.player)),a.j.delete(b))})};
|
|
59
|
+
Qj=function(a){const b=sj(a);b&&(b.transition=void 0,b.next=[],Pj(a))};Rj=function(a){return _.v(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);Qj(a);yield Mj(a,b)})};Sj=function(a){_.v(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(Qj(a),yield a.play(c))})};Pj=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Wg=!1),Bj(a,a.f))};tj=function(a,b){return a.h.find(c=>c.id===b)||null};
|
|
60
|
+
uj=function(a,b,c){const d=b?b.Yb||null:null;a.B?(a.a.setMuted(!0),Tj(a,!0)):(b.audio&&(c=b.audio),a.ka.onAudioDecision&&(c=a.ka.onAudioDecision(d)),c===wj?(a.a.setMuted(!1),Tj(a,!0)):c===vj?(a.a.setMuted(!0),Tj(a,!1)):a.g.warn("Audio decision not supported",c))};
|
|
61
|
+
xj=function(a,b){return _.v(function*(){if(b.player){a.G();if(b.state===kf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.ga=!1;b.Y&&(yield b.player.seek(b.Y,!0));a.f=b;b.role=Uj;rj(a,b.player,!0);b.state="loading";a.l?(uj(a,b,wj),b.player.isPaused()&&(yield b.player.play())):a.a.isPaused()&&(yield b.player.play());b.state=_.bf}})};
|
|
62
|
+
yj=function(a,b){return _.v(function*(){const c=b.player;if(c){if(b.state===kf){a.g.info(Eb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=Uj;rj(a,c,!0);b.state===jf?yield c.play():b.state===hf&&(yield Vj(a,c,b.config,b.Td));b.state=_.bf}})};zj=function(a,b){return _.v(function*(){yield Aj(a,b);yield b.player.play();b.state=_.bf})};
|
|
63
|
+
Aj=function(a,b){return _.v(function*(){const c=yield Wj(a,!!b.primary);a.f=b;b.role=Uj;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();rj(a,c,!0);b.state="loading";b.jd=Vj(a,c,b.config,b.Td);yield b.jd;b.state="loaded"})};
|
|
64
|
+
Cj=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.setPosition(l);a.a.trigger(new _.H(_.ec,{ad:c}));!c.j&&l>=m/4&&(c.j=!0,a.a.trigger(new _.H(_.Xb,{ad:c})));!c.l&&l>=m/2&&(c.l=!0,a.a.trigger(new _.H(_.cc,{ad:c})));!c.o&&l>=3*m/4&&(c.o=!0,a.a.trigger(new _.H(_.mc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.H(_.dc,{ad:c}))},g=()=>{a.a.trigger(new _.H(_.hc,{ad:c}))},h=()=>{a.a.trigger(new _.H(_.Ub,{ad:c}))},k=()=>{a.a.trigger(new _.H(_.lc,{ad:c}));a.a.trigger(new _.H(_.Wb,
|
|
65
|
+
{ad:c}));c.f===c.a&&a.a.trigger(new _.H(_.Tb,{id:b.Yb}))};d.on(_.ag,e);d.on(_.Ne,f);d.on(_.bf,g);d.on(_.Oc,h);d.one(_.Rd,k);b.disposers.push(()=>{d.off(_.ag,e);d.off(_.Ne,f);d.off(_.bf,g);d.off(_.Oc,h);d.off(_.Rd,k)});1===c.f&&a.a.trigger(new _.H(_.Sb,{id:b.Yb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.H(_.ac,{ad:c}));a.a.trigger(new _.H(_.kc,{ad:c}))};
|
|
66
|
+
Dj=function(a,b){return _.v(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.l||rj(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=Xj,b.uf?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.uf} ms.`),yield new Promise(d=>{setTimeout(()=>_.v(function*(){yield Oj(a,c);rj(a,c,!1);a.a.trigger(new _.H("ad-hls-released"));d()}),b.uf)})):(yield Oj(a,c),rj(a,c,!1)))})};
|
|
67
|
+
Ej=function(a){Promise.all(Array.from(a.j.keys()).map(b=>Lj(a,b)))};Fj=function(a,b){_.v(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>Yj(a,d)))}})};Zj=function(a,b,c){c=void 0===c?!1:c;if(!a.ga&&!a.a.isLive()){var d=sj(a);d?(d.Y=b,c&&(a.ga=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};ak=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];rj(a,a.a,!0)};
|
|
68
|
+
Hj=function(a,b,c){const d=b.transition.ze;let e=null;d.Y&&Zj(a,d.Y);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(a.g.info("Start RAF polling"),h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{a.g.info("Stop timeupdate polling");b.player.off(_.ag,f)};
|
|
69
|
+
a.g.info("Start timeupdate polling");b.player.on(_.ag,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};Oj=function(a,b){return _.v(function*(){b!==a.a&&(yield a.o.release(b))})};bk=function(a){return _.v(function*(){a.f&&(yield Dj(a,a.f),rj(a,a.a,!0))})};Wj=function(a,b){return _.v(function*(){if(b)return a.a;const c=yield a.o.get();if(!c)throw Error("No player available");return c})};
|
|
70
|
+
Vj=function(a,b,c,d){return _.v(function*(){yield b.release();yield b.load(c);d&&d(b.getDuration());if(a.f&&a.f.player){const e=a.f.player.getVolume();b.setVolume(null==e?1:e);b.setMuted(a.f.player.isMuted()||!1)}})};
|
|
71
|
+
Yj=function(a,b){return _.v(function*(){if(b.primary){b.state=kf;a.j.set(b.id,b);if(b.Y&&!a.l){var c=b.player;a.g.info("Preparing to resume at",b.Y);uj(a,b,vj);yield c.seek(b.Y,!0)}b.state=jf}else{c=b.id;var d=yield Wj(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=Xj;b.state=kf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(ma+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1);const e=a.a.getBandwidthEstimate();e&&(b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=
|
|
72
|
+
e);b.preloadPromise=Vj(a,d,b.config,b.Td);yield b.preloadPromise;b.state=jf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=gf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=hf)}}})};Tj=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};_.ck=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.dk=function(a){if(!a)return!1;const b=!!a[_.Mb];a=!!a[_.Lb];return(b||a)&&!(b&&a)};
|
|
73
|
+
ek=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Of&&typeof b.DURATION===_.r):!1};fk=function(a){return a.Mf&&!(a.once&&a.Xg)&&[0,6].includes(a.state)};gk=function(a){a=a.customAttributes[Kb];if(!a)return null;try{return JSON.parse(atob(a))}catch(b){return null}};hk=function(a,b){for(let d=0;d<a.length;d++){const e=a[d];var c=d===a.length-1;c&&2===b||(c?(e.next=[mf],e.transition={Ea:mf}):(c=a[d+1].id,e.next=[c],e.transition={Ea:c}))}};
|
|
74
|
+
ik=function(a){const b={};a=a.map(d=>d.customAttributes||{});const c=new Set;a.forEach(d=>{Object.keys(d).forEach(e=>{c.add(e)})});for(const d of c)if(d===_.Pb){const e=new Set([]);a.forEach(f=>{f[d]&&f[d].forEach(g=>e.add(g))});b[d]=Array.from(e)}else if(d===_.Qb){const e=a.reduce((f,g)=>g[d]?f+g[d]:f,0);b[d]=e}return b};
|
|
75
|
+
kk=function(a,b){if(0===a.length)return a;const c=new Map;1===b?a.forEach(d=>{const e=c.get(d.startTime)||[];e.push(d);c.set(d.startTime,e)}):c.set(0,a);a=[];for(const d of c.values())1===d.length?a.push(d[0]):(b=jk(d),a.push(b));return a};
|
|
76
|
+
jk=function(a){const b=[];let c=0;a.forEach(f=>{var g=Math.max(0,f.endTime-f.startTime);c+=g;var h=f.customAttributes[_.Lb];h&&b.push({type:"list",id:f.id,customAttributes:f.customAttributes,uc:{URI:h,DURATION:0}});if(h=f.customAttributes[_.Mb])g={type:"uri",id:f.id,customAttributes:f.customAttributes,uc:{URI:h,DURATION:g}},(f=gk(f))&&(g.uc[Kb]=f),b.push(g)});const d=ik(a);d[Nb]={entries:b,pa:[]};const e=a[0];a=a.map(f=>f.id).join("+");return Object.assign({},e,{id:a,endTime:e.startTime+c,customAttributes:d})};
|
|
77
|
+
_.mk=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...lk]}};nk=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||[...lk]};ok=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
|
|
78
|
+
pk=function(a){const b={};if(!a)return b;for(const c of a.trim().split("\r\n"))c&&(a=c.split(": "),b[a[0].toLowerCase()]=a.slice(1).join(": "));return b};
|
|
79
|
+
_.rk=function(a,b){_.eh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.qk,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||
|
|
80
|
+
[],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:[...lk],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&nk(c,b);return c};
|
|
81
|
+
_.vk=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(sk(c))return tk(a);throw uk(a);};sk=function(a){return 200<=a&&299>=a&&202!==a};tk=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}};
|
|
82
|
+
uk=function(a){a=tk(a);try{var b=_.li(a.data,!0)}catch(d){b=null}_.sh("HTTP error text:",b);const c=a.request;return new _.I(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.D:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};wk=function(a,b){b=null==b?-1:b;a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};
|
|
83
|
+
xk=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b,0>a.bytesRemaining&&(a.bytesTotal+=-a.bytesRemaining,a.bytesRemaining=0));a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};yk=function(a){return a.reduce((b,c)=>b+c,0)};zk=function(a){return a.a.find(b=>1===b.state)||null};Ak=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.od&&!d.once&&d.Eg&&d.startTime>b).forEach(d=>{d.Mf=!0})};Bk=function(a){return a.a.find(b=>4===b.state)||null};
|
|
84
|
+
Ck=function(a,b){return a.a.find(c=>fk(c)&&!c.ki&&1===c.od&&b>c.startTime&&b<c.endTime)||null};Dk=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.od&&!d.bg).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};Gk=function(a,b,c){_.v(function*(){a.ga=!0;try{const d=Bk(a);d&&(yield Ek(a,d));a.g.info("Seek into interstitial",b.ea);yield Fk(a,b)}catch(d){yield a.f.seek(c)}finally{a.ga=!1}})};
|
|
85
|
+
Hk=function(a,b,c){_.v(function*(){a.ga=!0;try{const d=Bk(a);d&&(yield Ek(a,d));a.g.info("Play jumped interstitial",b.ea,"resume at",c.toFixed(2));yield Fk(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.ea,d),b.Kh=new Date,yield a.f.seek(c)}finally{a.ga=!1}})};Ek=function(a,b){return _.v(function*(){a.g.info("Unschedule interstitial",b.ea);yield Rj(a.X);b.state=0})};
|
|
86
|
+
Pk=function(a,b){const c=()=>_.v(function*(){if(!a.ga&&!a.Ne){var g=b.getPosition(),h=Ik(a,g);h&&(yield Jk(a,h))&&Kk(a,h,b);if((h=Lk(a))&&0===h.state&&b.getDuration()-g<a.ka.resolutionOffsetSec&&(yield Jk(a,h)))if(h.pa&&0!==h.pa.length){if(g=a.X.getCurrentItem()){var k=Mk(a,h,2);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={Ea:l};a.g.info(`Schedule postroll interstitial ${h.ea}`);Nk(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.ag,c);a.h.push(()=>{b.off(_.ag,
|
|
87
|
+
c)});const d=()=>{Ok(a,!1,!0,!0)};b.on(_.$f,d);a.h.push(()=>{b.off(_.$f,d)});const e=()=>{a.Ne=!0};b.on(_.Sb,e);a.h.push(()=>{b.off(_.Sb,e)});const f=()=>{a.Ne=!1};b.on(_.Tb,f);a.h.push(()=>{b.off(_.Tb,f)})};Qk=function(a){a.h.forEach(b=>b());a.h=[]};Rk=function(a){return(a=a.X.getCurrentItem())&&!a.primary?a.player:null};
|
|
88
|
+
Ok=function(a,b,c,d){var e=Sk(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=Zh(a.a.map(p=>p.ea),e.map(p=>p.id));Tk(a,f.Oi);const n=new Set(f.uh);f=e.filter(p=>n.has(p.id))}if(!Uk(a,f))return!1;const g=[],h=[],k=[];f.forEach(n=>{const p=n.customAttributes.CUE||[];p.includes(_.bb)?h.push(n):!d&&p.includes("PRE")?g.push(n):!c&&n.startTime<a.ka.Ki?g.push(n):k.push(n)});e=kk(g,0);f=kk(h,2);const l=kk(k,1),m=e.concat(f,l);Vk(a,m);0<e.length&&Wk(a,e[0],b);l.forEach(n=>Xk(a,n,1));0<f.length&&
|
|
89
|
+
Xk(a,f[0],2);Yk(a,m);return 0<e.length};Zk=function(a){_.v(function*(){var b=a.X;Kj(b,[{id:mf,primary:!0,config:b.a.getConfiguration(),next:[],vb:0,duration:0,Yb:null}]);var c=sj(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=Uj;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();rj(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Ok(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.X,c=b.o,c=c.a[0]?c.a[0].player:null)b.l||rj(b,b.a,!1),rj(b,c,!0)}else c.autoplay&&(yield Jj(a.X))})};
|
|
90
|
+
Fk=function(a,b,c){return _.v(function*(){if(!(yield Jk(a,b)))throw Error("Failed to bind");yield $k(a,b,1,!1,c)})};Sk=function(a){return a.f.getTimelineCues().filter(b=>_.ck(b.schemeIdUri)&&b.customAttributes)};Tk=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ea)&&!fk(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ea))};
|
|
91
|
+
Uk=function(a,b){const c=[];b.forEach(d=>{_.dk(d.customAttributes)||c.push(`Interstitial cue ${d.id} is invalid `+"it must contain exactly one of X-ASSET-LIST or X-ASSET-URI.")});0<c.length&&a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${c.join(" ")}`);return 0===c.length};
|
|
92
|
+
Vk=function(a,b){var c=b.sort((f,g)=>f.startTime-g.startTime);b=a.ka.resolutionOffsetSec;let d=Infinity;const e=[];for(let f=0;f<c.length-1;f++){const g=c[f],h=c[f+1];h&&(d=Math.min(d,h.startTime-g.endTime));h&&h.startTime<=g.endTime&&e.push(`Interstitials ${g.id} and ${h.id} `+"overlap.")}d<b&&(c=d/2,a.ka.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${b} s) auto-reconfiguring to `+`${c} s.`));0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+
|
|
93
|
+
`behave correctly. ${e.join(" ")}`)};Wk=function(a,b,c){_.v(function*(){var d=Xk(a,b,0);const e=yield Jk(a,d),f=d.pa?d.pa.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.ea}`),yield $k(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=sj(a.X))&&(yield a.X.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),yield bk(a.X),c||(yield Jj(a.X))})};
|
|
94
|
+
Xk=function(a,b,c){{const e=b.customAttributes[_.Mb],f=b.customAttributes[_.Lb],g=b.customAttributes[Nb],h=b.customAttributes[_.Qb],k=b.customAttributes[_.Ob],l=b.customAttributes[_.Pb]||[];b.customAttributes[Rb]||(b.customAttributes[Rb]=null==h||0<h?"RANGE":"POINT");var d=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];d="CONTENT"===d?wj:"AD"===d?vj:void 0;b={ea:b.id,startTime:b.startTime,endTime:b.endTime,state:0,Rf:f,Sf:e,Hd:g,pa:null,Y:null==h?null:Math.max(0,b.startTime+h),Qi:h,oc:k,od:c,ki:"POINT"===
|
|
95
|
+
b.customAttributes[Rb],Ch:!l.includes("SKIP"),bg:!l.includes("JUMP"),Yg:gk(b),Eg:null!=h&&0>h,once:(b.customAttributes.CUE||[]).includes("ONCE"),Xg:!1,Mf:!0,customAttributes:b.customAttributes,audio:d}}a.a.push(b);return b};
|
|
96
|
+
Yk=function(a,b){_.v(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ea);if(h){const k=h.customAttributes[_.Ob];null==g.oc&&null!=k&&(a.g.info(Ab,h.id,"Playout limit",k),g.oc=k,1===g.od&&4===g.state&&al(a,g))}});else{var d=b.find(g=>g.id===c.Yb);if(d){var e=d.customAttributes[_.Ob];if(null!=e){var f=a.a.find(g=>g.ea===d.id);f&&null==f.oc&&(a.g.info(Ab,d.id,"Playout limit",e),f.oc=e,yield Ij(a.X,e))}}}})};
|
|
97
|
+
al=function(a,b){_.v(function*(){yield Ek(a,b);yield Kk(a,b,a.f)})};Jk=function(a,b){return _.v(function*(){b.state=1;if(b.Hd)yield bl(a,b,b.Hd);else if(b.Rf)yield dl(a,b,b.Rf);else if(b.Sf){b.pa=[{URI:b.Sf,DURATION:b.endTime-b.startTime}];var c={URI:b.pa[0].URI,DURATION:b.pa[0].DURATION};b.Yg&&(c[Kb]=b.Yg);c={ASSETS:[c]};el(a,new _.H($b,{id:b.ea,detail:c}));b.state=2}else b.state=3;return 2===b.state})};
|
|
98
|
+
$k=function(a,b,c,d,e){return _.v(function*(){if(0!==b.pa.length&&a.X.getCurrentItem()){var f=Mk(a,b,c);0!==f.length&&(Nk(a,b,f),0===c&&a.f.isLive()||(null!=e?Zj(a.X,e,!0):null!=b.Y&&Zj(a.X,b.Y)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
|
|
99
|
+
Kk=function(a,b,c){if(b.pa)if(0===b.pa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ea}`):null!=b.Y&&0!==b.Qi?c.seek(b.Y):a.g.info(`Empty VOD interstitial ${b.ea}, `+"continuing to next segment")};c.one(_.Yf,g);a.h.push(()=>{c.off(_.Yf,g)});a.g.info(`Schedule interstitial ${b.ea} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=Mk(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.Y&&Zj(a.X,b.Y);d.next=[f];d.transition={ze:{position:b.startTime,itemId:f,
|
|
100
|
+
Y:b.Y}};a.g.info(`Schedule interstitial ${b.ea} for `+`${b.startTime} s`);Nk(a,b,e)}}}};Ik=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.od&&fk(c)&&0<d&&d<=a.ka.resolutionOffsetSec})||null};Lk=function(a){return a.a.find(b=>2===b.od)||null};
|
|
101
|
+
bl=function(a,b,c){return _.v(function*(){try{const d=[],e=c.entries,f=e.map(h=>_.v(function*(){if("list"===h.type)return(yield fl(a,h.uc.URI)).ASSETS.map(k=>({id:h.id,customAttributes:h.customAttributes,uc:k}));if("uri"===h.type)return[{id:h.id,customAttributes:h.customAttributes,uc:h.uc}];throw new _.gl("Invalid group asset entry type");}));(yield Promise.all(f)).forEach(h=>d.push(...h));b.Hd={entries:e,pa:d};const g={ASSETS:d.map(h=>h.uc)};hl(a,b,g)}catch(d){a.g.error(`Failed to bind grouped asset list for ${b.ea}`,
|
|
102
|
+
d),b.state=3}})};dl=function(a,b,c){return _.v(function*(){try{a.g.info(`Load X-ASSET-LIST for ${b.ea}`);el(a,new _.H(Yb));const d=yield fl(a,c);hl(a,b,d)}catch(d){a.g.error("Failed to load X-ASSET-LIST",d),b.state=3}})};
|
|
103
|
+
fl=function(a,b){return _.v(function*(){var c=a.X.re();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.rk(il(a,b));c=yield jl(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!ek(c))throw new _.gl("Invalid X-ASSET-LIST list response");return c})};
|
|
104
|
+
hl=function(a,b,c){b.pa=c.ASSETS;b.pa&&0!==b.pa.length||a.g.info(`Interstitial ${b.ea} has no assets, `+"will be smoothly skipped");if(null==b.Y){const d=yk(b.pa.map(e=>e.DURATION));b.Y=b.startTime+(null==b.oc?d:Math.min(b.oc,d))}b.state=2;el(a,new _.H(Zb));el(a,new _.H($b,{id:b.ea,detail:c}))};el=function(a,b){a.f.trigger(b)};il=function(a,b){return(a=a.ka.Ji)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
|
|
105
|
+
Mk=function(a,b,c){let d=0;const e=!!b.Hd;let f=b.pa.map((l,m)=>{let n=b.ea;e&&(n=b.Hd.pa[m].id);d+=l.DURATION;return{id:`${n}-${m}`,config:{source:{url:il(a,l.URI),type:_.kl}},duration:l.DURATION,vb:d,Yb:n,next:[],La:new J(c,m+1,b.pa.length,l.DURATION,n,b.Ch,b.customAttributes||null),audio:b.audio}});hk(f,c);f.forEach(l=>{l.Be=()=>{var m=l.La;a.g.info(`Playing ad ${`${m.f}/${m.a}`} of interstitial `+l.Yb)};l.Td=()=>{el(a,new _.H(_.bc,{ad:l.La}))}});if(null!=b.oc&&(f=ll(a,b,f),0===f.length))return[];
|
|
106
|
+
const g=f[0].Be;f[0].Be=()=>{b.state=5;b.Xg=!0;b.Eg&&(b.Mf=!1);a.g.info(`Playing interstitial ${b.ea} with `+`${b.pa.length} assets and will resume primary `+`content ${b.Y?`at ${b.Y.toFixed(1)} s`:"after interstitial ended"}.`);g()};const h=f[0].Td;f[0].Td=l=>{null==b.Y&&(b.Y=b.startTime+l,Zj(a.X,b.Y),a.g.info("Primary content will resume at",b.Y.toFixed(1),"s"));h(l)};const k=f[f.length-1];k.Ea=()=>{b.state=6;Mj(a.X,f.map(l=>l.id));2===c&&bk(a.X)};k.uf=a.ka.adReleaseDelayMs;return f};
|
|
107
|
+
Nk=function(a,b,c){Kj(a.X,c);a=a.X;Pj(a);a.f&&(a.f.La&&Cj(a,a.f,a.f.La),Ej(a),Fj(a,a.f.next));b.state=4};
|
|
108
|
+
ll=function(a,b,c){const d=b.oc;a.g.info(`Playout limit for ${b.ea} is `+`${d} s`);b=c[c.length-1].vb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.vb-f.duration<=d);e.forEach(f=>{f.La.a=e.length});a=e[e.length-1];c=d-(a.vb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Ea=mf:a.transition.ze={position:c,itemId:mf,Y:null};a.maxDuration=c;return e};
|
|
109
|
+
ml=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
|
|
110
|
+
ql=function(a){a.a.on(window,"offline",()=>{nl(a,!1)});a.a.on(window,"online",()=>{a.f||ol(a)});a.a.on(a.m,Jf,()=>pl(a));a.a.on(a.m,"suspend",()=>pl(a));a.a.on(a.m,_.Ag,()=>pl(a));a.a.on(a.m,_.bf,()=>{a.f||ol(a)});a.a.on(a.m,_.nf,()=>{a.f||ol(a)});a.a.on(a.m,_.Lf,()=>{switch(a.m.getState()){case 2:pl(a);break;default:pl(a)}})};rl=function(a){a.h&&(a.h.stop(),a.h=null)};pl=function(a){a.f&&ol(a)};
|
|
111
|
+
tl=function(a){return _.v(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield sl(a.j,b.url,b.attemptParameters,b.method),nl(a,b))})};ol=function(a){a.m.getConfiguration().connectivityCheck&&(rl(a),a.h=(new _.Ii(()=>tl(a))).la(5))};nl=function(a,b){rl(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.H(Je,{online:a.f})))};_.vl=function(a,b){a.a.push(ul(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};
|
|
112
|
+
_.wl=function(){let a,b;const c=new Promise((e,f)=>{a=e;b=f}),d=Object.assign(c,{done:!1,vf:!1,Mi:!1,value:null,error:null,resolve(e){d.vf=!0;d.done=!0;d.value=e;a(e)},reject(e){d.Mi=!0;d.done=!0;d.error=e;b(e)}});return d};xl=function(a,b){try{return new URL(a,b)}catch(c){return null}};
|
|
113
|
+
yl=function(a,b,c){b=void 0===b?0:b;c=void 0===c?a.a-b:c;if(0>b||b>a.a)throw new RangeError(`getDataView: start ${b} out of range [0, ${a.a}]`);if(0>c||b+c>a.a)throw new RangeError(`getDataView: length ${c} out of range [0, ${a.a-b}]`);return new DataView(a.f.buffer,b,c)};
|
|
114
|
+
Al=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=zl(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=zl(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;{let e,f;try{f=a.j.getUint32(a.a,!1),e=a.j.getUint32(a.a+4,!1)}catch(g){throw new _.I(_.D,3,3E3);}if(2097151<f)throw new _.I(_.D,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.l=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
|
|
115
|
+
Bl=function(a){if(0<=a.l&&a.f<a.l)return null;let b=Al(a);for(;null!==b;){if(b.name===_.pe){const c={start:a.h,end:b.end,length:b.end-a.h,data:yl(a.o,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Al(a)}return null};zl=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};Cl=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};El=function(a){const b=new Dl;b.a=a.a;return b};
|
|
116
|
+
Fl=function(a,b){return _.v(function*(){var c=a.f;c.a=c.h;c.j=yl(c.o);c.f=c.j.byteLength;var d=Bl(a.f);for(c=[];d;)c.push(d),d=Bl(a.f);if(0!==c.length)if(a.j){var e=c[0];if(1<c.length){e=c[0];d=c[c.length-1];const f=d.end-e.start;e={start:e.start,end:d.end,length:f,data:yl(a.a,e.start,f),count:c.length}}(c=b(e))&&(yield c)}else for(e of c)(c=b(e))&&(yield c)})};
|
|
117
|
+
Gl=function(a,b,c,d){return _.v(function*(){const e=new Dl;for(wk(c,a.h);;){var f=yield b.read();if(f.done)break;f=f.value;a.a.append(f);const g=Cl()-e.a;e.a=Cl();xk(c,f.byteLength,g);d&&(yield Fl(a,d))}return a.a.get()})};
|
|
118
|
+
Il=function(a){var b=new window.Headers;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new window.AbortController,d={wd:!1,ah:!1};b={V:Hl(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.wd||(d.wd=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.ah=!0;c.abort()},a);b.V=b.V.finally(()=>{window.clearTimeout(e)})}return b};
|
|
119
|
+
Hl=function(a,b,c,d){return _.v(function*(){const e=new Dl;try{_.sh("sending Fetch request",c.method,a);const g=yield window.fetch(a,c);var f=ok(g.headers);const h={uri:g.url,data:null,headers:f,status:g.status,timeMs:0,responseStartMs:Cl()-e.a,request:b};if(!sk(g.status))throw h.data=yield g.arrayBuffer(),h.timeMs=Cl()-e.a,uk(h);const k=g.headers.get(ta),l=xi(k),m=g.body.getReader(),n=new Jl(l,!b.disableMergedFragments);f=null;Kl(b,g)&&(f=p=>{if(!d.wd)return b.onFragment(p)});h.data=yield Gl(n,m,
|
|
120
|
+
b,f);if(d.wd)throw Error("Request was aborted");h.timeMs=Cl()-e.a;return tk(h)}catch(g){if(d.wd)throw new _.I(1,1,7001,{url:a,request:b});if(d.ah)throw new _.I(1,1,1003,{url:a,request:b});if(g&&1001===g.code)throw g;_.th("Error while fetching data:",g);throw new _.I(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};Kl=function(a,b){b=(b=b.headers.get(_.ua))?b.split(";")[0].trim():null;return!(b!==_.rg&&b!==_.Gc&&b!==_.uc||!a.onFragment||a.disableFragmentSupport||2!==a.type)};
|
|
121
|
+
Ll=function(a){const b=a.uris[a.uriIndex],c=new window.XMLHttpRequest,d=new Dl,e=El(d);let f=0,g;const h=new _.wl;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(){c.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Cl()-e.a);if(c.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k){const m=c.getResponseHeader(ta);wk(a,xi(m));k=!0}};c.onload=function(){return _.v(function*(){const m=pk(c.getAllResponseHeaders());
|
|
122
|
+
try{const n=c.response,p=Cl()-e.a;l||xk(a,n?n.byteLength:0,p);const u=_.vk(m,n,c.status,b,c.responseURL,a,p,g);h.resolve(u)}catch(n){h.reject(n)}})};c.onerror=function(){if(0>=c.status)h.reject(new _.I(1,1,1002,{url:b,request:a,status:c.status}));else{var m=pk(c.getAllResponseHeaders());m=_.vk(m,c.response,c.status,b,c.responseURL,a,Cl()-e.a,g);h.resolve(m)}};c.ontimeout=function(){h.reject(new _.I(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Cl()-d.a;m.lengthComputable&&(100<n||
|
|
123
|
+
m.loaded>=m.total)&&(d.a=Cl(),xk(a,m.loaded-f,n),f=m.loaded,l=!0)};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);_.sh("sending XHR request",a.method,b);c.send(a.body);return{V:h,request:a,abort:()=>{c.abort();h.reject(new _.I(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};_.Nl=function(a,b=!0){a=_.Ml(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Ml=function(a){a=hi(_.G(a));return btoa(a)};
|
|
124
|
+
_.Ol=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Pl=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.Ql=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};
|
|
125
|
+
_.Rl=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};_.Sl=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
|
|
126
|
+
Ul=function(a){try{const b=a.uris[a.uriIndex],c=_.Tl(b);return{V:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{V:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
|
|
127
|
+
_.Tl=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.th("Bad data URI, failed to parse scheme"),new _.I(_.D,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.th("Bad data URI, failed to extract encoding and MIME type"),new _.I(_.D,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.Ol(a).buffer:_.mi(a).buffer,contentType:c}};
|
|
128
|
+
ul=function(a,b){a.V.then(()=>b(!0),()=>b(!1));return a};
|
|
129
|
+
Xl=function(a){a.j=a.C.then(e=>{a.f=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.h&&(a.h=Vl(e.request.baseDelay,1E3));const f=a.h*(1+(2*Math.random()-1)*Vl(e.request.fuzzFactor,.5));a.h*=Vl(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Wl(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.I(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
|
|
130
|
+
let b=0,c=0,d=0;return a.j.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.V}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.I){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return e.a(1),a.A&&a.A(e),Xl(a);g&&e.a(_.D);a.w.reject(e)}else a.w.reject(e)})};Wl=function(a,b,c){a.o=setTimeout(b,c)};Vl=function(a,b){return null===a||void 0===a?b:a};
|
|
131
|
+
jl=function(a,b){return _.v(function*(){const c=yield Yl(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ce)throw Error("Not an object");return d}catch(d){throw new _.gl("Failed to parse JSON response","json-failed");}})};sl=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.v(function*(){if(!navigator.onLine)return!1;if(b){const e=_.rk(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).V}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
|
|
132
|
+
Zl=function(a,b){b=(void 0===b?0:b)||!window.fetch||!window.AbortController||_.Mi(6)||_.Pi()&&68<_.ij().browserVersion.major?Ll:Il;a.l.http=b;a.l.https=b};$l=function(a,b){Zl(a,b.forceXhr)};am=function(a,b){a.A=b};Yl=function(a,b){return _.v(function*(){const c=yield a.fetch(b);return _.ii(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
|
|
133
|
+
_.em=function(a,b,c){if(a.w)return new bm(Promise.reject(new _.I(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.j&&0<a.j&&(b.rateLimitBps=a.j);var d=[];for(var e of a.f)d.push(e);if(b.requestModifiers)for(const g of b.requestModifiers)d.push(g);b.requestModifiers=d;cm(a,b);b.responseModifiers=[...a.h,...b.responseModifiers||[]];let f;e=d=new _.wl;try{const g=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.a}];for(const h of g)for(const k of h.modifiers)e=e.then(l=>{if(f.a)throw new _.I(_.D,
|
|
134
|
+
1,7001,l?{url:l.uris[l.uriIndex],request:l}:null);return"internal"===h.type?k(l,c)||l:k(l)||l}).catch(l=>{if(l instanceof _.I)throw l;throw new _.I(_.D,1,1006,null,l);});e=e.then(h=>({request:h,plugin:dm(a,h)}));f=new bm(e,a.A);for(const h of b.responseModifiers)f.then(k=>{const l=()=>{if(f.a)throw new _.I(_.D,1,7001,k?{url:k.request.uris[k.request.uriIndex],request:k.request}:null);};l();const m=h(k)||k;l();return m}).catch(k=>{if(k instanceof _.I&&k.data&&k.data.response){const l=h(k.data.response);
|
|
135
|
+
if(l&&l.then)return l.then(()=>Promise.reject(k))}return Promise.reject(k)}).catch(k=>{if(k instanceof _.I)throw k;throw new _.I(_.D,1,1007,null,k);});_.vl(a.o,f);d.resolve(b);return f}catch(g){return new bm(Promise.reject(g))}};cm=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};dm=function(a,b){b=b.uris[b.uriIndex];var c=new _.fm(b,location.href);c=c?c.a.protocol.slice(0,-1):"";const d=a.l[c];if(!d)throw new _.I(_.D,1,1E3,{url:b});return e=>d(e)};
|
|
136
|
+
hm=function(){gm.forEach(a=>a())};_.im=function(a){gm.push(a)};_.km=function(a){jm&&performance.mark(a)};_.mm=function(a,b,c){jm&&(b=performance.measure(a,b,c),null!=b&&lm.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};pm=function(a,b){var c=nm;om.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.tm=function(a,b){var c=[qm,rm,sm,nm];for(const d of c)if(c=om.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
|
|
137
|
+
um=function(a,b){const c=b||Vh;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.vm=function(a){return null!=a};wm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.gl("No non-null, non-undefined value found");};xm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};_.ym=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
|
|
138
|
+
_.zm=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};_.Am=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};
|
|
139
|
+
_.Bm=function(a,b){if(a.startsWith("http://")||a.startsWith(_.ae))return a;let c=b;b.startsWith("//")&&(c=`${location.protocol}${c}`);b=new URL(c);b.search="";return(new URL(a,b)).toString()};_.Fm=function(a){if(!a)return null;a=(new _.fm(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};Hm=function(a,b){const c=Gm[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.K?"":null};
|
|
140
|
+
_.Im=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Jm=function(a){return a.split(";")[0]};_.Km=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};
|
|
141
|
+
_.Om=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Wi()&&(a=360);const b=_.mk();b.maxAttempts=3;a={source:"",license:Lm,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.mk(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
|
|
142
|
+
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Mm(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.mk()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.oe,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
|
|
143
|
+
suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,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,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,
|
|
144
|
+
stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1,enableStalledSegmentAbort:!0},mediaSource:{codecSwitchingStrategy:_.lf},restrictions:Mm(),tizen:{sideStreamText:_.Mi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},
|
|
145
|
+
trickPlay:{speedUpMode:_.xd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Db,cropTimeline:!1},yospace:{enabled:!1},broadpeak:{adTracking:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1,chromecast:{useSenderAbrConfig:!1,useSenderStreamingConfig:!1}};if(_.Mi()||_.Pi())a.ads.hls.enable=!1;if(_.Li("Edge/")||_.Mi())a.streaming.gapDetectionThreshold=.5;_.Pi()&&(a.streaming.stallEnabled=!1);_.Pi()&&79===_.Ti().major&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
|
|
146
|
+
1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Mi()&&(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};return a};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}};
|
|
147
|
+
_.Qm=function(a,b){b=void 0===b?{}:b;if(!a)return _.Om();const c=[_.Om()];let d=!1;for(let e of a)null!==e&&void 0!==e&&(_.eh(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),b.Si||null==e.suggestedPresentationDelay||c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));
|
|
148
|
+
a=_.Yg.apply(null,c);_.eh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.fh(a.volume)||hh(a.volume)))throw new _.I(_.D,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.eh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.I(_.D,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.eh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.I(_.D,
|
|
149
|
+
7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.eh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.I(_.D,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.eh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.I(_.D,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.eh(a.drm.env))throw new _.I(_.D,7,
|
|
150
|
+
7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.eh(a.drm.offlineId))throw new _.I(_.D,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.fh(b.bufferingGoal)||hh(b.bufferingGoal))throw new _.I(_.D,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.fh(b.rebufferingGoal)||
|
|
151
|
+
hh(b.rebufferingGoal))throw new _.I(_.D,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.I(_.D,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.fh(b.bufferBehind)||hh(b.bufferBehind))throw new _.I(_.D,7,7100,"config.streaming.bufferBehind is not a number");if(!_.fh(b.smallGapLimit)||hh(b.smallGapLimit))throw new _.I(_.D,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.fh(b.durationBackoff)||hh(b.durationBackoff))throw new _.I(_.D,
|
|
152
|
+
7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.I(_.D,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Pm(a.restrictions);Pm(a.abr.restrictions);a.abr.initialRestrictions&&Pm(a.abr.initialRestrictions)}return a};
|
|
153
|
+
Pm=function(a){_.z(a.maxPixels)&&(a.maxPixels=Infinity);_.z(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.z(a.maxHeight)&&(a.maxHeight=Infinity);_.z(a.maxWidth)&&(a.maxWidth=Infinity);_.z(a.minPixels)&&(a.minPixels=0);_.z(a.minBandwidth)&&(a.minBandwidth=0);_.z(a.minHeight)&&(a.minHeight=0);_.z(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);a.maxBandwidth=Number(a.maxBandwidth);
|
|
154
|
+
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 _.I(_.D,7,7100,"Restrictions contain NaN");};Rm=function(a){return typeof a===_.Ce&&!Array.isArray(a)&&"source"in a};
|
|
155
|
+
Sm=function(a){if(!a)return null;a=(new _.fm(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.tc:a.endsWith(".M3U8")?_.kl:a.endsWith(".MP4")?_.rg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Bc:null};_.Um=function(a){let b;Rm(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Of||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Tm(b[c]);d&&a.push(d)}return a};
|
|
156
|
+
Tm=function(a){let b=null;_.eh(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Mc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Mc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Of||(b.name=a.name),_.z(a.videoMimeType)||typeof a.videoMimeType!==_.Of||(b.videoMimeType=a.videoMimeType),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.Of||(b.audioMimeType=a.audioMimeType));
|
|
157
|
+
b&&!b.type&&(b.type=Sm(a.url),b.type?Vm.debug("Detect media type "+b.type+" for "+a.url):Vm.warn("Unable to detect media type for "+a.url));return b};Wm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};_.Ym=function(a){_.Xm[a.I]=a};
|
|
158
|
+
_.$m=function(a){const b={attemptParameters:_.mk(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ka:{},widevineVersion:_.td};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
|
|
159
|
+
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Of&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.Xm[a.env]||null;if(!c)throw _.sh(_.va,_.fb+a.env+_.aa),new _.I(_.D,6,6015,`DRM environment '${a.env}' is missing.`);b.Ka=_.Zm(c,a.customData)||{};_.pi(a.env.toLowerCase(),Ld)&&(b.enforceSingleSession=!0)}return b};
|
|
160
|
+
bn=function(a){var b=an;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.mi(d),n=_.Ol(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.gl("Signature Verification failed",eg))}).catch(g)}else f()})};
|
|
161
|
+
dn=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 cn(b[0],b[1],b[2]);a.a=b}return a.a};en=function(a){return _.v(function*(){var b=dn(a);try{yield bn(b)}catch(c){if(c&&c.code===eg)throw c;b=new _.fm(window.location.href);if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.a.hostname))throw c;}})};
|
|
162
|
+
fn=function(a){switch((a.ha[0]||{src:"",type:""}).type){case _.tc:a="dash";break;case _.Bc:a="ss";break;case _.kl:a="hls";break;case _.rg:a="mp4";break;default:a=""}return a};gn=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};hn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
|
|
163
|
+
jn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};kn=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.fm(a)).a.hostname:""};ln=function(a){const b=a.configuration;let c="no";b.drm&&!_.gh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Ld)||kn(a).endsWith("drmtoday.com"))&&(c=Ld);return c};
|
|
164
|
+
mn=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.td:b="wv";break;case _.rd:b="pr";break;case _.pd:b="fps"}return b};nn=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};on=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ha:case Fa:b="L1";break;case Ga:b="L2";break;case _.nb:case _.mb:b="L3"}return b};
|
|
165
|
+
tn=function(a,b){const c=b.configuration;var d=[...Array.from(_.Ch.keys()),...b.Og];d={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":gn(c),"CL-ASSET-ID":hn(c),"CL-SESSION-ID":jn(c),"CL-PLAYBACK-TYPE":b.isLive?pn:qn,"CL-CONTENT-TYPE":fn(b),"CL-PLUGINS":d.join(" "),"CL-DRM":ln(b),"CL-DRM-CDM":mn(b),"CL-DRM-SEC-LEVEL":on(b),"CL-DRM-OFFLINE":nn(b),"CL-DRM-IP":kn(b)};rn&&rn.companionSdk&&(rn.companionSdk.name&&(d["CL-COMPANION-SDK"]=rn.companionSdk.name),rn.companionSdk.version&&
|
|
166
|
+
(d["CL-COMPANION-SDK-VERSION"]=rn.companionSdk.version));b=_.rk(["https://downloads.castlabs.com/r/register/"]);b.method="GET";b.headers=d;d=new _.sn;$l(d,{forceXhr:c.forceXhr});return d.fetch(b).V.catch(e=>{a:{var f=dn(a);e=e.data;var g=e.status;if(f.a&&f.a.ilv)f=Promise.resolve();else{switch(g){case 403:case 404:f=7101;var h="Castlabs Player license is invalid";if(403===g){g=h;h="";try{h=JSON.parse(decodeURIComponent(e.responseText)).message}catch(k){}e=h;e=g+(": "+e)}else e=h+"!";h=e;break;case 412:f=
|
|
167
|
+
7103;h="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:f=Promise.resolve();break a}a.g.error(La+h);f=Promise.reject(new _.I(_.D,7,f,h))}}return f})};_.vn=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=un.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.wn=function(a,b){a=_.vn(a);b=_.vn(b);return a.split("-")[0]===b.split("-")[0]};
|
|
168
|
+
An=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=xn(c[e]);Object.keys(yn).includes(f)&&(d[yn[f]]=g)}return d}).filter(c=>_.ah(c));return 0<b.length?b:null}catch(b){return zn.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
|
|
169
|
+
xn=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.gl("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.gl(`Parsing CMSD, not recognized value type of ${a}`);};
|
|
170
|
+
Cn=function(a){return b=>{{var c=b.headers;let e=b=null;var d=kh(c,"cmsd-dynamic");c=kh(c,"cmsd-static");d&&(b=An(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=xn(f[c]);Object.keys(Bn).includes(g)&&(d[Bn[g]]=h)}e=_.ah(d)?d:null}catch(f){zn.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.H("cmsd-event",{Bj:b,Nj:e}))}}};_.En=function(a){a&&(0<=Dn.indexOf(a)||Dn.push(a))};
|
|
171
|
+
Hn=function(a){if(!a.h&&a.B&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.ck(b.schemeIdUri))){const b=new Fn;b.A(a.a,a.B,a.f.mse.sendPlaybackSessionIdHeader?a.G:null);Gn(a,b,a.f)}};Jn=function(a,b){a.I=new In(b);en(a.I).catch(c=>{setTimeout(()=>{a.g.error(La+c);a.trigger(new _.H(_.Sd,{detail:new _.I(_.D,7,7101)}));a.destroy()},1E3)})};Ln=function(a,b){a.W=b;for(const c of a.W)(b=c.id())&&(a.K[b]=c);_.Kn(a,"onPlayerCreated")};
|
|
172
|
+
_.Mn=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.B=null),b&&(b.init(a.j,a.F),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.B=c))};
|
|
173
|
+
Nn=function(a,b){_.v(function*(){a.j.getMedia()||a.j.getCastElement();a.I||(a.I=new In(a.f.license));try{a.g.debug("Verifying license remotely"),yield tn(a.I,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(Wm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Kn=function(a,b,...c){if(!a.Z)return Promise.resolve();const d=a.W.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
|
|
174
|
+
On=function(a){return _.v(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.ca.off(document,_.yg);a.trigger(new _.H(_.sf));a.j&&a.j.release();a.h&&(yield a.h.o(),a.h=null);a.C&&(yield a.C.release(),a.C=null);if(a.a){let b=null;const c=a.a.on(_.Lf,d=>{b=d});return _.Kn(a,_.He).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.A.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
|
|
175
|
+
a.trigger(b))}).finally(()=>{a.a.off(_.Lf,c);a.trigger(new _.H(rf))})}a.trigger(new _.H(rf));return new Promise(b=>b())})};Pn=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};Qn=function(a,b){const c=xh(d=>d.f(_.ab)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.I(_.D,7,7003,"No compatible player implementing playlist mode found!");return{nb:c,player:c.create(),sourceIndex:0}};
|
|
176
|
+
Sn=function(a,b,c){if(a.M===_.ab)b=Qn(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.S){a.S=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.uh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={nb:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.r&&0<a.confidence?(_.vh.debug("Player Factory '"+a.nb.a()+"' can play",b[d]),b=new Rn(a.nb,d)):(_.vh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
|
|
177
|
+
null;if(!b)throw new _.I(_.D,7,7003,"No player factory compatible with given sources found!");c=b.nb;a=c.create();b={nb:c,player:a,sourceIndex:b.sourceIndex}}else b={nb:a.B,player:a.a,sourceIndex:0};return b};
|
|
178
|
+
_.Xn=function(a,b,c){return _.v(function*(){if(a.P)throw new _.I(_.D,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.D,7,7E3,"No surface associated with this player!");_.km(Xe);yield a.release();var d=c||_.Um(b);if(!b||0===d.length)throw new _.I(_.D,7,7003,Va);a.da=d;a.f=_.Qm([a.F,b,{source:d}]);$l(a.A,a.f);a.R=!1;d=Sn(a,d,a.f);_.Mn(a,d.player,d.nb);Tn(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);Un(a);a.a&&a.a.setCdnErrorCallback(a.L);_.Vn(a,a.f);Wn(a);if(a.f.pauseWhenInBackground)a.ca.on(document,
|
|
179
|
+
_.yg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});_.Kh(a.f.drm);Jh(a);yield _.Kn(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.km(We);_.mm("player.beforeLoad",Xe,We)})};_.Yn=function(a){return _.v(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.H(ne));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
|
|
180
|
+
_.$n=function(a){return _.v(function*(){_.km(Te);Nn(a,{configuration:a.getConfiguration(),ha:a.tg(),drmInfo:a.getDrmInfo(),Og:Object.keys(a.K),isLive:a.isLive()});Zn(a);Lh(a);yield _.Kn(a,_.Ee);a.f.autoplay&&(a.h?a.h.w():1)&&(yield a.play());_.km(Se);_.mm("player.afterLoad",Te,Se)})};ao=function(a){return _.v(function*(){if(a.a){var b=a.a;b.bh?(a.trigger(new _.H(ne)),yield b.bh(),yield _.$n(a)):a.g.warn(gb)}else a.g.warn(db)})};
|
|
181
|
+
Tn=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=ml()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};Un=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.v(function*(){a.$e&&a.Wc&&(yield a.Wc(b))}))};_.Vn=function(a,b){b=b||a.f;var c=Bh(a,b);c&&(c=c.create(a),Gn(a,c,b))};Wn=function(a){a.f.cmsd.enabled&&(a.C=new bo(a),a.a.setCmsdManager(a.C))};
|
|
182
|
+
co=function(a){const b=_.Uh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().sa().filter(f=>c?f.kind===_.Ud:f.kind!==_.Ud);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().ra();e&&e.language?(e=_.vn(e.language||""),b.push(e)):(e=a.getTrackManager().Ha())&&e.language&&(e=_.vn(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
|
|
183
|
+
{const g=_.vn(f);if(f=d.find(h=>{h=_.vn(h.language||"");return _.wn(h,g)}))return a.getTrackManager().Za(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};Zn=function(a){_.v(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);co(a)})};Gn=function(a,b,c){a.h=b;b.h(null==c.volume?1:c.volume);b.setMuted(c.muted||!1)};
|
|
184
|
+
go=function(a,b){return _.v(function*(){yield eo(a,()=>Promise.all(fo(a).map(b)))})};ho=function(a,b){_.v(function*(){yield eo(a,()=>Promise.all(a.f.filter(c=>null!=c.Qa()).map(b)))})};fo=function(a){return[a.Kc,...a.f].filter(b=>null!=b)};eo=function(a,b){return _.v(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};
|
|
185
|
+
lo=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>io(a,d.type);a.a.on(b,_.Rd,()=>{a.ga||(a.h=!1,jo(a,5))});a.a.on(b,Pc,c);a.a.on(b,_.bf,()=>{a.B=!0;a.h=!1;io(a,_.bf)});a.a.on(b,_.Ne,()=>{a.B=!1;a.h=!1;io(a,_.Ne)});a.a.on(b,_.ag,c);a.a.on(b,_.qf,c);a.a.on(b,_.Cf,d=>{a.ga=!1;a.h=!1;io(a,d.type)});a.a.on(b,_.Df,d=>{a.ga=!0;io(a,d.type)});a.a.on(b,Jf,c);a.a.on(b,_.Ag,()=>{a.h=!0;io(a,_.Ag)});a.a.on(b,_.Sd,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.D&&
|
|
186
|
+
jo(a,_.ko)});a.a.on(b,_.me,c);a.a.on(b,Qc,()=>{a.A=!0;io(a,Qc)});a.a.on(b,_.lg,d=>{a.ga=!0;io(a,d.type)});a.a.on(b,_.kg,d=>{a.ga=!1;a.h=!1;io(a,d.type)})};
|
|
187
|
+
jo=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=2===a.f;a.w=a.f;a.f=b;5===a.w&&(a.G=c,a.l=0);a.l||(a.l=a.G||c);a.I=c-a.l;a.l=c;2===b?(a.J=a.l,a.o=a.ga?1:2,a.g.info("Buffering started. Reason: "+_.ui(a.o,_.mo)),a.m.trigger(new _.H(_.Oc,{detail:{bufferedTimeMS:-1,reason:a.o}}))):d&&(a.C=a.l-a.J,a.g.info("Buffering finished. Reason: "+_.ui(a.o,_.mo)+". Buffering time: "+a.C+" ms"),a.m.trigger(new _.H(_.Nc,{detail:{bufferedTimeMS:a.C,reason:a.o}})));b=_.ui(a.w,_.no);c=_.ui(a.f,_.no);a.g.info(`Player state change: ${b} -> ${c}`);
|
|
188
|
+
b={currentState:a.f,previousState:a.w,timeSinceLastStateChangeMS:a.I};if(2===a.f||2===a.w)b.reason=a.o;a.m.trigger(new _.H(_.Lf,{detail:b}));return!0};
|
|
189
|
+
io=function(a,b){if(a.f===_.ko)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m.isEnded();if(d)a.ga||(a.h=!1,jo(a,5));else if(b!==_.ag){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Na(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.H=a.m.getPlaybackRate()||1;e=typeof a.j===_.r&&a.j<oo&&e.networkState===po;var f=typeof a.j===_.r&&0>=a.F&&a.f===_.qo,g=typeof a.j===_.r&&a.j<=oo&&a.h;e=a.ga||f||e||
|
|
190
|
+
g;!a.K||a.m.isLive()||2!==a.f||e||(f=b===_.Cf&&4===a.j,(g=1===a.w)&&!a.A?e=!0:g||a.A||f||(e=!0));f=!1;e?f=jo(a,2):c?f=jo(a,4):a.B&&(f=jo(a,3));f&&(a.A=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.ga+", waiting: "+a.h+", playing: "+a.B+", paused: "+c+", readyState: "+a.j+", rate: "+a.H+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+_.ui(a.f,_.no))}}};so=function(a){return ro(a).filter(b=>b.type===qd&&!b.pf)};to=function(a){a.forEach(b=>{b.pf=!0})};
|
|
191
|
+
xo=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,zg:!1}));a=uo(a);b&&(a=vo(a));return new Set(wo(a))};ro=function(a){const b=[];for(const c of a)b.push(c);return b};yo=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.hg||a.startTime,f=b.hg||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};
|
|
192
|
+
wo=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?zo(c,a):(a=Ao(c),b.push(a));return b};zo=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=_.jg,b.type=_.Bf};
|
|
193
|
+
Ao=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.Zd,eventElement:null};zo(a,b);return b};uo=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Bo));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Bo(d))||(d.zg=!0)});return Array.from(b.values())};vo=function(a){a.forEach(b=>{b.zg&&(b.endTime=b.startTime,b.startTime=0)});return a};Bo=function(a){return`${a.startTime}-${a.endTime}`};
|
|
194
|
+
Go=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.Yd;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=so(d);to(c);a.a=xo(c,a.l);0<a.a.size&&(Co(a,a.a),a.m.trigger(new _.H(_.$f)));a.j.on(b,_.wd,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){var k=g.startTime;e=k;k+=.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.H(_.Yf,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.H(_.Zf,
|
|
195
|
+
{detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.H(_.Yf,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);Do(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;Eo(a,b);f=so(d);var k=xo(f,a.l);g=new Set;h=!1;for(l of k)(k=Fo(a,l))?(l.customAttributes&&(k.customAttributes=_.Yg(k.customAttributes||{},l.customAttributes)||
|
|
196
|
+
void 0),h=!0):(a.a.add(l),g.add(l));var l={wi:g,xh:0<g.size||h};const {wi:m,xh:n}=l;to(f);(e||n)&&a.m.trigger(new _.H(_.$f));Co(a,m)},6E3))}};Ho=function(a,b){a.j.on(b,_.nc,c=>{c=c.track;c.kind===_.se&&Go(a,c)})};Co=function(a,b){for(const c of b)a.m.trigger(new _.H(_.Xf,{detail:c}))};Fo=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
|
|
197
|
+
Eo=function(a,b){if(b.cues){var c=ro(b.cues).filter(f=>f.type===qd),d=c.filter(f=>f.pf);c=c.filter(f=>!f.pf);var e=[];for(const f of c)for(const g of d)yo(f,g)&&(e.push(f),g.hg=f.startTime);Do(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Do=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};
|
|
198
|
+
Io=function(a,b){b=b.track;b.kind!==_.se&&(b.mode===_.Ef&&(b.mode=_.Yd),a.a.on(b,_.wd,c=>{c=c.target||c.srcElement;c.mode=_.Yd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};_.L=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.I(_.D,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
|
|
199
|
+
_.Jo=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
|
|
200
|
+
_.No=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.I(_.D,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.Ko(d);var f;(f=_.Jo(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.Jo(d,g);)c.push(new _.Lo(f[1],f[2]||f[3]||""))}return new _.Mo(a,b,c,e)};Oo=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};
|
|
201
|
+
_.Po=function(a){return a&&a!==_.fg?a:null};Ro=function(a){if(!a)throw new _.I(_.D,3,3101,`Invalid track type: ${a}`);if(!_.eh(a))throw new _.I(_.D,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.M:return _.M;case _.N:return _.N;case _.O:return _.O;case Qo:return Qo}throw new _.I(_.D,3,3101,`Unknown track type: ${a}.`);};
|
|
202
|
+
To=function(a,b,c){a=Ro(a);const d=_.Po(c.kind);a=new _.So(b,d===_.se?Qo:a);a.kind=d;a.label=_.Po(c.label);a.language=_.Po(c.language);a.originalLanguage=c.originalLanguage||a.language;return a};Uo=function(a,b){return _.v(function*(){const c=_.rk(b);return yield Yl(a.f,c)})};
|
|
203
|
+
Yo=function(a,b,c){return _.v(function*(){const {mimeType:d,renditions:e}=yield Vo(a,b,c),f=new _.So("dummy",_.O),g=e.map((h,k)=>{k=new _.Wo(`R${k}`,f);k.bandwidth=h.bandwidth;k.ud=h.ud;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Xo(g);return{renditions:g,mimeType:d||void 0}})};
|
|
204
|
+
$o=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Zo(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};Vo=function(a,b,c){return _.v(function*(){const d=ap(b),e=bp(b,c);return{mimeType:yield cp(a,e,d[0]?d[0].codec:null),renditions:d}})};
|
|
205
|
+
Xo=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};Zo=function(a){const b=_.No(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.rb);c=null!=c?{AUDIO:_.N,VIDEO:_.O,SUBTITLES:_.M}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.Ka),wj:a("AUTOSELECT"),default:a("DEFAULT"),Dj:a("FORCED"),dg:a("CHARACTERISTICS"),uri:a(_.ub)}};
|
|
206
|
+
ap=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.No(0,b);if(c.getAttribute(_.Cb))throw Error("Playlist contains alternative video streams.");var d=_.L(c,_.ib);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.L(c,_.na);e=e?Number(e):null;var f=_.L(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.L(c,_.qa);c=_.dp(_.t,c?c.split(","):[]);return b={bandwidth:e,ud:f,codec:c,width:b,height:d,mimeType:null}})};
|
|
207
|
+
bp=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Bm(a,b):null};cp=function(a,b,c){return _.v(function*(){if(!b||!c)return null;var d=yield Uo(a,b);d=[ep(d,b),fp(d,b)].filter(Boolean);return _.gp(d,_.t,c)})};ep=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Bm(a,b):null};fp=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.L(_.No(0,a),_.ub))?_.Bm(a,b):null:null};
|
|
208
|
+
_.ip=function(a,b,c){for(const d of _.hp)if(d.probe(b,c))return d.create(a);return null};_.jp=function(a){a=_.hp.indexOf(a);0<=a&&_.hp.splice(a,1)};kp=function(a){a.h=[];a.A={};a.a.clear();a.o.clear();a.f.release()};
|
|
209
|
+
mp=function(a,b,c){const d=lp(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.o.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.M:f="mode";e=_.Ef;g=_.zd;break;case _.N:f="enabled";break;case _.O:f="selected"}if(f)for(const h of d)h[f]=c.type===c.type&&c.id===h.id?e:g}}else if(a.g.debug("Disable track type "+
|
|
210
|
+
b),a.a.get(b)&&d&&b===_.M){for(e of d)e.mode=_.zd;a.a.set(b,null)}b===_.N?a.m.trigger(new _.H(_.Jc)):b===_.M&&a.m.trigger(new _.H(_.Wf))};np=function(a){if(0!==a.j.size){for(const b of a.j){const [c,d]=b;{const e=c;if(null===d)mp(a,e,null);else{const f=d,g=a.h.find(h=>h.type===e&&h.language===f.language&&h.kind===f.kind&&h.label===f.label);g&&mp(a,e,g)}}}a.j.clear()}};op=function(a){return a.enabled||a.selected||a.mode===_.Ef||a.mode===_.Yd};qp=function(a,b,c){return pp(a)&&b===_.O&&!!c.enableHlsVideoTrackInfo};
|
|
211
|
+
rp=function(a,b,c){return _.v(function*(){var d=a.m.getLoadedSource();d&&a.l&&(d=yield a.l.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};sp=function(a,b,c){return pp(a)&&(b===_.N||b===_.M)&&!!c.enableMetadata};
|
|
212
|
+
tp=function(a,b,c){return _.v(function*(){var d=a.m.getLoadedSource();d&&a.l&&(d=yield a.l.a(d.url,c),d.Mc&&(d=d.Mc.get(`${b.type}:${b.label}`))&&d.dg&&(b.accessibility=d.dg.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};up=function(a,b){return a.h.filter(c=>c.type===b)};vp=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};lp=function(a,b){if(a=wp(a,b))a=Array.from(a),b===_.M&&(a=a.filter(c=>c.kind!==_.se));return a};
|
|
213
|
+
xp=function(a){var b=wp(a,_.M);b&&(a.f.on(b,_.nc,a.M),a.f.on(b,tf,a.R),a.f.on(b,Yc,a.P));if(b=wp(a,_.N))a.f.on(b,_.nc,a.J),a.f.on(b,tf,a.L),a.f.on(b,Yc,a.K);if(b=wp(a,_.O))a.f.on(b,_.nc,a.S),a.f.on(b,tf,a.W),a.f.on(b,Yc,a.U)};zp=function(a){_.v(function*(){const b=a.m.getConfiguration();yp(a,_.N,b.preferredAudioLanguage);if(!lp(a,_.M).some(c=>op(c))){const c=wp(a,_.M);yield new Promise(d=>{a.f.one(c,Yc,d);(new _.Ii(d)).la(1)})}a.B||yp(a,_.M,b.preferredTextLanguage)})};
|
|
214
|
+
Ap=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Bp=function(a,b){return(a=a.o.get(b))&&a.renditions[0]};Cp=function(a,b,c,d){const e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.si(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.C.add(e)};
|
|
215
|
+
Dp=function(a,b,c){return _.v(function*(){var d=a.m.getConfiguration();if(d=_.ip(d,b.mimeType,_.Uf)){var e=_.rk(b.url),f={objectType:b.mimeType===_.uc?"tt":"c"};(f=yield _.em(a.m.getNetworkEngine(),e,f).V)&&f.data&&(e="External_"+`${a.I++}`,a.A[e]=b,d=d.a(_.G(f.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Uf},Cp(a,d,e,c))}else a.g.warn("Track MIME type is not supported",b)})};
|
|
216
|
+
pp=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.kl&&!a.url.endsWith(".m3u8"))&&_.Vi()};wp=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.N:return a.audioTracks;case _.O:return a.videoTracks;case _.M:return a.textTracks;default:return null}};
|
|
217
|
+
yp=function(a,b,c){c=_.Uh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=up(a,b);c.some(e=>{const f=_.vn(e);return(e=d.find(g=>{g=_.vn(g.language||"");return _.wn(f,g)}))?(a.g.info("Will select track with id",e.id),mp(a,b,e),!0):!1})};Fp=function(a){return a.name===Za&&Ep.some(b=>a.message.startsWith(b))};Gp=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Ig]=a.f),a.a&&(b.headers[Jg]=a.a))};
|
|
218
|
+
Hp=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Ig],a.a=b.headers[Jg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.ii(_.Ol(b))),{delay:a.renewalPeriod,sj:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Ip=function(){throw new _.I(_.D,3,3E3);};
|
|
219
|
+
_.Jp=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.G(a.f.buffer);b=_.G(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Ip()}};_.P=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Ip()}};_.Kp=function(a){return a.a<a.f.byteLength};_.Lp=function(){throw new _.I(_.D,3,3E3,"Buffer read out of bounds.");};_.Mp=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Lp()}};_.Np=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Lp()}};
|
|
220
|
+
_.Q=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Lp()}};_.Op=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Lp()}};_.Pp=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Lp()}if(2097151<c)throw new _.I(_.D,3,3001);a.a+=8;return c*Math.pow(2,32)+b};Qp=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Mp(a);return c};
|
|
221
|
+
_.Rp=function(a,b){a.a+b>a.f.byteLength&&_.Lp();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.G(c)};Sp=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Tp=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Up=function(a){for(;_.Kp(a.reader)&&!a.parser.a;)a.parser.De(a.start+a.headerSize,a.reader,a.partialOkay)};_.Vp=function(a){for(let b=_.Q(a.reader);0<b&&!a.parser.a;--b)a.parser.De(a.start+a.headerSize,a.reader,a.partialOkay)};
|
|
222
|
+
_.Wp=function(a){return b=>{const c=b.reader.Ra()-b.reader.getPosition();a(_.Rp(b.reader,c))}};_.Xp=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Yp=function(a){let b="";try{b=_.li(a)}catch(c){}return b};_.$p=function(a){a=Yp(a);let b="";a.length&&(b=(new _.Zp(a)).a);return b};
|
|
223
|
+
bq=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.ii(a)),d=_.Ol(c.sinf[0]);(new _.aq).N(_.Hf,_.Up).N("schi",_.Up).N("tenc",e=>{e.reader.skip(6);_.Mp(e.reader)&&(e.reader.skip(1),b=_.Ql(_.Rp(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
|
|
224
|
+
dq=function(a,b,c){if(!c||!c.byteLength)throw new _.I(_.D,6,6102);let d;typeof b===_.Of?d=_.ni(b,!0):d=b;a=_.ni(Yp(a),!0);b=new _.cq(12+a.byteLength+d.byteLength+c.byteLength,!0);_.P(b,a.byteLength);_.Jp(b,_.G(a));_.P(b,d.byteLength);_.Jp(b,_.G(d));_.P(b,c.byteLength);_.Jp(b,_.G(c));return _.G(b.buffer)};_.eq=function(a){var b=_.G(a.body);b=_.Nl(b);a.headers[_.ua]=_.Cc;a.body=_.mi("spc\x3d"+b).buffer};
|
|
225
|
+
_.fq=function(a){let b;try{b=_.ii(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=gi(_.Ol(b))};
|
|
226
|
+
gq=function(a){switch(a){case "PRODUCTION":return"https://lic.drmtoday.com";case "STAGING":return"https://lic.staging.drmtoday.com";case "DEMO":return"https://lic-demo.staging.drmtoday.com";case "TEST":return"https://lic.test.drmtoday.com";default:throw new _.gl(`Cannot infer DRMtoday base URL for environment: ${a}`);}};_.hq=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
|
|
227
|
+
_.iq=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.ah(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};kq=function(a){const b={},c=a?a[Kg]:void 0;a=jq[a?a[Kg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
|
|
228
|
+
mq=function(a){a=a["x-dt-li"];if(!a)return null;try{const b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(b){return _.lq.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};_.oq=function(a){a=nq[a];if(!a)return null;const b=_.ij();return b.os===bj&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};pq=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
|
|
229
|
+
rq=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=qq.value().get(b),c.one(a,b,d))};
|
|
230
|
+
sq=function(a,b){a.f=b;_.Sh(a.a);if(!b)return Promise.resolve();a.a.on(b,Pd,c=>{_.sh("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,Gg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.G(c.initData);if(_.fi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=ki(c.subarray(4),
|
|
231
|
+
!0);c=_.mi(c);const d=new Event(Pd);d.initDataType="skd";d.initData=gi(c);a.f.dispatchEvent(d)}});rq(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};tq=function(a,b){pq(a.keyStatuses,b);b=new _.H(de);a.dispatchEvent(b)};
|
|
232
|
+
wq=function(a,b){a.a=b;_.Sh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Pd);d.initDataType=_.Vc;d.initData=gi(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=uq(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.H(_.re,{messageType:d?ge:fe,message:c.message});d=e;_.sh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.th("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=uq(a,
|
|
233
|
+
c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=uq(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const 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?vq(d,_.Me):1===e?vq(d,"expired"):vq(d,_.ce))}}}))};
|
|
234
|
+
uq=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};vq=function(a,b){pq(a.keyStatuses,b);b=new _.H(de);a.dispatchEvent(b)};xq=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
|
|
235
|
+
yq=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.Pe)if(c)d=_.G(_.mi("LOAD_SESSION|"+c));else{const f=_.mi("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.G(b),f.byteLength);d=g}else d=_.G(b)}catch(f){return Promise.reject(f)}a.f=new _.wl;const e=xq(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ja)return a.f=null,Promise.reject(f);(new _.Ii(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
|
|
236
|
+
a.f=null}})).la(.01)}return a.f};zq=function(a,b,c){if(a.a)a.a.then(()=>zq(a,b,c)).catch(()=>zq(a,b,c));else{a.a=b;if(a.h===Cg){var d=_.ii(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=_.Ol(e.keys[0].k);e=_.Ol(e.keys[0].kid)}else d=_.G(c),e=null;var f=xq(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
|
|
237
|
+
Cq=function(a,b){var c=Aq;if(a){var d=c.find(e=>e.a()===a);if(d)return Bq.info(Jb+d.a()),d.create();Bq.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return Bq.info(Jb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");Bq.info(Jb+c.a());return c.create()};_.Fq=function(a){var b=_.Pl(a);b=parseInt(b.byteLength,10).toString(16);b=_.Pl("12"+b+a);return new Dq(Eq,a,b)};
|
|
238
|
+
_.Hq=function(a){const b=new _.Gq(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.Q(b);var c=_.Q(b);c=_.Tp(c);var d=_.Q(b);const e=d>>>24;d&=16777215;var f=_.Rp(b,16);f=_.Ql(f);if(0<e){var g=_.Q(b);b.skip(16*g)}g=_.Q(b);const h=()=>{let u=_.Mp(b),x=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Mp(b),x=(x|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:x},k=u=>{switch(u){case 0:do if(!_.Kp(b))throw Error("not enough data to skip!");while(_.Mp(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
|
|
239
|
+
break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.Kp(b);){var n=h(),p=n&7;n>>>=3;if(2===p){p=h();if(0>p)throw Error(`unable to read length of field ${n}`);p=Qp(b,p);2===n?l.push(p):4===n&&(m=p)}else k(p)}_.sh("Parsed WV PSSH Box","size",a,"name",c,ng,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Ml(m):"","keyIds",l.map(u=>_.Ql(u)));return 0<l.length?_.Fq(_.Ql(l[0])):null};
|
|
240
|
+
_.Iq=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.G(a);a.set(b,0);return a};
|
|
241
|
+
_.Nq=function(a){var b=_.R;a:{var c=new _.Gq(new DataView(a.buffer),!0);_.Q(c);for(_.Np(c);_.Kp(c);)if(1===_.Np(c)){var d=_.Np(c);c=_.Rp(c,d);break a}c=null}c||(c=a);a=ki(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(ng)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.R;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,pa);f=g?f.f(g):null;e={value:e,Se:f}}else e=null;else e=null;d=e?[e]:(e=Jq(d))?[e]:(d=Kq(d))?d:null;const {value:h="",Se:k}=d&&d[0]||{};d=_.Ol(h);d=_.Iq(d);d=_.Ql(d);return new _.Lq(_.Mq,
|
|
242
|
+
d,b,c,a,k)};Jq=function(a){var b=_.R;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(pa);c=c.getAttribute("ALGID");return{value:b,Se:a,vh:c}};
|
|
243
|
+
Kq=function(a){var b=_.R;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(pa),e=c.getAttribute("ALGID");b.push({value:a,Se:d,vh:e})}return b.length?b:null};Oq=function(a){return _.v(function*(){const b=new Promise(c=>{(new _.Ii(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};
|
|
244
|
+
_.Qq=function(a){return Pq(a)?_.rd:a};Rq=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
|
|
245
|
+
Sq=function(a,b){b=b[_.Qq(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
|
|
246
|
+
_.Tq=function(a,b){b=_.Im(a.mimeType,b||a.codecs);if(_.tm(b,a.type)){a=a.type;var c=_.tm(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Uq=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Wq=function(a){return(a.audioCapabilities||[]).some(Vq)||(a.videoCapabilities||[]).some(Vq)};
|
|
247
|
+
Xq=function(a,b){a=_.$p(b);_.sh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
|
|
248
|
+
Yq=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===fa){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.ch(k)||(k=Xq);let l="";try{l=k(b,c,g)}catch(m){throw new _.I(_.D,6,6103);}if(!l.length)throw new _.I(_.D,6,6101,"Content ID is an empty string");c=dq(c,l,a)}return c};Zq=function(a){return!!a.match(/^com\.widevine\.alpha/)};Pq=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
|
|
249
|
+
Vq=function(a){return null!=a.robustness&&""!==a.robustness};$q=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Rl(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId===g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
|
|
250
|
+
ar=function(a){var b=a.o;const c=a.Z;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.I(_.D,6,6014));a.D.jf(_.jh(c));a.A||a.g.info(wa);a.A=!0;a.F=!1};br=function(a){a.h.forEach((b,c)=>{const d=b.ef;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.hf(c.sessionId,e),b.ef=e)})};
|
|
251
|
+
cr=function(a){return _.v(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.ca.stop();a.ca=null;a.U.stop();a.U=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Uc&&c.Uc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.v(function*(){a.g.debug("Closing session",c.sessionId);try{yield Oq(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
|
|
252
|
+
c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.P=null})};_.ir=function(a,b){const c=dr(a,b),d=er(b);for(const e of d)fr(a,e,a.f.Ka);b=gr(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.km(Cd);a=_.hr(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.km(Bd);_.mm("DRM queryMediaKeys_()",Cd,Bd)})};
|
|
253
|
+
_.kr=function(a,b,c){c=void 0===c?[]:c;a.K=jr;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.ir(a,b)};
|
|
254
|
+
_.hr=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.I(_.D,6,6E3));null===a.l&&(a.l=Cq(a.f.emeApi,a.lb));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.wl;const e=_.ij(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.rd){if((_.Ki()||e.os===dj&&_.Li("Chrome")&&!_.Ki())&&!a.f.Ka[m].useLegacySystem)return l.label=sd,a.l.a(sd,
|
|
255
|
+
[l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.rd;Uq(l);return a.l.a(m,[l])});Uq(l)}if(m===_.td&&a.f.widevineVersion!==_.td){const n=a.f.widevineVersion;if(!n.startsWith(_.td))return a.g.error(`Invalid "widevineVersion" value "${n}".`),Promise.reject();const p=Object.assign({},l,{label:n,distinctiveIdentifier:_.Ke,persistentState:_.Ke});return a.l.a(n,[p]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
|
|
256
|
+
{a:{if(m===_.td&&Wq(l)){const p=_.ij();if(Wq(l)&&p.os===bj&&p.browser===Zc){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Uq(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.ij();if(h.os===dj&&10<=h.osVersion.major&&"edge"===h.browser)g=_.rd;else if("safari"===h.browser)g=_.pd;else if(h.browser===Zc||"firefox"===h.browser)g=_.td}g&&(h=
|
|
257
|
+
b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,m)=>{m!==g&&f(k,l,m)});d=d.catch(()=>{throw new _.I(_.D,6,6001,"Failed to get MediaKeySystemAccess.");});d=d.then(k=>{if(a.j)return null;a.J.clear();var l=k.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType.toLowerCase());for(var p of l)a.J.add(p.contentType.toLowerCase());{m=k.keySystem;n=b.get(_.Qq(k.keySystem));
|
|
258
|
+
p=[];l=[];const u=[],x=[];$q(n.drmInfos,p,l,u,x);1<l.length&&_.B("Multiple unique server certificates found! Only the first will be used.");1<p.length&&_.B("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:p[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===_.uf,persistentStateRequired:n.persistentState===_.uf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
|
|
259
|
+
"",serverCertificate:l[0],initData:u,keyIds:x,periodId:null}}a.a=m;if(!a.a.licenseServerUri)throw new _.I(_.D,6,6012,a.a.keySystem);return k.createMediaKeys()}).then(k=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=k,a.S=!0)}).catch(k=>{if(!a.j){a.a=null;a.J.clear();if(k instanceof _.I)throw k;throw new _.I(_.D,6,6002,{browserError:k.message});}});c.reject();return d};
|
|
260
|
+
lr=function(a){a=ih(a.f.Ka[_.Le]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Pl(f);e=_.Pl(e);e={kty:"oct",kid:_.Nl(f,!1),k:_.Nl(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.mi(d),initDataType:"keyids"}];return{keySystem:_.Le,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
|
|
261
|
+
keyIds:[],periodId:null}};er=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};mr=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ka[c.keySystem]||(a.f.Ka[c.keySystem]={licenseUrl:""})};
|
|
262
|
+
dr=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=ih(a.f.Ka);Rq(b,d)}d=a.f.Ka[_.pd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.pd));if(!1!==a.f.vj&&_.Vi()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.pd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=lr(a))for(const g of b)g.drmInfos=[f];b=er(b);mr(a,b);for(const g of b)Sq(g,
|
|
263
|
+
a.f.Ka);return c};fr=function(a,b,c){const d=_.Qq(b.keySystem);c=c[d];d===_.Le&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
|
|
264
|
+
gr=function(a,b){var c=new Set(er(b));const d=a.G?_.uf:_.Ke,e=a.G?[_.Pe]:[Sf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Vc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ke,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Tq(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Mi()&&(h=_.Tq(b,_.Od));const k=c?_.Tq(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Mi()&&(l=_.Tq(c,_.Od));
|
|
265
|
+
for(const m of f.drmInfos){const n=a.get(m.keySystem);n.drmInfos.push(m);m.initData&&m.initData.length&&(n.initDataTypes=[...new Set(m.initData.map(p=>p.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.uf);m.persistentStateRequired&&(n.persistentState=_.uf);b&&_.Uh(m.audioRobustness).forEach(p=>{const u={robustness:p||"",contentType:g};n.audioCapabilities.find(x=>x.robustness===u.robustness&&x.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:p||
|
|
266
|
+
"",contentType:h})});c&&_.Uh(m.videoRobustness).forEach(p=>{const u={robustness:p||"",contentType:k};n.videoCapabilities.find(x=>x.robustness===u.robustness&&x.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:p||"",contentType:l})})}}return a};nr=function(a){return _.v(function*(){if(!a.l.o())if(a.P)yield a.P;else try{a.P=a.l.h(a.I),yield a.P}catch(b){a.j||a.w(new _.I(_.D,6,6003,b.message,b))}})};
|
|
267
|
+
_.rr=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==jr)){var e=a.keySystem();if(!e.startsWith(_.pd)&&b===_.Vc){const f=new or(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
|
|
268
|
+
_.Mi(2)||a.keySystem().startsWith(_.pd)||!_.pr(a,d,c,!0))&&qr(a,d,null,b,c)}};sr=function(a,b){return _.v(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield nr(a);b.initData&&_.rr(a,b.initDataType,_.G(b.initData))})};ur=function(a){return _.v(function*(){_.km(Ed);const b=a.W.map(c=>tr(a,c));a.ia=!0;a.W=[];yield Promise.all(b);_.km(Dd);_.mm("drm.onPlay",Ed,Dd)})};
|
|
269
|
+
wr=function(a){const b=a.keySystem(),c=a.f.Ka[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return vr(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.rk([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Xc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.Bb.fetch(f).V}).then(f=>{a.a.serverCertificate=_.G(f.data)}).catch(f=>{var g=
|
|
270
|
+
f.data.headers;g=Object.assign({message:Aa,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},kq(g));throw new _.I(_.D,6,6100,g,f);})};
|
|
271
|
+
_.xr=function(a){return _.v(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.I(_.D,6,6004,{browserError:b.message});}})};
|
|
272
|
+
_.Ar=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Mi(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.pd)){const e=a.h.values();for(const f of e)_.Rl(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),yr(c.initData,f)||(f.ne.push(c.initData),c.keyId&&!f.ub.includes(c.keyId)&&
|
|
273
|
+
f.ub.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Mf)),d=!1)}!d||a.G&&a.K===jr||(_.pr(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),qr(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.zr(a,c);b.length||a.L.length||(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return a.H};
|
|
274
|
+
_.Br=function(a,b){if(!a.I)return Th(a.B,b,()=>{a.w(new _.I(_.D,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Re,()=>ur(a));a.B.on(a.C,_.Bg,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==lb||a.L.length)d=nr(a);c=Promise.resolve();_.Pi()&&38===_.Ti().major||(a.a&&a.a.keySystem!==_.Le&&!a.a.serverCertificate&&(c=wr(a)),c=c.then(()=>_.xr(a)));return Promise.all([d,
|
|
275
|
+
c]).then(()=>{a.j||(_.Ar(a),a.B.on(a.C,Pd,e=>sr(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.td&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.I(1,6,6004)),a.a.serverCertificate=null,a.R++,_.Br(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
|
|
276
|
+
vr=function(a,b){return _.v(function*(){const c=a.D.Zc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
|
|
277
|
+
_.zr=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Pe)}catch(e){const f=new _.I(_.D,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.re,a.bb.bind(a));a.B.on(c,de,a.ab.bind(a));const d={initData:null,loaded:!1,ef:Infinity,tc:null,qb:new _.wl,periodId:null,ne:[],keyId:null,ub:[],initDataType:null,Ac:null,sessionContext:{ldlDelay:0,customData:{}}};d.qb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
|
|
278
|
+
a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.I(_.D,6,6013)),null;d.loaded=!0;Cr(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.I(_.D,6,6005,{browserError:e.message})))})};yr=function(a,b){if(!a)return!1;for(let c=0;c<b.ne.length;c++)if(_.Rl(a,b.ne[c]))return!0;return!1};
|
|
279
|
+
_.pr=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.Rl(c,f.initData))return b?f.ub.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.ub.push(b),a.o.get(b)||a.o.set(b,Mf),d&&a.g.info(pb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(pb+`Session: '${e.sessionId}'`),!0;if(yr(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
|
|
266
280
|
!0}return!1};
|
|
267
|
-
|
|
268
|
-
if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.
|
|
269
|
-
k={
|
|
270
|
-
m=a.f.Ka[m];n=(n=m.modifiers)&&n.transformInitData;_.
|
|
271
|
-
a.w(new _.I(_.D,6,6006,{browserError:u.message,error:u,extended:
|
|
272
|
-
|
|
273
|
-
_.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
(h=a.h.get(d.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
l?{headers:l}:{},
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
qr=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.v(function*(){if(e.length){var h=b;if(!h)try{h=Dr(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&Er(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
|
|
282
|
+
if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.Pe:Sf;var p=a.I.createSession(n);a.D.onEvent(new _.H(Id,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.I(_.D,6,6005,{browserError:u.message}));return}a.B.on(p,_.re,a.bb.bind(a));a.B.on(p,de,a.ab.bind(a));
|
|
283
|
+
k={Ac:f,ne:[],initData:e,initDataType:d,keyId:h,ub:h?[h]:[],loaded:!1,ef:Infinity,periodId:c,tc:null,qb:new _.wl,sessionContext:{ldlDelay:0,customData:{}}};k.qb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(p,k);h&&!a.o.get(h)&&a.o.set(h,Mf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.ub.includes(m.keyId)&&_.Rl(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.ub.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Mf));l=a.D.getConfiguration();m=a.keySystem();
|
|
284
|
+
m=a.f.Ka[m];n=(n=m.modifiers)&&n.transformInitData;_.ch(n)||(n=Yq);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.I||(h=new _.I(_.D,6,6016,u));k.qb&&k.qb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);p.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var x=null;u.errorCode&&u.errorCode.systemCode&&(x=u.errorCode.systemCode,0>x&&(x+=Math.pow(2,32)),x="0x"+x.toString(16));
|
|
285
|
+
a.w(new _.I(_.D,6,6006,{browserError:u.message,error:u,extended:x},u))}})}else a.g.warn("Empty init data")})};Fr=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Cr=function(a){for(const b of a.h.values())if(!b.loaded)return!1;return!0};Er=function(a,b,c,d){if(!b&&c!==_.Hf)return!1;d=b||bq(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.ub.includes(b)||c===_.Hf&&(e.keyId||bq(e.initData))===d)return!0;return!1};
|
|
286
|
+
Dr=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.Ka[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.ch(g)||(g=Xq);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Hf)return bq(c)||"";if(b===_.Vc){l=a.keySystem();try{if(Zq(l)){const m=
|
|
287
|
+
_.Hq(c);if(m)return m.a}else if(Pq(l)){{f=new _.Gq(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.Q(f);const m=_.Q(f);h=_.Tp(m);const n=_.Q(f);c=n>>>24;k=n&16777215;const p=_.Rp(f,16),u=_.Ql(p);if(0<c){const E=_.Q(f);f.skip(16*E)}const x=_.Q(f),y=_.Rp(f,x),A=_.Nq(y);_.sh("Parsed PR PSSH Box","size",g,"name",h,ng,c,"flags",k,"size",x,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
|
|
288
|
+
tr=function(a,b){return _.v(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Gr(a,b))yield Hr(a,e,b,c,d);else{var f=a.Aa;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Fi(f),a.j))return;var g=a.keySystem(),h=a.f.Ka[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.rk([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.bb;Zq(g)&&(k.headers[_.ua]=zc);k.licenseRequestType=b.messageType===
|
|
289
|
+
ge&&d.Ac?fe:b.messageType;k.sessionId=c.sessionId;if(k.licenseRequestType===fe)a.D.onEvent(new _.H(Hd));Pq(a.a.keySystem)&&Ir(a,k);Gp(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield Jr(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Hp(a.M,f),yield Kr(a,c,f.data,d,h))h=Fr(a),a.D.onEvent(new _.H(_.Kd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.tc&&d.tc.resolve(),d.Ac&&(h=d.Ac,a.g.info(`Closing expired session '${h.sessionId}'`),Oq(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
|
|
290
|
+
(h=a.h.get(d.Ac))&&h.Uc&&h.Uc.stop(),a.h.delete(d.Ac),d.Ac=null),(new _.Ii(()=>{a.j||(d.loaded=!0,d.qb&&d.qb.resolve(),Cr(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve()))})).la(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.pi(g,_.pd)||_.pi(g,_.rd)))&&(h=new _.Ii(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),Pq(g)?qr(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.pd)&&c.update(_.mi("renew")))}),d.Uc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
|
|
291
|
+
Gr=function(a,b){a=a.keySystem();return Zq(a)&&b.message&&2===b.message.byteLength};Hr=function(a,b,c,d,e){return _.v(function*(){var f=_.rk([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.bb;f.licenseRequestType=Xc;f.sessionId=d.sessionId;f.headers[_.ua]=zc;(f=yield Lr(a,f,e,b,d.sessionId,c.messageType))&&(yield Kr(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
|
|
292
|
+
Ir=function(a,b){var c=ki(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.mg).textContent;b.body=_.Ol(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[_.ua]="text/xml; charset\x3dutf-8"};
|
|
293
|
+
Jr=function(a,b,c,d,e,f,g,h){return _.v(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield Mr(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.H(Gd,{delay:h}));var k=Date.now();_.km(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.Bb.fetch(b).V}catch(p){if(a.j)return null;l=p.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:p.data.url,status:p.data.status,response:p.data.response},
|
|
294
|
+
l?{headers:l}:{},kq(l));l=new _.I(_.D,6,6007,l,p);Nr(a,l,c);return null}_.km(`drm.license.req.${d}.end`);_.mm(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=mq(l.headers);m&&(a.Aa=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
|
|
295
|
+
Kr=function(a,b,c,d,e){return _.v(function*(){_.km(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===ob)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.D,6,6008,{browserError:f.message});Nr(a,g,d);return!1}_.km(`drm.sess.update.${e}.end`);_.mm(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
|
|
296
|
+
Lr=function(a,b,c,d,e,f){return _.v(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield Mr(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.Bb.fetch(b).V}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Aa,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},kq(h));h=new _.I(_.D,6,6100,h,m);Nr(a,h,c);return null}g=Date.now()-g;const k=mq(h.headers);
|
|
283
297
|
let l="";k&&k.requestId&&(l=` RID:${k.requestId}`);a.g.info("WV Server certificate response for "+`SID:'${e}' `+`${h.data.byteLength} bytes `+`in ${g}ms${l}`);return a.j?null:h})};
|
|
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
|
-
a.
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
()
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
_.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
st=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};tt=function(a,b,c){return new window.TextTrackCue(a,b,c)};ut=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};wt=function(a,b,c){if("input"===a)switch(this.type){case "range":a=$c}vt.call(this,a,b,c)};_.xt=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};
|
|
339
|
-
_.zt=function(a,b){a=_.Tm(_.Um(a),_.Vm(a));_.yt[a]=b};_.At=function(a){a=_.Tm(_.Um(a),_.Vm(a));return _.yt[a]||null};_.Bt=function(a){a=_.Tm(_.Um(a),_.Vm(a));delete _.yt[a]};_.Gt=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Ct:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Dt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Et:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Ft:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.He}};
|
|
340
|
-
_.It=function(a,b,c,d){return _.w(function*(){try{return new (yield Ht(a,b,c,d))}catch(e){throw e.a(_.D),e;}})};
|
|
341
|
-
Ht=function(a,b,c,d){return _.w(function*(){if(d){var e=_.Jt[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Qm(a)){const f=_.Kt[e];if(f)return f;_.B("Could not determine manifest type for extension ",e)}else _.B("Could not find extension for ",a);if(!d&&(d=yield Lt(a,b,c))){if(e=_.Jt[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.I(_.D,4,4E3,{url:a});})};
|
|
342
|
-
Lt=function(a,b,c){return _.w(function*(){var d=_.vk(a);sk(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).V).headers["content-type"])?d.toLowerCase():""})};_.Ug=[];Yg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Zg=typeof Object.defineProperties==_.be?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
|
343
|
-
$g("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=Yg.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
|
|
344
|
-
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Ie:var h=null!=g;break a;case _.be:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
345
|
-
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.be?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
|
|
346
|
-
g.ke(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,u){return typeof p==_.be?function(v){try{l(p(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.ke(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.ke=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
|
|
347
|
-
l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Xg(g),m=l.next();!m.done;m=l.next())d(m.value).ke(h,k)})};b.all=function(g){var h=Xg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).ke(n(p.length-1),m),k=h.next();while(!k.done)})};return b});var bh=this||self;
|
|
348
|
-
bh.a=!0;_.x("clpp.utils.obj.cloneItem",_.eh);_.x("clpp.utils.obj.merge",_.dh);var uh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",uh);var sh=0,rh={},Mt=[];_.x("clpp.log.getLoggers",function(){return _.eh(rh)});_.x("clpp.log.addInterceptor",function(a){a&&Mt.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=Mt.indexOf(a),0<=a&&Mt.splice(a,1))});_.x("clpp.log.getTagLevel",th);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=rh[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.kh(b)&&(b=vh(b)),rh[a]=b)});
|
|
349
|
-
_.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.kh(a)&&(a=vh(a));sh=a});_.x("clpp.log.getLogLevel",function(){return sh});
|
|
350
|
-
_.T=class{constructor(a){(this.tag=a)&&void 0===rh[a]&&(rh[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=th(this.tag);if(0<=d){if(d<c)return}else if(sh<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,
|
|
351
|
-
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Mt)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}Jh(a){return a?
|
|
352
|
-
this.tag?new _.T(this.tag+"."+a):new _.T(a):this}};_.x("clpp.log.Logger",_.T);_.T.prototype.createChild=_.T.prototype.Jh;_.T.prototype.error=_.T.prototype.error;_.T.prototype.warn=_.T.prototype.warn;_.T.prototype.debug=_.T.prototype.debug;_.T.prototype.info=_.T.prototype.info;_.T.prototype.log=_.T.prototype.log;var wh=new _.T("clpp");_.x("clpp.log.info",_.xh);_.x("clpp.log.debug",_.yh);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.zh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var bo;bo=class{constructor(a,b){this.ob=a;this.sourceIndex=b}};_.Bh=new _.T("clpp.players");_.Ah={};_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Fh=new _.T("clpp.ads"),Eh=[];_.Nt=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(vb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(vb);}Vb(){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)}Na(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
|
|
353
|
-
1)}oc(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Oa(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Na(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
|
|
354
|
-
"";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.x("clpp.BufferInfo",_.Nt);_.Nt.prototype.bufferedAheadOf=_.Nt.prototype.Oa;_.Nt.prototype.isBuffered=_.Nt.prototype.oc;_.Nt.prototype.bufferEnd=_.Nt.prototype.Na;_.Nt.prototype.bufferStart=_.Nt.prototype.Vb;_.Nt.prototype.end=_.Nt.prototype.end;_.Nt.prototype.start=_.Nt.prototype.start;var Kh;Kh=new _.T("clpp.Components");_.Ih=new Map;_.x("clpp.install",function(a){Th(a)});_.x("clpp.uninstall",function(a){Uh(a)});_.I=class extends Error{constructor(a,b,c,d,e){super(Vh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.kh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.I)}a(a){this.severity!==a&&(this.severity=a,this.message=Vh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.I);_.D=2;_.I.Severity={RECOVERABLE:1,FATAL:_.D};
|
|
298
|
+
Mr=function(a,b,c){return _.v(function*(){const d=a.D.getConfiguration();yield vr(a,d);const e=a.keySystem();var f=a.f.Ka[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.pd)&&b.requestModifiers.push(k=>_.eq(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.pd)&&b.responseModifiers.push(k=>_.fq(k))})};Nr=function(a,b,c){a.j||(a.w(b),c.tc&&c.tc.reject(b),c.qb&&c.qb.reject(b))};
|
|
299
|
+
_.Qr=function(a,b){a&&b&&(_.Or.set(a,b),_.Pr.info(`Registered TextDisplayerFactory: '${a}'`))};_.Rr=function(a,b){b=b.find(c=>(c=_.Or.get(c))?c.a(a):!1);if(null==b)return _.Pr.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Pr.info(`Chosen the text displayer: ${b}`);return _.Or.get(b)};
|
|
300
|
+
_.Sr=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};Tr=function(a,b){let c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(const d of a.f)c+=d.state===b?d.duration:0;return c};Ur=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};
|
|
301
|
+
Vr=function(a){return a.a.map(b=>_.Zg(b))};_.Wr=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:[]}};
|
|
302
|
+
Yr=function(a,b){if(a.w)throw new _.I(_.D,7,7E3);a.a||(a.h.on(b,_.Sd,()=>{{const c=Xr(a);if(c)a.onError(c)}}),a.h.on(b,_.vf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.H(_.Lc,{detail:{width:c,height:d}}))}),a.a=b)};$r=function(a){const b=_.Vi()?fa:void 0;return new _.Zr(a,b)};
|
|
303
|
+
as=function(a){return _.v(function*(){if(a.w)return Promise.reject(new _.I(_.D,7,7E3));var b=a.ha[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.$m(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=$r({Bb:c,onError:d=>a.onError(d),jf:()=>{},hf:(d,e)=>{a.trigger(new _.H(_.Fd,{expirationTime:e}))},onEvent:d=>{d instanceof _.H?a.dispatchEvent(d):
|
|
304
|
+
a.log.debug(_.xb,d.type)},getConfiguration:()=>a.getConfiguration(),Zc:()=>a.Zc()});a.o.f=b;yield _.kr(a.o,[{id:0,language:_.fg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,Ja:0,mimeType:_.rg,codecs:"",encrypted:!0,keyId:null,language:_.fg,originalLanguage:_.fg,label:null,type:_.t,primary:!1,frameRate:void 0,
|
|
305
|
+
Hj:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,tj:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Br(a.o,a.a)})};bs=function(a,b){rq(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.ko&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
|
|
306
|
+
Xr=function(a){if(null===a.ha||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.I(_.D,3,3016,{code:b,Cj:c,message:a.a.error.message})};
|
|
307
|
+
ds=function(a){if(a.w)return new _.cs(Promise.reject(new _.I(_.D,7,7E3)),()=>{});const b=a.ha[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&bs(a,c);if(d.preload!==_.Be)a.h.one(d,_.me,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Mi()||_.Pi())&&d.load();const f=new _.wl;a.h.one(d,Jf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Ii(()=>{f.reject(new _.I(_.D,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
|
|
308
|
+
uri:b.url},d.error))})).la(g))});rq(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(Xr(a)):d.preload===_.Be&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.Sd,()=>{f.reject(Xr(a))});return new _.cs(f,
|
|
309
|
+
()=>{const g=new _.I(_.D,7,7001);f.reject(g);return Promise.resolve()})};es=function(a,b){rq(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.ko){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
|
|
310
|
+
fs=function(a,b){let c=!1;a.h.on(b,_.Df,()=>{c=b.paused});a.h.on(b,_.Cf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};gs=function(a){a.J.forEach(b=>b());a.J=[]};
|
|
311
|
+
js=function(a,b){return _.v(function*(){try{_.km(af);a.M=_.ab;a.Z=!1;const c=b.slice(1).map(d=>({config:d,ha:_.Um(d)}));yield _.Xn(a,b[0]);c.forEach(d=>{hs(a,d.config,d.ha)});a.trigger(new _.H(ne));yield a.a.setupPlaylist(b);yield _.$n(a);c.forEach(d=>{is(a,d.config,d.ha)});_.km($e);_.mm("player.setupPlaylist",af,$e)}catch(c){if(a.l)throw a.g.info(Ma),new _.I(_.D,7,7E3);throw c;}})};
|
|
312
|
+
ks=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.yf,c);a.J.push(()=>{a.removeEventListener(_.yf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.ag,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.H(_.xf)),a.pause())};a.addEventListener(_.ag,e);a.J.push(()=>{a.removeEventListener(_.ag,e)})}};
|
|
313
|
+
ls=function(a,b){return _.v(function*(){try{_.km(Ve);const c=_.Um(b);hs(a,b,c);yield a.a.appendLoad(b);is(a,b,c);_.km(Ue);_.mm("player.appendLoad",Ve,Ue)}catch(c){if(a.l)throw a.g.info(Ma),new _.I(_.D,7,7E3,{id:b.id});throw c;}})};
|
|
314
|
+
hs=function(a,b,c){if(0===c.length)throw new _.I(_.D,7,7003,{message:Va,id:b.id});if(1<c.length)throw new _.I(_.D,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.I(_.D,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};is=function(a,b,c){Nn(a,{configuration:b,ha:c,drmInfo:a.getDrmInfo(),Og:Object.keys(a.K),isLive:c[0].isLive})};
|
|
315
|
+
ms=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(dd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Ad);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new S(d,b)})};
|
|
316
|
+
ns=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(ed)):(a.g.info(`Hide video element .${b}`),d.classList.remove(ed)),a.w&&a.w(d,c))};qs=function(a,b){return _.v(function*(){const c=yield a.o.get();a.f=b;b.role=os;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();ns(a,c,!0);yield c.open(b.config);ps(a,b);b.config.autoplay||(yield c.play())})};
|
|
317
|
+
xs=function(a){_.v(function*(){if(0===a.a)yield rs(a);else if(a.a===a.h.length-1)yield ss(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>ts(a,c)))}})};
|
|
318
|
+
ys=function(a,b){return _.v(function*(){if(b.player){if(b.state===kf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=os;ns(a,b.player,!0);b.state===jf?(_.km(ff),a.ka.preloadMedia?yield b.player.play():yield ao(b.player),_.km(ef),_.mm("playlist.next",ff,ef)):b.state===hf&&(yield b.player.open(b.config));ps(a,b);b.config.autoplay||(yield b.player.play())}})};
|
|
319
|
+
Bs=function(a,b){return _.v(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();ns(a,b.player,!1);yield zs(a,b);b.player=null;b.videoEl=null;b.role=As})};Ds=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Cs(a,b)))};Es=function(a){return _.v(function*(){yield a.o.destroy();const b=document.getElementById(a.ka.anchorId);b&&(b.classList.remove(dd),b.innerHTML="")})};
|
|
320
|
+
Cs=function(a,b){return _.v(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield zs(a,c)),a.l.delete(b))})};zs=function(a,b){return _.v(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};ps=function(a,b){if(a.ka.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Mg()};b.player.on(_.Rd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Rd,c)})}};
|
|
321
|
+
ts=function(a,b){return _.v(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=As;d.state=kf;a.trigger(new _.H(hg));try{a.l.set(b,d),a.ka.preloadMedia?(d.config.autoplay&&(a.g.warn(ma+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.open(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=jf,a.trigger(new _.H(hg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=gf):
|
|
322
|
+
(a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.H(_.Sd,{detail:e})),d.state=hf),a.trigger(new _.H(hg))}})};rs=function(a){return _.v(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield ts(a,b)})};ss=function(a){return _.v(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield ts(a,b)})};
|
|
323
|
+
_.Gs=function(a){if(Fs.has(a))return Fs.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Fs.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Fs.set(a,b),b):!1};Hs=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.q&&(b=b.replace(_.t,_.q));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
|
|
324
|
+
_.Is=function(a,b){return void 0===a?b:null===a?null:typeof a===_.Of?_.oq(a):a};
|
|
325
|
+
_.Zm=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0;const e=b?b.widevineAudioRobustness:void 0,f=b?b.serverCertificate:void 0;let g=a.f[_.td];g&&(c[_.td]={licenseUrl:g.licenseUrl,videoRobustness:xm(d,g.videoRobustness),audioRobustness:xm(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:wm(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:wm(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,
|
|
326
|
+
!1),serverCertificate:_.Is(f,g.serverCertificate)});(g=a.f[_.pd])&&(c[_.pd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.rd])&&(c[_.rd]={licenseUrl:g.licenseUrl,videoRobustness:d||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
|
|
327
|
+
Ms=function(a,b){b=gq(b);switch(a){case _.td:return b+Js;case _.rd:return b+Ks;case _.pd:return b+Ls;default:throw new _.gl(`Cannot infer DRMtoday license URL for key system: ${a}`);}};
|
|
328
|
+
_.Ns=function(a,b,c){{b=Yp(b);b=new _.Zp(_.hq(b));const e=_.Am(b.f);if(a&&a.drm&&a.drm.customData){var d=a.drm.customData;a=d.assetId;d=d.variantId;a&&_.ri(`${a}`)&&(e.assetId=a,_.lq.debug("Using assetId from the configuration instead of the value from the HLS manifest."));d&&_.ri(`${d}`)&&(e.variantId=d,_.lq.info("Using variantId from the configuration instead of the value from the HLS manifest."))}e.keyId?(a=["keyId"],_.lq.debug("KeyId found in FPS SKD. Removing other parameters")):a=["assetId",
|
|
329
|
+
"variantId"];b.f=_.zm(e,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.ym(b)}return(c&&c.customData?c.customData:{}).fpsContentId=b};_.Ps=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c?c.customData&&(_.iq(b,a),a=a.drm,(void 0===d||d)&&a&&a.customData&&(c=a.customData.assetId))&&(d=b.uris[0],d+="?assetId\x3d"+encodeURIComponent(`${c}`),(a=a.customData.variantId)&&(d+="\x26variantId\x3d"+encodeURIComponent(`${a}`)),b.uris[0]=d):_.Os.warn(Ta)};
|
|
330
|
+
Qs=function(a,b,c){_.Ps(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.fm(b.uris[0]);c.a.searchParams.set(_.Oe,a.toString());b.uris[0]=c.toString()};Rs=function(a,b,c){_.Ps(a,b,c,!1);b.headers[_.ua]=_.Cc;a={spc:_.Ml(b.body)};b.body=_.oi(_.zm(a,!0))};_.Ss=function(a,b){200===b.status&&(a=_.ii(b.data).trim(),a.startsWith("\x3cckc\x3e")&&a.endsWith("\x3c/ckc\x3e")&&(a=a.slice(5,-6)),a=_.Ol(a).buffer,b.data=a)};
|
|
331
|
+
Ts=function(a,b){a=a.drm;if(!a)_.Os.warn(Ta);else if(a.customData&&a.customData.merchant){const c=new _.fm(b.uris[0]);let d=c.a.pathname;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.a.pathname=d;b.uris[0]=c.toString()}};
|
|
332
|
+
_.Us=function(a,b){try{const d=_.G(b.data),e=JSON.parse(String.fromCharCode.apply(null,d));_.lq.debug("Widevine License response",e);const f=atob(e.license),g=new Uint8Array(f.length);for(a=0;a<f.length;++a)g[a]=f.charCodeAt(a);var c=g.buffer}catch(d){_.lq.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data"),c=null}c&&(b.data=c)};
|
|
333
|
+
Zs=function(a){switch(a){case "DRMtoday":return Vs;case "DRMtoday_STAGING":return Ws;case "DRMtoday_DEMO":return Xs;case "DRMtoday_TEST":return Ys;default:return null}};$s=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Wd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};
|
|
334
|
+
at=function(a){a=a.target;if(a.webkitPresentationMode===Qe){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)};bt=function(){return this.webkitSupportsPresentationMode(Qe)?(this.webkitSetPresentationMode(Qe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};
|
|
335
|
+
ct=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};dt=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};et=function(a,b,c){return new window.TextTrackCue(a,b,c)};
|
|
336
|
+
ft=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};ht=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Yc}gt.call(this,a,b,c)};_.it=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.kt=function(a,b){a=_.Im(_.Jm(a),_.Km(a));_.jt[a]=b};_.lt=function(a){a=_.Im(_.Jm(a),_.Km(a));return _.jt[a]||null};_.mt=function(a){a=_.Im(_.Jm(a),_.Km(a));delete _.jt[a]};
|
|
337
|
+
_.rt=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case nt:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case ot:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case pt:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case qt:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Be}};_.tt=function(a,b,c,d){return _.v(function*(){try{return new (yield st(a,b,c,d))}catch(e){throw e.a(_.D),e;}})};
|
|
338
|
+
st=function(a,b,c,d){return _.v(function*(){if(d){var e=_.ut[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Fm(a)){const f=_.vt[e];if(f)return f;_.B("Could not determine manifest type for extension ",e)}else _.B("Could not find extension for ",a);if(!d&&(d=yield wt(a,b,c))){if(e=_.ut[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.I(_.D,4,4E3,{url:a});})};
|
|
339
|
+
wt=function(a,b,c){return _.v(function*(){var d=_.rk(a);nk(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).V).headers["content-type"])?d.toLowerCase():""})};_.Og=[];Sg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Tg=typeof Object.defineProperties==_.Wd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
|
340
|
+
Ug("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=Sg.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
|
|
341
|
+
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Ce:var h=null!=g;break a;case _.Wd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
342
|
+
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Wd?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
|
|
343
|
+
g.he(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,u){return typeof p==_.Wd?function(x){try{l(p(x))}catch(y){m(y)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.he(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.he=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
|
|
344
|
+
l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Rg(g),m=l.next();!m.done;m=l.next())d(m.value).he(h,k)})};b.all=function(g){var h=Rg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(x){return function(y){p[x]=y;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).he(n(p.length-1),m),k=h.next();while(!k.done)})};return b});var Wg=this||self;
|
|
345
|
+
Wg.a=!0;_.w("clpp.utils.obj.cloneItem",_.Zg);_.w("clpp.utils.obj.merge",_.Yg);var oh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.w("clpp.log.Level",oh);var mh=0,lh={},xt=[];_.w("clpp.log.getLoggers",function(){return _.Zg(lh)});_.w("clpp.log.addInterceptor",function(a){a&&xt.push(a)});_.w("clpp.log.removeInterceptor",function(a){a&&(a=xt.indexOf(a),0<=a&&xt.splice(a,1))});_.w("clpp.log.getTagLevel",nh);_.w("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=lh[a]});_.w("clpp.log.setTagLevel",function(a,b){a&&(_.eh(b)&&(b=ph(b)),lh[a]=b)});
|
|
346
|
+
_.w("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.eh(a)&&(a=ph(a));mh=a});_.w("clpp.log.getLogLevel",function(){return mh});
|
|
347
|
+
_.T=class{constructor(a){(this.tag=a)&&void 0===lh[a]&&(lh[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=nh(this.tag);if(0<=d){if(d<c)return}else if(mh<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,
|
|
348
|
+
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of xt)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}Gh(a){return a?
|
|
349
|
+
this.tag?new _.T(this.tag+"."+a):new _.T(a):this}};_.w("clpp.log.Logger",_.T);_.T.prototype.createChild=_.T.prototype.Gh;_.T.prototype.error=_.T.prototype.error;_.T.prototype.warn=_.T.prototype.warn;_.T.prototype.debug=_.T.prototype.debug;_.T.prototype.info=_.T.prototype.info;_.T.prototype.log=_.T.prototype.log;var qh=new _.T("clpp");_.w("clpp.log.info",_.rh);_.w("clpp.log.debug",_.sh);_.w("clpp.log.warn",_.B);_.w("clpp.log.error",_.th);var Rn;Rn=class{constructor(a,b){this.nb=a;this.sourceIndex=b}};_.vh=new _.T("clpp.players");_.uh={};_.w("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.w("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.w("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var zh=new _.T("clpp.ads"),yh=[];_.yt=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(sb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(sb);}Vb(){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)}Ma(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
|
|
350
|
+
1)}mc(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Na(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Ma(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
|
|
351
|
+
"";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.w("clpp.BufferInfo",_.yt);_.yt.prototype.bufferedAheadOf=_.yt.prototype.Na;_.yt.prototype.isBuffered=_.yt.prototype.mc;_.yt.prototype.bufferEnd=_.yt.prototype.Ma;_.yt.prototype.bufferStart=_.yt.prototype.Vb;_.yt.prototype.end=_.yt.prototype.end;_.yt.prototype.start=_.yt.prototype.start;var Eh;Eh=new _.T("clpp.Components");_.Ch=new Map;_.w("clpp.install",function(a){Oh(a)});_.w("clpp.uninstall",function(a){Ph(a)});_.I=class extends Error{constructor(a,b,c,d,e){super(Qh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.eh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.I)}a(a){this.severity!==a&&(this.severity=a,this.message=Qh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.w("clpp.Error",_.I);_.D=2;_.I.Severity={RECOVERABLE:1,FATAL:_.D};
|
|
355
352
|
_.I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
|
|
356
353
|
_.I.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,MALFORMED_URL:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
|
|
357
354
|
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,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
|
|
@@ -361,70 +358,95 @@ SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID
|
|
|
361
358
|
NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,
|
|
362
359
|
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,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,
|
|
363
360
|
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,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,
|
|
364
|
-
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,SESSIONS_INVALID_CONFIGURATION:15E3};_.
|
|
365
|
-
_.
|
|
366
|
-
_.
|
|
367
|
-
_.
|
|
368
|
-
_.
|
|
369
|
-
_.
|
|
370
|
-
_.
|
|
371
|
-
_.
|
|
372
|
-
|
|
373
|
-
U.prototype.
|
|
374
|
-
U.prototype.
|
|
375
|
-
|
|
376
|
-
J.prototype.
|
|
377
|
-
J.prototype.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
_.
|
|
381
|
-
|
|
382
|
-
var Ki=null,Ji=null,aj=new _.T(pd),ej="android",dj="ios",jj="linux",fj="osx",gj="windows",hj="tizen",ij="webos",cj=_.mg,kj=_.mg,Vi={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,
|
|
361
|
+
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,SESSIONS_INVALID_CONFIGURATION:15E3};_.gl=class extends Error{constructor(a,b){super(a);this.code=b}};_.H=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.stopped=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.stopped=!0}stopPropagation(){}};_.zt=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var At;_.Bt=class{constructor(){this.a=new _.zt}release(){_.Sh(this)}on(a,b,c,d=!1){a=new At(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!==a||c!==f.a&&c||(Rh(f),this.a.remove(b,f))}}};At=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var Ct=class{constructor(a,b,c,d){this.h=a;this.a=b;this.f=c;this.j=!!d}trigger(a){try{this.a.handleEvent?this.a.handleEvent(a):this.a.call(this.f,a)}catch(b){_.th("clpp","Uncaught exception in event handler for event '"+this.h+"'",b,b?b.message:null,b?b.stack:null)}}};var Dt=class{constructor(a){this.a=new _.zt;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].trigger(a),b[c].j&&this.a.remove(a.type,b[c]),!a||!a.stopped);c++);}on(a,b,c){this.a.push(a,new Ct(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Ct(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].a===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};_.Et=class{constructor(){this.Cd=new Dt(this);this.yd=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Cd.on(a,b,c)}one(a,b,c){return this.Cd.one(a,b,c)}off(a,b){return this.Cd.off(a,b)}forwardEventsTo(a){a&&(0<=this.yd.indexOf(a)||this.yd.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.yd.indexOf(a),0<=a&&this.yd.splice(a,1))}trigger(a){this.Cd.trigger(a);for(const b of this.yd)b.dispatchEvent(a)}};
|
|
362
|
+
_.Et.prototype.off=_.Et.prototype.off;_.Et.prototype.one=_.Et.prototype.one;_.Et.prototype.on=_.Et.prototype.on;_.Et.prototype.removeEventListener=_.Et.prototype.removeEventListener;_.Et.prototype.addEventListener=_.Et.prototype.addEventListener;var Ft=class{load(){}j(){}A(){}resume(){}pause(){}ib(){}isPaused(){}skip(){}getVolume(){}getAdVolume(){}setVolume(){}h(){}setMuted(){}isMuted(){}pb(){}getPosition(){}o(){}w(){}};_.w("clpp.ads.IAdsManager",Ft);Ft.prototype.getPosition=Ft.prototype.getPosition;Ft.prototype.setVolume=Ft.prototype.setVolume;Ft.prototype.getVolume=Ft.prototype.getVolume;Ft.prototype.skip=Ft.prototype.skip;Ft.prototype.pause=Ft.prototype.pause;Ft.prototype.resume=Ft.prototype.resume;_.w("clpp.events.ERROR",_.Sd);_.w("clpp.events.LOADEDMETADATA",_.me);_.w("clpp.events.BUFFERING_ENDED",_.Nc);_.w("clpp.events.BUFFERING_STARTED",_.Oc);_.w("clpp.events.STATE_CHANGED",_.Lf);_.w("clpp.events.AUDIO_TRACK_CHANGED",_.Jc);_.w("clpp.events.TEXT_TRACK_CHANGED",_.Wf);_.w("clpp.events.VIDEO_TRACK_CHANGED",_.tg);_.w("clpp.events.BITRATE_CHANGED",_.Lc);_.w("clpp.events.TRACKS_ADDED",_.bg);_.w("clpp.events.TRACKS_REMOVED","tracksremoved");_.w("clpp.events.LOAD_START",ne);
|
|
363
|
+
_.w("clpp.events.RELEASING",_.sf);_.w("clpp.events.RELEASED",rf);_.w("clpp.events.DESTROYING","destroying");_.w("clpp.events.DESTROYED","destroyed");_.w("clpp.events.VIDEO_BUFFER_CHANGED",_.sg);_.w("clpp.events.AUDIO_BUFFER_CHANGED",_.Ic);_.w("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.w("clpp.events.DRM_SESSION_CREATED",Id);_.w("clpp.events.DRM_SESSION_UPDATE",_.Kd);_.w("clpp.events.DRM_SESSION_PERSISTED",_.Jd);_.w("clpp.events.DRM_RENEWAL_STARTED",Hd);
|
|
364
|
+
_.w("clpp.events.DRM_EXPIRATION_UPDATE",_.Fd);_.w("clpp.events.DRM_LICENSE_REQUESTED",Gd);_.w("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Kc);_.w("clpp.events.PLAY",_.Re);_.w("clpp.events.SEEKING",_.Df);_.w("clpp.events.SEEKED",_.Cf);_.w("clpp.events.USER_SEEKING",_.lg);_.w("clpp.events.USER_SEEKED",_.kg);_.mo={SEEKING:1,NO_DATA:2};_.w("clpp.events.BufferingReasons",_.mo);_.w("clpp.events.ADS_TIMELINE_CHANGED",_.oc);_.w("clpp.events.AD_LOADED",_.bc);_.w("clpp.events.AD_BREAK_STARTED",_.Sb);
|
|
365
|
+
_.w("clpp.events.AD_STARTED",_.kc);_.w("clpp.events.AD_BUFFERING",_.Ub);_.w("clpp.events.AD_PROGRESS",_.ec);_.w("clpp.events.AD_FIRST_QUARTILE",_.Xb);_.w("clpp.events.AD_MIDPOINT",_.cc);_.w("clpp.events.AD_THIRD_QUARTILE",_.mc);_.w("clpp.events.AD_PAUSED",_.dc);_.w("clpp.events.AD_RESUMED",_.hc);_.w("clpp.events.AD_SKIPPED",_.jc);_.w("clpp.events.AD_CLICKED",_.Vb);_.w("clpp.events.AD_IMPRESSION",_.ac);_.w("clpp.events.AD_COMPLETED",_.Wb);_.w("clpp.events.AD_STOPPED",_.lc);
|
|
366
|
+
_.w("clpp.events.AD_BREAK_STOPPED",_.Tb);_.w("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Yb);_.w("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Zb);_.w("clpp.events.AD_HLS_RESOLVED",$b);_.w("clpp.events.SIMID_CREATIVE_STARTED",_.Ff);_.w("clpp.events.SIMID_CREATIVE_STOPPED",_.Gf);_.w("clpp.events.CASTING_STARTED",_.Rc);_.w("clpp.events.CASTING_ENDED","castingended");_.w("clpp.events.CAST_STATUS_CHANGED",_.Sc);_.w("clpp.events.CAST_VISIBILITY_CHANGED",_.Tc);_.w("clpp.events.AIRPLAY_STATUS_CHANGED",_.rc);
|
|
367
|
+
_.w("clpp.events.AIRPLAY_CASTING_STARTED",_.qc);_.w("clpp.events.AIRPLAY_CASTING_ENDED",_.pc);_.w("clpp.events.TIMELINE_CUE_ADDED",_.Xf);_.w("clpp.events.TIMELINE_CUE_ENTER",_.Yf);_.w("clpp.events.TIMELINE_CUE_EXIT",_.Zf);_.w("clpp.events.TIMELINE_CUES_CHANGED",_.$f);_.w("clpp.events.MPD_TYPE_CHANGED",_.ze);_.w("clpp.events.LIVE_TURNED_STATIC",_.je);_.w("clpp.events.VIMOND_RESPONSE",_.xg);_.w("clpp.events.PLAYLIST_ITEM_CHANGED",_.cf);_.w("clpp.events.PLAYLIST_MODIFIED",_.df);
|
|
368
|
+
_.w("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Af);_.w("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.yf);_.w("clpp.events.SC_PLAYLIST_ENDED",_.xf);_.w("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.zf);_.w("clpp.events.CDN_SWITCH_SUCCESS",_.Uc);_.w("clpp.events.ONLINE_STATUS_CHANGED",Je);_.w("clpp.events.CMSD_EVENT","cmsd-event");_.w("clpp.events.YOSPACE_SESSION_STARTED",_.Mg);_.w("clpp.events.YOSPACE_SESSION_ENDED",_.Lg);var U=class{cb(){}eb(){}gb(){}getId(){}getCreativeId(){}yb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Ab(){}Pa(){}getMediaUrl(){}Ta(){}Sa(){}Ba(){}Ca(){}getPodIndex(){}ob(){}fb(){}Ua(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}zb(){}canSeek(){}};_.w("clpp.ads.IAd",U);U.prototype.canSeek=U.prototype.canSeek;U.prototype.getVideoElement=U.prototype.zb;U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;
|
|
369
|
+
U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;U.prototype.getSequenceLength=U.prototype.Ua;U.prototype.getPositionInSequence=U.prototype.fb;U.prototype.getPodTimeOffset=U.prototype.ob;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Ca;U.prototype.getMediaBitrate=U.prototype.Ba;U.prototype.getMediaHeight=U.prototype.Sa;U.prototype.getMediaWidth=U.prototype.Ta;U.prototype.getMediaUrl=U.prototype.getMediaUrl;
|
|
370
|
+
U.prototype.getClickThroughUrl=U.prototype.Pa;U.prototype.isBumper=U.prototype.Ab;U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;U.prototype.getPosition=U.prototype.getPosition;U.prototype.getDuration=U.prototype.getDuration;U.prototype.getTitle=U.prototype.getTitle;U.prototype.getAdvertiserName=U.prototype.getAdvertiserName;U.prototype.getAdSystem=U.prototype.getAdSystem;U.prototype.getApiFramework=U.prototype.getApiFramework;U.prototype.getSourceId=U.prototype.yb;
|
|
371
|
+
U.prototype.getCreativeId=U.prototype.getCreativeId;U.prototype.getId=U.prototype.getId;U.prototype.getTechnology=U.prototype.gb;U.prototype.getAdManagerVersion=U.prototype.eb;U.prototype.getAdManagerName=U.prototype.cb;var J=class{constructor(a,b,c,d,e,f,g){this.o=this.l=this.j=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.w=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}cb(){return""}eb(){return""}gb(){return 2}getId(){return this.B}getCreativeId(){return""}yb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}setPosition(a){this.w=a}getPosition(){return this.w}getSkipTimeOffset(){return-1}canSeek(){return this.A}Ab(){return!1}Pa(){return null}getMediaUrl(){return null}Ta(){return 0}Sa(){return 0}Ba(){return 0}Ca(){return this.F}getPodIndex(){return 0}ob(){return 0}fb(){return this.f}Ua(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}zb(){return this.videoEl}Yh(){return this.C}};
|
|
372
|
+
J.prototype.getCustomAttributes=J.prototype.Yh;J.prototype.getVideoElement=J.prototype.zb;J.prototype.getWrapperCreativeIds=J.prototype.getWrapperCreativeIds;J.prototype.getWrapperAdSystems=J.prototype.getWrapperAdSystems;J.prototype.getWrapperAdIds=J.prototype.getWrapperAdIds;J.prototype.getSequenceLength=J.prototype.Ua;J.prototype.getPositionInSequence=J.prototype.fb;J.prototype.getPodTimeOffset=J.prototype.ob;J.prototype.getPodIndex=J.prototype.getPodIndex;J.prototype.getPodType=J.prototype.Ca;
|
|
373
|
+
J.prototype.getMediaBitrate=J.prototype.Ba;J.prototype.getMediaHeight=J.prototype.Sa;J.prototype.getMediaWidth=J.prototype.Ta;J.prototype.getMediaUrl=J.prototype.getMediaUrl;J.prototype.getClickThroughUrl=J.prototype.Pa;J.prototype.isBumper=J.prototype.Ab;J.prototype.canSeek=J.prototype.canSeek;J.prototype.getSkipTimeOffset=J.prototype.getSkipTimeOffset;J.prototype.getPosition=J.prototype.getPosition;J.prototype.getDuration=J.prototype.getDuration;J.prototype.getTitle=J.prototype.getTitle;
|
|
374
|
+
J.prototype.getAdvertiserName=J.prototype.getAdvertiserName;J.prototype.getAdSystem=J.prototype.getAdSystem;J.prototype.getApiFramework=J.prototype.getApiFramework;J.prototype.getSourceId=J.prototype.yb;J.prototype.getCreativeId=J.prototype.getCreativeId;J.prototype.getId=J.prototype.getId;J.prototype.getTechnology=J.prototype.gb;J.prototype.getAdManagerVersion=J.prototype.eb;J.prototype.getAdManagerName=J.prototype.cb;var Gt=class{constructor(a){this.a=a.map(b=>({hc:b.getSurface().getMedia().id,player:b,ge:!0,ready:Promise.resolve()}));this.g=new _.T("clpp.playlist.PlayerPool")}has(){return this.a.some(a=>a.ge)}get(){const a=this;return _.v(function*(){const b=a.a.find(c=>c.ge);if(!b)throw Error("No available players in the pool");b.ge=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.ge=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
|
|
375
|
+
d)}).then(c)});return b.ready}destroy(){const a=this;return _.v(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Ht=class{};_.w("clpp.utils.BufferUtils",Ht);Ht.toArrayBuffer=gi;Ht.toDataView=_.fi;Ht.toInt32Array=_.ei;Ht.toUint32Array=di;Ht.toUint16Array=ci;Ht.toUint8Array=_.G;Ht.equal=ai;var ji=new _.T("clpp.utils.strings");_.w("clpp.utils.strings.fromUtf8",_.ii);_.w("clpp.utils.strings.fromBytesAutoDetect",_.li);_.w("clpp.utils.strings.toUtf8",_.mi);_.w("clpp.utils.strings.toUtf16",_.ni);_.w("clpp.utils.strings.toByteArray",_.oi);_.w("clpp.utils.strings.startsWith",_.pi);_.w("clpp.utils.strings.endsWith",_.qi);_.w("clpp.utils.strings.bitrateToString",_.ti);
|
|
376
|
+
_.w("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
|
|
377
|
+
_.w("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var vi=document.createElement("span");_.w("clpp.utils.dom.createHTMLElement",_.Bi);var It=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Ci(this,a)}get(){return this.a}};_.Jt=class{constructor(a){this.f=a;this.a=null}la(a){return Ei(this,a,!1)}Gb(a){return Ei(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Ii=class{constructor(a){this.f=a;this.a=null}Ff(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.Jt(()=>{this.f()})).la(a);return this}Gb(a){this.stop();this.a=(new _.Jt(()=>{this.f()})).Gb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.w("clpp.utils.Timer",_.Ii);_.Ii.prototype.stop=_.Ii.prototype.stop;_.Ii.prototype.tickEvery=_.Ii.prototype.Gb;_.Ii.prototype.tickAfter=_.Ii.prototype.la;_.Ii.prototype.tickNow=_.Ii.prototype.Ff;var Kt=class{};_.w(ld,Kt);Kt.getInfo=_.ij;
|
|
378
|
+
var Hi=null,Gi=null,Yi=new _.T(ld),bj="android",aj="ios",gj="linux",cj="osx",dj="windows",ej="tizen",fj="webos",$i=_.gg,hj=_.gg,Si={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,
|
|
383
379
|
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,
|
|
384
380
|
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},
|
|
385
|
-
webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var
|
|
386
|
-
HTMLMediaElement))throw new _.I(_.D,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.I(_.D,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.
|
|
387
|
-
a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.
|
|
388
|
-
|
|
389
|
-
this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.
|
|
390
|
-
|
|
391
|
-
a,_.
|
|
392
|
-
c.startTime)return
|
|
393
|
-
sideAdContainer:this.ka.sideAdContainer,onAudioDecision:this.ka.onAudioDecision,
|
|
394
|
-
{b.setVolume(a)})}isLive(){const a=this.
|
|
395
|
-
a.getVolume()||0:0}h(a){this.a.setVolume(a)}getPosition(){const a=
|
|
396
|
-
|
|
397
|
-
_.
|
|
398
|
-
"cs"],["dan","da"],["deu","de"],[_.
|
|
381
|
+
webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var mj=class{constructor(a,b){this.g=new _.T("clpp.PlayerSurface");this.w=_.Yg(Lt,b);this.f=new It;this.h=null;this.a=new It;this.l=Mt;Mt+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Bt;if(null==a)throw new _.I(_.D,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.I(_.D,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
|
|
382
|
+
HTMLMediaElement))throw new _.I(_.D,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.I(_.D,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Ad);a.parentNode?a.parentNode.replaceChild(c,
|
|
383
|
+
a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.zi(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Qf);for(d of[_.Hg,_.Xd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Mi()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Di(this.a,"clpp-container"),
|
|
384
|
+
Di(this.a,this.o),Di(this.f,_.$c),Di(this.f,"clpp-video"));b.webOSStartupPatch&&jj(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.zi(a,cd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(cd):
|
|
385
|
+
this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.zi(a,_.$c);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.zi(a,cd)}show(a){a.classList.remove(cd)}release(){this.j.release()}};
|
|
386
|
+
mj.prototype.removeElementFromContainer=mj.prototype.removeElementFromContainer;mj.prototype.addElementToContainer=mj.prototype.addElementToContainer;mj.prototype.getCastElement=mj.prototype.getCastElement;mj.prototype.getContainer=mj.prototype.getContainer;mj.prototype.getMedia=mj.prototype.getMedia;var Lt={disableContainer:!1,webOSStartupPatch:!1,crossorigin:"anonymous",containerEl:null},Mt=1;var Nt=class{constructor(a){this.ka=a;this.l=!!a.sideAdContainer;this.h=[];this.a=a.Pg;this.C=lj(a);this.A=[];const b=nj(this,this.C,this.ka.Ih);this.o=new Gt(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.T("clpp.interstitial.MultiController");this.ga=this.B=!1;this.G=a.Ci||(()=>{});qj(this).forEach(c=>rj(this,c,!1))}getCurrentItem(){return this.f}re(){return this.f?this.f.player:null}qg(){return Array.from(this.j.values())}Kd(){return 0<this.j.size}play(a){return Gj(this,
|
|
387
|
+
a,_.Re)}load(a){return Gj(this,a,_.ke)}release(){const a=this;return _.v(function*(){yield Promise.all([yield Nj(a),a.f?Dj(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.v(function*(){a.g.info("Destroy");yield a.release();yield a.o.destroy();ak(a)})}isMuted(){return this.B}},Xj="preload",Uj=_.oe,wj="primary",vj="ad";var lk=[403,401];_.w("clpp.net.DEFAULT_FATAL_STATUS_CODES",lk);_.w("clpp.net.makeRequest",_.rk);_.qk=6;_.w("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.qk,CONTENT_STEERING:7});var Ot=class extends _.Et{constructor(a){super();this.ka=_.Yg({Ki:.5},a);this.Ne=this.ga=!1;this.g=new _.T("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.ga)return!1;if(c=zk(this))return this.g.info("Seek ignored while binding interstitial",c.ea),!1;Ak(this,b);c=Bk(this);const d=Ck(this,b),e=Dk(this,b);if(c){if(d&&d!==c)return Gk(this,d,b),!1;if(e&&e!==c)return Hk(this,e,b),!1;if(b<c.startTime-this.ka.resolutionOffsetSec)return Ek(this,c),!0;if(b<
|
|
388
|
+
c.startTime)return Pj(this.X),this.g.info("Seek inside resolution area of",c.ea),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.ea),Sj(this.X),!1;if(c.bg)return this.g.info("Jump over a scheduled interstitial",c.ea),Rj(this.X),c.state=0,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.ea);Sj(this.X);Zj(this.X,b,!0);return!1}return d?(Gk(this,d,b),!1):e&&!e.Kh?(Hk(this,e,b),!1):!0});this.X=new Nt({Ih:this.ka.config,Pg:a.player,preloadMedia:!0,nb:a.nb,
|
|
389
|
+
sideAdContainer:this.ka.sideAdContainer,onAudioDecision:this.ka.onAudioDecision,Ci:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Pk(this,a.player)}destroy(){const a=this;return _.v(function*(){Qk(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.X.destroy()})}Qb(){return this.j}setMuted(a){var b=this.X;b.B=a;b.l?a?(b.a.setMuted(!0),Tj(b,!0)):(a=b.getCurrentItem(),uj(b,a,a&&a.Yb?vj:wj)):(b.a.setMuted(a),Tj(b,a))}isMuted(){return this.X.isMuted()}setVolume(a){qj(this.X).forEach(b=>
|
|
390
|
+
{b.setVolume(a)})}isLive(){const a=this.X.re();return a?a.isLive():null}};var Fn=class{constructor(){this.a=null}load(){return Promise.resolve()}j(){const a=Rk(this.a);return a?(a.play(),!1):!0}A(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,nb:b},d.ads.hls||{},{Ji:c});this.a=new Ot(a);Zk(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}pb(){return null!==Rk(this.a)}ib(){const a=Rk(this.a);a&&a.pause()}isPaused(){const a=Rk(this.a);return a?a.isPaused():!1}skip(){}getAdVolume(){const a=Rk(this.a);return a?
|
|
391
|
+
a.getVolume()||0:0}h(a){this.a.setVolume(a)}getPosition(){const a=Rk(this.a);return a?a.getPosition():-1}w(){return!this.a.Qb()}o(){return this.a.destroy()}setVolume(a){this.h(a)}getVolume(){return this.getAdVolume()}pause(){this.ib()}resume(){this.j()}};Fn.prototype.resume=Fn.prototype.resume;Fn.prototype.pause=Fn.prototype.pause;Fn.prototype.getVolume=Fn.prototype.getVolume;Fn.prototype.setVolume=Fn.prototype.setVolume;Fn.prototype.getPosition=Fn.prototype.getPosition;Fn.prototype.skip=Fn.prototype.skip;var Pt=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Bt;this.h=null;this.f=!0;ql(this)}release(){this.a.release();rl(this);this.m=null}};_.Qt=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.V.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.wl.prototype.resolve=function(){};_.wl.prototype.reject=function(){};var Rt;_.fm=class{constructor(a,b){{var c=[a];let f=xl(...c);if(!f||f.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(f=xl(...c))?c:null}if(!c)throw new _.I(_.D,1,1011,{message:"The provided URL is invalid.",url:a,base:b});const [d,e]=c;this.a=new URL(d,e);this.f=a.startsWith("//")}toString(){const a=this.a.toString();return this.f?a.replace(Rt,""):a}};Rt=/^[A-Za-z]+:/;var St=class{constructor(a){this.f=new Uint8Array(a);this.a=0}append(a){const b=this.a+a.byteLength;if(b>this.f.byteLength){const c=this.f;this.f=new Uint8Array(Math.max(2*this.f.byteLength,b));this.f.set(c)}this.f.set(a,this.a);this.a+=a.byteLength}get(){return this.a===this.f.byteLength?this.f.buffer:this.f.buffer.slice(0,this.a)}};var Tt=class{constructor(a){this.o=a;this.f=this.a=this.h=0;this.j=null;this.l=-1}};var Dl=class{constructor(){this.a=Cl()}};var Jl=class{constructor(a,b){b=void 0===b?!0:b;this.a=new St(a||1048576);this.f=new Tt(this.a);this.j=b;this.h=a}};var Ut=class{};_.w("clpp.utils.Uint8ArrayUtils",Ut);Ut.toStandardBase64=_.Ml;Ut.concat=_.Sl;Ut.equal=_.Rl;Ut.toHex=_.Ql;Ut.fromHex=_.Pl;Ut.fromBase64=_.Ol;Ut.toBase64Url=_.Nl;_.cs=class{constructor(a,b){this.V=a;this.B=b;this.a=!1}abort(){this.a=!0;return this.B()}};var bm=class extends _.cs{constructor(a,b){super(new _.wl,()=>Promise.resolve());this.C=a;this.j=null;this.w=this.V;this.h=-1;this.f=this.l=this.o=null;this.A=b||null;Xl(this)}then(a,b){this.V=this.V.then(a,b);return this}catch(a){this.V=this.V.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.j.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.sn=class{constructor(){this.f=[];this.a=[];this.h=[];this.w=!1;this.o=new _.Qt;this.l={};this.headers=new Map;this.j=0;this.A=null;this.l.data=Ul;Zl(this)}Zi(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.j=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.f=[];this.a=[];this.h=[];return this.o.destroy()}Qf(a){this.f.push(a)}td(a){this.h.push(a)}Tg(a){this.f=this.f.filter(b=>b!==a)}Ge(a){this.h=this.h.filter(b=>b!==a)}fetch(a){let b=void 0;1===a.type&&(b={objectType:Vt});
|
|
392
|
+
return _.em(this,a,b)}};_.w("clpp.net.NetworkEngine",_.sn);_.sn.prototype.fetch=_.sn.prototype.fetch;_.sn.prototype.removeResponseModifier=_.sn.prototype.Ge;_.sn.prototype.removeRequestModifier=_.sn.prototype.Tg;_.sn.prototype.addResponseModifier=_.sn.prototype.td;_.sn.prototype.addRequestModifier=_.sn.prototype.Qf;_.sn.prototype.setRateLimit=_.sn.prototype.Zi;var gm=[];var jm=!!(performance&&performance.mark&&performance.measure),lm=new _.T("clpp.perf");_.w("clpp.version",_.ea);_.w("clpp.name",_.sa);var rn=null;_.w("clpp.configure",a=>{rn=a});_.kl="application/x-mpegurl";_.w("clpp.Type",{DASH:_.tc,HLS:_.kl,SMOOTH_STREAMING:_.Bc,MP4:_.rg,MP3:"audio/mp3"});_.w("clpp.TimelineCueType",{SCTE35:_.Bf,DASH_CALLBACK:_.Ae,HLS_DATERANGE:_.Zd,UNKNOWN:_.gg});_.w("clpp.SpeedUpMode",{DECODER:_.xd,SEEK:"seek"});_.w("clpp.CodecSwitchingStrategy",{PREVENT:_.lf,SMOOTH:_.If});var om=new Map,nm=1,sm=2,rm=3,qm=4;_.Zp=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
|
|
393
|
+
_.pi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.w("clpp.utils.url.queryString",_.zm);var Gm;_.K=_.Tf;_.Wt=1/15;Gm={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/]};Gm[_.K]=[/^vtt$/,/^wvtt/,/^stpp/];var Vt="m";var Xt=class{};_.w("clpp.utils.PlayerConfiguration",Xt);Xt.create=function(...a){return _.Qm(a,{Si:!1})};Xt.build=_.Qm;_.w("clpp.utils.media.detectType",Sm);var Vm=new _.T("clpp.sources");_.w("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.mb,SW_SECURE_DECODE:_.nb,HW_SECURE_CRYPTO:Ga,HW_SECURE_DECODE:Ha,HW_SECURE_ALL:Fa});_.w("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.w("clpp.drm.KeySystem",{NONE:_.Be,CLEAR_KEY:_.Le,WIDEVINE:_.td,PLAYREADY:_.rd,FAIRPLAY:_.pd,PRIMETIME:_.od});_.Xm={};_.w("clpp.drm.registerDrmEnvironment",_.Ym);var cn=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.ii(_.Ol(a)));this.a=JSON.parse(_.ii(_.Ol(b)));this.j=c}};var an={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 In=class{constructor(a){this.f=a;this.a=null;this.g=new _.T("clpp.utils.LicenseKey")}},qn="vod",pn="live";var un=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",
|
|
394
|
+
"cs"],["dan","da"],["deu","de"],[_.Ad,"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",
|
|
399
395
|
"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",
|
|
400
396
|
"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",
|
|
401
397
|
"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",
|
|
402
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var
|
|
403
|
-
|
|
404
|
-
this.j=new
|
|
405
|
-
this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of
|
|
406
|
-
b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.H(_.
|
|
407
|
-
this.l=
|
|
408
|
-
{this.
|
|
409
|
-
b.a;c.preload?yield c.preload(b.f):b.g.warn(
|
|
410
|
-
this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.
|
|
411
|
-
this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}
|
|
412
|
-
b){this.a&&this.a.setPlaybackRate(a,b)}setPlaybackRate(a,b){this.
|
|
413
|
-
this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.
|
|
414
|
-
S.prototype.getLoadedSource=S.prototype.getLoadedSource;S.prototype.getCurrentSource=S.prototype.
|
|
415
|
-
S.prototype.setPlaybackRate=S.prototype.setPlaybackRate;S.prototype.setRate=S.prototype.
|
|
398
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var bo,yn,Bn,zn;bo=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Cn(this);this.f.td(this.h);this.a=null}release(){this.a=null;this.f.Ge(this.h)}};_.Yt="maxSuggestedBitrateKbps";yn={du:"duress",etp:_.Td,mb:_.Yt,rd:"responseDelay",rtt:"roundTripTime"};Bn={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:ng};
|
|
399
|
+
zn=new _.T("clpp.net.CmsdManager");var S=class extends _.Et{constructor(a,b,c){super();hm();this.g=new _.T("clpp.Player");this.g.info("SDK version: 6.33.0-beta.1");if(!a)throw new _.I(_.D,7,7102);this.ca=new _.Bt;this.f=this.F=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 _.I(_.D,7,7101,"No license provided in configuration!");
|
|
400
|
+
this.j=new mj(a,c);this.G=this.B=this.a=this.I=null;this.A=new _.sn;$l(this.A,this.f);this.h=null;this.W=[];this.Z=!0;this.K={};this.da=null;this.R=!0;this.S=this.P=!1;this.L=this.Wc=null;this.$e=!1;this.ia=new Pt(this);this.C=null;this.on(_.Lf,()=>{this.getState()===_.ko&&(this.a?this.a.unload():Promise.resolve())});this.on(_.qc,()=>{this.$e=!0});this.on(_.pc,()=>{this.$e=!1});this.on(_.$f,()=>Hn(this));Jn(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
|
|
401
|
+
this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Dn)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Ln(this,a);this.M=_.oa;Ih(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,
|
|
402
|
+
b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.H(_.Sd,{detail:a}),this.trigger(a)}Ed(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Zg(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){const a=this;return _.v(function*(){const b=a.getTrackManager();b&&b.detach();a.a&&(yield a.a.detach(),a.a.stopForwardingEventsTo(a))})}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");
|
|
403
|
+
this.l=On(this);return this.l.finally(()=>{Pn(this);this.g.debug("Player released");this.l=null})}stop(){return this.release()}destroy(){if(this.P)return this.g.debug("The player is already destroyed. No-op"),new Promise(a=>a());this.P=!0;return this.release().then(()=>{this.g.debug(ya);this.trigger(new _.H("destroying"));return _.Kn(this,_.Ge)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Cd.clear();this.ia.release();if(this.a)return this.a.destroy()}).then(()=>this.A.destroy()).then(()=>
|
|
404
|
+
{this.B=this.a=null;this.trigger(new _.H("destroyed"))})}open(a){const b=this;return _.v(function*(){try{_.km(Ze);b.M=_.oa;b.Z=!0;const c=_.Um(a),d=Rm(a)?a:{};if(d.license)throw new _.I(_.D,7,7100,"License cannot be passed into the open method.");yield _.Xn(b,d,c);yield _.Yn(b);yield _.$n(b);_.km(Ye);_.mm("player.open",Ze,Ye)}catch(c){Pn(b);if(b.l)throw b.g.info(Ma),new _.I(_.D,7,7E3);throw c;}})}load(a){return this.open(a)}preload(a){const b=this;return _.v(function*(){yield _.Xn(b,a);if(b.a){var c=
|
|
405
|
+
b.a;c.preload?yield c.preload(b.f):b.g.warn(gb)}else b.g.warn(db)})}use(a){(a=Oh(a))&&a.playerConstructed(this)}remove(a){return this.getState()!==_.qo&&!this.R||null===Gh(a)?!1:(Ph(a),this.S=!0)}play(){return this.a?this.h&&!this.h.j()?Promise.resolve():this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.h&&this.h.pb()?(this.h.ib(),Promise.resolve()):this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&
|
|
406
|
+
this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.yt}getState(){return this.a?this.a.getState():_.qo}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.h&&this.h.pb()?this.h.isPaused():this.a?this.a.isPaused():!1}getPosition(){return this.a?this.a.getPosition():0}setPosition(a){return this.getState()===_.ko?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}seek(a){return this.setPosition(a)}getPresentationStartTime(){return this.a?
|
|
407
|
+
this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}Ec(){const a=this.a;return a&&a.Ec?a.Ec():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.h&&this.h.h(a);this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}pb(){return this.h?this.h.pb():!1}lc(){return this.a?this.a.getPlaybackRate():1}getPlaybackRate(){return this.lc()}qd(a,
|
|
408
|
+
b){this.a&&this.a.setPlaybackRate(a,b)}setPlaybackRate(a,b){this.qd(a,b)}isMuted(){return this.a?!!this.a.isMuted():!1}setMuted(a){this.h&&this.h.setMuted(a);this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.A}setNetworkEngine(a){this.A=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}tg(){return Object.freeze(this.da)}Qa(){return this.a&&this.a.getLoadedSource()}getLoadedSource(){return this.Qa()}getTimelineCues(){return this.a?
|
|
409
|
+
this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Wc=a;Un(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};_.w("clpp.Player",S);S.registerPlugin=_.En;S.prototype.setCdnErrorCallback=S.prototype.setCdnErrorCallback;S.prototype.setDrmCustomDataModifier=S.prototype.setDrmCustomDataModifier;S.prototype.resetAbr=S.prototype.resetAbr;S.prototype.getTimelineCues=S.prototype.getTimelineCues;
|
|
410
|
+
S.prototype.getLoadedSource=S.prototype.getLoadedSource;S.prototype.getCurrentSource=S.prototype.Qa;S.prototype.getSources=S.prototype.tg;S.prototype.getStats=S.prototype.getStats;S.prototype.isLive=S.prototype.isLive;S.prototype.getTextDisplayer=S.prototype.getTextDisplayer;S.prototype.setNetworkEngine=S.prototype.setNetworkEngine;S.prototype.getNetworkEngine=S.prototype.getNetworkEngine;S.prototype.setMuted=S.prototype.setMuted;S.prototype.isMuted=S.prototype.isMuted;
|
|
411
|
+
S.prototype.setPlaybackRate=S.prototype.setPlaybackRate;S.prototype.setRate=S.prototype.qd;S.prototype.getPlaybackRate=S.prototype.getPlaybackRate;S.prototype.getRate=S.prototype.lc;S.prototype.isPlayingAd=S.prototype.pb;S.prototype.namespace=S.prototype.namespace;S.prototype.getAdsManager=S.prototype.getAdsManager;S.prototype.getDuration=S.prototype.getDuration;S.prototype.setVolume=S.prototype.setVolume;S.prototype.getVolume=S.prototype.getVolume;S.prototype.getTimelineOffset=S.prototype.Ec;
|
|
416
412
|
S.prototype.getSeekRange=S.prototype.getSeekRange;S.prototype.getPresentationStartTime=S.prototype.getPresentationStartTime;S.prototype.seek=S.prototype.seek;S.prototype.setPosition=S.prototype.setPosition;S.prototype.getPosition=S.prototype.getPosition;S.prototype.isPaused=S.prototype.isPaused;S.prototype.isEnded=S.prototype.isEnded;S.prototype.getState=S.prototype.getState;S.prototype.getBufferInfo=S.prototype.getBufferInfo;S.prototype.getTrackManager=S.prototype.getTrackManager;
|
|
417
|
-
S.prototype.pause=S.prototype.pause;S.prototype.play=S.prototype.play;S.prototype.remove=S.prototype.remove;S.prototype.use=S.prototype.use;S.prototype.load=S.prototype.load;S.prototype.open=S.prototype.open;S.prototype.destroy=S.prototype.destroy;S.prototype.stop=S.prototype.stop;S.prototype.release=S.prototype.release;S.prototype.getDrmInfo=S.prototype.getDrmInfo;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.getSurface=S.prototype.getSurface;S.prototype.getPlugin=S.prototype.
|
|
418
|
-
S.prototype.off=S.prototype.off;S.prototype.one=S.prototype.one;S.prototype.on=S.prototype.on;_.
|
|
419
|
-
{a.off(_.
|
|
420
|
-
Math.round(c.
|
|
421
|
-
(1===g?b.
|
|
422
|
-
a.payloadType}};_.
|
|
423
|
-
_.
|
|
424
|
-
_.
|
|
425
|
-
_.
|
|
426
|
-
_.
|
|
427
|
-
_.
|
|
413
|
+
S.prototype.pause=S.prototype.pause;S.prototype.play=S.prototype.play;S.prototype.remove=S.prototype.remove;S.prototype.use=S.prototype.use;S.prototype.load=S.prototype.load;S.prototype.open=S.prototype.open;S.prototype.destroy=S.prototype.destroy;S.prototype.stop=S.prototype.stop;S.prototype.release=S.prototype.release;S.prototype.getDrmInfo=S.prototype.getDrmInfo;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.getSurface=S.prototype.getSurface;S.prototype.getPlugin=S.prototype.Ed;
|
|
414
|
+
S.prototype.off=S.prototype.off;S.prototype.one=S.prototype.one;S.prototype.on=S.prototype.on;_.qo=0;_.ko=6;_.no={IDLE:_.qo,PREPARING:1,BUFFERING:2,PLAYING:3,PAUSED:4,ENDED:5,ERROR:_.ko,UNSET:7};S.State=_.no;var Dn=[];var Zt=class{constructor(){this.Kc=null;this.f=[];this.h=[];this.Wa=new _.T(fd);this.a=null;this.j=!1}load(a){const b=this;return _.v(function*(){b.Kc?yield go(b,c=>_.v(function*(){yield c.open(a)})):b.Wa.warn("No main player, cannot load.")})}Xi(a){this.j=a;this.Wa.info("Looping set to",a)}th(a){this.f.push(a)}sh(a){if(this.Kc)this.Wa.warn("Main player already set.");else{this.Kc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Lf,b);a.on(_.ag,c);a.on(_.Rd,d);this.h.push(()=>
|
|
415
|
+
{a.off(_.Lf,b);a.off(_.ag,c);a.on(_.Rd,d)})}}clear(){this.Kc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.v(function*(){a.j&&(a.Wa.info("Looping playback."),yield go(a,b=>_.v(function*(){yield b.setPosition(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,3===a?(this.Wa.info("Mirroring playing."),ho(this,b=>_.v(function*(){yield b.play()}))):[4,2,_.ko].includes(a)&&(this.Wa.info("Mirroring paused/buffering/error."),ho(this,b=>{const c=this;return _.v(function*(){var d=
|
|
416
|
+
Math.round(c.Kc.getPosition())-.1;yield b.setPosition(d);yield Fi(.2);d=b.getState();if(3===d||2===d)yield b.pause()})})))}w(){this.a||ho(this,a=>{const b=this;return _.v(function*(){a.isPaused()&&(yield a.play());const c=b.Kc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.lc();if(!(3!==a.getState()||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.qd(1),yield a.setPosition(c)):f===g?1!==g&&b.Wa.info(`Delta ${d.toFixed(1)} s.`):
|
|
417
|
+
(1===g?b.Wa.info("Secondary caught up."):1>g?b.Wa.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Wa.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.qd(g))}})})}};_.w(fd,Zt);Zt.prototype.clear=Zt.prototype.clear;Zt.prototype.addMainPlayer=Zt.prototype.sh;Zt.prototype.addSecondaryPlayer=Zt.prototype.th;Zt.prototype.setLoop=Zt.prototype.Xi;Zt.prototype.load=Zt.prototype.load;var $t=class{constructor(a){this.g=new _.T("clpp.native.StateManager");this.m=a;this.a=new _.Bt;this.w=this.f=_.qo;this.I=0;this.o=2;this.J=this.l=this.G=this.C=0;this.h=this.ga=this.B=!1;this.F=0;this.j=null;this.H=0;this.K=_.Vi();this.A=!1;this.G=Date.now();lo(this)}getState(){return this.f}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};var au=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Bt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.T("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.v(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.hu=class{constructor(a,b,c,d){d=void 0===d?_.bu:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.cu;this.writingMode=_.du;this.lineInterpretation=_.eu;this.line=null;this.lineAlign=_.fu;this.direction=gu;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Xc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
|
|
418
|
+
a.payloadType}};_.w("clpp.text.Cue",_.hu);_.hu.positionAlign={LEFT:_.he,RIGHT:_.ie,CENTER:_.Wc,AUTO:"auto"};_.bu=_.Tf;_.hu.payloadType={TEXT:_.bu,VTT_XML:_.zg,TTML_XML:_.dg};_.cu=_.Wc;_.iu={LEFT:_.ee,RIGHT:_.wf,CENTER:_.cu,START:_.Kf,END:_.Qd};_.hu.textAlign=_.iu;var gu="ltr";_.hu.direction={HORIZONTAL_LEFT_TO_RIGHT:gu,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.du="horizontal-tb";_.hu.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.du,VERTICAL_LEFT_TO_RIGHT:_.og,VERTICAL_RIGHT_TO_LEFT:_.pg};_.eu=0;
|
|
419
|
+
_.hu.lineInterpretation={LINE_NUMBER:_.eu,PERCENTAGE:1};_.fu=_.Kf;_.ju={CENTER:_.Wc,START:_.fu,END:_.Qd};_.hu.lineAlign=_.ju;_.mu=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.ku;this.scroll=lu;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.w("clpp.text.CueRegion",_.mu);_.ku=1;_.mu.units={PX:0,PERCENTAGE:_.ku,LINES:2};var lu="";
|
|
420
|
+
_.mu.scrollMode={NONE:lu,UP:"up"};_.mu.displayAlign={BEFORE:"flex-end",CENTER:_.Wc,AFTER:"flex-start"};_.mu.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.nd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var nu=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Bt;this.j=!1;this.g=new _.T("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.nc,b=>Io(this,b)),this.a.on(this.f,Yc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Ef&&(d.mode=
|
|
421
|
+
_.Yd)}}}))}o(a){const b=new _.hu(a.startTime,a.endTime,a.text,_.zg);if(_.eh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.og;break;case "rl":b.writingMode=_.pg}_.fh(a.size)&&(b.size=a.size);if(_.eh(a.align))switch(a.align){case _.ee:case _.Kf:b.textAlign=_.Kf;break;case _.Wc:b.textAlign=_.cu;break;case _.wf:case _.Qd:b.textAlign=_.Qd}_.fh(a.position)&&(b.position=a.position);if(_.eh(a.positionAlign))switch(a.positionAlign){case _.he:b.positionAlign=_.he;break;case _.Wc:b.positionAlign=
|
|
422
|
+
_.Wc;break;case _.ie:b.positionAlign=_.ie}_.fh(a.line)&&(b.line=a.line);if(_.eh(a.lineAlign))switch(a.lineAlign){case _.Kf:b.lineAlign=_.fu;break;case _.Wc:b.lineAlign=_.Wc;break;case _.Qd:b.lineAlign=_.Qd}typeof a.snapToLines===_.Mc&&(b.lineInterpretation=a.snapToLines?_.eu:1);return b}};var ou;ou={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.dp=(a,b)=>{const c=ou[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.K?"":null};_.pu={text:{mp4:_.uc,m4s:_.uc,m4i:_.uc,cmft:_.uc,vtt:_.Uf,ttml:_.Ac},video:{mp4:_.rg,m4s:_.rg,m4f:_.rg,m4i:_.rg,m4v:_.rg,cmfv:_.rg,ts:_.qg},audio:{mp4:_.Gc,m4s:_.Gc,m4f:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.qg,aac:_.Dc,ec3:_.Fc,ac3:_.Ec},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.gp=(a,b,c)=>a.map(d=>{d=_.Fm(d)||"";return d=(d=_.pu[b][d])?d:b===_.K?c&&"vtt"!==c?_.uc:_.Uf:null}).filter(Boolean)[0]||null;_.Mo=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
|
|
423
|
+
_.Lo=class{constructor(a,b){this.name=a;this.value=b}};_.qu=new _.T("clpp.hls.Utils");_.Ko=class{constructor(a){this.f=a;this.a=0}};var Qo;
|
|
424
|
+
_.So=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}Xc(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&&Xh(this.roles,
|
|
425
|
+
a.roles)&&Xh(this.accessibility,a.accessibility,Oo)}toString(){return`Track type: ${this.type} id: ${this.id}
|
|
426
|
+
renditions size: ${this.renditions.length}`}};_.w("clpp.Track",_.So);_.So.prototype.toString=_.So.prototype.toString;_.Wo=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.ud=this.bandwidth=this.height=this.width=null;this.a=!1}};_.w("clpp.Rendition",_.Wo);_.O=_.t;_.N=_.q;_.M=_.Tf;Qo=_.se;_.ru={VIDEO:_.O,AUDIO:_.N,TEXT:_.M,METADATA:Qo};_.So.Type=_.ru;var su=class{constructor(a){this.f=a;this.g=new _.T("clpp.native.hls.HlsMetadataParser");this.a=um(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.v(function*(){let d=null;try{d=yield Uo(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield Yo(c,d,
|
|
427
|
+
a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield $o(d);e.Mc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.hp=[];_.V=class{detach(){}Re(){return!0}Qh(a){return this.getVideoTracks().find(b=>_.gh(b,a,a&&Object.keys(a)))}Mh(a){return this.getAudioTracks().find(b=>_.gh(b,a,a&&Object.keys(a)))}Oh(a){return this.sa().find(b=>_.gh(b,a,a&&Object.keys(a)))}Ph(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.gh(b,a,a&&Object.keys(a)))}Lh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.gh(b,a,a&&Object.keys(a)))}Nh(a){return this.sa().flatMap(b=>b.renditions).find(b=>_.gh(b,a,a&&Object.keys(a)))}};
|
|
428
|
+
_.w("clpp.TrackManager",_.V);_.V.prototype.isAbrEnabled=_.V.prototype.va;_.V.prototype.addTextTrack=_.V.prototype.addTextTrack;_.V.prototype.findTextRendition=_.V.prototype.Nh;_.V.prototype.findAudioRendition=_.V.prototype.Lh;_.V.prototype.findVideoRendition=_.V.prototype.Ph;_.V.prototype.findTextTrack=_.V.prototype.Oh;_.V.prototype.findAudioTrack=_.V.prototype.Mh;_.V.prototype.findVideoTrack=_.V.prototype.Qh;_.V.prototype.setTextRendition=_.V.prototype.Eb;_.V.prototype.setAudioRendition=_.V.prototype.Db;
|
|
429
|
+
_.V.prototype.setVideoRendition=_.V.prototype.rb;_.V.prototype.setTextTrack=_.V.prototype.Za;_.V.prototype.setAudioTrack=_.V.prototype.za;_.V.prototype.setVideoTrack=_.V.prototype.Fb;_.V.prototype.getTextTrack=_.V.prototype.ua;_.V.prototype.getAudioTrack=_.V.prototype.ra;_.V.prototype.getVideoTrack=_.V.prototype.Ha;_.V.prototype.getLoadingTextRendition=_.V.prototype.Ob;_.V.prototype.getLoadingAudioRendition=_.V.prototype.Nb;_.V.prototype.getLoadingVideoRendition=_.V.prototype.wb;
|
|
430
|
+
_.V.prototype.getTextRendition=_.V.prototype.Va;_.V.prototype.getAudioRendition=_.V.prototype.Oa;_.V.prototype.getVideoRendition=_.V.prototype.ta;_.V.prototype.getTextTracks=_.V.prototype.sa;_.V.prototype.getAudioTracks=_.V.prototype.getAudioTracks;_.V.prototype.getVideoTracks=_.V.prototype.getVideoTracks;_.V.prototype.canSelectVideoTracks=_.V.prototype.Re;var tu=class extends _.V{constructor(){super();this.g=new _.T("clpp.native.TrackManager");this.m=null;this.f=new _.Bt;this.h=[];this.I=0;this.A={};this.C=new Set;this.a=new Map;this.w=null;this.o=new Map;this.B=!0;this.M=this.F.bind(this,_.M);this.R=this.H.bind(this,_.M);this.P=this.G.bind(this,_.M);this.S=this.F.bind(this,_.O);this.W=this.H.bind(this,_.O);this.U=this.G.bind(this,_.O);this.J=this.F.bind(this,_.N);this.L=this.H.bind(this,_.N);this.K=this.G.bind(this,_.N);this.l=null;this.j=new Map}Re(){return!_.Vi()}detach(){this.j.clear();
|
|
431
|
+
for(const a of this.a){const [b,c]=a;{const d=b;c?this.j.set(d,{language:c.language,kind:c.kind,label:c.label}):d===_.M&&this.j.set(d,null)}}kp(this);this.m.trigger(new _.H("tracksremoved"))}F(a,b){const c=this;return _.v(function*(){const d=b.track,e=a===_.O;var f=a===_.M;const g=a===_.N||e,h=To(a,d.id,d),k=op(d);if(f){if(d.kind===_.se)return;h.kind&&"captions"===h.kind&&(h.mimeType=_.sc);if(f=c.A[d.id])h.src=f.url,h.mimeType=f.mimeType}else if(f=c.h.find(m=>m.type===a&&_.gh(m,h,["kind","label",
|
|
432
|
+
"language"]))){f.id=d.id;k&&(c.g.debug(`Setting native ${a} track active`),c.a.set(a,f));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{h.renditions.push(new _.Wo(h.id,h));c.h.push(h);var l=c.m.getConfiguration().safari;qp(c,a,l)?yield rp(c,h,l):sp(c,a,l)&&(yield tp(c,h,l));c.g.debug(a+" Track added",h);c.m.trigger(new _.H(_.bg));const m=up(c,a).length,n=b.target,p=!(!n||!n.length),u=n&&n.length||0;l=()=>{c.g.debug(`Setting native ${a} track active. `+
|
|
433
|
+
`Native track active: ${k}. `+`Number of tracks: ${m}`,d);c.a.set(a,h)};k?l():1===m&&g&&(e?l():p&&1!==u||l())}catch(m){c.g.error("Error while converting track data",m)}})}H(a,b){const c=b.track;a===_.M&&c.kind!==_.se&&(b=this.h.find(d=>d.type===a&&d.id===c.id))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),vp(this)),this.g.debug(a+" Track removed, id: ",b.id))}G(a,b){this.g.debug(a+" Track changed",b);a===_.M&&vp(this);const c=lp(this,a);if(c)for(let d=0;d<c.length;++d)if(op(c[d])){if(b=
|
|
434
|
+
this.h.find(e=>e.type===a&&e.id===c[d].id))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.o.get(a)&&this.o.set(a,null),a===_.N?this.m.trigger(new _.H(_.Jc)):a===_.M&&this.m.trigger(new _.H(_.Wf));break}}initialize(a){this.m=a;this.l=new su(a.getNetworkEngine())}load(){this.B=!1;xp(this);this.f.one(this.m,Qc,()=>{0===this.j.size?zp(this):np(this)})}release(){const a=this.m.getSurface().getMedia();if(a)for(const b of this.C)a.removeChild(b);this.C.clear();this.B=!0;kp(this)}destroy(){this.release();
|
|
435
|
+
this.j.clear();this.m=null}getVideoTracks(){return up(this,_.O)}getAudioTracks(){return up(this,_.N)}sa(){return up(this,_.M)}ta(){const a=this.a.get(_.O)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||null}Oa(){return Ap(this,_.N)}Va(){return Ap(this,_.M)}wb(){return Bp(this,_.O)}Nb(){return Bp(this,_.N)}Ob(){return Bp(this,_.M)}Ha(){return this.a.get(_.O)||null}ra(){return this.a.get(_.N)||null}ua(){return this.a.get(_.M)||
|
|
436
|
+
null}Fb(a){mp(this,_.O,a)}za(a){mp(this,_.N,a)}Za(a){mp(this,_.M,a)}rb(a){mp(this,_.O,a&&a.track)}Db(a){mp(this,_.N,a&&a.track)}Eb(a){mp(this,_.M,a&&a.track)}addTextTrack(a){const b=this;return _.v(function*(){if(b.m){var c=b.m.getSurface().getMedia();if(c)if(a.mimeType.match(/text\/vtt/)){const d="External_"+`${b.I++}`;b.A[d]=a;Cp(b,a,d,c)}else yield Dp(b,a,c)}})}va(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}};tu.prototype.isAbrEnabled=tu.prototype.va;
|
|
437
|
+
tu.prototype.addTextTrack=tu.prototype.addTextTrack;tu.prototype.setTextRendition=tu.prototype.Eb;tu.prototype.setAudioRendition=tu.prototype.Db;tu.prototype.setVideoRendition=tu.prototype.rb;tu.prototype.setTextTrack=tu.prototype.Za;tu.prototype.setAudioTrack=tu.prototype.za;tu.prototype.setVideoTrack=tu.prototype.Fb;tu.prototype.getTextTrack=tu.prototype.ua;tu.prototype.getAudioTrack=tu.prototype.ra;tu.prototype.getVideoTrack=tu.prototype.Ha;tu.prototype.getLoadingTextRendition=tu.prototype.Ob;
|
|
438
|
+
tu.prototype.getLoadingAudioRendition=tu.prototype.Nb;tu.prototype.getLoadingVideoRendition=tu.prototype.wb;tu.prototype.getTextRendition=tu.prototype.Va;tu.prototype.getAudioRendition=tu.prototype.Oa;tu.prototype.getVideoRendition=tu.prototype.ta;tu.prototype.getTextTracks=tu.prototype.sa;tu.prototype.getAudioTracks=tu.prototype.getAudioTracks;tu.prototype.getVideoTracks=tu.prototype.getVideoTracks;tu.prototype.canSelectVideoTracks=tu.prototype.Re;var Ep=["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"];var uu=["abort",Pc,Qc,Nd,"emptied",Pd,_.Rd,_.Sd,"interruptbegin","interruptend",_.le,_.me,ne,"mozaudioavailable",_.Ne,_.Re,_.bf,_.nf,_.qf,_.Cf,_.Df,Jf,"suspend",_.ag,"volumechange",_.Ag,_.Bg,_.vf,Gg,Fg,Dg,Eg],oo=2,po=2;_.vu=class extends _.Et{constructor(a){super();this.log=new _.T(a);this.configuration=this.ia=_.Om();this.ha=this.C=null;this.Jb=this.rf=!1;this.Pf=new _.T("clpp.video.events");this.vc=null;this.fd=-1;this.qh=this.nh.bind(this);this.Ub=new _.sn;this.setNetworkEngine(this.Ub);this.L=new _.Bt;this.qf=this.Rc=this.Wc=this.P=null}init(a,b){this.configuration=this.ia=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of uu)this.L.on(a,
|
|
439
|
+
c,this.qh,c!==_.Sd);this.vc||(this.vc=this.eh());this.vc.initialize(this);this.C.showMediaElement()}release(){this.P&&(this.P.destroy(),this.P=null);return Promise.resolve()}destroy(){this.L.release();return this.Ub.release()}canPlay(a,b){return _.uh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.Ya)}appendLoad(){return Promise.reject(_.Ya)}seekWith(){return Promise.reject(_.Ya)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ha)return Promise.reject("No sources specified yet. You need to load content before calling play.");
|
|
440
|
+
const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};Fp(c)?(this.trigger(new _.H(_.Kc)),this.log.warn(_.la)):c.name===Za&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ha?new Promise((a,b)=>{const c=this.getState();if(2!==c&&5!==c&&3!==c&&4!==c)b(new _.I(_.D,7,3201,"The player state does not allow pause."));
|
|
441
|
+
else if(this.C.getMedia().pause(),3===this.getState())this.L.one(this,_.Lf,()=>{a()});else a()}):Promise.reject(new _.I(_.D,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Wc=a}setCdnErrorCallback(a){this.Rc=a}Zc(){return this.Wc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
|
|
442
|
+
return new _.yt(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),Promise.reject();const d=a-b;return.1>=Math.abs(d)?
|
|
443
|
+
(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.H(_.lg));this.L.on(c,_.Cf,h);this.L.on(c,_.ag,h);this.L.on(c,_.nf,h);this.log.info("Seeking to "+a+". Delta "+d);this.Jb=this.rf=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var p=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,x=l.type===_.Cf,y=l.type===_.nf,A=l.type===_.ag,E=y&&u;p=x||n&&E||A&&p;this.log.debug("Checking seeking state after "+
|
|
444
|
+
l.type+" event. Seek completed:",p,"Current Time:",m,"Target Time:",a,"Native Event:",x,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",E);p?(this.Jb=this.rf=!1,this.L.off(c,_.Cf,h),this.L.off(c,_.ag,h),this.L.off(c,_.nf,h),this.Of(),this.trigger(new _.H(_.kg)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.L.one(c,_.me,g)};this.getState()===_.qo?
|
|
445
|
+
(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Lf,()=>{switch(this.getState()){case 2:case 3:case 4:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();b?_.fh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
|
|
446
|
+
Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Mc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ha?this.C.getMedia().duration:-1}getTrackManager(){return this.vc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
|
|
447
|
+
1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.fd=a}getSourceIndex(){return this.fd}getLoadedSource(){return this.ha&&-1!==this.fd?this.ha[this.fd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Ub}setNetworkEngine(a){this.Ub=a;am(this.Ub,b=>{this.onError(b)})}setCmsdManager(a){this.qf=a}getTextDisplayer(){return this.P}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}nh(a){var b=this.getSurface().getMedia();const c=
|
|
448
|
+
this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.ag||a.type===_.nf)this.Pf.debug(d);else{let e="";switch(a.type){case _.qf:e=`Rate: ${this.getPlaybackRate()}`;break;case Nd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Re:case _.bf:case "suspend":case _.Ag:case Jf:case _.Df:case _.Cf:case _.ag:case _.nf:case Pc:case Qc:b=this.getBufferInfo().Na(c);e=`State ${this.getSurface().getMedia().readyState} `+
|
|
449
|
+
`Buffer: ${b}`;break;case _.vf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Pf.info(d)}a.type!==_.Sd&&this.trigger(new _.H(a.type,{detail:a}))}Of(){}};var wu=class{constructor(){this.a=this.f=null;this.g=new _.T("clpp.drm.csl")}release(){this.a=this.f=null}};var nq={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,
|
|
428
450
|
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,
|
|
429
451
|
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,
|
|
430
452
|
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,
|
|
@@ -438,101 +460,73 @@ _.mr=class{constructor(a,b){this.name=a;this.value=b}};var Du=class{constructor(
|
|
|
438
460
|
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,
|
|
439
461
|
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,
|
|
440
462
|
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,
|
|
441
|
-
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]};_.
|
|
442
|
-
_.
|
|
443
|
-
this.f[f];if(h){let m=null;var k=null;this.h[f]===
|
|
444
|
-
_.
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
this.
|
|
457
|
-
|
|
458
|
-
new
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
a.
|
|
465
|
-
|
|
466
|
-
this.
|
|
467
|
-
_.
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
a.
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
_.
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
"
|
|
480
|
-
(
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
l.type+" event. Seek completed:",p,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",E);p?(this.Lc=this.uf=!1,this.L.off(c,_.If,h),this.L.off(c,_.gg,h),this.L.off(c,_.uf,h),this.Sf(),this.trigger(new _.H(_.tg)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.L.one(c,_.se,g)};this.getState()===_.Fs?
|
|
492
|
-
(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Rf,()=>{switch(this.getState()){case 2:case 3:case 4:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();b?_.lh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
|
|
493
|
-
Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Oc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ha?this.C.getMedia().duration:-1}getTrackManager(){return this.Ub}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
|
|
494
|
-
1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.hd=a}getSourceIndex(){return this.hd}getLoadedSource(){return this.ha&&-1!==this.hd?this.ha[this.hd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Tb}setNetworkEngine(a){this.Tb=a;lm(this.Tb,b=>{this.onError(b)})}setCmsdManager(a){this.tf=a}getTextDisplayer(){return this.P}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}qh(a){var b=this.getSurface().getMedia();const c=
|
|
495
|
-
this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.gg||a.type===_.uf)this.Tf.debug(d);else{let e="";switch(a.type){case _.wf:e=`Rate: ${this.getPlaybackRate()}`;break;case Td:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Xe:case _.hf:case "suspend":case _.Gg:case Pf:case _.Jf:case _.If:case _.gg:case _.uf:case Rc:case Sc:b=this.getBufferInfo().Oa(c);e=`State ${this.getSurface().getMedia().readyState} `+
|
|
496
|
-
`Buffer: ${b}`;break;case _.Bf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Tf.info(d)}a.type!==_.Yd&&this.trigger(new _.H(a.type,{detail:a}))}Sf(){}};_.ks=new Map;_.ls=new _.T("clpp.text");var rv=class{constructor(){this.a=null;this.f=[]}};var sv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.uv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new rv;this.f=new sv}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:ps(this.a,3),pauseTime:ps(this.a,4),bufferingTime:ps(this.a,2),stateHistory:qs(this.a),switchHistory:rs(this.f)}}};var vv=class{constructor(a){this.g=new _.T("clpp.StateManager");this.m=a;this.a=new _.Qt;this.f=_.Fs;this.w=7;this.G=0;this.o=-1;this.J=this.l=this.H=this.A=0;this.h=this.ga=this.C=!1;this.F=0;this.j=null;this.I=0;this.K=_.Yi();this.B=!1;this.H=Date.now();ws(this)}getState(){return ys(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};var wv=class extends _.qv{constructor(){super(nd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Qt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new vv(this);us(this.j,_.Fs)}namespace(){return nd}unload(){const a=this;return _.w(function*(){if(a.ha){a.log.debug("Releasing player with source",a.ha);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.P&&(a.P.destroy(),a.P=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
|
|
497
|
-
a.o=null);_.Xh(a.h);a.f&&(a.f=new _.uv);a.F=null;a.ha=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.D,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Yd),a.h.off(b,_.Bf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&us(this.j,_.Fs)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(za);const a=this.getTrackManager();
|
|
498
|
-
a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.Ub}load(a){const b=this;return _.w(function*(){if(b.w)return Promise.reject(new _.I(_.D,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.H=Date.now()/
|
|
499
|
-
1E3;b.f=new _.uv;b.h.on(b,_.Rf,()=>{b.f&&_.os(b.f.a,b.getState())});us(b.j,1);b.ha=_.en(a);b.configuration=_.an([b.ia,a]);b.log.debug(_.Pa,b.configuration);b.log.debug(_.hb,b.ha);const d=_.ns(b.configuration,[_.fe,"native"]);b.P=d.create(b);b.P.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Jh(_.Xf)&&!_.$i()&&(b.A=new Au(b),b.A.start(c));b.l?b.l.release():b.l=new nu(b);c.textTracks&&Jo(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||
|
|
500
|
-
b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);null==b.configuration.startTime&&Os(b,c);_.Yi()&&Ps(b,c);try{Hs(b,c),yield Ks(b),yield Ns(b).V}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.D&&null!==this.j&&us(this.j,_.vs),this.trigger(new _.H(_.Yd,{detail:a})))}jh(){return new ov}getState(){return null!==this.j?this.j.getState().currentState:7}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();
|
|
501
|
-
return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.ss();this.f&&_.os(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),
|
|
502
|
-
a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ta())a.bandwidth&&(this.f.w=a.bandwidth),a.wd&&(this.f.h=a.wd);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}},xv=class{a(){return nd}canPlay(a,b){a=a.type||"";const c=a===_.vc,d=a===_.Dc,e=a===_.tl;var f;_.Xi()||c||d||e&&!_.Yi()?f=0:f=""!==Mi().canPlayType(a)?e&&_.Yi()&&(window.ManagedMediaSource||
|
|
503
|
-
window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new wv}};var yv=class extends S{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.dh(this.C,a);this.f=_.dh(this.f,a);this.G=0;this.o=[];this.U=!1;this.w=null;this.J=[]}Gi(a,b){const c=this;return _.w(function*(){if(c.w)throw new _.I(_.D,7,7008,`Cannot call openPlaylist() while ${c.w}() is ongoing!`);if(0!==a)throw new _.I(_.D,7,7007,"The index parameter only supports the value of 0.");
|
|
504
|
-
if(0===b.length)throw new _.I(_.D,7,7003,Ya);if(b.some(g=>!g.id||!g.source))throw new _.I(_.D,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.I(_.D,7,7100,"Some config contains a non-unique property `id`!");const d=b[0].playlist;if(d){var e=d.timeline,f=["flat","basic"];if(e&&!f.includes(e))throw new _.I(_.D,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.I(_.D,
|
|
505
|
-
7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.I(_.D,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.D,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{Qs(c),c.w="openPlaylist",yield Ts(c,b),c.G=0,c.o=b,c.U=!0,Us(c,b[0].playlist||{})}finally{c.w=null}})}uh(a){const b=this;return _.w(function*(){if(b.w)throw new _.I(_.D,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
|
|
506
|
-
if(!b.U)throw new _.I(_.D,7,7008,"openPlaylist() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.D,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.I(_.D,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield Vs(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.G]||null}getCurrentItemIndex(){return this.G}di(){return[...this.o]}Jd(){return this.o.length}getTimeline(){return this.a?
|
|
507
|
-
this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.G=0;this.U=!1;return super.release()}destroy(){Qs(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.x("clpp.playlist.ScPlaylist",yv);yv.prototype.setCdnErrorCallback=yv.prototype.setCdnErrorCallback;yv.prototype.destroy=yv.prototype.destroy;yv.prototype.release=yv.prototype.release;yv.prototype.seekWith=yv.prototype.seekWith;
|
|
508
|
-
yv.prototype.getTimeline=yv.prototype.getTimeline;yv.prototype.getSize=yv.prototype.Jd;yv.prototype.getPlaylist=yv.prototype.di;yv.prototype.getCurrentItemIndex=yv.prototype.getCurrentItemIndex;yv.prototype.getCurrentItem=yv.prototype.getCurrentItem;yv.prototype.addItem=yv.prototype.uh;yv.prototype.openPlaylist=yv.prototype.Gi;var zv=class extends _.Tt{constructor(a){super();this.ka=_.dh({transition:_.Te,preloadMedia:!1},a);this.h=[];this.a=0;const b=Ws(a.anchorId,this.ka.config);this.o=new Vt(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.T(od);this.o.a.forEach(c=>Xs(this,c.player,!1))}Mb(){return this.f}te(){return this.f?this.f.player:null}tg(){return this.l.get(this.a+1)||null}vg(){return this.l.get(this.a-1)||null}ug(){return[this.vg(),this.tg()].filter(Boolean)}Wi(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
|
|
509
|
-
this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Vi(a){if(0===this.h.length)throw Error(Wa);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Md(){return this.a<this.h.length-1}zg(){return 0<this.a}Ii(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Wa);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
|
|
510
|
-
yield $s(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,dt(a)}}})}Qg(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Md()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ka.transition===_.Te&&b.player.pause();it(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield et(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
|
|
511
|
-
d;}finally{a.j=!1,b&&(yield ht(a,b)),dt(a)}}else a.g.warn("There are no more items in the playlist")})}Ji(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.zg()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ka.transition===_.Te&&b.player.pause();it(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield et(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
|
|
512
|
-
d;}finally{a.j=!1,b&&(yield ht(a,b)),dt(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield Promise.all([jt(a),a.f?ht(a,a.f):Promise.resolve()]);yield kt(a)})}};_.x(od,zv);zv.prototype.destroy=zv.prototype.destroy;zv.prototype.playPrev=zv.prototype.Ji;zv.prototype.playNext=zv.prototype.Qg;zv.prototype.playFirst=zv.prototype.Ii;zv.prototype.hasPrev=zv.prototype.zg;zv.prototype.hasNext=zv.prototype.Md;
|
|
513
|
-
zv.prototype.setIndex=zv.prototype.Vi;zv.prototype.setItems=zv.prototype.Wi;zv.prototype.getPreloading=zv.prototype.ug;zv.prototype.getPrev=zv.prototype.vg;zv.prototype.getNext=zv.prototype.tg;zv.prototype.getCurrentPlayer=zv.prototype.te;zv.prototype.getCurrent=zv.prototype.Mb;var gt="preload",Ys=_.ue;var lt=new Map;var Cv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Fc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.mt(Jc);if(b)return _.mt(nt(b,a));b=nt(_.q,a);a=nt(_.t,a);return _.mt(b)||_.mt(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
|
|
514
|
-
b){const c=new Map;c.set(a,b);try{const d=_.Um(b),e=_.Vm(b).split(","),f=new Map,g=Sm(_.q,e),h=Sm(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.Tm(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.Tm(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Fc?Jc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?nt(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.G(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
|
|
515
|
-
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===Av?b.push(k):h.type===Bv&&c.push(k)},g=()=>{e={video:_.em(...b),captions:d,audio:_.em(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.I(_.D,3,3018);return e}},Bv=_.q,Av=_.t;var Dv=class{getCuePoints(){}Qb(){}Pb(){}};_.x("clpp.ads.IAdsTimeline",Dv);Dv.prototype.hasPostroll=Dv.prototype.Pb;Dv.prototype.hasPreroll=Dv.prototype.Qb;Dv.prototype.getCuePoints=Dv.prototype.getCuePoints;_.Ev=class{install(){}uninstall(){}beforeLoad(){}afterLoad(){}playerConstructed(){}};var Hv=class extends _.Eu{constructor(a,b,c,d,e){super(Ja);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.T(kd);_.xi(this.l)?this.g.warn(_.Kb):this.jb(_.xd,{licenseUrl:this.l,videoRobustness:[_.pb,void 0],audioRobustness:[_.ob,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Ud.bind(this)}});_.xi(this.j)?this.g.warn(_.fb):this.jb(_.vd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Ud.bind(this)}});
|
|
516
|
-
_.xi(this.h)?this.g.warn(_.Ea):_.xi(this.a)?this.g.warn(_.Da):this.jb(_.td,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Lg.bind(this),licenseResponse:this.Mg.bind(this),certificateRequest:this.Ud.bind(this),extractContentId:this.og.bind(this)}})}Ud(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}og(a,b){a=fp(b);switch(this.o){case Fv:return a;case Gv:return(new _.gp(a)).a;default:throw Error("Unknown content ID strategy");}}Lg(a,b){b.headers[ta]=
|
|
517
|
-
Ec;this.Ud(a,b);a={spc:_.Zl(b.body)};b.body=_.ti(_.Nm(a,!0))}Mg(a,b){a=_.ni(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.am(a).buffer}};_.x(kd,Hv);Hv.prototype.onFairPlayLicenseResponse=Hv.prototype.Mg;Hv.prototype.onFairPlayLicenseRequest=Hv.prototype.Lg;Hv.prototype.extractFairPlayContentId=Hv.prototype.og;Hv.prototype.onLicenseRequest=Hv.prototype.Ud;Hv.prototype.constructor=Hv.prototype.constructor;Hv.NAME=Ja;
|
|
518
|
-
var Gv="hostname",Fv="full-skd";Hv.FairPlayContentIdStrategy={HOSTNAME:Gv,FULL_SKD:Fv};_.x("clpp.drm.HeaderDrmComponent",class extends _.Ev{beforeLoad(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ja){a=a.drm.customData;if(!a)throw new _.I(_.D,7,7100,_.yd);a=new Hv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Fv);_.jn(a)}}uninstall(){delete _.hn.HeaderDrm}id(){return"headerdrm"}});var vt;_.Iv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Jv;_.Kv=class{constructor(){this.a=new Blob([Jv],{type:_.Ag})}canPlay(a){var b=document.createElement(_.t);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Gl;b=b.play();const d=(new _.Li(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===cb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
|
|
519
|
-
Jv=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
463
|
+
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]};_.cq=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.fh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ra(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Ip();this.a=a}};_.Gq=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ra(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Lp();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Lp();this.a=a}};
|
|
464
|
+
_.w("clpp.utils.dataview.DataViewReader",_.Gq);_.aq=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.T("clpp.mp4")}N(a,b){a=Sp(a);this.h[a]=xu;this.f[a]=b;return this}fa(a,b){a=Sp(a);this.h[a]=yu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.G(a);a=new _.Gq(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Kp(a)&&!this.a;)this.De(0,a,b)}De(a,b,c){const d=b.getPosition();let e=_.Q(b);var f=_.Q(b);let g=!1;this.g.debug("Parsing MP4 box",_.Tp(f));switch(e){case 0:e=b.Ra()-d;break;case 1:e=_.Pp(b),g=!0}const h=
|
|
465
|
+
this.f[f];if(h){let m=null;var k=null;this.h[f]===yu&&(k=_.Q(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ra()&&(l=b.Ra());l-=b.getPosition();b=0<l?_.Rp(b,l):new Uint8Array(0);b=new _.Gq(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Ra()-b.getPosition()),b.skip(a)}};_.w("clpp.utils.Mp4Parser",_.aq);_.aq.typeToString=_.Tp;
|
|
466
|
+
_.aq.allData=_.Wp;_.aq.sampleDescription=_.Vp;_.aq.children=_.Up;_.aq.prototype.parseNext=_.aq.prototype.De;_.aq.prototype.parse=_.aq.prototype.parse;_.aq.prototype.stop=_.aq.prototype.stop;_.aq.prototype.fullBox=_.aq.prototype.fa;_.aq.prototype.box=_.aq.prototype.N;_.aq.headerSize=_.Xp;var xu=0,yu=1;var zu=class{};_.w("clpp.utils.FairplayUtils",zu);zu.parseFairPlayResponse=_.fq;zu.formatFairPlayRequest=_.eq;zu.createFairplayPayload=dq;zu.extractContentId=_.$p;zu.extractExtXKeyUri=Yp;var Au,Bu,Cu,Du,jq;Au=[Fa,Ha,Ga,_.nb,_.mb];Bu=[Fa,Ha,Ga,_.nb,_.mb];Cu=["3000","2000","150"];Du=["2000","150"];
|
|
467
|
+
jq={1001:"Internal Error",1002:"External Error",10001:"Bad request",10002:"Request read failed",10003:"Content keys not found",10101:"Request denied",10201:"Missing config",10202:"Feature disabled",20001:"Authtoken invalid",20002:"Authtoken expired",20003:"Auth callback failed",20101:"Auth denied",40001:"Device revoked (override possible)",40002:"Device permanently revoked",40003:"Invalid service certificate (unmapped)",40004:"Persistence forbidden",60001:"CSL Invalid",60100:"CSL Denied",70100:"GBL Denied"};
|
|
468
|
+
_.lq=new _.T("clpp.drm.DrmTodayUtils");_.Eu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Gu=class{constructor(){this.size=0;this.a=void 0;this.g=new _.T("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Fu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Fu.value();return this.a&&ai(a,b)?!0:!1}entries(){}keys(){}values(){}},Fu=new _.Eu(()=>gi(new Uint8Array([0])));var qq=new _.Eu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.me],[HTMLMediaElement.HAVE_CURRENT_DATA,_.le],[HTMLMediaElement.HAVE_FUTURE_DATA,Pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Qc]]));_.w("clpp.drm.eme.EmeFactory.Apis",{STANDARD:lb,APPLE:fa,WEBKIT:"WEBKIT",NOP:"NOP"});var Iu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&sq(b,null);return(this.j=a)?sq(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.sh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Hu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return fa}},Hu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.pd))for(var c of b){a:{a=c;if(a.persistentState===_.uf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
|
|
469
|
+
persistentState:_.Ke,distinctiveIdentifier:_.Ke,initDataTypes:a.initDataTypes,sessionTypes:[Sf],label:a.label};let d=!1,e=!1;if(a.audioCapabilities)for(const f of a.audioCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.audioCapabilities.push(f),e=!0));if(a.videoCapabilities)for(const f of a.videoCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),
|
|
470
|
+
e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.rg));a=e?b:null}if(a){this.a=a;return}}c=Error(zb);c.name=$a;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Ju(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.sh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Ju=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Bt;this.j=0;this.g=new _.T(id);this.g.info("Created Media Keys for "+a)}createSession(a){a=
|
|
471
|
+
void 0===a?Sf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Sf)throw new TypeError("Session type "+a+ba);return new Ku(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Ku=class extends _.Et{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Bt;this.sessionId=b;this.expiration=NaN;this.closed=new _.wl;this.l=!1;this.keyStatuses=new Gu;this.g=new _.T(id)}generateRequest(a,
|
|
472
|
+
b){if(this.l)return Promise.reject(ob);this.g.debug("generateRequest");this.h=new _.wl;try{const c=this.o.createSession(_.rg,_.G(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Fg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.H(_.re,{messageType:void 0===e||e===Mf?ge:fe,message:gi(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Dg,d=>{this.g.debug("onWebkitKeyAdded_",
|
|
473
|
+
d);this.f&&(tq(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Eg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Mf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
|
|
474
|
+
this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:tq(this,"output-not-allowed");break;default:tq(this,_.ce)}});tq(this,Mf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.ke);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(ob);this.g.debug(hg);this.f=new _.wl;try{this.a.update(_.G(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
|
|
475
|
+
this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Sh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Lu=class{a(){return fa}f(){return!!window.WebKitMediaKeys}create(){return new Iu}};var Mu=class{constructor(){this.j=null;this.g=new _.T("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Ra)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return lb}},
|
|
476
|
+
Nu=class{a(){return lb}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Mu}};var Pu=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.sh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Ra);const b=this.w;b&&b!==a&&wq(b,null);(this.w=a)&&wq(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.sh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.t);c=d.length?d[0]:document.createElement(_.t)}const e=
|
|
477
|
+
new Ou(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Ou=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Le&&(this.a=Cg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,
|
|
478
|
+
this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.rg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.uf||a||(e=!1);if(e){this.f=g;return}}b=zb;if(c===_.Le||c===_.td)b="None of the requested configurations were supported.";c=Error(b);c.name=$a;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Qu(this.h,this.a))}getConfiguration(){return this.f}},Qu=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Bt;this.j=[];this.l=new Map}createSession(a=
|
|
479
|
+
Sf){if(a!==Sf&&a!==_.Pe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ja,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Ru(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Ru=class extends _.Et{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.wl;this.keyStatuses=
|
|
480
|
+
new Gu}ready(){_.sh("WebkitEmeManager.MediaKeySession.ready");vq(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.sh("WebkitEmeManager.MediaKeySession.generateRequest");return yq(this,b,null)}load(a){_.sh(Fb);return this.l===_.Pe?yq(this,null,a):Promise.reject(Error(Wa))}update(a){_.sh(Fb);const b=new _.wl;zq(this,b,a);return b}close(){_.sh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Pe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
|
|
481
|
+
this.closed;const a=xq(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.sh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Pe?Promise.reject(Error(Wa)):this.close()}},Su=class{a(){return"WEBKIT"}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Pu}};var Tu=class{l(){}h(a){_.sh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.sh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}},Uu=class{a(){return"NOP"}f(){return!0}create(){return new Tu}};var Bq=new _.T("clpp.drm.EmeFactory"),Aq=[];_.Vu=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.Vf)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
|
|
482
|
+
b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Ng=_.Vu.prototype;_.Ng.Zd=_.Pg(19);_.Ng.Fe=_.Pg(17);_.Ng.ue=_.Pg(15);_.Ng.ve=_.Pg(13);_.Ng.Ee=_.Pg(11);_.Ng.Sc=_.Pg(9);_.Ng.qe=_.Pg(7);_.Ng.aa=_.Pg(5);_.Ng.Cc=_.Pg(3);_.Ng.Wb=_.Pg(1);_.R=new _.Vu;_.Wu=new _.T("clpp.xml.Parser");_.Nm="dom";var Eq,Xu,Dq;_.Mq=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Eq=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];Xu=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Dq=class extends Xu{};_.Lq=class extends Xu{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var or=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.aq).fa("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.B("No pssh box found!")}j(a){if(1<a.version)_.B("Unrecognized PSSH version found!");else{var b=_.Ql(_.Rp(a.reader,16)),c=[];if(0<a.version){var d=_.Q(a.reader);for(let e=0;e<d;++e){const f=_.Ql(_.Rp(a.reader,16));c.push(f)}}d=_.Q(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});
|
|
483
|
+
a.reader.getPosition()!==a.reader.Ra()&&_.B("Mismatch between box size and data size!")}}};var jr,Yu;
|
|
484
|
+
_.Zr=class{constructor(a,b){this.D=a;this.lb=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=Yu;this.B=new _.Bt;this.M=new wu;this.h=new Map;this.L=[];this.H=new _.wl;this.Aa=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.Z=new Map;this.U=new _.Ii(()=>ar(this));this.j=!1;this.da=new _.wl;this.G=!1;this.W=[];this.ia=!1;this.R=0;this.g=new _.T("clpp.drm.DrmEngine");this.ca=(new _.Ii(()=>{br(this)})).Gb(1);this.H.catch(()=>{});
|
|
485
|
+
this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.v(function*(){a.j?yield a.da:(a.j=!0,yield cr(a),a.da.resolve())})}keySystem(){return this.a?_.Qq(this.a.keySystem):""}getDrmInfo(){return this.a}bb(a){const b=this;return _.v(function*(){b.G&&b.K===jr||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ia?yield tr(b,a):b.W.push(a))})}ab(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
|
|
486
|
+
_.Of){var g=f;f=e;e=g}if(Pq(this.a.keySystem)&&16===f.byteLength&&_.Ki()){g=_.fi(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Mf&&(c.loaded=!0);c&&c.qb&&c.qb.resolve();"expired"===e&&(d=!0);f=_.G(f);let h=_.Ql(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.pd)&&16!==f.byteLength&&(h=hi(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
|
|
487
|
+
this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.ub.forEach(e=>{this.o.get(e)===Mf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Me))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Mf&&_.Rl(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Me))}a=b.expiration-Date.now();(0>a||d&&1E3>
|
|
488
|
+
a)&&c&&!c.tc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Uc&&a.Uc.stop(),this.h.delete(b),b.close().catch(()=>{}));Cr(this)&&(this.H.resolve(),1!==this.h.size||d?this.U.la(.5):ar(this))}};jr=0;Yu=3;_.Or=new Map;_.Pr=new _.T("clpp.text");var Zu=class{constructor(){this.a=null;this.f=[]}};var $u=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.av=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new Zu;this.f=new $u}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:Tr(this.a,3),pauseTime:Tr(this.a,4),bufferingTime:Tr(this.a,2),stateHistory:Ur(this.a),switchHistory:Vr(this.f)}}};var bv=class extends _.vu{constructor(){super(jd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Bt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new $t(this);jo(this.j,_.qo)}namespace(){return jd}unload(){const a=this;return _.v(function*(){if(a.ha){a.log.debug("Releasing player with source",a.ha);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.P&&(a.P.destroy(),a.P=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
|
|
489
|
+
a.o=null);_.Sh(a.h);a.f&&(a.f=new _.av);a.F=null;a.ha=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.D,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Sd),a.h.off(b,_.vf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&jo(this.j,_.qo)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(ya);const a=this.getTrackManager();
|
|
490
|
+
a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.vc}load(a){const b=this;return _.v(function*(){if(b.w)return Promise.reject(new _.I(_.D,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.H=Date.now()/
|
|
491
|
+
1E3;b.f=new _.av;b.h.on(b,_.Lf,()=>{b.f&&_.Sr(b.f.a,b.getState())});jo(b.j,1);b.ha=_.Um(a);b.configuration=_.Qm([b.ia,a]);b.log.debug(_.Na,b.configuration);b.log.debug(_.eb,b.ha);const d=_.Rr(b.configuration,[_.$d,"native"]);b.P=d.create(b);b.P.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Dh(_.Rf)&&!_.Xi()&&(b.A=new nu(b),b.A.start(c));b.l?b.l.release():b.l=new au(b);c.textTracks&&Ho(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||
|
|
492
|
+
b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);null==b.configuration.startTime&&es(b,c);_.Vi()&&fs(b,c);try{Yr(b,c),yield as(b),yield ds(b).V}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.D&&null!==this.j&&jo(this.j,_.ko),this.trigger(new _.H(_.Sd,{detail:a})))}eh(){return new tu}getState(){return null!==this.j?this.j.getState():_.qo}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();
|
|
493
|
+
return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.Wr();this.f&&_.Sr(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),
|
|
494
|
+
a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ta())a.bandwidth&&(this.f.w=a.bandwidth),a.ud&&(this.f.h=a.ud);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}},cv=class{a(){return jd}canPlay(a,b){a=a.type||"";const c=a===_.tc,d=a===_.Bc,e=a===_.kl;var f;_.Ui()||c||d||e&&!_.Vi()?f=0:f=""!==Ji().canPlayType(a)?e&&_.Vi()&&(window.ManagedMediaSource||
|
|
495
|
+
window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.oa}create(){return new bv}};var dv=class extends S{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.F=_.Yg(this.F,a);this.f=_.Yg(this.f,a);this.H=0;this.o=[];this.U=!1;this.w=null;this.J=[]}Fi(a,b){const c=this;return _.v(function*(){if(c.w)throw new _.I(_.D,7,7008,`Cannot call openPlaylist() while ${c.w}() is ongoing!`);if(0!==a)throw new _.I(_.D,7,7007,"The index parameter only supports the value of 0.");
|
|
496
|
+
if(0===b.length)throw new _.I(_.D,7,7003,Va);if(b.some(g=>!g.id||!g.source))throw new _.I(_.D,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.I(_.D,7,7100,"Some config contains a non-unique property `id`!");const d=b[0].playlist;if(d){var e=d.timeline,f=["flat","basic"];if(e&&!f.includes(e))throw new _.I(_.D,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.I(_.D,
|
|
497
|
+
7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.I(_.D,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.D,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{gs(c),c.w="openPlaylist",yield js(c,b),c.H=0,c.o=b,c.U=!0,ks(c,b[0].playlist||{})}finally{c.w=null}})}rh(a){const b=this;return _.v(function*(){if(b.w)throw new _.I(_.D,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
|
|
498
|
+
if(!b.U)throw new _.I(_.D,7,7008,"openPlaylist() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.D,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.I(_.D,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield ls(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}ai(){return[...this.o]}Gd(){return this.o.length}getTimeline(){return this.a?
|
|
499
|
+
this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.U=!1;return super.release()}destroy(){gs(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.w("clpp.playlist.ScPlaylist",dv);dv.prototype.setCdnErrorCallback=dv.prototype.setCdnErrorCallback;dv.prototype.destroy=dv.prototype.destroy;dv.prototype.release=dv.prototype.release;dv.prototype.seekWith=dv.prototype.seekWith;
|
|
500
|
+
dv.prototype.getTimeline=dv.prototype.getTimeline;dv.prototype.getSize=dv.prototype.Gd;dv.prototype.getPlaylist=dv.prototype.ai;dv.prototype.getCurrentItemIndex=dv.prototype.getCurrentItemIndex;dv.prototype.getCurrentItem=dv.prototype.getCurrentItem;dv.prototype.addItem=dv.prototype.rh;dv.prototype.openPlaylist=dv.prototype.Fi;var ev=class extends _.Et{constructor(a){super();this.ka=_.Yg({transition:_.Ne,preloadMedia:!1},a);this.h=[];this.a=0;const b=ms(a.anchorId,this.ka.config);this.o=new Gt(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.T(kd);this.o.a.forEach(c=>ns(this,c.player,!1))}Mb(){return this.f}re(){return this.f?this.f.player:null}pg(){return this.l.get(this.a+1)||null}rg(){return this.l.get(this.a-1)||null}qg(){return[this.rg(),this.pg()].filter(Boolean)}Vi(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
|
|
501
|
+
this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Ui(a){if(0===this.h.length)throw Error(Ua);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Kd(){return this.a<this.h.length-1}vg(){return 0<this.a}Hi(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Ua);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
|
|
502
|
+
yield qs(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,xs(a)}}})}Mg(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Kd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ka.transition===_.Ne&&b.player.pause();Cs(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield ys(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
|
|
503
|
+
d;}finally{a.j=!1,b&&(yield Bs(a,b)),xs(a)}}else a.g.warn("There are no more items in the playlist")})}Ii(){const a=this;return _.v(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.vg()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ka.transition===_.Ne&&b.player.pause();Cs(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield ys(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
|
|
504
|
+
d;}finally{a.j=!1,b&&(yield Bs(a,b)),xs(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.v(function*(){a.g.info("Destroy");yield Promise.all([Ds(a),a.f?Bs(a,a.f):Promise.resolve()]);yield Es(a)})}};_.w(kd,ev);ev.prototype.destroy=ev.prototype.destroy;ev.prototype.playPrev=ev.prototype.Ii;ev.prototype.playNext=ev.prototype.Mg;ev.prototype.playFirst=ev.prototype.Hi;ev.prototype.hasPrev=ev.prototype.vg;ev.prototype.hasNext=ev.prototype.Kd;
|
|
505
|
+
ev.prototype.setIndex=ev.prototype.Ui;ev.prototype.setItems=ev.prototype.Vi;ev.prototype.getPreloading=ev.prototype.qg;ev.prototype.getPrev=ev.prototype.rg;ev.prototype.getNext=ev.prototype.pg;ev.prototype.getCurrentPlayer=ev.prototype.re;ev.prototype.getCurrent=ev.prototype.Mb;var As="preload",os=_.oe;var Fs=new Map;var hv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Dc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Gs(Hc);if(b)return _.Gs(Hs(b,a));b=Hs(_.q,a);a=Hs(_.t,a);return _.Gs(b)||_.Gs(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
|
|
506
|
+
b){const c=new Map;c.set(a,b);try{const d=_.Jm(b),e=_.Km(b).split(","),f=new Map,g=Hm(_.q,e),h=Hm(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.Im(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.Im(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Dc?Hc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Hs(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.G(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
|
|
507
|
+
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===fv?b.push(k):h.type===gv&&c.push(k)},g=()=>{e={video:_.Sl(...b),captions:d,audio:_.Sl(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.I(_.D,3,3018);return e}},gv=_.q,fv=_.t;var iv=class{getCuePoints(){}Qb(){}Pb(){}};_.w("clpp.ads.IAdsTimeline",iv);iv.prototype.hasPostroll=iv.prototype.Pb;iv.prototype.hasPreroll=iv.prototype.Qb;iv.prototype.getCuePoints=iv.prototype.getCuePoints;_.jv=class{install(){}uninstall(){}beforeLoad(){}drmConfigurationResolved(){}afterLoad(){}playerConstructed(){}};_.kv=class{constructor(a){this.I=a;this.f={}}jb(a,b){this.f[a]=b}};_.w("clpp.drm.DrmEnvironment",_.kv);_.kv.prototype.setDrmSystem=_.kv.prototype.jb;var Js,Ks,Ls;Js="/license-proxy-widevine/cenc/";Ks="/license-proxy-headerauth/drmtoday/RightsManager.asmx";Ls="/license-server-fairplay/";_.Os=new _.T("clpp.drm.DrmTodayLegacyEndpointHandler");var lv=class{};_.w("clpp.drm.DrmToday",lv);var Vs="PRODUCTION",Ws="STAGING",Xs="DEMO",Ys="TEST";lv.Environment={PRODUCTION:Vs,STAGING:Ws,DEMO:Xs,TEST:Ys};lv.WidevineCertificates={V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"};var mv=class extends _.jv{drmConfigurationResolved(a){if(a){var b=a.env;if((b=!!b&&!!Zs(b))&&!_.Xm[a.env]){{b=a.env;a=Zs(b);if(!a)throw new _.gl(`env not recognized as DRMtoday environment: ${b}`);b=new _.kv(b);let c=null;switch(a){case Vs:case Ws:case Xs:c=_.oq("V2");break;case Ys:c=null}b.jb(_.td,{licenseUrl:Ms(_.td,a),videoRobustness:Au,audioRobustness:Bu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:c,modifiers:{licenseRequest:_.Ps,licenseResponse:_.Us}});b.jb(_.pd,
|
|
508
|
+
{licenseUrl:Ms(_.pd,a),certificateUrl:gq(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:Rs,licenseResponse:_.Ss,extractContentId:_.Ns,certificateRequest:Ts}});b.jb(_.rd,{licenseUrl:Ms(_.rd,a),videoRobustness:Cu,audioRobustness:Du,modifiers:{licenseRequest:Qs}});_.Ym(b)}}}}id(){return Ld}};var pv=class extends _.kv{constructor(a,b,c,d,e){super(Ia);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.T(hd);_.si(this.l)?this.g.warn(_.Gb):this.jb(_.td,{licenseUrl:this.l,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Sd.bind(this)}});_.si(this.j)?this.g.warn(_.cb):this.jb(_.rd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Sd.bind(this)}});
|
|
509
|
+
_.si(this.h)?this.g.warn(_.Da):_.si(this.a)?this.g.warn(_.Ba):this.jb(_.pd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Hg.bind(this),licenseResponse:this.Ig.bind(this),certificateRequest:this.Sd.bind(this),extractContentId:this.kg.bind(this)}})}Sd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}kg(a,b){a=Yp(b);switch(this.o){case nv:return a;case ov:return(new _.Zp(a)).a;default:throw Error("Unknown content ID strategy");}}Hg(a,b){b.headers[_.ua]=
|
|
510
|
+
_.Cc;this.Sd(a,b);a={spc:_.Ml(b.body)};b.body=_.oi(_.zm(a,!0))}Ig(a,b){a=_.ii(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.Ol(a).buffer}};_.w(hd,pv);pv.prototype.onFairPlayLicenseResponse=pv.prototype.Ig;pv.prototype.onFairPlayLicenseRequest=pv.prototype.Hg;pv.prototype.extractFairPlayContentId=pv.prototype.kg;pv.prototype.onLicenseRequest=pv.prototype.Sd;pv.prototype.constructor=pv.prototype.constructor;pv.NAME=Ia;
|
|
511
|
+
var ov="hostname",nv="full-skd";pv.FairPlayContentIdStrategy={HOSTNAME:ov,FULL_SKD:nv};var qv=class extends _.jv{drmConfigurationResolved(a){if(a&&a.env===Ia){a=a.customData;if(!a)throw new _.I(_.D,7,7100,_.ud);a=new pv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||nv);_.Ym(a)}}uninstall(){delete _.Xm.HeaderDrm}id(){return"headerdrm"}};_.w("clpp.drm.HeaderDrmComponent",qv);var gt;_.rv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var sv;_.uv=class{constructor(){this.a=new Blob([sv],{type:_.rg})}canPlay(a){var b=document.createElement(_.t);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.wl;b=b.play();const d=(new _.Ii(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===$a?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
|
|
512
|
+
sv=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
520
513
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
521
514
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,
|
|
522
515
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,
|
|
523
516
|
0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,
|
|
524
517
|
0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,
|
|
525
|
-
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]);_.
|
|
526
|
-
_.
|
|
527
|
-
a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.
|
|
528
|
-
_.
|
|
529
|
-
_.
|
|
530
|
-
_.
|
|
531
|
-
Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};
|
|
532
|
-
b;else throw new _.I(_.D,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.I(_.D,2,2011);return this.a.parseMedia(a,b)}};_.
|
|
533
|
-
_.
|
|
534
|
-
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange"
|
|
535
|
-
_.
|
|
536
|
-
_.
|
|
537
|
-
_.
|
|
538
|
-
_.
|
|
518
|
+
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]);_.jt={};_.wv=class{constructor(a){a=a.getConfiguration();a=_.Zg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Of?a.backgroundColor:null;this.R=typeof a.windowColor===_.Of?a.windowColor:null;this.M=typeof a.fontColor===_.Of?a.fontColor:null;this.P=typeof a.fontFamily===_.Of?a.fontFamily:null;this.I=typeof a.fontSize===_.Of?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Of?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
|
|
519
|
+
_.Of&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.P}setFontFamily(a){this.P=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?vv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
|
|
520
|
+
a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.wv.prototype.setEdgeType=_.wv.prototype.setEdgeType;_.wv.prototype.getEdgeType=_.wv.prototype.getEdgeType;_.wv.prototype.setEdgeColor=_.wv.prototype.setEdgeColor;_.wv.prototype.getEdgeColor=_.wv.prototype.getEdgeColor;_.wv.prototype.setFontSizePercent=_.wv.prototype.setFontSizePercent;_.wv.prototype.getFontSizePercent=_.wv.prototype.getFontSizePercent;_.wv.prototype.setFontSize=_.wv.prototype.setFontSize;
|
|
521
|
+
_.wv.prototype.getFontSize=_.wv.prototype.getFontSize;_.wv.prototype.setFontColor=_.wv.prototype.setFontColor;_.wv.prototype.getFontColor=_.wv.prototype.getFontColor;_.wv.prototype.setFontFamily=_.wv.prototype.setFontFamily;_.wv.prototype.getFontFamily=_.wv.prototype.getFontFamily;_.wv.prototype.setWindowColor=_.wv.prototype.setWindowColor;_.wv.prototype.getWindowColor=_.wv.prototype.getWindowColor;_.wv.prototype.setBackgroundColor=_.wv.prototype.setBackgroundColor;
|
|
522
|
+
_.wv.prototype.getBackgroundColor=_.wv.prototype.getBackgroundColor;var vv=1/15;var xv;
|
|
523
|
+
_.yv=class extends _.wv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${xv++}`;this.j=document.createElement(_.Qf);this.l=this.A=!1;_.zi(this.o,this.f);document.head.appendChild(this.j);this.h()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.rt(this)},b=
|
|
524
|
+
Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};xv=0;var zv=class{a(){return!0}create(a){return new _.yv(a)}};var Av=class{constructor(a){this.f=a;this.a=null;this.g=new _.T("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.lt(_.xc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.lt(_.yc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
|
|
525
|
+
b;else throw new _.I(_.D,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.I(_.D,2,2011);return this.a.parseMedia(a,b)}};_.im(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.G(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});
|
|
526
|
+
_.im(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;Vd in document||(Object.defineProperty(document,Vd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
527
|
+
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",$s);document.addEventListener("webkitfullscreenerror",$s);document.addEventListener("mozfullscreenchange",$s);document.addEventListener("mozfullscreenerror",$s);document.addEventListener("MSFullscreenChange",$s);document.addEventListener("MSFullscreenError",$s)}});
|
|
528
|
+
_.im(function(){_.sh("InputEvent.install");_.Li("Trident/")&&HTMLInputElement.prototype.addEventListener!==ht&&(_.rh("Patching input event support on IE."),gt=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=ht)});_.im(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.im(function(){_.sh("mathRound.install")});
|
|
529
|
+
_.im(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.sh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=bt,document.exitPictureInPicture=ct,document.addEventListener("webkitpresentationmodechanged",at,!0))}});
|
|
530
|
+
_.im(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=dt)}});_.im(function(){_.sh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});
|
|
531
|
+
_.im(function(){if(window.VTTCue)_.rh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.rh(Bb),window.VTTCue=et;else if(6===a)_.rh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=ft;else{try{var b=!!et(1,2,"")}catch(c){b=!1}b&&(_.rh(Bb),window.VTTCue=et)}}else _.th("VTTCue not available.")});_.wh(new cv);_.kt(_.uc,Av);_.Qr("native",new zv);pm(_.Dc,()=>new hv(_.Dc));pm(_.qg,()=>new hv(_.qg));Oh(mv);Oh(qv);
|
|
532
|
+
Aq=[new Nu,new Lu,new Su,new Uu].filter(a=>a.f());_.Bv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Xb(){return this.f}Nd(){return this.h}Xc(a){return this.getId()===a.getId()&&this.Xb()===a.Xb()&&this.getDuration()===a.getDuration()&&this.Nd()===a.Nd()}};_.w("clpp.media.TimelineWindow",_.Bv);_.Bv.prototype.isDynamic=_.Bv.prototype.Nd;_.Bv.prototype.getStart=_.Bv.prototype.Xb;_.Bv.prototype.getId=_.Bv.prototype.getId;_.Bv.prototype.getDuration=_.Bv.prototype.getDuration;_.Cv=new _.T("clpp.media.TimestampParser");_.Dv=class{constructor(){this.a=[];this.f=-1;this.h=null}ci(a){return this.a[a]||null}di(){return this.a.length}ei(){return this.a}og(){return this.a[this.f]||null}Xh(){return this.f}};_.w("clpp.media.Timeline",_.Dv);_.Dv.prototype.getCurrentWindowIndex=_.Dv.prototype.Xh;_.Dv.prototype.getCurrentWindow=_.Dv.prototype.og;_.Dv.prototype.getWindows=_.Dv.prototype.ei;_.Dv.prototype.getWindowCount=_.Dv.prototype.di;_.Dv.prototype.getWindow=_.Dv.prototype.ci;_.ut={};_.vt={};var nt="raised",ot="depressed",qt="dropshadow",pt="uniform";_.w("clpp.text.EdgeType",{NONE:_.Be,RAISED:nt,DEPRESSED:ot,DROP_SHADOW:qt,UNIFORM:pt});_.Ev=class{onPlayerCreated(){}onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;
|