@castlabs/prestoplay 6.27.0 → 6.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +113 -112
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +625 -624
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +89 -89
- package/cjs/cl.externs.js +80 -72
- package/cjs/cl.freewheel.js +25 -25
- package/cjs/cl.hls.js +78 -79
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +23 -24
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +347 -347
- package/cjs/cl.muxdata.js +14 -15
- package/cjs/cl.onboard.js +4 -3
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +16 -17
- package/cjs/cl.smooth.js +72 -72
- 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 +38 -38
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +6 -5
- package/cl.cast.js +91 -90
- package/cl.conviva.js +27 -27
- package/cl.core.js +503 -499
- package/cl.crypto.js +8 -8
- package/cl.dash.js +83 -82
- package/cl.externs.js +80 -72
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +80 -80
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mediatailor.js +2 -3
- package/cl.mse.js +304 -305
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.simid.js +14 -14
- package/cl.smooth.js +60 -60
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +15 -15
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +31 -29
- package/package.json +1 -1
- package/typings.d.ts +34 -65
- package/cjs/cl.sessions.js +0 -21
- package/cl.sessions.js +0 -10
package/cl.core.js
CHANGED
|
@@ -1,417 +1,421 @@
|
|
|
1
|
-
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,ta,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.
|
|
5
|
-
|
|
6
|
-
_.
|
|
7
|
-
fb="Player not ready yet.";_.gb="Player sources";_.
|
|
8
|
-
|
|
9
|
-
_.
|
|
10
|
-
_.
|
|
11
|
-
|
|
12
|
-
_.pd="com.adobe.primetime";_.qd="com.apple.fps";rd="com.apple.quicktime.HLS";_.sd="com.microsoft.playready";td="com.microsoft.playready.recommendation";_.ud="com.widevine.alpha";_.vd="config.drm.customData is not defined";_.wd="content-steering-change";_.xd="content-steering-location-ban-update";yd="controls";_.zd="cuechange";_.Ad="decoder";_.Bd="destroy()";_.Cd="disabled";_.Dd="div";Ed="drm.mediaKeys.end";Fd="drm.mediaKeys.start";Gd="drm.onPlay.end";Hd="drm.onPlay.start";
|
|
13
|
-
Jd="drmlicenserequested";Kd="drmrenewalstarted";Ld="drmsessioncreated";_.Md="drmsessionpersisted";_.
|
|
14
|
-
_.me="live-turned-static";_.
|
|
15
|
-
_.Pe="output-restricted";_.
|
|
16
|
-
kf="preload-aborted";
|
|
17
|
-
Lf="
|
|
18
|
-
_.
|
|
19
|
-
_.
|
|
20
|
-
|
|
21
|
-
_.x=function(a,b){a=a.split(".");var c
|
|
22
|
-
|
|
23
|
-
_.
|
|
24
|
-
_.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
_.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Aj=function(a,b){
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Jj=function(a){const b
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
a.
|
|
121
|
-
_.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
a.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
_.
|
|
136
|
-
_.
|
|
137
|
-
_.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
a
|
|
153
|
-
|
|
154
|
-
_.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
186
|
-
f.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
_.
|
|
194
|
-
|
|
195
|
-
_.
|
|
1
|
+
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,sa,ta,wa,xa,ya,za,Aa,Ba,Fa,Ga,Ha,Ia,Ka,Ma,Na,Ra,Ta,Ua,Va,Wa,Xa,Ya,$a,ab,fb,ib,ob,pb,tb,vb,yb,Ab,Bb,Eb,Fb,Hb,Kb,Qb,Xb,Yb,Zb,Bc,Gc,Oc,Pc,Wc,Xc,Yc,bd,cd,dd,ed,gd,hd,id,jd,kd,ld,md,rd,td,yd,Ed,Fd,Gd,Hd,Jd,Kd,Ld,Qd,Rd,Td,Zd,he,je,ke,ue,Ne,Ue,We,Xe,Ye,Ze,$e,af,bf,cf,df,ef,kf,lf,mf,nf,of,pf,rf,vf,xf,Nf,Qf,Wf,ig,og,ug,Cg,Gg,Hg,Ig,Jg,Kg,Mg,Ng,Og,Ug,Vg,Yg,Zg,dh,ah,lh,mh,oh,rh,th,Bh,Fh,Mh,Nh,Oh,Ph,Qh,Rh,Sh,Th,Uh,Xh,Vh,Zh,ai,$h,ci,ei,gi,fi,hi,ii,ji,mi,ni,qi,Gi,Hi,Ii,Ji,Ni,Si,Ri,dj,
|
|
2
|
+
Xi,Wi,qj,rj,sj,tj,vj,wj,xj,yj,Mj,Hj,Oj,Pj,Qj,Sj,Tj,Rj,Wj,Xj,Yj,Vj,zj,Aj,Dj,Ej,Fj,Gj,Ij,Jj,Kj,Lj,ek,fk,Nj,Uj,gk,bk,dk,Zj,kk,lk,ok,pk,qk,sk,tk,uk,vk,yk,zk,Ak,Ck,Dk,Fk,Gk,Hk,Kk,Lk,Ik,Tk,Uk,Vk,Sk,bl,Jk,Wk,Xk,Yk,Zk,$k,al,el,Nk,dl,Ok,Mk,Pk,fl,il,Qk,Rk,ml,ol,sl,tl,rl,vl,ql,pl,yl,zl,Al,Cl,Dl,El,Fl,Gl,Il,Jl,Hl,Kl,Ol,Nl,Ul,cm,wl,fm,em,dm,jl,ul,hm,gm,jm,km,om,zm,Em,Gm,Hm,Km,Om,Tm,Wm,Ym,Zm,$m,cn,jn,ln,mn,nn,on,pn,qn,rn,sn,tn,un,vn,An,Hn,En,Jn,Nn,Pn,Rn,Tn,Un,Vn,Wn,Yn,ho,Zn,$n,ao,bo,jo,fo,mo,no,lo,ko,po,qo,uo,
|
|
3
|
+
oo,vo,to,wo,xo,ro,so,yo,Do,Eo,zo,Co,Bo,Ao,Fo,Go,Ho,To,Vo,ap,ep,gp,np,xp,jp,sp,Dp,Ep,Fp,Hp,Ip,Jp,Mp,Kp,Lp,Np,Op,Pp,Sp,Zp,$p,dq,gq,hq,jq,lq,mq,oq,eq,kq,pq,qq,rq,sq,Bq,uq,Cq,tq,vq,wq,Dq,Iq,Kq,Mq,Lq,Oq,Gq,Wq,Tq,Vq,Uq,Jq,Xq,Yq,Zq,$q,ar,br,cr,dr,jr,mr,pr,qr,ur,wr,rr,tr,vr,xr,yr,zr,Br,Cr,Hr,Ir,Kr,Lr,Mr,Nr,Or,Pr,Rr,Qr,Sr,Tr,Ur,Vr,Wr,Jr,Xr,Zr,es,fs,gs,os,ps,qs,js,is,vs,xs,ys,zs,us,Bs,Cs,Ds,Es,Hs,Is,Js,Fs,Gs,Ks,Ls,Os,Ss,Ts,Ws,Ys,Zs,Xs,Us,Ns,Rs,Ps,Qs,bt,ct,dt,et,ft,gt,ht,it,kt,vt,zt,Wg,Xg;_.aa=" is registered.";
|
|
4
|
+
ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.28.0";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.ka="Autoplay is not allowed due to browser policy.";la="Autoplay should not be used for preloaded streams. ";_.ma="BANDWIDTH";_.na="BASIC";oa="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";sa="Content-Length";ta="Content-Type";
|
|
5
|
+
_.va="Could not find configured DRM environment.";wa="DRM licenses loaded";xa="DRMtoday";ya="DRMtodayOnboard";za="Destroying player";Aa="Error while decoding string!";Ba="Error while fetching certificate!";_.Ca="FairPlay Certificate URL is not defined";_.Da="FairPlay License URL is not defined";_.Ea="GROUP-ID";Fa="HW_SECURE_ALL";Ga="HW_SECURE_CRYPTO";Ha="HW_SECURE_DECODE";Ia="HeaderDrm";Ka="InvalidStateError";_.La="LANGUAGE";Ma="License verification failed: ";Na="Load interrupted while a player release is pending";
|
|
6
|
+
_.Oa="Loading player with configuration";_.Pa="MaxHeight";_.Qa="MaxWidth";Ra="Missing media element";_.Sa="NAME";Ta="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ua="No event provided!";Va="No items in the playlist";Wa="No sources provided!";Xa="No track data attached to the event, unable to add track!";Ya="Not a persistent session.";_.Za="Not supported";$a="NotAllowedError";ab="NotSupportedError";_.bb="PLAYLIST";_.cb="POST";_.eb="PlayReady License URL is not defined";
|
|
7
|
+
fb="Player not ready yet.";_.gb="Player sources";_.hb="Please make sure ";ib="Preloading is not supported by this player.";_.jb="QualityLevel";_.kb="RESOLUTION";_.lb="Representation";_.mb="SW_SECURE_CRYPTO";_.nb="SW_SECURE_DECODE";ob="Session is closed";pb="Skipping Session creation. License for init data was already requested in ";_.rb="SmoothStreamingMedia";_.sb="TYPE";tb="The index is not in the allowed range.";_.ub="URI";vb="Unable to translate ";_.wb="Unhandled/ignored event";_.xb="Unregistering listeners";
|
|
8
|
+
yb="Unsupported keySystem";Ab="Updating playout limit for interstitial";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";Hb="Will create EME Manager: ";Kb="X-AD-CREATIVE-SIGNALING";_.Lb="X-ASSET-LIST";_.Mb="X-ASSET-URI";_.Nb="X-PLAYOUT-LIMIT";_.Ob="X-RESTRICT";_.Pb="X-RESUME-OFFSET";Qb="X-TIMELINE-OCCUPIES";_.Rb="ad-break-started";_.Sb="ad-break-stopped";
|
|
9
|
+
_.Tb="ad-buffering";_.Ub="ad-clicked";_.Vb="ad-completed";_.Wb="ad-first-quartile";Xb="ad-hls-asset-list-request";Yb="ad-hls-asset-list-response";Zb="ad-hls-resoled";_.cc="ad-impression";_.ec="ad-loaded";_.fc="ad-midpoint";_.gc="ad-paused";_.hc="ad-progress";_.ic="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";_.tc="airplay-status-changed";_.uc="application/cea-608";
|
|
10
|
+
_.vc="application/dash+xml";_.wc="application/mp4";_.xc='application/mp4; codecs\x3d"stpp"';_.yc='application/mp4; codecs\x3d"wvtt"';_.zc="application/ttml+xml";_.Ac="application/vnd.ms-sstr+xml";Bc="application/x-www-form-urlencoded";_.q="audio";_.Cc="audio/aac";_.Dc="audio/ac3";_.Ec="audio/eac3";_.Fc="audio/mp4";Gc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Hc="audiobufferchanged";_.Ic="audiotrackchanged";_.Jc="autoplaynotallowed";_.Kc="bitratechanged";_.Lc="boolean";_.Mc="bufferingended";_.Nc="bufferingstarted";
|
|
11
|
+
Oc="canplay";Pc="canplaythrough";_.Qc="castingstarted";_.Rc="caststatuschanged";_.Sc="cdn-switch-success";_.Tc="cenc";_.Vc="center";Wc="certificate-request";Xc="change";Yc="chrome";_.ad="clpp-fill";bd="clpp-hidden";cd="clpp-mc-playlist";dd="clpp-visible";ed="clpp.PlayerFleet";_.fd="clpp.cast.CastSender";gd="clpp.drm.DrmToday";hd="clpp.drm.HeaderDrm";id="clpp.drm.eme.AppleEmeManager";jd="clpp.drm.eme.EmeFactory";kd="clpp.native.Player";ld="clpp.plist.McPlaylist";md="clpp.utils.Platform";_.nd="codecs";
|
|
12
|
+
_.od="column-reverse";_.pd="com.adobe.primetime";_.qd="com.apple.fps";rd="com.apple.quicktime.HLS";_.sd="com.microsoft.playready";td="com.microsoft.playready.recommendation";_.ud="com.widevine.alpha";_.vd="config.drm.customData is not defined";_.wd="content-steering-change";_.xd="content-steering-location-ban-update";yd="controls";_.zd="cuechange";_.Ad="decoder";_.Bd="destroy()";_.Cd="disabled";_.Dd="div";Ed="drm.mediaKeys.end";Fd="drm.mediaKeys.start";Gd="drm.onPlay.end";Hd="drm.onPlay.start";
|
|
13
|
+
_.Id="drmexpirationupdate";Jd="drmlicenserequested";Kd="drmrenewalstarted";Ld="drmsessioncreated";_.Md="drmsessionpersisted";_.Pd="drmsessionupdate";Qd="drmtoday";Rd="durationchange";_.Sd="ec-3";Td="encrypted";_.Ud="end";_.Vd="ended";_.Wd="error";_.Xd="estimatedThroughputKbps";_.Yd="forced";Zd="fullscreenElement";_.$d="function";_.ae="height";_.be="hidden";_.ce="hls-daterange";_.de="html";_.ee="https://";_.fe="image";_.ge="internal-error";he="keystatuseschange";_.ie="left";je="license-renewal";
|
|
14
|
+
ke="license-request";_.le="line-left";_.me="line-right";_.qe="live-turned-static";_.re="load";_.se="loadeddata";_.te="loadedmetadata";ue="loadstart";_.ve="main";_.we="mdat";_.xe="mdia";_.ye="message";_.ze="metadata";_.Ae="mimeType";_.Be="minf";_.Ce="moov";_.De="mpd-type-changed";_.Ee="mpeg-dash-callback-event";_.Fe="none";_.r="number";_.Ge="object";_.He="onBitrateChanged()";_.Ie="onContentLoaded";_.Je="onPlayerError()";_.Ke="onPlayerWillDestroy";_.Le="onPlayerWillRelease";_.Me="onStateChanged()";
|
|
15
|
+
Ne="online-status-changed";_.Oe="optional";_.Pe="org.w3.clearkey";_.Qe="output-restricted";_.Re="pause";_.Se="persistent";_.Te="persistent-license";Ue="picture-in-picture";_.Ve="play";We="player.afterLoad.end";Xe="player.afterLoad.start";Ye="player.appendLoad.end";Ze="player.appendLoad.start";$e="player.beforeLoad.end";af="player.beforeLoad.start";bf="player.load.end";cf="player.load.start";df="player.setupPlaylist.end";ef="player.setupPlaylist.start";_.ff="playing";_.hf="playlist-item-changed";
|
|
16
|
+
_.jf="playlist-modified";kf="playlist.next.end";lf="playlist.next.start";mf="preload-aborted";nf="preload-failed";of="preloaded";pf="preloading";_.qf="prevent";rf="primary-content";_.sf="progress";_.tf="px";_.uf="ratechange";vf="released";_.wf="releasing";xf="removetrack";_.yf="required";_.zf="resize";_.Af="right";_.Bf="sc-playlist-ended";_.Cf="sc-playlist-item-changed";_.Df="sc-playlist-live-turned-static";_.Ef="sc-playlist-timeline-changed";_.Ff="scte35";_.Gf="seeked";_.Hf="seeking";_.If="showing";
|
|
17
|
+
_.Jf="simid-creative-started";_.Kf="simid-creative-stopped";_.Lf="sinf";_.Mf="smooth";Nf="stalled";_.Of="start";_.Pf="statechanged";Qf="status-pending";_.Rf="stbl";_.Sf="string";_.Tf="stsd";_.Uf="style";_.Vf="subtitles-htmlcue";Wf="temporary";_.Xf="text";_.Yf="text/vtt";_.Zf="text/xml";_.$f="texttrackchanged";_.ag="timeline-cue-added";_.bg="timeline-cue-enter";_.cg="timeline-cue-exit";_.dg="timeline-cues-changed";_.eg="timeupdate";_.fg="tracksadded";_.gg="trak";_.hg="ttml-xml";ig="unauthenticated";
|
|
18
|
+
_.jg="und";_.ng="unknown";og="update";_.pg="urn:scte:scte35";_.qg="urn:scte:scte35:2014";_.rg="user-seeked";_.sg="user-seeking";_.tg="value";ug="version";_.vg="vertical-lr";_.wg="vertical-rl";_.t="video";_.xg="video/mp2t";_.yg="video/mp4";_.zg="videobufferchanged";_.Ag="videotrackchanged";_.Bg="vimond-response";Cg="visibilitychange";_.Dg="vtt-xml";_.Eg="waiting";_.Fg="waitingforkey";Gg="webkit-org.w3.clearkey";Hg="webkitkeyadded";Ig="webkitkeyerror";Jg="webkitkeymessage";Kg="webkitneedkey";_.Lg="width";
|
|
19
|
+
Mg="x-dt-csl-tracking-token";Ng="x-dt-follow-up-token";Og="x-dt-resp-code";_.Pg="yospace-session-ended";_.Qg="yospace-session-started";_.Tg=function(a){return function(){return _.Sg[a].apply(this,arguments)}};Ug=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Vg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Ug(a)}};
|
|
20
|
+
Yg=function(a,b){if(b){var c=Wg;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&&Xg(c,a,{configurable:!0,writable:!0,value:b})}};Zg=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())})};_.w=function(a){return Zg(a())};
|
|
21
|
+
_.x=function(a,b){a=a.split(".");var c=$g;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};_.ch=function(a){return _.z(a)||ah(a)?a:_.bh(a)};_.bh=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=dh(b,{merging:a[c]},1));return b.merging||null};_.eh=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
|
|
22
|
+
dh=function(a,b,c){const d=c+1;if(_.z(a)||!_.fh(a))a={};for(const e in b)c=b[e],ah(c)||_.z(c)||_.gh(c)||c instanceof Element?a[e]=c:_.fh(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.gh(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=dh([],c,d):!_.z(c)&&_.hh(c)&&20>d&&(a[e]=dh(a[e],c,d));return a};ah=function(a){a=typeof a;return a===_.Sf||a===_.r||a===_.Lc};_.z=function(a){return null===a||"undefined"===typeof a};_.fh=function(a){return typeof a===_.Ge};
|
|
23
|
+
_.gh=function(a){return typeof a===_.$d};_.ih=function(a){return typeof a===_.Sf};_.jh=function(a){return typeof a===_.r};_.hh=function(a){if(_.z(a)||!_.fh(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
|
|
24
|
+
_.kh=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||!_.fh(a)||!_.fh(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
|
+
lh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};mh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.nh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};oh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};rh=function(a){return a&&0<=ph[a]?ph[a]:qh};
|
|
26
|
+
th=function(a){if(!a)return _.B("clpp.log",vb+a+ca),-1;const b=sh[a.toUpperCase()];return void 0===b?(_.B("clpp.log",vb+a+ca),-1):b};_.vh=function(a){uh.info.apply(uh,arguments)};_.wh=function(a){uh.debug.apply(uh,arguments)};_.B=function(a){uh.warn.apply(uh,arguments)};_.xh=function(a){uh.error.apply(uh,arguments)};_.Ah=function(a){if(a){var b=a.a();b in _.yh?_.zh.warn("Player-Factory '"+b+"' already registered"):(_.yh[b]=a,_.zh.info("Registered Player-Factory: '"+b+"'"))}};
|
|
27
|
+
Bh=function(a){return Object.values(_.yh).find(a)||null};_.Eh=function(a){0<=Ch.indexOf(a)?Dh.warn(`Factory '${a.name()}' is already registered`):(Ch.push(a),Dh.info(`Factory '${a.name()}' has been registered.`))};Fh=function(a,b){const c=Ch.find(d=>d.a(a,b))||null;c&&Dh.info(`Chosen ads manager: ${c.name()}`);return c};_.Hh=function(a){return _.Gh.get(a)||null};_.Lh=function(a){_.Gh.get(a.id())?Ih.warn("Component already in use."):_.Gh.set(a.id(),a)};
|
|
28
|
+
Mh=function(a){return Array.from(_.Gh.values()).find(b=>b instanceof a)||null};Nh=function(a){for(const b of _.Gh.values())a(b)};Oh=function(a){Nh(b=>{b.playerConstructed(a)})};Ph=function(a){Nh(b=>{b.beforeLoad(a)})};Qh=function(a){Nh(b=>{b.afterLoad(a)})};Rh=function(a){Nh(b=>{b.playerDestroyed(a)})};Sh=function(a){if(null!==Mh(a))return null;a=new a;a.install();_.Lh(a);Ih.info("Installed component:",a.id());return a};
|
|
29
|
+
Th=function(a){if(a=Mh(a))a.uninstall(),_.Gh.delete(a.id()),Ih.info("Uninstalled component:",a.id())};Uh=function(a,b,c,d){a=`${a===_.C?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.ih(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};_.Wh=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)Vh(b[c]);a.a.clear()};
|
|
30
|
+
Xh=function(a,b,c){var d=[Td,"msneedkey",Kg,"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)};Vh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};_.Yh=function(a){return Array.isArray(a)?a:[a]};Zh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};ai=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 $h(a,b)&&$h(b,a)};
|
|
31
|
+
$h=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.bi=function(a,b={}){if(b.Pf){const c=[];for(const d of a)c.some(e=>b.Pf(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};ci=function(a,b){const c=new Set(a),d=new Set(b);return{xi:a.filter(e=>!d.has(e)),sj:a.filter(e=>d.has(e)),dh:b.filter(e=>!c.has(e))}};_.di=function(a,b){for(const c of a)if(!b(c))return!1;return!0};ei=function*(a){for(let b=0;b<a;b++)yield b};
|
|
32
|
+
gi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(fi(a)===fi(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.F(a);b=_.F(b);for(const d of ei(a.byteLength))if(c[d]!==b[d])return!1;return!0};fi=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.F=function(a,b=0,c=Infinity){return hi(a,b,c,Uint8Array)};
|
|
33
|
+
hi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=fi(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)};ii=function(a,b=0,c=Infinity){return hi(a,b,c,Uint16Array)};ji=function(a,b=0,c=Infinity){return hi(a,b,c,Uint32Array)};_.ki=function(a,b=0,c=Infinity){return hi(a,b,c,Int32Array)};_.li=function(a,b=0,c=Infinity){return hi(a,b,c,DataView)};
|
|
34
|
+
mi=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};ni=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
|
+
_.oi=function(a){if(!a)return"";a=_.F(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(Aa);return a}a=escape(ni(a));try{return decodeURIComponent(a)}catch(b){throw Error(Aa);}};
|
|
36
|
+
qi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw pi.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.F(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(_.F(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 ni(c)};
|
|
37
|
+
_.ri=function(a,b){if(_.ih(a))return a;let c="";b=!!b;const d=_.F(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.oi(d):254===d[0]&&255===d[1]?c=qi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=qi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);pi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=qi(a,!1):0===d[1]&&0===d[3]?c=qi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.oi(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
|
|
38
|
+
};_.si=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};_.ti=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
|
+
_.ui=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=ji(d):2===c?e=ii(d):e=_.F(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.vi=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.wi=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};_.xi=function(a){return!!(a&&0<a.length)};_.yi=function(a){return!a||0===a.length};
|
|
40
|
+
_.zi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(lh(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""}};_.Bi=function(a){a=a.replace(/<[^>]+>/gi,"");Ai.innerHTML=a;a=Ai.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Ci=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};
|
|
41
|
+
_.Di=function(a,b){a.classList.add(b)};_.Ei=function(a,b){if(a&&typeof b===_.Ge)for(const c in b)a.style[c]=b[c]};_.Fi=function(a){return document.createElement(a)};Gi=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());$h(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Hi=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
|
|
42
|
+
Ii=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};Ji=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Ni=function(){if(Ki)return Ki;Li||(Li=new _.Mi(()=>{Ki=null}));(Ki=document.querySelector(_.t)||document.querySelector(_.q))||(Ki=document.createElement(_.t));Li.la(1);return Ki};_.Oi=function(){return!!navigator.userAgent.match(/Edge?\//)};
|
|
43
|
+
_.Pi=function(a){return(navigator.userAgent||"").includes(a)};_.Qi=function(a){return _.Pi("Tizen"+(a?" "+String(a):""))};Si=function(a){const b={major:-1,name:_.ng};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Ri(a,c[0]));2<=c.length&&(b.minor=Ri(a,c[1]));3<=c.length&&(b.patch=Ri(a,c[2]));4<=c.length&&(b.build=Ri(a,c[3]));return b};_.Ti=function(){return _.Pi("Web0S")};_.Vi=function(){return _.Ti()&&79===_.Ui().major};
|
|
44
|
+
_.Ui=function(){const a=Wi();const b=["ie","edge","opera","firefox","safari",Yc];var c=Xi();const d=Yi[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Si(c[1]);return Si("")};_.Zi=function(){return _.Pi("CrKey")};_.$i=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Qi()};_.aj=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.$i()&&1<navigator.maxTouchPoints};_.bj=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
|
|
45
|
+
Ri=function(a,b){try{return parseInt(b,10)}catch(c){cj.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};dj=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};
|
|
46
|
+
Xi=function(){const a=Wi();if(!a)return ej;var b=a.match(/^.+?(?=\))/);if(!b)return ej;b=b[0];if(dj(b,["iphone","ipad"]))return fj;if(dj(b,["android"]))return gj;if(dj(b,["macintosh"]))return hj;if(dj(b,["windows nt"]))return ij;if(dj(b,["tizen"]))return jj;if(dj(b,["web0s"]))return kj;if(dj(b,["linux"]))return lj;cj.warn("Unable to identify OS from user agent: "+a);return ej};Wi=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
|
|
47
|
+
_.pj=function(){var a=Xi();var b=Xi();var c=Yi[b];if(c){c=Wi().match(c.os_version)[1];c=Si(c);if(b===ij)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=Si("");a:{c=Wi();const e=["ie","edge","opera","firefox","safari",Yc];var d=Xi();d=Yi[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=oj}return{os:a,osVersion:b,browser:c,browserVersion:_.Ui()}};
|
|
48
|
+
qj=function(a,b,c){(_.Ti()&&53===_.Ui().major||_.Ti()&&68===_.Ui().major||_.Vi())&&!b.hasAttribute(yd)&&(b.style.opacity="0",b.setAttribute(yd,""),a.j.one(b,Rd,()=>{b.removeAttribute(yd);b.style.opacity="1";c&&(c.style.opacity="1")}))};rj=function(a){if(a.Va){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Va.h=b}a.fe&&a.fe()};sj=function(a,b){return _.w(function*(){yield a.release();yield a.load(b)})};
|
|
49
|
+
tj=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Bg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
|
|
50
|
+
vj=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.t);b.appendChild(f);d=a.ka.ab.create();f=new uj(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})};wj=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
|
|
51
|
+
xj=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(dd),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(dd),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};yj=function(a){return a.h.find(b=>!!b.primary)||null};
|
|
52
|
+
Mj=function(a,b,c){return _.w(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=zj(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?Aj(a,e,Bj):e.player.pause():e.player.pause()),e.primary?Aj(a,e,Bj):Aj(a,e,Cj));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Ve?(e&&d.primary?yield Dj(a,d):f?yield Ej(a,d):yield Fj(a,d),rj(d)):f?a.g.error("Loading preloaded items is not supported"):yield Gj(a,d);Hj(a,d);d.primary?Aj(a,d,
|
|
53
|
+
Cj):Aj(a,d,Bj);d.Va&&Ij(a,d,d.Va);if(d.za)d.player.one(_.Vd,d.za);d.ug&&d.ug(d.player.getDuration());e&&Jj(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=yj(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield Dj(a,h))}finally{a.w=!1,Kj(a),Lj(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
|
|
54
|
+
Hj=function(a,b){const c=b.transition;if(c&&!c.Gg){if(c.za){const d=c.za,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Vd,e);b.disposers.push(()=>{b.player.off(_.Vd,e)})}c.de&&Nj(a,b,()=>{const d=a.f.Va;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.G(_.lc,{ad:d})),a.a.trigger(new _.G(_.Vb,{ad:d})),a.a.trigger(new _.G(_.Sb,{id:b.Ib})))});c.Gg=!0}};
|
|
55
|
+
Oj=function(a,b){return _.w(function*(){a.g.info("Crop ads by playout limit",b);var c=yj(a),d=a.getCurrentItem();if(c&&d&&d.Va&&null!=c.W){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.kb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.kb-d.duration),h=e.sort((l,m)=>m.kb-l.kb)[0],k=c.W;b<=g?(c.W-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.W.toFixed(1)} instead of `+`${k.toFixed(1)}`),
|
|
56
|
+
yield Mj(a,c.id,_.Ve),h.za&&h.za(),c=d.Va,a.a.trigger(new _.G(_.lc,{ad:c})),a.a.trigger(new _.G(_.Vb,{ad:c})),a.a.trigger(new _.G(_.Sb,{id:d.Ib}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.kb&&b>=l.kb-l.duration))?(e=b-(d.kb-d.duration),d.Va.h=e,c.W-=f-b,a.g.info("Last ad is now ",d.Va.qb(),"with cropped duration",e,"and primary will resume at",c.W.toFixed(1),"instead of",k.toFixed(1)),h.za&&(d.za=h.za),d.transition={de:{position:e,itemId:c.id,W:c.W}},Hj(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
|
|
57
|
+
Pj=function(a){return _.w(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Oc),yield b.player.play(),b.state=_.ff,rj(b))})};Qj=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(),Oc:Promise.resolve()})))};
|
|
58
|
+
Sj=function(a,b){return _.w(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 Rj(a,e.id)}))})};Tj=function(a){return _.w(function*(){yield Sj(a,a.h.map(b=>b.id))})};Rj=function(a,b){return _.w(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield Uj(a,c.player)),a.j.delete(b))})};
|
|
59
|
+
Wj=function(a){const b=yj(a);b&&(b.transition=void 0,b.next=[],Vj(a))};Xj=function(a){return _.w(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);Wj(a);yield Sj(a,b)})};Yj=function(a){_.w(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(Wj(a),yield a.play(c))})};Vj=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Gg=!1),Hj(a,a.f))};zj=function(a,b){return a.h.find(c=>c.id===b)||null};
|
|
60
|
+
Aj=function(a,b,c){const d=b?b.Ib||null:null;a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),Zj(a,!0)):(b.audio&&(c=b.audio),a.ka.onAudioDecision&&(c=a.ka.onAudioDecision(d)),c===Cj?(a.a.setMuted(!1),Zj(a,!0)):c===Bj?(a.a.setMuted(!0),Zj(a,!1)):a.g.warn("Audio decision not supported",c))};
|
|
61
|
+
Dj=function(a,b){return _.w(function*(){if(b.player){a.G();if(b.state===pf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.fa=!1;b.W&&(yield b.player.seek(b.W,!0));a.f=b;b.role=ak;xj(a,b.player,!0);b.state="loading";a.o?(Aj(a,b,Cj),b.player.isPaused()&&(yield b.player.play())):yield b.player.play();b.state=_.ff}})};
|
|
62
|
+
Ej=function(a,b){return _.w(function*(){const c=b.player;if(c){if(b.state===pf){a.g.info(Eb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=ak;xj(a,c,!0);b.state===of?yield c.play():b.state===nf&&(yield sj(c,b.config));b.state=_.ff}})};Fj=function(a,b){return _.w(function*(){yield Gj(a,b);yield b.player.play();b.state=_.ff})};
|
|
63
|
+
Gj=function(a,b){return _.w(function*(){const c=yield bk(a,!!b.primary);a.f=b;b.role=ak;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();xj(a,c,!0);b.state="loading";b.Oc=sj(c,b.config);yield b.Oc;b.state="loaded"})};
|
|
64
|
+
Ij=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.G(_.hc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.G(_.Wb,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.G(_.fc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.G(_.mc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.G(_.gc,{ad:c}))},g=()=>{a.a.trigger(new _.G(_.ic,{ad:c}))},h=()=>{a.a.trigger(new _.G(_.Tb,{ad:c}))},k=()=>{a.a.trigger(new _.G(_.lc,{ad:c}));a.a.trigger(new _.G(_.Vb,
|
|
65
|
+
{ad:c}));c.f===c.a&&a.a.trigger(new _.G(_.Sb,{id:b.Ib}))};d.on(_.eg,e);d.on(_.Re,f);d.on(_.ff,g);d.on(_.Nc,h);d.one(_.Vd,k);b.disposers.push(()=>{d.off(_.eg,e);d.off(_.Re,f);d.off(_.ff,g);d.off(_.Nc,h);d.off(_.Vd,k)});1===c.f&&a.a.trigger(new _.G(_.Rb,{id:b.Ib}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.G(_.cc,{ad:c}));a.a.trigger(new _.G(_.kc,{ad:c}))};
|
|
66
|
+
Jj=function(a,b){return _.w(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||xj(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=ck,b.$e?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.$e} ms.`),yield new Promise(d=>{setTimeout(()=>_.w(function*(){yield Uj(a,c);xj(a,c,!1);a.a.trigger(new _.G("ad-hls-released"));d()}),b.$e)})):(yield Uj(a,c),xj(a,c,!1)))})};
|
|
67
|
+
Kj=function(a){Promise.all(Array.from(a.j.keys()).map(b=>Rj(a,b)))};Lj=function(a,b){_.w(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=>dk(a,d)))}})};ek=function(a,b,c){c=void 0===c?!1:c;if(!a.fa){var d=yj(a);d?(d.W=b,c&&(a.fa=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};fk=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];xj(a,a.a,!0)};
|
|
68
|
+
Nj=function(a,b,c){const d=b.transition.de;let e=null;d.W&&ek(a,d.W);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(a.g.info("Start RAF polling"),h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{a.g.info("Stop timeupdate polling");b.player.off(_.eg,f)};
|
|
69
|
+
a.g.info("Start timeupdate polling");b.player.on(_.eg,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};Uj=function(a,b){return _.w(function*(){b!==a.a&&(yield a.l.release(b))})};gk=function(a){return _.w(function*(){a.f&&(yield Jj(a,a.f),xj(a,a.a,!0))})};bk=function(a,b){return _.w(function*(){if(b)return a.a;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
|
|
70
|
+
dk=function(a,b){return _.w(function*(){if(b.primary){b.state=pf;a.j.set(b.id,b);if(b.W&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.W);Aj(a,b,Bj);yield c.seek(b.W,!0)}b.state=of}else{c=b.id;var d=yield bk(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=ck;b.state=pf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(la+`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=
|
|
71
|
+
e);b.preloadPromise=sj(d,b.config);yield b.preloadPromise;b.state=of}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=mf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=nf)}}})};Zj=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};_.hk=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.jk=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...ik]}};
|
|
72
|
+
kk=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||[...ik]};lk=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
|
|
73
|
+
_.nk=function(a,b){_.ih(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.mk,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||
|
|
74
|
+
[],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:[...ik],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&kk(c,b);return c};
|
|
75
|
+
_.rk=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(ok(c))return pk(a);throw qk(a);};ok=function(a){return 200<=a&&299>=a&&202!==a};pk=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}};
|
|
76
|
+
qk=function(a){a=pk(a);try{var b=_.ri(a.data,!0)}catch(d){b=null}_.wh("HTTP error text:",b);const c=a.request;return new _.H(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.C:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};sk=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};tk=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
|
|
77
|
+
uk=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};vk=function(a){return a.reduce((b,c)=>b+c,0)};yk=function(a){return a.tf&&!(a.once&&a.Hg)&&[wk,xk].includes(a.state)};zk=function(a){const b={URI:a.wa[0].URI,DURATION:a.wa[0].DURATION};a.Ig&&(b[Kb]=a.Ig);return{ASSETS:[b]}};Ak=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Sf&&typeof b.DURATION===_.r):!1};
|
|
78
|
+
Ck=function(a){return a.a.find(b=>b.state===Bk)||null};Dk=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.Rc&&!d.once&&d.pg&&d.startTime>b).forEach(d=>{d.tf=!0})};Fk=function(a){return a.a.find(b=>b.state===Ek)||null};Gk=function(a,b){return a.a.find(c=>yk(c)&&!c.Uh&&1===c.Rc&&b>c.startTime&&b<c.endTime)||null};Hk=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.Rc&&!d.Mf).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};
|
|
79
|
+
Kk=function(a,b,c){_.w(function*(){a.fa=!0;try{const d=Fk(a);d&&(yield Ik(a,d));a.g.info("Seek into interstitial",b.ca);yield Jk(a,b)}catch(d){yield a.f.seek(c)}finally{a.fa=!1}})};Lk=function(a,b,c){_.w(function*(){a.fa=!0;try{const d=Fk(a);d&&(yield Ik(a,d));a.g.info("Play jumped interstitial",b.ca,"resume at",c.toFixed(2));yield Jk(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.ca,d),b.th=new Date,yield a.f.seek(c)}finally{a.fa=!1}})};
|
|
80
|
+
Ik=function(a,b){return _.w(function*(){a.g.info("Unschedule interstitial",b.ca);yield Xj(a.X);b.state=wk})};
|
|
81
|
+
Tk=function(a,b){const c=()=>_.w(function*(){if(!a.fa&&!a.ue){var g=b.getPosition(),h=Mk(a,g);h&&(yield Nk(a,h))&&Ok(a,h,b);if((h=Pk(a))&&h.state===wk&&b.getDuration()-g<a.ka.resolutionOffsetSec&&(yield Nk(a,h)))if(h.wa&&0!==h.wa.length){if(g=a.X.getCurrentItem()){var k=Qk(a,h,2);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={za:l};a.g.info(`Schedule postroll interstitial ${h.ca}`);Rk(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.eg,c);a.h.push(()=>{b.off(_.eg,
|
|
82
|
+
c)});const d=()=>{Sk(a,!1,!0,!0)};b.on(_.dg,d);a.h.push(()=>{b.off(_.dg,d)});const e=()=>{a.ue=!0};b.on(_.Rb,e);a.h.push(()=>{b.off(_.Rb,e)});const f=()=>{a.ue=!1};b.on(_.Sb,f);a.h.push(()=>{b.off(_.Sb,f)})};Uk=function(a){a.h.forEach(b=>b());a.h=[]};Vk=function(a){return(a=a.X.getCurrentItem())&&!a.primary?a.player:null};
|
|
83
|
+
Sk=function(a,b,c,d){const e=Wk(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=ci(a.a.map(m=>m.ca),e.map(m=>m.id));Xk(a,f.xi);const l=new Set(f.dh);f=e.filter(m=>l.has(m.id))}if(!Yk(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.cb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ka.li?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&Zk(a,g[0],b);
|
|
84
|
+
k.forEach(l=>$k(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&$k(a,h[0],2);al(a,e);return 0<g.length};
|
|
85
|
+
bl=function(a){_.w(function*(){var b=a.X;Qj(b,[{id:rf,primary:!0,config:b.a.getConfiguration(),next:[],kb:0,duration:0,Ib:null}]);var c=yj(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=ak;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();xj(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Sk(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.X,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||xj(b,b.a,!1),xj(b,c,!0)}else c.autoplay&&(yield Pj(a.X))})};
|
|
86
|
+
Jk=function(a,b,c){return _.w(function*(){if(!(yield Nk(a,b)))throw Error("Failed to bind");yield dl(a,b,1,!1,c)})};Wk=function(a){return a.f.getTimelineCues().filter(b=>_.hk(b.schemeIdUri)&&b.customAttributes)};Xk=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ca)&&!yk(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ca))};
|
|
87
|
+
Yk=function(a,b){var c=b.sort((h,k)=>h.startTime-k.startTime);const d=a.ka.resolutionOffsetSec;let e=Infinity;const f=[];for(let h=0;h<c.length-1;h++){const k=c[h],l=c[h+1];l&&(e=Math.min(e,l.startTime-k.endTime));l&&l.startTime<=k.endTime&&f.push(`Interstitials ${k.id} and ${l.id} `+"overlap.")}e<d&&(c=e/2,a.ka.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${d} s) auto-reconfiguring to `+`${c} s.`));const g=[];b.forEach(h=>{const k=h.customAttributes[_.Mb];
|
|
88
|
+
h.customAttributes[_.Lb]||k||g.push(`Interstitial cue ${h.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<g.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${g.join(" ")}`):0<f.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${f.join(" ")}`);return 0===g.length};
|
|
89
|
+
Zk=function(a,b,c){_.w(function*(){var d=$k(a,b,0);const e=yield Nk(a,d),f=d.wa?d.wa.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.ca}`),yield dl(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=yj(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 gk(a.X),c||(yield Pj(a.X))})};
|
|
90
|
+
$k=function(a,b,c){{const u=b.customAttributes[_.Mb],v=b.customAttributes[_.Lb],y=b.customAttributes[_.Pb],A=b.customAttributes[_.Nb];var d=b.customAttributes[_.Ob]||[];b.customAttributes[Qb]||(b.customAttributes[Qb]=null==y||0<y?"RANGE":"POINT");var e=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];e="CONTENT"===e?Cj:"AD"===e?Bj:void 0;var f=b.id,g=b.startTime,h=b.endTime,k=wk,l=null==y?null:Math.max(0,b.startTime+y),m="POINT"===b.customAttributes[Qb],n=!d.includes("SKIP");d=!d.includes("JUMP");{const D=
|
|
91
|
+
b.customAttributes[Kb];if(D)try{var p=JSON.parse(atob(D))}catch(E){p=null}else p=null}b={ca:f,startTime:g,endTime:h,state:k,Af:v,Bf:u,wa:null,W:l,zi:y,bc:A,Rc:c,Uh:m,lh:n,Mf:d,Ig:p,pg:null!=y&&0>y,once:(b.customAttributes.CUE||[]).includes("ONCE"),Hg:!1,tf:!0,customAttributes:b.customAttributes,audio:e}}a.a.push(b);return b};
|
|
92
|
+
al=function(a,b){_.w(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ca);if(h){const k=h.customAttributes[_.Nb];null==g.bc&&null!=k&&(a.g.info(Ab,h.id,"Playout limit",k),g.bc=k,1===g.Rc&&g.state===Ek&&el(a,g))}});else{var d=b.find(g=>g.id===c.Ib);if(d){var e=d.customAttributes[_.Nb];if(null!=e){var f=a.a.find(g=>g.ca===d.id);f&&null==f.bc&&(a.g.info(Ab,d.id,"Playout limit",e),f.bc=e,yield Oj(a.X,e))}}}})};
|
|
93
|
+
el=function(a,b){_.w(function*(){yield Ik(a,b);yield Ok(a,b,a.f)})};
|
|
94
|
+
Nk=function(a,b){return _.w(function*(){b.state=Bk;if(b.Af)try{a.g.info(`Load X-ASSET-LIST for ${b.ca}`);a.Sa(new _.G(Xb));const c=yield fl(a,b.Af);b.wa=c.ASSETS;b.wa&&0!==b.wa.length||a.g.info(`Interstitial ${b.ca} has no assets, `+"will be smoothly skipped");if(null==b.W){const d=vk(b.wa.map(e=>e.DURATION));b.W=b.startTime+(null==b.bc?d:Math.min(b.bc,d))}b.state=gl;a.Sa(new _.G(Yb));a.Sa(new _.G(Zb,{id:b.ca,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=hl}else b.Bf?(b.wa=
|
|
95
|
+
[{URI:b.Bf,DURATION:b.endTime-b.startTime}],a.Sa(new _.G(Zb,{id:b.ca,detail:zk(b)})),b.state=gl):b.state=hl;return b.state===gl})};dl=function(a,b,c,d,e){return _.w(function*(){if(0!==b.wa.length&&a.X.getCurrentItem()){var f=Qk(a,b,c);0!==f.length&&(Rk(a,b,f),0===c&&a.f.isLive()||(null!=e?ek(a.X,e,!0):null!=b.W&&ek(a.X,b.W)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
|
|
96
|
+
Ok=function(a,b,c){if(b.wa)if(0===b.wa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ca}`):null!=b.W&&0!==b.zi?c.seek(b.W):a.g.info(`Empty VOD interstitial ${b.ca}, `+"continuing to next segment")};c.one(_.bg,g);a.h.push(()=>{c.off(_.bg,g)});a.g.info(`Schedule interstitial ${b.ca} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=Qk(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.W&&ek(a.X,b.W);d.next=[f];d.transition={de:{position:b.startTime,itemId:f,
|
|
97
|
+
W:b.W}};a.g.info(`Schedule interstitial ${b.ca} for `+`${b.startTime} s`);Rk(a,b,e)}}}};Mk=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Rc&&yk(c)&&0<d&&d<=a.ka.resolutionOffsetSec})||null};Pk=function(a){return a.a.find(b=>2===b.Rc)||null};
|
|
98
|
+
fl=function(a,b){return _.w(function*(){var c=a.X.Rd();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.nk(il(a,b));c=yield jl(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!Ak(c))throw new _.kl("Invalid X-ASSET-LIST list response");return c})};il=function(a,b){return(a=a.ka.ki)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
|
|
99
|
+
Qk=function(a,b,c){let d=0,e=b.wa.map((h,k)=>{const l=`${b.ca}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:il(a,h.URI),type:_.ll}},duration:h.DURATION,kb:d,Ib:b.ca,next:[],Va:new I(c,k+1,b.wa.length,h.DURATION,b.ca,b.lh,b.customAttributes||null),audio:b.audio}});e.forEach((h,k)=>{const l=k===e.length-1;l&&2===c||(l?(h.next=[rf],h.transition={za:rf}):(k=l?rf:`${h.Ib}-${k+1}`,h.next=[k],h.transition={za:k}))});e.forEach(h=>{h.fe=()=>{var k=h.Va;a.g.info(`Playing ad ${`${k.f}/${k.a}`} of interstitial `+
|
|
100
|
+
h.Ib)}});if(null!=b.bc&&(e=ml(a,b,e),0===e.length))return[];const f=e[0].fe;e[0].fe=()=>{b.Hg=!0;b.pg&&(b.tf=!1);a.g.info(`Playing interstitial ${b.ca} with `+`${b.wa.length} assets and will resume primary `+`content ${b.W?`at ${b.W.toFixed(1)} s`:"after interstitial ended"}.`);f()};e[0].ug=h=>{null==b.W&&(b.W=b.startTime+h,ek(a.X,b.W),a.g.info("Primary content will resume at",b.W.toFixed(1),"s"));b.state=nl};const g=e[e.length-1];g.za=()=>{b.state=xk;Sj(a.X,e.map(h=>h.id));2===c&&gk(a.X)};g.$e=a.ka.adReleaseDelayMs;
|
|
101
|
+
return e};Rk=function(a,b,c){Qj(a.X,c);c=a.X;Vj(c);c.f&&(c.f.Va&&Ij(c,c.f,c.f.Va),Kj(c),Lj(c,c.f.next));b.state=Ek;a.Sa(new _.G(_.ec,{detail:null}))};
|
|
102
|
+
ml=function(a,b,c){const d=b.bc;a.g.info(`Playout limit for ${b.ca} is `+`${d} s`);b=c[c.length-1].kb;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.kb-f.duration<=d);e.forEach(f=>{f.Va.a=e.length});a=e[e.length-1];c=d-(a.kb-a.duration);.1>Math.abs(c-a.duration)?a.transition.za=rf:a.transition.de={position:c,itemId:rf,W:null};a.maxDuration=c;return e};
|
|
103
|
+
ol=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)})}};
|
|
104
|
+
sl=function(a){a.a.on(window,"offline",()=>{pl(a,!1)});a.a.on(window,"online",()=>{a.f||ql(a)});a.a.on(a.m,Nf,()=>rl(a));a.a.on(a.m,"suspend",()=>rl(a));a.a.on(a.m,_.Eg,()=>rl(a));a.a.on(a.m,_.ff,()=>{a.f||ql(a)});a.a.on(a.m,_.sf,()=>{a.f||ql(a)});a.a.on(a.m,_.Pf,()=>{switch(a.m.getState()){case 2:rl(a);break;default:rl(a)}})};tl=function(a){a.h&&(a.h.stop(),a.h=null)};rl=function(a){a.f&&ql(a)};
|
|
105
|
+
vl=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield ul(a.j,b.url,b.attemptParameters,b.method),pl(a,b))})};ql=function(a){a.m.getConfiguration().connectivityCheck&&(tl(a),a.h=(new _.Mi(()=>vl(a))).la(5))};pl=function(a,b){tl(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.G(Ne,{online:a.f})))};_.xl=function(a,b){a.a.push(wl(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};
|
|
106
|
+
yl=function(a,b){try{return new URL(a,b)}catch(c){return null}};zl=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};Al=function(a){return zl()-a.a};Cl=function(a){const b=new Bl;b.a=a.a;return b};Dl=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};
|
|
107
|
+
El=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Dl(a,e),tk(c,e.byteLength,Al(a.h)),a.h.a=zl());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>El(a,b,c))})};Fl=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};
|
|
108
|
+
Gl=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};Il=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Hl(a);for(;null!==b;){if(b.name===_.we){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Hl(a)}return null};
|
|
109
|
+
Jl=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Al(a.w)),a.w.a=zl());if(f)return e=Fl(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Gl(a,g);var k=Il(a);for(e=[];k;)e.push(k),k=Il(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
|
|
110
|
+
c(!1,k))&&(h=e)}}return h.then(()=>Jl(a,b,c,d))})};
|
|
111
|
+
Hl=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Kl(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Kl(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.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.H(_.C,3,3E3);}if(2097151<f)throw new _.H(_.C,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
|
|
112
|
+
Kl=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
|
|
113
|
+
Ol=function(a){var b=new Ll;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Ml,d={Wc:!1,Lg:!1};b={U:Nl(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.Wc||(d.Wc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Lg=!0;c.abort()},a);b.U=b.U.finally(()=>{window.clearTimeout(e)})}return b};
|
|
114
|
+
Nl=function(a,b,c,d){return _.w(function*(){const e=new Bl,f=Cl(e);try{const g=yield Pl(a,c),h=lk(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Al(f),request:b};if(!ok(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Al(e),qk(k);const l=g.headers.get(sa);sk(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),p=new Ql(m,!b.disableMergedFragments);k.data=yield Jl(p,n,(u,v)=>{if(d.Wc)return null;
|
|
115
|
+
v&&v.data&&(tk(b,v.data.byteLength,Al(f)),f.a=zl());return b.onFragment&&v?b.rateLimitBps?uk(b.rateLimitBps,Al(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),p=yield El(new Rl(m),n,b);b.rateLimitBps&&(yield uk(b.rateLimitBps,Al(e),p.byteLength));k.data=p}if(d.Wc)throw Error("Request was aborted");k.timeMs=Al(e);return pk(k)}catch(g){if(d.Wc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Lg)throw new _.H(1,1,1003,{url:a,request:b});if(g&&
|
|
116
|
+
1001===g.code)throw g;_.xh("Error while fetching data:",g);throw new _.H(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};
|
|
117
|
+
Ul=function(a){const b=a.uris[a.uriIndex],c=new Sl,d=new Bl,e=Cl(d);let f=0,g;const h=new _.Tl;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(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Al(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(sa),sk(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
|
|
118
|
+
const p={};for(const u of n)n=u.split(": "),p[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Al(e);l||tk(a,m.response?m.response.length:0,u);const v=_.rk(p,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?uk(a.rateLimitBps,Al(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.H(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
|
|
119
|
+
for(var p of n)n=p.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}p=_.rk(u,m.response,m.status,b,m.responseURL,a,Al(e),g);h.resolve(p)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Al(d);d.a=zl();if(100<n||m.lengthComputable&&m.loaded===m.total)tk(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{U:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
|
|
120
|
+
7001,{url:b,request:a}));return Promise.resolve()}}};_.Wl=function(a,b=!0){a=_.Vl(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Vl=function(a){a=ni(_.F(a));return btoa(a)};_.Xl=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};_.Yl=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};
|
|
121
|
+
_.Zl=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};_.$l=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};_.am=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};
|
|
122
|
+
cm=function(a){try{const b=a.uris[a.uriIndex],c=_.bm(b);return{U:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{U:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
|
|
123
|
+
_.bm=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.xh("Bad data URI, failed to parse scheme"),new _.H(_.C,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.xh("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.C,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?_.Xl(a).buffer:_.si(a).buffer,contentType:c}};
|
|
124
|
+
wl=function(a,b){a.U.then(()=>b(!0),()=>b(!1));return a};
|
|
125
|
+
fm=function(a){a.h=a.C.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=dm(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*dm(e.request.fuzzFactor,.5));a.f*=dm(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;em(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.H(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
|
|
126
|
+
let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.U}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return a.A&&a.A(e),fm(a);g&&e.a(_.C);a.w.reject(e)}else a.w.reject(e)})};em=function(a,b,c){a.o=setTimeout(b,c)};dm=function(a,b){return null===a||void 0===a?b:a};
|
|
127
|
+
jl=function(a,b){return _.w(function*(){const c=yield gm(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ge)throw Error("Not an object");return d}catch(d){throw new _.kl("Failed to parse JSON response","json-failed");}})};ul=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.nk(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).U}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
|
|
128
|
+
hm=function(a,b){a.A=b};gm=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.oi(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
|
|
129
|
+
_.lm=function(a,b,c){if(a.w)return new im(Promise.reject(new _.H(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.l&&0<a.l&&(b.rateLimitBps=a.l);var d=[];for(var e of a.h)d.push(e);if(b.requestModifiers)for(const g of b.requestModifiers)d.push(g);b.requestModifiers=d;jm(a,b);b.responseModifiers=[...a.j,...b.responseModifiers||[]];let f;e=d=new _.Tl;try{const g=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.f}];for(const h of g)for(const k of h.modifiers)e=e.then(l=>{if(f.a)throw new _.H(_.C,
|
|
130
|
+
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 _.H)throw l;throw new _.H(_.C,1,1006,null,l);});e=e.then(h=>({request:h,plugin:km(a,h)}));f=new im(e,a.A);for(const h of b.responseModifiers)f.then(k=>{const l=()=>{if(f.a)throw new _.H(_.C,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 _.H&&k.data&&k.data.response){const l=h(k.data.response);
|
|
131
|
+
if(l&&l.then)return l.then(()=>Promise.reject(k))}return Promise.reject(k)}).catch(k=>{if(k instanceof _.H)throw k;throw new _.H(_.C,1,1007,null,k);});_.xl(a.o,f);d.resolve(b);return f}catch(g){return new im(Promise.reject(g))}};jm=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};km=function(a,b){b=b.uris[b.uriIndex];var c=new _.mm(b,location.href);c=c?c.a.protocol.slice(0,-1):"";const d=a.a[c];if(!d)throw new _.H(_.C,1,1E3,{url:b});return e=>d(e)};
|
|
132
|
+
om=function(){nm.forEach(a=>a())};_.pm=function(a){nm.push(a)};_.rm=function(a){qm&&performance.mark(a)};_.tm=function(a,b,c){qm&&(b=performance.measure(a,b,c),null!=b&&sm.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};zm=function(a,b){var c=um;ym.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Dm=function(a,b){var c=[Am,Bm,Cm,um];for(const d of c)if(c=ym.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
|
|
133
|
+
Em=function(a,b){const c=b||Zh;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)}};_.Fm=function(a){return null!=a};Gm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.kl("No non-null, non-undefined value found");};Hm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};_.Im=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
|
|
134
|
+
_.Jm=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)},""):""};Km=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};
|
|
135
|
+
_.Lm=function(a,b){if(a.startsWith("http://")||a.startsWith(_.ee))return a;let c=b;b.startsWith("//")&&(c=`${location.protocol}${c}`);b=new URL(c);b.search="";return(new URL(a,b)).toString()};_.Mm=function(a){if(!a)return null;a=(new _.mm(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};Om=function(a,b){const c=Nm[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.J?"":null};
|
|
136
|
+
_.Pm=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Qm=function(a){return a.split(";")[0]};_.Rm=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(","):""};
|
|
137
|
+
_.Vm=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.aj()&&(a=360);const b=_.jk();b.maxAttempts=3;a={source:"",license:Sm,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.jk(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
|
|
138
|
+
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Tm(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.jk()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.ve,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
|
|
139
|
+
suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,xmlParser:_.Um,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,
|
|
140
|
+
stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.qf},restrictions:Tm(),tizen:{sideStreamText:_.Qi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Ad,
|
|
141
|
+
preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Db,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1,chromecast:{useSenderAbrConfig:!1,useSenderStreamingConfig:!1}};if(_.Qi()||_.Ti())a.ads.hls.enable=!1;if(_.Pi("Edge/")||_.Qi())a.streaming.gapDetectionThreshold=.5;_.Ti()&&(a.streaming.stallEnabled=!1);_.Vi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=
|
|
142
|
+
.02);_.Qi()&&(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};Tm=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}};
|
|
143
|
+
_.Xm=function(a,b){b=void 0===b?{}:b;if(!a)return _.Vm();const c=[_.Vm()];let d=!1;for(let e of a)null!==e&&void 0!==e&&(_.ih(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.Bi||null==e.suggestedPresentationDelay||c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));
|
|
144
|
+
a=_.bh.apply(null,c);_.ih(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.jh(a.volume)||lh(a.volume)))throw new _.H(_.C,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.ih(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.C,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.ih(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.C,
|
|
145
|
+
7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.ih(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.C,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.ih(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.C,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.ih(a.drm.env))throw new _.H(_.C,7,
|
|
146
|
+
7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.ih(a.drm.offlineId))throw new _.H(_.C,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(!_.jh(b.bufferingGoal)||lh(b.bufferingGoal))throw new _.H(_.C,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.jh(b.rebufferingGoal)||
|
|
147
|
+
lh(b.rebufferingGoal))throw new _.H(_.C,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.C,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.jh(b.bufferBehind)||lh(b.bufferBehind))throw new _.H(_.C,7,7100,"config.streaming.bufferBehind is not a number");if(!_.jh(b.smallGapLimit)||lh(b.smallGapLimit))throw new _.H(_.C,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.jh(b.durationBackoff)||lh(b.durationBackoff))throw new _.H(_.C,
|
|
148
|
+
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 _.H(_.C,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Wm(a.restrictions);Wm(a.abr.restrictions);a.abr.initialRestrictions&&Wm(a.abr.initialRestrictions)}return a};
|
|
149
|
+
Wm=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);
|
|
150
|
+
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 _.H(_.C,7,7100,"Restrictions contain NaN");};Ym=function(a){return typeof a===_.Ge&&!Array.isArray(a)&&"source"in a};
|
|
151
|
+
Zm=function(a){if(!a)return null;a=(new _.mm(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.vc:a.endsWith(".M3U8")?_.ll:a.endsWith(".MP4")?_.yg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Ac:null};_.an=function(a){let b;Ym(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Sf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=$m(b[c]);d&&a.push(d)}return a};
|
|
152
|
+
$m=function(a){let b=null;_.ih(a)&&(a={url:a});typeof a===_.Ge&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Lc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Lc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Sf||(b.name=a.name),_.z(a.Xb)||typeof a.Xb!==_.Sf||(b.Xb=a.Xb),_.z(a.$a)||typeof a.$a!==_.Sf||(b.$a=a.$a));b&&!b.type&&(b.type=Zm(a.url),b.type?bn.debug("Detect media type "+b.type+" for "+a.url):
|
|
153
|
+
bn.warn("Unable to detect media type for "+a.url));return b};cn=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};_.en=function(a){_.dn[a.I]=a};
|
|
154
|
+
_.gn=function(a){const b={attemptParameters:_.jk(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ha:{},widevineVersion:_.ud};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!==
|
|
155
|
+
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Sf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.dn[a.env]||null;if(!c)throw _.wh(_.va,_.hb+a.env+_.aa),new _.H(_.C,6,6015,`DRM environment '${a.env}' is missing.`);b.Ha=_.fn(c,a.customData)||{};_.vi(a.env.toLowerCase(),Qd)&&(b.enforceSingleSession=!0)}return b};
|
|
156
|
+
jn=function(a){var b=hn;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=_.si(d),n=_.Xl(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.kl("Signature Verification failed",ig))}).catch(g)}else f()})};
|
|
157
|
+
ln=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 kn(b[0],b[1],b[2]);a.a=b}return a.a};mn=function(a){return _.w(function*(){var b=ln(a);try{yield jn(b)}catch(c){if(c&&c.code===ig)throw c;b=new _.mm(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;}})};
|
|
158
|
+
nn=function(a){switch((a.ga[0]||{src:"",type:""}).type){case _.vc:a="dash";break;case _.Ac:a="ss";break;case _.ll:a="hls";break;case _.yg:a="mp4";break;default:a=""}return a};on=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};pn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
|
|
159
|
+
qn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};rn=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.mm(a)).a.hostname:""};sn=function(a){const b=a.configuration;let c="no";b.drm&&!_.kh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Qd)||rn(a).endsWith("drmtoday.com"))&&(c=Qd);return c};
|
|
160
|
+
tn=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.ud:b="wv";break;case _.sd:b="pr";break;case _.qd:b="fps"}return b};un=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};vn=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};
|
|
161
|
+
An=function(a,b){const c="ie"===_.pj().browser;var d=b.configuration;const e=[...Array.from(_.Gh.keys()),...b.Ag];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":on(d),"CL-ASSET-ID":pn(d),"CL-SESSION-ID":qn(d),"CL-PLAYBACK-TYPE":b.isLive?wn:xn,"CL-CONTENT-TYPE":nn(b),"CL-PLUGINS":e.join(" "),"CL-DRM":sn(b),"CL-DRM-CDM":tn(b),"CL-DRM-SEC-LEVEL":vn(b),"CL-DRM-OFFLINE":un(b),"CL-DRM-IP":rn(b)};yn&&yn.companionSdk&&(yn.companionSdk.name&&(b["CL-COMPANION-SDK"]=yn.companionSdk.name),
|
|
162
|
+
yn.companionSdk.version&&(b["CL-COMPANION-SDK-VERSION"]=yn.companionSdk.version));c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.nk(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.zn).fetch(d).U.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=ln(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="Castlabs Player license is invalid";
|
|
163
|
+
if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.g.error(Ma+k);g=Promise.reject(new _.H(_.C,7,g,k))}}return g})};
|
|
164
|
+
_.Cn=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Bn.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Dn=function(a,b){a=_.Cn(a);b=_.Cn(b);return a.split("-")[0]===b.split("-")[0]};
|
|
165
|
+
Hn=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}=En(c[e]);Object.keys(Fn).includes(f)&&(d[Fn[f]]=g)}return d}).filter(c=>_.eh(c));return 0<b.length?b:null}catch(b){return Gn.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
|
|
166
|
+
En=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.kl("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 _.kl(`Parsing CMSD, not recognized value type of ${a}`);};
|
|
167
|
+
Jn=function(a){return b=>{{var c=b.headers;let e=b=null;var d=oh(c,"cmsd-dynamic");c=oh(c,"cmsd-static");d&&(b=Hn(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=En(f[c]);Object.keys(In).includes(g)&&(d[In[g]]=h)}e=_.eh(d)?d:null}catch(f){Gn.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.G("cmsd-event",{ij:b,uj:e}))}}};_.Ln=function(a){a&&(0<=Kn.indexOf(a)||Kn.push(a))};
|
|
168
|
+
Nn=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.hk(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.F:null;a.h=new Mn;a.h.o(a.a,a.A,b)}};Pn=function(a,b){a.H=new On(b);mn(a.H).catch(c=>{setTimeout(()=>{a.g.error(Ma+c);a.trigger(new _.G(_.Wd,{detail:new _.H(_.C,7,7101)}));a.destroy()},1E3)})};Rn=function(a,b){a.Y=b;for(const c of a.Y)(b=c.id())&&(a.K[b]=c);_.Qn(a,"onPlayerCreated")};
|
|
169
|
+
_.Sn=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
|
|
170
|
+
Tn=function(a,b){_.w(function*(){a.j.getMedia()||a.j.getCastElement();a.H||(a.H=new On(a.f.license));try{a.g.debug("Verifying license remotely"),yield An(a.H,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(cn,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Qn=function(a,b,...c){if(!a.ba)return Promise.resolve();const d=a.Y.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
|
|
171
|
+
Un=function(a){return _.w(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.da.off(document,Cg);a.trigger(new _.G(_.wf));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Pf,d=>{b=d});return _.Qn(a,_.Le).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
|
|
172
|
+
a.trigger(b))}).finally(()=>{a.a.off(_.Pf,c);a.trigger(new _.G(vf))})}a.trigger(new _.G(vf));return new Promise(b=>b())})};Vn=function(a){a.F&&(a.g.info("Playback session ended, ID:",a.F),a.F=null,a.a&&a.a.setPlaybackSessionId(null))};Wn=function(a,b){const c=Bh(d=>d.f(_.bb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.H(_.C,7,7003,"No compatible player implementing playlist mode found!");return{ab:c,player:c.create(),sourceIndex:0}};
|
|
173
|
+
Yn=function(a,b,c){if(a.M===_.bb)b=Wn(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.T){a.T=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.yh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={ab: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?(_.zh.debug("Player Factory '"+a.ab.a()+"' can play",b[d]),b=new Xn(a.ab,d)):(_.zh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
|
|
174
|
+
null;if(!b)throw new _.H(_.C,7,7003,"No player factory compatible with given sources found!");c=b.ab;a=c.create();b={ab:c,player:a,sourceIndex:b.sourceIndex}}else b={ab:a.A,player:a.a,sourceIndex:0};return b};
|
|
175
|
+
_.co=function(a,b,c){return _.w(function*(){if(a.P)throw new _.H(_.C,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.H(_.C,7,7E3,"No surface associated with this player!");_.rm(af);yield a.release();var d=c||_.an(b);if(!b||0===d.length)throw new _.H(_.C,7,7003,Wa);a.ha=d;a.f=_.Xm([a.C,b,{source:d}]);a.R=!1;d=Yn(a,d,a.f);_.Sn(a,d.player,d.ab);Zn(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);$n(a);a.a&&a.a.setCdnErrorCallback(a.L);ao(a,a.f);bo(a);if(a.f.pauseWhenInBackground)a.da.on(document,
|
|
176
|
+
Cg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Ph(a);yield _.Qn(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.rm($e);_.tm("player.beforeLoad",af,$e)})};_.eo=function(a){return _.w(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.G(ue));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
|
|
177
|
+
_.go=function(a){return _.w(function*(){_.rm(Xe);Tn(a,{configuration:a.getConfiguration(),ga:a.eg(),drmInfo:a.getDrmInfo(),Ag:Object.keys(a.K),isLive:a.isLive()});fo(a);Qh(a);yield _.Qn(a,_.Ie);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.rm(We);_.tm("player.afterLoad",Xe,We)})};ho=function(a){return _.w(function*(){if(a.a){var b=a.a;b.Og?(a.trigger(new _.G(ue)),yield b.Og(),yield _.go(a)):a.g.warn(ib)}else a.g.warn(fb)})};
|
|
178
|
+
Zn=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=ol()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.F=c};$n=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.Je&&a.Hc&&(yield a.Hc(b))}))};ao=function(a,b){if(b=Fh(a,b))a.h=b.create(a)};bo=function(a){a.f.cmsd.enabled&&(a.B=new io(a),a.a.setCmsdManager(a.B))};
|
|
179
|
+
jo=function(a){const b=_.Yh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().pa().filter(f=>c?f.kind===_.Yd:f.kind!==_.Yd);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().oa();e&&e.language?(e=_.Cn(e.language||""),b.push(e)):(e=a.getTrackManager().Ea())&&e.language&&(e=_.Cn(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=>
|
|
180
|
+
{const g=_.Cn(f);if(f=d.find(h=>{h=_.Cn(h.language||"");return _.Dn(h,g)}))return a.getTrackManager().Ra(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};fo=function(a){_.w(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);jo(a)})};mo=function(a,b){return _.w(function*(){yield ko(a,()=>Promise.all(lo(a).map(b)))})};
|
|
181
|
+
no=function(a,b){_.w(function*(){yield ko(a,()=>Promise.all(a.f.filter(c=>null!=c.getLoadedSource()).map(b)))})};lo=function(a){return[a.xc,...a.f].filter(b=>null!=b)};ko=function(a,b){return _.w(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};po=function(a){return oo(a).filter(b=>b.type===rd&&!b.We)};qo=function(a){a.forEach(b=>{b.We=!0})};uo=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,jg:!1}));a=ro(a);b&&(a=so(a));return new Set(to(a))};
|
|
182
|
+
oo=function(a){const b=[];for(const c of a)b.push(c);return b};vo=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Sf||a.startTime,f=b.Sf||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};to=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?wo(c,a):(a=xo(c),b.push(a));return b};
|
|
183
|
+
wo=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.qg,b.type=_.Ff};xo=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:_.ce,eventElement:null};wo(a,b);return b};
|
|
184
|
+
ro=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(yo));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(yo(d))||(d.jg=!0)});return Array.from(b.values())};so=function(a){a.forEach(b=>{b.jg&&(b.endTime=b.startTime,b.startTime=0)});return a};yo=function(a){return`${a.startTime}-${a.endTime}`};
|
|
185
|
+
Do=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.be;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=po(d);qo(c);a.a=uo(c,a.l);0<a.a.size&&(zo(a,a.a),a.m.trigger(new _.G(_.dg)));a.j.on(b,_.zd,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.G(_.bg,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.G(_.cg,
|
|
186
|
+
{detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.G(_.bg,{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);Ao(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;Bo(a,b);f=po(d);var k=uo(f,a.l);g=new Set;h=!1;for(l of k)(k=Co(a,l))?(l.customAttributes&&(k.customAttributes=_.bh(k.customAttributes||{},l.customAttributes)||
|
|
187
|
+
void 0),h=!0):(a.a.add(l),g.add(l));var l={di:g,gh:0<g.size||h};const {di:m,gh:n}=l;qo(f);(e||n)&&a.m.trigger(new _.G(_.dg));zo(a,m)},6E3))}};Eo=function(a,b){a.j.on(b,_.nc,c=>{c=c.track;c.kind===_.ze&&Do(a,c)})};zo=function(a,b){for(const c of b)a.m.trigger(new _.G(_.ag,{detail:c}))};Co=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
|
|
188
|
+
Bo=function(a,b){if(b.cues){var c=oo(b.cues).filter(f=>f.type===rd),d=c.filter(f=>f.We);c=c.filter(f=>!f.We);var e=[];for(const f of c)for(const g of d)vo(f,g)&&(e.push(f),g.Sf=f.startTime);Ao(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Ao=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};
|
|
189
|
+
Fo=function(a,b){b=b.track;b.kind!==_.ze&&(b.mode===_.If&&(b.mode=_.be),a.a.on(b,_.zd,c=>{c=c.target||c.srcElement;c.mode=_.be;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};_.K=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.C,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};Go=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Mg]=a.f),a.a&&(b.headers[Ng]=a.a))};
|
|
190
|
+
Ho=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Mg],a.a=b.headers[Ng],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(_.oi(_.Xl(b))),{delay:a.renewalPeriod,Zi:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};
|
|
191
|
+
_.Jo=function(a){a=Io[a];if(!a)return null;const b=_.pj();return b.os===gj&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};_.Ko=function(a,b){return void 0===a?b:null===a?null:typeof a===_.Sf?_.Jo(a):a};
|
|
192
|
+
_.fn=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[_.ud];g&&(c[_.ud]={licenseUrl:g.licenseUrl,videoRobustness:Hm(d,g.videoRobustness),audioRobustness:Hm(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:Gm(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:Gm(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,
|
|
193
|
+
!1),serverCertificate:_.Ko(f,g.serverCertificate)});(g=a.f[_.qd])&&(c[_.qd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.sd])&&(c[_.sd]={licenseUrl:g.licenseUrl,videoRobustness:d||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
|
|
194
|
+
_.Lo=function(){throw new _.H(_.C,3,3E3);};_.Mo=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.F(a.f.buffer);b=_.F(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Lo()}};_.L=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Lo()}};_.No=function(a){return a.a<a.f.byteLength};_.Oo=function(){throw new _.H(_.C,3,3E3,"Buffer read out of bounds.");};_.Po=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Oo()}};
|
|
195
|
+
_.Qo=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Oo()}};_.M=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Oo()}};_.Ro=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Oo()}};_.So=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){_.Oo()}if(2097151<c)throw new _.H(_.C,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
|
|
196
|
+
To=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Po(a);return c};_.Uo=function(a,b){a.a+b>a.f.byteLength&&_.Oo();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.F(c)};Vo=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Wo=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Xo=function(a){for(;_.No(a.reader)&&!a.parser.a;)a.parser.he(a.start+a.headerSize,a.reader,a.partialOkay)};
|
|
197
|
+
_.Yo=function(a){for(let b=_.M(a.reader);0<b&&!a.parser.a;--b)a.parser.he(a.start+a.headerSize,a.reader,a.partialOkay)};_.Zo=function(a){return b=>{const c=b.reader.Ma()-b.reader.getPosition();a(_.Uo(b.reader,c))}};_.$o=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};ap=function(a){let b="";try{b=_.ri(a)}catch(c){}return b};_.cp=function(a){a=ap(a);let b="";a.length&&(b=(new _.bp(a)).a);return b};
|
|
198
|
+
ep=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.oi(a)),d=_.Xl(c.sinf[0]);(new _.dp).N(_.Lf,_.Xo).N("schi",_.Xo).N("tenc",e=>{e.reader.skip(6);_.Po(e.reader)&&(e.reader.skip(1),b=_.Zl(_.Uo(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
|
|
199
|
+
gp=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.C,6,6102);let d;typeof b===_.Sf?d=_.ti(b,!0):d=b;a=_.ti(ap(a),!0);b=new _.fp(12+a.byteLength+d.byteLength+c.byteLength,!0);_.L(b,a.byteLength);_.Mo(b,_.F(a));_.L(b,d.byteLength);_.Mo(b,_.F(d));_.L(b,c.byteLength);_.Mo(b,_.F(c));return _.F(b.buffer)};_.hp=function(a){var b=_.F(a.body);b=_.Wl(b);a.headers[ta]=Bc;a.body=_.si("spc\x3d"+b).buffer};
|
|
200
|
+
_.ip=function(a){let b;try{b=_.oi(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=mi(_.Xl(b))};np=function(a,b){b=jp(b);if(a===_.ud)return b+kp;if(a===_.sd)return b+lp;if(a===_.qd)return b+mp;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
|
|
201
|
+
_.qp=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(xa)?c.customData&&(_.pp(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):op.warn(Ta)};
|
|
202
|
+
_.rp=function(a,b){try{const c=_.F(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));op.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){op.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
|
|
203
|
+
_.tp=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.qp(a,b,c,!1);b.headers[ta]=Bc;c={spc:_.Vl(b.body)};if((a=a.drm)&&a.env.startsWith(ya)&&d){a={};var e=Km((new _.bp(sp(d))).f);d=e.keyId;if(e=e.assetId)op.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(op.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(op.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(op.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
|
|
204
|
+
_.ui(_.Jm(c,!0))};_.up=function(a,b){op.debug("Clearing response data");200===b.status&&(a=_.oi(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Xl(a).buffer)};
|
|
205
|
+
_.vp=function(a,b,c){b=ap(b);c=c&&c.customData?c.customData:{};b=new _.bp(sp(b));const d=Km(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.xi(`${a}`)&&(d.assetId=a,op.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.xi(`${e}`)&&(d.variantId=e,op.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],op.debug("KeyId found in FPS SKD. Removing other parameters")):
|
|
206
|
+
a=["assetId","variantId"];b.f=_.Jm(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Im(b);return c.fpsContentId=b};_.wp=function(a,b){a=a.drm;if(!a||!a.env.startsWith(xa))op.warn(Ta);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ya)){const c=new _.mm(b.uris[0]);let d=c.a.pathname;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.a.pathname=d;b.uris[0]=c.toString()}};
|
|
207
|
+
xp=function(a,b,c){_.qp(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.mm(b.uris[0]);c.a.searchParams.set(_.Se,a.toString());b.uris[0]=c.toString()};jp=function(a){if(a===yp)return"https://lic.drmtoday.com";if(a===zp)return"https://lic.staging.drmtoday.com";if(a===Ap)return"https://lic-demo.staging.drmtoday.com";if(a===Bp)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};
|
|
208
|
+
sp=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};_.pp=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.eh(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};
|
|
209
|
+
Dp=function(a){const b={},c=a?a[Og]:void 0;a=Cp[a?a[Og]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};Ep=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 op.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};Fp=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
|
|
210
|
+
Hp=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Gp.value().get(b),c.one(a,b,d))};
|
|
211
|
+
Ip=function(a,b){a.f=b;_.Wh(a.a);if(!b)return Promise.resolve();a.a.on(b,Td,c=>{_.wh("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,Kg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.F(c.initData);if(_.li(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=qi(c.subarray(4),
|
|
212
|
+
!0);c=_.si(c);const d=new Event(Td);d.initDataType="skd";d.initData=mi(c);a.f.dispatchEvent(d)}});Hp(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};Jp=function(a,b){Fp(a.keyStatuses,b);b=new _.G(he);a.dispatchEvent(b)};
|
|
213
|
+
Mp=function(a,b){a.a=b;_.Wh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Td);d.initDataType=_.Tc;d.initData=mi(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=Kp(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.G(_.ye,{messageType:d?ke:je,message:c.message});d=e;_.wh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.xh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=Kp(a,
|
|
214
|
+
c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=Kp(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?Lp(d,_.Qe):1===e?Lp(d,"expired"):Lp(d,_.ge))}}}))};
|
|
215
|
+
Kp=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};Lp=function(a,b){Fp(a.keyStatuses,b);b=new _.G(he);a.dispatchEvent(b)};Np=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
|
|
216
|
+
Op=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===_.Te)if(c)d=_.F(_.si("LOAD_SESSION|"+c));else{const f=_.si("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.F(b),f.byteLength);d=g}else d=_.F(b)}catch(f){return Promise.reject(f)}a.f=new _.Tl;const e=Np(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ka)return a.f=null,Promise.reject(f);(new _.Mi(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
|
|
217
|
+
a.f=null}})).la(.01)}return a.f};Pp=function(a,b,c){if(a.a)a.a.then(()=>Pp(a,b,c)).catch(()=>Pp(a,b,c));else{a.a=b;if(a.h===Gg){var d=_.oi(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=_.Xl(e.keys[0].k);e=_.Xl(e.keys[0].kid)}else d=_.F(c),e=null;var f=Np(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
|
|
218
|
+
Sp=function(a,b){var c=Qp;if(a){var d=c.find(e=>e.a()===a);if(d)return Rp.info(Hb+d.a()),d.create();Rp.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return Rp.info(Hb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");Rp.info(Hb+c.a());return c.create()};_.Vp=function(a){var b=_.Yl(a);b=parseInt(b.byteLength,10).toString(16);b=_.Yl("12"+b+a);return new Tp(Up,a,b)};
|
|
219
|
+
_.Xp=function(a){const b=new _.Wp(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.M(b);var c=_.M(b);c=_.Wo(c);var d=_.M(b);const e=d>>>24;d&=16777215;var f=_.Uo(b,16);f=_.Zl(f);if(0<e){var g=_.M(b);b.skip(16*g)}g=_.M(b);const h=()=>{let u=_.Po(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Po(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.No(b))throw Error("not enough data to skip!");while(_.Po(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
|
|
220
|
+
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(;_.No(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=To(b,p);2===n?l.push(p):4===n&&(m=p)}else k(p)}_.wh("Parsed WV PSSH Box","size",a,"name",c,ug,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Vl(m):"","keyIds",l.map(u=>_.Zl(u)));return 0<l.length?_.Vp(_.Zl(l[0])):null};
|
|
221
|
+
_.Yp=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=_.F(a);a.set(b,0);return a};
|
|
222
|
+
_.cq=function(a){var b=_.N;a:{var c=new _.Wp(new DataView(a.buffer),!0);_.M(c);for(_.Qo(c);_.No(c);)if(1===_.Qo(c)){var d=_.Qo(c);c=_.Uo(c,d);break a}c=null}c||(c=a);a=qi(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(ug)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.N;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,oa);f=g?f.f(g):null;e={value:e,Ae:f}}else e=null;else e=null;d=e?[e]:(e=Zp(d))?[e]:(d=$p(d))?d:null;const {value:h="",Ae:k}=d&&d[0]||{};d=_.Xl(h);d=_.Yp(d);d=_.Zl(d);return new _.aq(_.bq,
|
|
223
|
+
d,b,c,a,k)};Zp=function(a){var b=_.N;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(oa);c=c.getAttribute("ALGID");return{value:b,Ae:a,eh:c}};
|
|
224
|
+
$p=function(a){var b=_.N;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(oa),e=c.getAttribute("ALGID");b.push({value:a,Ae:d,eh:e})}return b.length?b:null};dq=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.Mi(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};
|
|
225
|
+
_.fq=function(a){return eq(a)?_.sd:a};gq=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};
|
|
226
|
+
hq=function(a,b){b=b[_.fq(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))};
|
|
227
|
+
_.iq=function(a,b){b=_.Pm(a.mimeType,b||a.codecs);if(_.Dm(b,a.type)){a=a.type;var c=_.Dm(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};jq=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};lq=function(a){return(a.audioCapabilities||[]).some(kq)||(a.videoCapabilities||[]).some(kq)};
|
|
228
|
+
mq=function(a,b){a=_.cp(b);_.wh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
|
|
229
|
+
oq=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===nq){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.gh(k)||(k=mq);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.C,6,6103);}if(!l.length)throw new _.H(_.C,6,6101,"Content ID is an empty string");c=gp(c,l,a)}return c};eq=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
|
|
230
|
+
kq=function(a){return null!=a.robustness&&""!==a.robustness};pq=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.$l(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])}};
|
|
231
|
+
qq=function(a){var b=a.o;const c=a.ba;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.H(_.C,6,6014));a.D.Re(_.nh(c));a.A||a.g.info(wa);a.A=!0;a.F=!1};rq=function(a){a.h.forEach((b,c)=>{const d=b.Ne;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Qe(c.sessionId,e),b.Ne=e)})};
|
|
232
|
+
sq=function(a){return _.w(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.da.stop();a.da=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Gc&&c.Gc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.g.debug("Closing session",c.sessionId);try{yield dq(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",
|
|
233
|
+
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})};_.yq=function(a,b){const c=tq(a,b),d=uq(b);for(const e of d)vq(a,e,a.f.Ha);b=wq(a,b);if(!b.size)return a.T=!0,Promise.resolve();_.rm(Fd);a=_.xq(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.rm(Ed);_.tm("DRM queryMediaKeys_()",Fd,Ed)})};
|
|
234
|
+
_.Aq=function(a,b,c){c=void 0===c?[]:c;a.K=zq;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 _.yq(a,b)};
|
|
235
|
+
_.xq=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.H(_.C,6,6E3));null===a.l&&(a.l=Sp(a.f.emeApi,a.Za));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Tl;const e=_.pj(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.sd){if((_.Oi()||e.os===ij&&_.Pi("Chrome")&&!_.Oi())&&!a.f.Ha[m].useLegacySystem)return l.label=td,a.l.a(td,
|
|
236
|
+
[l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.sd;jq(l);return a.l.a(m,[l])});jq(l)}if(m===_.ud&&a.f.widevineVersion!==_.ud){const n=a.f.widevineVersion;if(!n.startsWith(_.ud))return a.g.error(`Invalid "widevineVersion" value "${n}".`),Promise.reject();const p=Object.assign({},l,{label:n,distinctiveIdentifier:_.Oe,persistentState:_.Oe});return a.l.a(n,[p]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
|
|
237
|
+
{a:{if(m===_.ud&&lq(l)){const p=_.pj();if(lq(l)&&p.os===gj&&p.browser===Yc){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");jq(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.pj();if(h.os===ij&&10<=h.osVersion.major&&"edge"===h.browser)g=_.sd;else if("safari"===h.browser)g=_.qd;else if(h.browser===Yc||"firefox"===h.browser)g=_.ud}g&&(h=
|
|
238
|
+
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 _.H(_.C,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(_.fq(k.keySystem));
|
|
239
|
+
p=[];l=[];const u=[],v=[];pq(n.drmInfos,p,l,u,v);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===_.yf,persistentStateRequired:n.persistentState===_.yf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
|
|
240
|
+
"",serverCertificate:l[0],initData:u,keyIds:v,periodId:null}}a.a=m;if(!a.a.licenseServerUri)throw new _.H(_.C,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.T=!0)}).catch(k=>{if(!a.j){a.a=null;a.J.clear();if(k instanceof _.H)throw k;throw new _.H(_.C,6,6002,{browserError:k.message});}});c.reject();return d};
|
|
241
|
+
Bq=function(a){a=mh(a.f.Ha[_.Pe]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Yl(f);e=_.Yl(e);e={kty:"oct",kid:_.Wl(f,!1),k:_.Wl(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.si(d),initDataType:"keyids"}];return{keySystem:_.Pe,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
|
|
242
|
+
keyIds:[],periodId:null}};uq=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};Cq=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ha[c.keySystem]||(a.f.Ha[c.keySystem]={licenseUrl:""})};
|
|
243
|
+
tq=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=mh(a.f.Ha);gq(b,d)}d=a.f.Ha[_.qd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.qd));if(!1!==a.f.bj&&_.$i()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.qd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=Bq(a))for(const g of b)g.drmInfos=[f];b=uq(b);Cq(a,b);for(const g of b)hq(g,
|
|
244
|
+
a.f.Ha);return c};vq=function(a,b,c){const d=_.fq(b.keySystem);c=c[d];d===_.Pe&&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)};
|
|
245
|
+
wq=function(a,b){var c=new Set(uq(b));const d=a.G?_.yf:_.Oe,e=a.G?[_.Te]:[Wf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Tc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Oe,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.iq(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Qi()&&(h=_.iq(b,_.Sd));const k=c?_.iq(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Qi()&&(l=_.iq(c,_.Sd));
|
|
246
|
+
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=_.yf);m.persistentStateRequired&&(n.persistentState=_.yf);b&&_.Yh(m.audioRobustness).forEach(p=>{const u={robustness:p||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:p||
|
|
247
|
+
"",contentType:h})});c&&_.Yh(m.videoRobustness).forEach(p=>{const u={robustness:p||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:p||"",contentType:l})})}}return a};Dq=function(a){return _.w(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 _.H(_.C,6,6003,b.message,b))}})};
|
|
248
|
+
_.Hq=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==zq)){var e=a.keySystem();if(!e.startsWith(_.qd)&&b===_.Tc){const f=new Eq(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||
|
|
249
|
+
_.Qi(2)||a.keySystem().startsWith(_.qd)||!_.Fq(a,d,c,!0))&&Gq(a,d,null,b,c)}};Iq=function(a,b){return _.w(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield Dq(a);b.initData&&_.Hq(a,b.initDataType,_.F(b.initData))})};Kq=function(a){return _.w(function*(){_.rm(Hd);const b=a.Y.map(c=>Jq(a,c));a.ia=!0;a.Y=[];yield Promise.all(b);_.rm(Gd);_.tm("drm.onPlay",Hd,Gd)})};
|
|
250
|
+
Mq=function(a){const b=a.keySystem(),c=a.f.Ha[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Lq(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.nk([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Wc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.ub.fetch(f).U}).then(f=>{a.a.serverCertificate=_.F(f.data)}).catch(f=>{var g=
|
|
251
|
+
f.data.headers;g=Object.assign({message:Ba,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Dp(g));throw new _.H(_.C,6,6100,g,f);})};
|
|
252
|
+
_.Nq=function(a){return _.w(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 _.H(_.C,6,6004,{browserError:b.message});}})};
|
|
253
|
+
_.Qq=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Qi(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.qd)){const e=a.h.values();for(const f of e)_.$l(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}.`),Oq(c.initData,f)||(f.Pd.push(c.initData),c.keyId&&!f.jb.includes(c.keyId)&&
|
|
254
|
+
f.jb.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Qf)),d=!1)}!d||a.G&&a.K===zq||(_.Fq(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),Gq(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.Pq(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};
|
|
255
|
+
_.Sq=function(a,b){if(!a.I)return Xh(a.B,b,()=>{a.w(new _.H(_.C,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Ve,()=>Kq(a));a.B.on(a.C,_.Fg,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()!==Rq||a.L.length)d=Dq(a);c=Promise.resolve();_.Ti()&&38===_.Ui().major||(a.a&&a.a.keySystem!==_.Pe&&!a.a.serverCertificate&&(c=Mq(a)),c=c.then(()=>_.Nq(a)));return Promise.all([d,
|
|
256
|
+
c]).then(()=>{a.j||(_.Qq(a),a.B.on(a.C,Td,e=>Iq(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.ud&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.H(1,6,6004)),a.a.serverCertificate=null,a.R++,_.Sq(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
|
|
257
|
+
Lq=function(a,b){return _.w(function*(){const c=a.D.Kc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
|
|
258
|
+
_.Pq=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Te)}catch(e){const f=new _.H(_.C,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.ye,a.Ua.bind(a));a.B.on(c,he,a.Ta.bind(a));const d={initData:null,loaded:!1,Ne:Infinity,hc:null,fb:new _.Tl,periodId:null,Pd:[],keyId:null,jb:[],initDataType:null,pc:null,sessionContext:{ldlDelay:0,customData:{}}};d.fb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
|
|
259
|
+
a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.H(_.C,6,6013)),null;d.loaded=!0;Tq(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 _.H(_.C,6,6005,{browserError:e.message})))})};Oq=function(a,b){if(!a)return!1;for(let c=0;c<b.Pd.length;c++)if(_.$l(a,b.Pd[c]))return!0;return!1};
|
|
260
|
+
_.Fq=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(_.$l(c,f.initData))return b?f.jb.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.jb.push(b),a.o.get(b)||a.o.set(b,Qf),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(Oq(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
|
|
196
261
|
!0}return!1};
|
|
197
|
-
|
|
198
|
-
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?_.
|
|
199
|
-
k={
|
|
200
|
-
m=a.f.Ha[m];n=(n=m.modifiers)&&n.transformInitData;_.
|
|
201
|
-
a.w(new _.
|
|
202
|
-
|
|
203
|
-
_.
|
|
204
|
-
|
|
205
|
-
k.sessionId=c.sessionId;if(k.licenseRequestType===
|
|
206
|
-
(h=a.h.get(d.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
l?{headers:l}:{},
|
|
211
|
-
|
|
212
|
-
|
|
262
|
+
Gq=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.w(function*(){if(e.length){var h=b;if(!h)try{h=Uq(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&&Vq(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);
|
|
263
|
+
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?_.Te:Wf;var p=a.I.createSession(n);a.D.onEvent(new _.G(Ld,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.H(_.C,6,6005,{browserError:u.message}));return}a.B.on(p,_.ye,a.Ua.bind(a));a.B.on(p,he,a.Ta.bind(a));
|
|
264
|
+
k={pc:f,Pd:[],initData:e,initDataType:d,keyId:h,jb:h?[h]:[],loaded:!1,Ne:Infinity,periodId:c,hc:null,fb:new _.Tl,sessionContext:{ldlDelay:0,customData:{}}};k.fb.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,Qf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.jb.includes(m.keyId)&&_.$l(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.jb.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Qf));l=a.D.getConfiguration();m=a.keySystem();
|
|
265
|
+
m=a.f.Ha[m];n=(n=m.modifiers)&&n.transformInitData;_.gh(n)||(n=oq);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 _.H||(h=new _.H(_.C,6,6016,u));k.fb&&k.fb.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 v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
|
|
266
|
+
a.w(new _.H(_.C,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};Wq=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};Tq=function(a){a=a.h.values();return _.di(a,b=>b.loaded)};Vq=function(a,b,c,d){if(!b&&c!==_.Lf)return!1;d=b||ep(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.jb.includes(b)||c===_.Lf&&(e.keyId||ep(e.initData))===d)return!0;return!1};
|
|
267
|
+
Uq=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.Ha[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.gh(g)||(g=mq);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===_.Lf)return ep(c)||"";if(b===_.Tc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
|
|
268
|
+
_.Xp(c);if(m)return m.a}else if(eq(l)){{f=new _.Wp(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.M(f);const m=_.M(f);h=_.Wo(m);const n=_.M(f);c=n>>>24;k=n&16777215;const p=_.Uo(f,16),u=_.Zl(p);if(0<c){const D=_.M(f);f.skip(16*D)}const v=_.M(f),y=_.Uo(f,v),A=_.cq(y);_.wh("Parsed PR PSSH Box","size",g,"name",h,ug,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
|
|
269
|
+
Jq=function(a,b){return _.w(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Xq(a,b))yield Yq(a,e,b,c,d);else{var f=a.ya;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Ji(f),a.j))return;var g=a.keySystem(),h=a.f.Ha[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.nk([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.cb;k.licenseRequestType=b.messageType===ke&&d.pc?je:b.messageType;
|
|
270
|
+
k.sessionId=c.sessionId;if(k.licenseRequestType===je)a.D.onEvent(new _.G(Kd));eq(a.a.keySystem)&&Zq(a,k);Go(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield $q(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Ho(a.M,f),yield ar(a,c,f.data,d,h))h=Wq(a),a.D.onEvent(new _.G(_.Pd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.hc&&d.hc.resolve(),d.pc&&(h=d.pc,a.g.info(`Closing expired session '${h.sessionId}'`),dq(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
|
|
271
|
+
(h=a.h.get(d.pc))&&h.Gc&&h.Gc.stop(),a.h.delete(d.pc),d.pc=null),(new _.Mi(()=>{a.j||(d.loaded=!0,d.fb&&d.fb.resolve(),Tq(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&&(_.vi(g,_.qd)||_.vi(g,_.sd)))&&(h=new _.Mi(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),eq(g)?Gq(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.qd)&&c.update(_.si("renew")))}),d.Gc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
|
|
272
|
+
Xq=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};Yq=function(a,b,c,d,e){return _.w(function*(){var f=_.nk([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.cb;f.licenseRequestType=Wc;f.sessionId=d.sessionId;(f=yield br(a,f,e,b,d.sessionId,c.messageType))&&(yield ar(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
|
|
273
|
+
Zq=function(a,b){var c=qi(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(_.tg).textContent;b.body=_.Xl(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
|
|
274
|
+
$q=function(a,b,c,d,e,f,g,h){return _.w(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield cr(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.G(Jd,{delay:h}));var k=Date.now();_.rm(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.ub.fetch(b).U}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},
|
|
275
|
+
l?{headers:l}:{},Dp(l));l=new _.H(_.C,6,6007,l,p);dr(a,l,c);return null}_.rm(`drm.license.req.${d}.end`);_.tm(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=Ep(l.headers);m&&(a.ya=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})};
|
|
276
|
+
ar=function(a,b,c,d,e){return _.w(function*(){_.rm(`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 _.H(_.C,6,6008,{browserError:f.message});dr(a,g,d);return!1}_.rm(`drm.sess.update.${e}.end`);_.tm(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
|
|
277
|
+
br=function(a,b,c,d,e,f){return _.w(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield cr(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.ub.fetch(b).U}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Ba,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},Dp(h));h=new _.H(_.C,6,6100,h,m);dr(a,h,c);return null}g=Date.now()-g;const k=Ep(h.headers);
|
|
213
278
|
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})};
|
|
214
|
-
|
|
215
|
-
_.
|
|
216
|
-
_.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
a
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
_.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
a
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
h
|
|
271
|
-
jr=function(a,b,c){_.w(function*(){var d=kr(a,b,0);const e=yield Yq(a,d),f=d.wa?d.wa.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.da}`),yield nr(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=Zp(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 Gq(a.X),c||(yield pq(a.X))})};
|
|
272
|
-
kr=function(a,b,c){{const u=b.customAttributes[_.Lb],v=b.customAttributes[_.Kb],y=b.customAttributes[_.Ob],A=b.customAttributes[_.Mb];var d=b.customAttributes[_.Nb]||[];b.customAttributes[Pb]||(b.customAttributes[Pb]=null==y||0<y?"RANGE":"POINT");var e=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];e="CONTENT"===e?cq:"AD"===e?bq:void 0;var f=b.id,g=b.startTime,h=b.endTime,k=Hq,l=null==y?null:Math.max(0,b.startTime+y),m="POINT"===b.customAttributes[Pb],n=!d.includes("SKIP");d=!d.includes("JUMP");{const D=
|
|
273
|
-
b.customAttributes[Jb];if(D)try{var p=JSON.parse(atob(D))}catch(E){p=null}else p=null}b={da:f,startTime:g,endTime:h,state:k,qf:v,rf:u,wa:null,W:l,ii:y,Zb:A,Qc:c,Gh:m,Xg:n,Bf:d,vg:p,eg:null!=y&&0>y,once:(b.customAttributes.CUE||[]).includes("ONCE"),ug:!1,jf:!0,customAttributes:b.customAttributes,audio:e}}a.a.push(b);return b};
|
|
274
|
-
lr=function(a,b){_.w(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.da);if(h){const k=h.customAttributes[_.Mb];null==g.Zb&&null!=k&&(a.g.info(Ab,h.id,"Playout limit",k),g.Zb=k,1===g.Qc&&g.state===Pq&&or(a,g))}});else{var d=b.find(g=>g.id===c.Hb);if(d){var e=d.customAttributes[_.Mb];if(null!=e){var f=a.a.find(g=>g.da===d.id);f&&null==f.Zb&&(a.g.info(Ab,d.id,"Playout limit",e),f.Zb=e,yield oq(a.X,e))}}}})};
|
|
275
|
-
or=function(a,b){_.w(function*(){yield Tq(a,b);yield Zq(a,b,a.f)})};
|
|
276
|
-
Yq=function(a,b){return _.w(function*(){b.state=Mq;if(b.qf)try{a.g.info(`Load X-ASSET-LIST for ${b.da}`);a.Sa(new _.C(Yb));const c=yield pr(a,b.qf);b.wa=c.ASSETS;b.wa&&0!==b.wa.length||a.g.info(`Interstitial ${b.da} has no assets, `+"will be smoothly skipped");if(null==b.W){const d=bj(b.wa.map(e=>e.DURATION));b.W=b.startTime+(null==b.Zb?d:Math.min(b.Zb,d))}b.state=qr;a.Sa(new _.C(Zb));a.Sa(new _.C($b,{id:b.da,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=rr}else b.rf?(b.wa=
|
|
277
|
-
[{URI:b.rf,DURATION:b.endTime-b.startTime}],a.Sa(new _.C($b,{id:b.da,detail:Kq(b)})),b.state=qr):b.state=rr;return b.state===qr})};nr=function(a,b,c,d,e){return _.w(function*(){if(0!==b.wa.length&&a.X.getCurrentItem()){var f=ar(a,b,c);0!==f.length&&(br(a,b,f),0===c&&a.f.isLive()||(null!=e?Eq(a.X,e,!0):null!=b.W&&Eq(a.X,b.W)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
|
|
278
|
-
Zq=function(a,b,c){if(b.wa)if(0===b.wa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.da}`):null!=b.W&&0!==b.ii?c.seek(b.W):a.g.info(`Empty VOD interstitial ${b.da}, `+"continuing to next segment")};c.one(_.$f,g);a.h.push(()=>{c.off(_.$f,g)});a.g.info(`Schedule interstitial ${b.da} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=ar(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.W&&Eq(a.X,b.W);d.next=[f];d.transition={$d:{position:b.startTime,itemId:f,
|
|
279
|
-
W:b.W}};a.g.info(`Schedule interstitial ${b.da} for `+`${b.startTime} s`);br(a,b,e)}}}};Xq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Qc&&Jq(c)&&0<d&&d<=a.ka.resolutionOffsetSec})||null};$q=function(a){return a.a.find(b=>2===b.Qc)||null};
|
|
280
|
-
pr=function(a,b){return _.w(function*(){var c=a.X.Md();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.mj(sr(a,b));c=yield Mk(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!Lq(c))throw new _.ni("Invalid X-ASSET-LIST list response");return c})};sr=function(a,b){return(a=a.ka.Xh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
|
|
281
|
-
ar=function(a,b,c){let d=0,e=b.wa.map((h,k)=>{const l=`${b.da}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:sr(a,h.URI),type:_.Ql}},duration:h.DURATION,jb:d,Hb:b.da,next:[],Va:new Q(c,k+1,b.wa.length,h.DURATION,b.da,b.Xg,b.customAttributes||null),audio:b.audio}});e.forEach((h,k)=>{const l=k===e.length-1;l&&2===c||(l?(h.next=[pf],h.transition={za:pf}):(k=l?pf:`${h.Hb}-${k+1}`,h.next=[k],h.transition={za:k}))});e.forEach(h=>{h.be=()=>{var k=h.Va;a.g.info(`Playing ad ${`${k.f}/${k.a}`} of interstitial `+
|
|
282
|
-
h.Hb)}});if(null!=b.Zb&&(e=tr(a,b,e),0===e.length))return[];const f=e[0].be;e[0].be=()=>{b.ug=!0;b.eg&&(b.jf=!1);a.g.info(`Playing interstitial ${b.da} with `+`${b.wa.length} assets and will resume primary `+`content ${b.W?`at ${b.W.toFixed(1)} s`:"after interstitial ended"}.`);f()};e[0].jg=h=>{null==b.W&&(b.W=b.startTime+h,Eq(a.X,b.W),a.g.info("Primary content will resume at",b.W.toFixed(1),"s"));b.state=ur};const g=e[e.length-1];g.za=()=>{b.state=Iq;sq(a.X,e.map(h=>h.id));2===c&&Gq(a.X)};g.Re=a.ka.adReleaseDelayMs;
|
|
283
|
-
return e};br=function(a,b,c){qq(a.X,c);c=a.X;vq(c);c.f&&(c.f.Va&&iq(c,c.f,c.f.Va),kq(c),lq(c,c.f.next));b.state=Pq;a.Sa(new _.C(_.bc,{detail:null}))};
|
|
284
|
-
tr=function(a,b,c){const d=b.Zb;a.g.info(`Playout limit for ${b.da} is `+`${d} s`);b=c[c.length-1].jb;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.jb-f.duration<=d);e.forEach(f=>{f.Va.a=e.length});a=e[e.length-1];c=d-(a.jb-a.duration);.1>Math.abs(c-a.duration)?a.transition.za=pf:a.transition.$d={position:c,itemId:pf,W:null};a.maxDuration=c;return e};
|
|
285
|
-
vr=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)})}};
|
|
286
|
-
zr=function(a){a.a.on(window,"offline",()=>{wr(a,!1)});a.a.on(window,"online",()=>{a.f||xr(a)});a.a.on(a.m,Lf,()=>yr(a));a.a.on(a.m,"suspend",()=>yr(a));a.a.on(a.m,_.Cg,()=>yr(a));a.a.on(a.m,_.ef,()=>{a.f||xr(a)});a.a.on(a.m,_.qf,()=>{a.f||xr(a)});a.a.on(a.m,_.Nf,()=>{switch(a.m.getState()){case _.lp:yr(a);break;default:yr(a)}})};Ar=function(a){a.h&&(a.h.stop(),a.h=null)};yr=function(a){a.f&&xr(a)};
|
|
287
|
-
Br=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Rk(a.j,b.url,b.attemptParameters,b.method),wr(a,b))})};xr=function(a){a.m.getConfiguration().connectivityCheck&&(Ar(a),a.h=(new _.Mj(()=>Br(a))).la(5))};wr=function(a,b){Ar(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.C(Me,{online:a.f})))};Dr=function(){for(let a=0;a<Cr.length;++a)Cr[a].Bc()};
|
|
288
|
-
_.Er=function(a){var b=b||0;a={priority:b,Bc:a};for(let c=0;c<Cr.length;c++)if(Cr[c].priority<b){Cr.splice(c,0,a);return}Cr.push(a)};Fr=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
|
|
289
|
-
Hr=function(a){var b=Gr;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=_.Fi(d),n=_.Bk(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.ni("Signature Verification failed",gg))}).catch(g)}else f()})};
|
|
290
|
-
Jr=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 Ir(b[0],b[1],b[2]);a.a=b}return a.a};Kr=function(a){return _.w(function*(){var b=Jr(a);try{yield Hr(b)}catch(c){if(c&&c.code===gg)throw c;b=new _.Ui(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;}})};
|
|
291
|
-
Lr=function(a){switch((a.ga[0]||{src:"",type:""}).type){case _.uc:a="dash";break;case _.Bc:a="ss";break;case _.Ql:a="hls";break;case _.tg:a="mp4";break;default:a=""}return a};Mr=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Nr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
|
|
292
|
-
Or=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Pr=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.Ui(a)).a.hostname:""};Qr=function(a){const b=a.configuration;let c="no";b.drm&&!_.ih(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Od)||Pr(a).endsWith("drmtoday.com"))&&(c=Od);return c};
|
|
293
|
-
Rr=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.ud:b="wv";break;case _.sd:b="pr";break;case _.qd:b="fps"}return b};Sr=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Tr=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ia:case Ga:b="L1";break;case Ha:b="L2";break;case _.ob:case _.nb:b="L3"}return b};
|
|
294
|
-
Yr=function(a,b){const c="ie"===_.ok().browser;var d=b.configuration;const e=[...Array.from(_.am.keys()),...b.og];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":Mr(d),"CL-ASSET-ID":Nr(d),"CL-SESSION-ID":Or(d),"CL-PLAYBACK-TYPE":b.isLive?Ur:Vr,"CL-CONTENT-TYPE":Lr(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Qr(b),"CL-DRM-CDM":Rr(b),"CL-DRM-SEC-LEVEL":Tr(b),"CL-DRM-OFFLINE":Sr(b),"CL-DRM-IP":Pr(b)};Wr&&Wr.companionSdk&&(Wr.companionSdk.name&&(b["CL-COMPANION-SDK"]=Wr.companionSdk.name),
|
|
295
|
-
Wr.companionSdk.version&&(b["CL-COMPANION-SDK-VERSION"]=Wr.companionSdk.version));c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.mj(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Xr).fetch(d).U.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Jr(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="Castlabs Player license is invalid";
|
|
296
|
-
if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.g.error(Ma+k);g=Promise.reject(new _.I(_.F,7,g,k))}}return g})};
|
|
297
|
-
bs=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}=Zr(c[e]);Object.keys($r).includes(f)&&(d[$r[f]]=g)}return d}).filter(c=>_.ch(c));return 0<b.length?b:null}catch(b){return as.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
|
|
298
|
-
Zr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.ni("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 _.ni(`Parsing CMSD, not recognized value type of ${a}`);};
|
|
299
|
-
ds=function(a){return b=>{{var c=b.headers;let e=b=null;var d=mh(c,"cmsd-dynamic");c=mh(c,"cmsd-static");d&&(b=bs(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Zr(f[c]);Object.keys(cs).includes(g)&&(d[cs[g]]=h)}e=_.ch(d)?d:null}catch(f){as.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.C("cmsd-event",{Ui:b,fj:e}))}}};_.fs=function(a){a&&(0<=es.indexOf(a)||es.push(a))};
|
|
300
|
-
hs=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.Yi(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new gs;a.h.o(a.a,a.A,b)}};js=function(a,b){a.F=new is(b);Kr(a.F).catch(c=>{setTimeout(()=>{a.g.error(Ma+c);a.trigger(new _.C(_.Ud,{detail:new _.I(_.F,7,7101)}));a.destroy()},1E3)})};ls=function(a,b){a.Z=b;for(const c of a.Z)(b=c.id())&&(a.K[b]=c);_.ks(a,"onPlayerCreated")};
|
|
301
|
-
_.ms=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
|
|
302
|
-
ns=function(a,b){_.w(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new is(a.f.license));try{a.g.debug("Verifying license remotely"),yield Yr(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(Fr,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.ks=function(a,b,...c){if(!a.ca)return Promise.resolve();const d=a.Z.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
|
|
303
|
-
os=function(a){return _.w(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.ea.off(document,Ag);a.trigger(new _.C(_.vf));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Nf,d=>{b=d});return _.ks(a,_.Ke).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
|
|
304
|
-
a.trigger(b))}).finally(()=>{a.a.off(_.Nf,c);a.trigger(new _.C(uf))})}a.trigger(new _.C(uf));return new Promise(b=>b())})};ps=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};qs=function(a,b){const c=zh(d=>d.f(_.cb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.I(_.F,7,7003,"No compatible player implementing playlist mode found!");return{$a:c,player:c.create(),sourceIndex:0}};
|
|
305
|
-
ss=function(a,b,c){if(a.M===_.cb)b=qs(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.T){a.T=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.wh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={$a: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?(_.xh.debug("Player Factory '"+a.$a.a()+"' can play",b[d]),b=new rs(a.$a,d)):(_.xh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
|
|
306
|
-
null;if(!b)throw new _.I(_.F,7,7003,"No player factory compatible with given sources found!");c=b.$a;a=c.create();b={$a:c,player:a,sourceIndex:b.sourceIndex}}else b={$a:a.A,player:a.a,sourceIndex:0};return b};
|
|
307
|
-
_.xs=function(a,b,c){return _.w(function*(){if(a.P)throw new _.I(_.F,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.F,7,7E3,"No surface associated with this player!");_.Sn($e);yield a.release();var d=c||_.vp(b);if(!b||0===d.length)throw new _.I(_.F,7,7003,Xa);a.ha=d;a.f=_.Zl(a.C,b,{source:d});a.R=!1;d=ss(a,d,a.f);_.ms(a,d.player,d.$a);ts(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);us(a);a.a&&a.a.setCdnErrorCallback(a.L);vs(a,a.f);ws(a);if(a.f.pauseWhenInBackground)a.ea.on(document,
|
|
308
|
-
Ag,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});hm(a);yield _.ks(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Sn(Ze);_.Un("player.beforeLoad",$e,Ze)})};_.ys=function(a){return _.w(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.C(qe));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
|
|
309
|
-
_.As=function(a){return _.w(function*(){_.Sn(We);ns(a,{configuration:a.getConfiguration(),ga:a.Uf(),drmInfo:a.getDrmInfo(),og:Object.keys(a.K),isLive:a.isLive()});zs(a);im();yield _.ks(a,_.He);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.Sn(Ve);_.Un("player.afterLoad",We,Ve)})};Bs=function(a){return _.w(function*(){if(a.a){var b=a.a;b.Ag?(a.trigger(new _.C(qe)),yield b.Ag(),yield _.As(a)):a.g.warn(jb)}else a.g.warn(fb)})};
|
|
310
|
-
ts=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=vr()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};us=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.Be&&a.Gc&&(yield a.Gc(b))}))};vs=function(a,b){if(b=Kp(a,b))a.h=b.create(a)};ws=function(a){a.f.cmsd.enabled&&(a.B=new Cs(a),a.a.setCmsdManager(a.B))};
|
|
311
|
-
Ds=function(a){const b=_.di(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().pa().filter(f=>c?f.kind===_.Wd:f.kind!==_.Wd);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().oa();e&&e.language?(e=_.$i(e.language||""),b.push(e)):(e=a.getTrackManager().Ea())&&e.language&&(e=_.$i(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=>
|
|
312
|
-
{const g=_.$i(f);if(f=d.find(h=>{h=_.$i(h.language||"");return _.aj(h,g)}))return a.getTrackManager().Ra(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};zs=function(a){_.w(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Ds(a)})};Es=function(a){a.J.forEach(b=>b());a.J=[]};
|
|
313
|
-
Ks=function(a,b){return _.w(function*(){try{_.Sn(df);a.M=_.cb;a.ca=!1;const c=b.slice(1).map(d=>({config:d,ga:_.vp(d)}));yield _.xs(a,b[0]);c.forEach(d=>{Fs(a,d.config,d.ga)});a.trigger(new _.C(qe));yield a.a.setupPlaylist(b);yield _.As(a);c.forEach(d=>{Js(a,d.config,d.ga)});_.Sn(cf);_.Un("player.setupPlaylist",df,cf)}catch(c){if(a.l)throw a.g.info(Oa),new _.I(_.F,7,7E3);throw c;}})};
|
|
314
|
-
Ls=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Bf,c);a.J.push(()=>{a.removeEventListener(_.Bf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.cg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.C(_.Af)),a.pause())};a.addEventListener(_.cg,e);a.J.push(()=>{a.removeEventListener(_.cg,e)})}};
|
|
315
|
-
Ms=function(a,b){return _.w(function*(){try{_.Sn(Ye);const c=_.vp(b);Fs(a,b,c);yield a.a.appendLoad(b);Js(a,b,c);_.Sn(Xe);_.Un("player.appendLoad",Ye,Xe)}catch(c){if(a.l)throw a.g.info(Oa),new _.I(_.F,7,7E3,{id:b.id});throw c;}})};
|
|
316
|
-
Fs=function(a,b,c){if(0===c.length)throw new _.I(_.F,7,7003,{message:Xa,id:b.id});if(1<c.length)throw new _.I(_.F,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(_.F,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};Js=function(a,b,c){ns(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),og:Object.keys(a.K),isLive:c[0].isLive})};
|
|
317
|
-
Ns=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(bd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Dd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
|
|
318
|
-
Os=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(cd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(cd)),a.w&&a.w(d,c))};Rs=function(a,b){return _.w(function*(){const c=yield a.o.get();a.f=b;b.role=Ps;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Os(a,c,!0);yield c.load(b.config);Qs(a,b);b.config.autoplay||(yield c.play())})};
|
|
319
|
-
Vs=function(a){_.w(function*(){if(0===a.a)yield Ss(a);else if(a.a===a.h.length-1)yield Ts(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Us(a,c)))}})};
|
|
320
|
-
Ws=function(a,b){return _.w(function*(){if(b.player){if(b.state===nf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Ps;Os(a,b.player,!0);b.state===mf?(_.Sn(jf),a.ka.preloadMedia?yield b.player.play():yield Bs(b.player),_.Sn(hf),_.Un("playlist.next",jf,hf)):b.state===lf&&(yield b.player.load(b.config));Qs(a,b);b.config.autoplay||(yield b.player.play())}})};
|
|
321
|
-
Zs=function(a,b){return _.w(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();Os(a,b.player,!1);yield Xs(a,b);b.player=null;b.videoEl=null;b.role=Ys})};at=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>$s(a,b)))};bt=function(a){return _.w(function*(){yield a.o.destroy();const b=document.getElementById(a.ka.anchorId);b&&(b.classList.remove(bd),b.innerHTML="")})};
|
|
322
|
-
$s=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Xs(a,c)),a.l.delete(b))})};Xs=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};Qs=function(a,b){if(a.ka.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.mg()};b.player.on(_.Td,c);const d=b.player;b.disposers.push(()=>{d.off(_.Td,c)})}};
|
|
323
|
-
Us=function(a,b){return _.w(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Ys;d.state=nf;a.trigger(new _.C(jg));try{a.l.set(b,d),a.ka.preloadMedia?(d.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=mf,a.trigger(new _.C(jg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=kf):
|
|
324
|
-
(a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.C(_.Ud,{detail:e})),d.state=lf),a.trigger(new _.C(jg))}})};Ss=function(a){return _.w(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Us(a,b)})};Ts=function(a){return _.w(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Us(a,b)})};
|
|
325
|
-
_.dt=function(a){if(ct.has(a))return ct.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ct.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ct.set(a,b),b):!1};et=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};
|
|
326
|
-
ft=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.$d?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};gt=function(a){a=a.target;if(a.webkitPresentationMode===Te){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)};
|
|
327
|
-
ht=function(){return this.webkitSupportsPresentationMode(Te)?(this.webkitSetPresentationMode(Te),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};it=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
|
|
328
|
-
jt=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};kt=function(a,b,c){return new window.TextTrackCue(a,b,c)};lt=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};nt=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Xc}mt.call(this,a,b,c)};_.ot=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};
|
|
329
|
-
_.qt=function(a,b,c,d){return _.w(function*(){try{return new (yield pt(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
|
|
330
|
-
pt=function(a,b,c,d){return _.w(function*(){if(d){var e=_.rt[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Vi(a)){const f=_.st[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 tt(a,b,c))){if(e=_.rt[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.I(_.F,4,4E3,{url:a});})};
|
|
331
|
-
tt=function(a,b,c){return _.w(function*(){var d=_.mj(a);jj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};_.vt=function(a,b){a=_.ul(_.vl(a),_.wl(a));_.ut[a]=b};_.wt=function(a){a=_.ul(_.vl(a),_.wl(a));return _.ut[a]||null};_.xt=function(a){a=_.ul(_.vl(a),_.wl(a));delete _.ut[a]};
|
|
332
|
-
_.Ct=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case yt:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case zt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case At:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Bt:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ee}};_.Qg=[];Ug="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
|
|
333
|
-
Vg=typeof Object.defineProperties==_.$d?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
|
334
|
-
Wg("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=Ug.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=
|
|
335
|
-
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 _.Fe:var h=null!=g;break a;case _.$d:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
279
|
+
cr=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield Lq(a,d);const e=a.keySystem();var f=a.f.Ha[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.qd)&&b.requestModifiers.push(k=>_.hp(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.qd)&&b.responseModifiers.push(k=>_.ip(k))})};dr=function(a,b,c){a.j||(a.w(b),c.hc&&c.hc.reject(b),c.fb&&c.fb.reject(b))};
|
|
280
|
+
_.er=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};
|
|
281
|
+
_.ir=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.C,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.fr(d);var f;(f=_.er(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.er(d,g);)c.push(new _.gr(f[1],f[2]||f[3]||""))}return new _.hr(a,b,c,e)};jr=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};
|
|
282
|
+
_.kr=function(a){return a&&a!==_.jg?a:null};mr=function(a){if(!a)throw new _.H(_.C,3,3101,`Invalid track type: ${a}`);if(!_.ih(a))throw new _.H(_.C,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.O:return _.O;case _.P:return _.P;case _.Q:return _.Q;case lr:return lr}throw new _.H(_.C,3,3101,`Unknown track type: ${a}.`);};
|
|
283
|
+
pr=function(a,b){a=mr(a);const c=_.kr(b.kind);let d=b.id;d||(d=String(_.nr++));a=new _.or(d,c===_.ze?lr:a);a.kind=c;a.label=_.kr(b.label);a.language=_.kr(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};qr=function(a,b){return _.w(function*(){const c=_.nk(b);return yield gm(a.f,c)})};
|
|
284
|
+
ur=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield rr(a,b,c),f=new _.or("dummy",_.Q),g=e.map((h,k)=>{k=new _.sr(`R${k}`,f);k.bandwidth=h.bandwidth;k.Uc=h.Uc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});tr(g);return{renditions:g,mimeType:d||void 0}})};
|
|
285
|
+
wr=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>vr(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};rr=function(a,b,c){return _.w(function*(){const d=xr(b),e=yr(b,c);return{mimeType:yield zr(a,e,d[0]?d[0].codec:null),renditions:d}})};
|
|
286
|
+
tr=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.");};vr=function(a){const b=_.ir(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.sb);c=null!=c?{AUDIO:_.P,VIDEO:_.Q,SUBTITLES:_.O}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.La),cj:a("AUTOSELECT"),default:a("DEFAULT"),kj:a("FORCED"),Of:a("CHARACTERISTICS"),uri:a(_.ub)}};
|
|
287
|
+
xr=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.ir(0,b);if(c.getAttribute(_.Cb))throw Error("Playlist contains alternative video streams.");var d=_.K(c,_.kb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.K(c,_.ma);e=e?Number(e):null;var f=_.K(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.K(c,_.pa);c=_.Ar(_.t,c?c.split(","):[]);return b={bandwidth:e,Uc:f,codec:c,width:b,height:d,mimeType:null}})};
|
|
288
|
+
yr=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Lm(a,b):null};zr=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield qr(a,b);d=[Br(d,b),Cr(d,b)].filter(Boolean);return _.Dr(d,_.t,c)})};Br=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Lm(a,b):null};Cr=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.K(_.ir(0,a),_.ub))?_.Lm(a,b):null:null};
|
|
289
|
+
_.Fr=function(a,b,c){for(const d of _.Er)if(d.probe(b,c))return d.create(a);return null};_.Gr=function(a){a=_.Er.indexOf(a);0<=a&&_.Er.splice(a,1)};Hr=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.kh(a,{kind:_.kr(b.kind),language:_.kr(b.language),label:_.kr(b.label)},["kind","language","label"])};Ir=function(a){return a.enabled||a.selected||a.mode===_.If||a.mode===_.be};Kr=function(a,b,c){return Jr(a)&&b===_.Q&&!!c.enableHlsVideoTrackInfo};
|
|
290
|
+
Lr=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};Mr=function(a,b,c){return Jr(a)&&(b===_.P||b===_.O)&&!!c.enableMetadata};
|
|
291
|
+
Nr=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.zc&&(d=d.zc.get(`${b.type}:${b.label}`))&&d.Of&&(b.accessibility=d.Of.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Or=function(a,b){return a.h.filter(c=>c.type===b)};Pr=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Rr=function(a,b){if(a=Qr(a,b))a=Array.from(a),b===_.O&&(a=a.filter(c=>c.kind!==_.ze));return a};
|
|
292
|
+
Qr=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 _.P:return a.audioTracks;case _.Q:return a.videoTracks;case _.O:return a.textTracks;default:return null}};Sr=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Tr=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
|
|
293
|
+
Ur=function(a,b,c){const d=Rr(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.O:f="mode";e=_.If;g=_.Cd;break;case _.P:f="enabled";break;case _.Q:f="selected"}if(f)for(const h of d)h[f]=Hr(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
|
|
294
|
+
d&&b===_.O){for(e of d)e.mode=_.Cd;a.a.set(b,null)}b===_.P?a.m.trigger(new _.G(_.Ic)):b===_.O&&a.m.trigger(new _.G(_.$f))};Vr=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.yi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
|
|
295
|
+
Wr=function(a,b){return _.w(function*(){var c=a.m.getConfiguration();if(c=_.Fr(c,b.mimeType,_.Yf)){var d=_.nk(b.url),e={objectType:b.mimeType===_.wc?"tt":"c"};(e=yield _.lm(a.m.getNetworkEngine(),d,e).U)&&e.data&&(d="External_"+`${a.G++}`,a.o[d]=b,c=c.a(_.F(e.data)),c={url:URL.createObjectURL(new Blob([c])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Yf},Vr(a,c,d))}else a.g.warn("Track MIME type is not supported",b)})};
|
|
296
|
+
Jr=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.ll&&!a.url.endsWith(".m3u8"))&&_.$i()};Xr=function(a,b,c){c=_.Yh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=Or(a,b);c.some(e=>{const f=_.Cn(e);return(e=d.find(g=>{g=_.Cn(g.language||"");return _.Dn(f,g)}))?(a.g.info("Will select track with id",e.id),Ur(a,b,e),!0):!1})};Zr=function(a){return a.name===$a&&Yr.some(b=>a.message.startsWith(b))};_.bs=function(a,b){a&&b&&(_.$r.set(a,b),_.as.info(`Registered TextDisplayerFactory: '${a}'`))};
|
|
297
|
+
_.cs=function(a,b){b=b.find(c=>(c=_.$r.get(c))?c.a(a):!1);if(null==b)return _.as.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.as.info(`Chosen the text displayer: ${b}`);return _.$r.get(b)};_.ds=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})}}};
|
|
298
|
+
es=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};fs=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};gs=function(a){return a.a.map(b=>_.ch(b))};
|
|
299
|
+
_.hs=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:[]}};
|
|
300
|
+
os=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>is(a,d.type);a.a.on(b,_.Vd,()=>{a.fa||(a.h=!1,js(a,5))});a.a.on(b,Oc,c);a.a.on(b,_.ff,()=>{a.C=!0;a.h=!1;is(a,_.ff)});a.a.on(b,_.Re,()=>{a.C=!1;a.h=!1;is(a,_.Re)});a.a.on(b,_.eg,c);a.a.on(b,_.uf,c);a.a.on(b,_.Gf,d=>{a.fa=!1;a.h=!1;is(a,d.type)});a.a.on(b,_.Hf,d=>{a.fa=!0;is(a,d.type)});a.a.on(b,Nf,c);a.a.on(b,_.Eg,()=>{a.h=!0;is(a,_.Eg)});a.a.on(b,_.Wd,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.C&&
|
|
301
|
+
js(a,_.ks)});a.a.on(b,_.te,c);a.a.on(b,Pc,()=>{a.B=!0;is(a,Pc)});a.a.on(b,_.sg,d=>{a.fa=!0;is(a,d.type)});a.a.on(b,_.rg,d=>{a.fa=!1;a.h=!1;is(a,d.type)})};ps=function(a,b){return Object.keys(b)[a]};qs=function(a,b){const c={type:_.Pf};b===_.Nc||b===_.Mc?(c.reason=a.o,b===_.Nc?c.timeSinceLastStateChangeMS=a.G:c.bufferedTimeMS=a.A):(2===a.f&&(c.reason=a.o),2===a.w&&(c.reason=a.o,c.bufferedTimeMS=a.A),c.currentState=a.f,c.previousState=a.w,c.timeSinceLastStateChangeMS=a.G);return c};
|
|
302
|
+
js=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.H=c,a.l=0);a.l||(a.l=a.H||c);a.G=c-a.l;a.l=c;2===b?(a.J=a.l,a.o=a.fa?1:2,a.g.info("Buffering started. Reason: "+ps(a.o-1,_.rs)),b=qs(a,_.Nc),a.Sa(_.Nc,b)):d&&(a.A=a.l-a.J,a.g.info("Buffering finished. Reason: "+ps(a.o-1,_.rs)+". Buffering time: "+a.A+" ms"),b=qs(a,_.Mc),a.Sa(_.Mc,b));b=ps(a.w,_.ss);c=ps(a.f,_.ss);a.g.info(`Player state change: ${b} -> ${c}`);a.Sa(_.Pf,qs(a,""));return!0};
|
|
303
|
+
is=function(a,b){if(a.f===_.ks)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.fa||(a.h=!1,js(a,5));else if(b!==_.eg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ka(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.I=a.m.getPlaybackRate()||1;e=typeof a.j===_.r&&2>a.j&&2===e.networkState;var f=typeof a.j===_.r&&0>=a.F&&a.f===_.ts,g=typeof a.j===_.r&&2>=a.j&&a.h;e=a.fa||
|
|
304
|
+
f||e||g;!a.K||a.m.isLive()||2!==a.f||e||(f=b===_.Gf&&4===a.j,(g=1===a.w)&&!a.B?e=!0:g||a.B||f||(e=!0));f=!1;e?f=js(a,2):c?f=js(a,4):a.C&&(f=js(a,3));f&&(a.B=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.fa+", waiting: "+a.h+", playing: "+a.C+", paused: "+c+", readyState: "+a.j+", rate: "+a.I+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+ps(a.f,_.ss))}}};
|
|
305
|
+
vs=function(a,b){if(a.w)throw new _.H(_.C,7,7E3);a.a||(a.h.on(b,_.Wd,()=>{{const c=us(a);if(c)a.onError(c)}}),a.h.on(b,_.zf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.G(_.Kc,{detail:{width:c,height:d}}))}),a.a=b)};xs=function(a){const b=_.$i()?nq:void 0;return new _.ws(a,b)};
|
|
306
|
+
ys=function(a){return _.w(function*(){if(a.w)return Promise.reject(new _.H(_.C,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.gn(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=xs({ub:c,onError:d=>a.onError(d),Re:()=>{},Qe:(d,e)=>{a.trigger(new _.G(_.Id,{expirationTime:e}))},onEvent:d=>{d instanceof _.G?a.dispatchEvent(d):
|
|
307
|
+
a.log.debug(_.wb,d.type)},getConfiguration:()=>a.getConfiguration(),Kc:()=>a.Kc()});a.o.f=b;yield _.Aq(a.o,[{id:0,language:_.jg,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,Ba:0,mimeType:_.yg,codecs:"",encrypted:!0,keyId:null,language:_.jg,originalLanguage:_.jg,label:null,type:_.t,primary:!1,frameRate:void 0,
|
|
308
|
+
oj:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,$i:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Sq(a.o,a.a)})};zs=function(a,b){Hp(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.ks&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
|
|
309
|
+
us=function(a){if(null===a.ga||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.H(_.C,3,3016,{code:b,jj:c,message:a.a.error.message})};
|
|
310
|
+
Bs=function(a){if(a.w)return new _.As(Promise.reject(new _.H(_.C,7,7E3)),()=>{});const b=a.ga[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&zs(a,c);if(d.preload!==_.Fe)a.h.one(d,_.te,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Qi()||_.Ti())&&d.load();const f=new _.Tl;a.h.one(d,Nf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Mi(()=>{f.reject(new _.H(_.C,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
|
|
311
|
+
uri:b.url},d.error))})).la(g))});Hp(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(us(a)):d.preload===_.Fe&&(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,_.Wd,()=>{f.reject(us(a))});return new _.As(f,
|
|
312
|
+
()=>{const g=new _.H(_.C,7,7001);f.reject(g);return Promise.resolve()})};Cs=function(a,b){Hp(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.ks){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)}))}})};
|
|
313
|
+
Ds=function(a,b){let c=!1;a.h.on(b,_.Hf,()=>{c=b.paused});a.h.on(b,_.Gf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};Es=function(a){a.J.forEach(b=>b());a.J=[]};
|
|
314
|
+
Hs=function(a,b){return _.w(function*(){try{_.rm(ef);a.M=_.bb;a.ba=!1;const c=b.slice(1).map(d=>({config:d,ga:_.an(d)}));yield _.co(a,b[0]);c.forEach(d=>{Fs(a,d.config,d.ga)});a.trigger(new _.G(ue));yield a.a.setupPlaylist(b);yield _.go(a);c.forEach(d=>{Gs(a,d.config,d.ga)});_.rm(df);_.tm("player.setupPlaylist",ef,df)}catch(c){if(a.l)throw a.g.info(Na),new _.H(_.C,7,7E3);throw c;}})};
|
|
315
|
+
Is=function(a,b){const c=d=>{a.G=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Cf,c);a.J.push(()=>{a.removeEventListener(_.Cf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.eg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.G(_.Bf)),a.pause())};a.addEventListener(_.eg,e);a.J.push(()=>{a.removeEventListener(_.eg,e)})}};
|
|
316
|
+
Js=function(a,b){return _.w(function*(){try{_.rm(Ze);const c=_.an(b);Fs(a,b,c);yield a.a.appendLoad(b);Gs(a,b,c);_.rm(Ye);_.tm("player.appendLoad",Ze,Ye)}catch(c){if(a.l)throw a.g.info(Na),new _.H(_.C,7,7E3,{id:b.id});throw c;}})};
|
|
317
|
+
Fs=function(a,b,c){if(0===c.length)throw new _.H(_.C,7,7003,{message:Wa,id:b.id});if(1<c.length)throw new _.H(_.C,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 _.H(_.C,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};Gs=function(a,b,c){Tn(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),Ag:Object.keys(a.K),isLive:c[0].isLive})};
|
|
318
|
+
Ks=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(cd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Dd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
|
|
319
|
+
Ls=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(dd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(dd)),a.w&&a.w(d,c))};Os=function(a,b){return _.w(function*(){const c=yield a.o.get();a.f=b;b.role=Ms;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Ls(a,c,!0);yield c.load(b.config);Ns(a,b);b.config.autoplay||(yield c.play())})};
|
|
320
|
+
Ss=function(a){_.w(function*(){if(0===a.a)yield Ps(a);else if(a.a===a.h.length-1)yield Qs(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Rs(a,c)))}})};
|
|
321
|
+
Ts=function(a,b){return _.w(function*(){if(b.player){if(b.state===pf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Ms;Ls(a,b.player,!0);b.state===of?(_.rm(lf),a.ka.preloadMedia?yield b.player.play():yield ho(b.player),_.rm(kf),_.tm("playlist.next",lf,kf)):b.state===nf&&(yield b.player.load(b.config));Ns(a,b);b.config.autoplay||(yield b.player.play())}})};
|
|
322
|
+
Ws=function(a,b){return _.w(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();Ls(a,b.player,!1);yield Us(a,b);b.player=null;b.videoEl=null;b.role=Vs})};Ys=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Xs(a,b)))};Zs=function(a){return _.w(function*(){yield a.o.destroy();const b=document.getElementById(a.ka.anchorId);b&&(b.classList.remove(cd),b.innerHTML="")})};
|
|
323
|
+
Xs=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Us(a,c)),a.l.delete(b))})};Us=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};Ns=function(a,b){if(a.ka.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.yg()};b.player.on(_.Vd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Vd,c)})}};
|
|
324
|
+
Rs=function(a,b){return _.w(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Vs;d.state=pf;a.trigger(new _.G(og));try{a.l.set(b,d),a.ka.preloadMedia?(d.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=of,a.trigger(new _.G(og))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=mf):
|
|
325
|
+
(a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.G(_.Wd,{detail:e})),d.state=nf),a.trigger(new _.G(og))}})};Ps=function(a){return _.w(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Rs(a,b)})};Qs=function(a){return _.w(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Rs(a,b)})};
|
|
326
|
+
_.at=function(a){if($s.has(a))return $s.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);$s.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),$s.set(a,b),b):!1};bt=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};
|
|
327
|
+
ct=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.$d?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};dt=function(a){a=a.target;if(a.webkitPresentationMode===Ue){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)};
|
|
328
|
+
et=function(){return this.webkitSupportsPresentationMode(Ue)?(this.webkitSetPresentationMode(Ue),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};ft=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
|
|
329
|
+
gt=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};ht=function(a,b,c){return new window.TextTrackCue(a,b,c)};it=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};kt=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Xc}jt.call(this,a,b,c)};_.lt=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};
|
|
330
|
+
_.nt=function(a,b){a=_.Pm(_.Qm(a),_.Rm(a));_.mt[a]=b};_.ot=function(a){a=_.Pm(_.Qm(a),_.Rm(a));return _.mt[a]||null};_.pt=function(a){a=_.Pm(_.Qm(a),_.Rm(a));delete _.mt[a]};_.ut=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case qt:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case rt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case st:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case tt:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Fe}};
|
|
331
|
+
_.wt=function(a,b,c,d){return _.w(function*(){try{return new (yield vt(a,b,c,d))}catch(e){throw e.a(_.C),e;}})};
|
|
332
|
+
vt=function(a,b,c,d){return _.w(function*(){if(d){var e=_.xt[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Mm(a)){const f=_.yt[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 zt(a,b,c))){if(e=_.xt[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.H(_.C,4,4E3,{url:a});})};
|
|
333
|
+
zt=function(a,b,c){return _.w(function*(){var d=_.nk(a);kk(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};_.Sg=[];Wg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Xg=typeof Object.defineProperties==_.$d?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
|
334
|
+
Yg("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=Wg.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=
|
|
335
|
+
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 _.Ge:var h=null!=g;break a;case _.$d:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
336
336
|
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.$d?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();
|
|
337
|
-
g.
|
|
338
|
-
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=
|
|
339
|
-
|
|
340
|
-
_.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.
|
|
341
|
-
_.S=class{constructor(a){(this.tag=a)&&void 0===
|
|
342
|
-
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of
|
|
343
|
-
this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.x("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
_.
|
|
347
|
-
_.
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
_.
|
|
357
|
-
|
|
358
|
-
_.
|
|
359
|
-
_.
|
|
360
|
-
_.
|
|
361
|
-
_.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
337
|
+
g.Kd(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==_.$d?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.Kd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Kd=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: "+
|
|
338
|
+
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=Vg(g),m=l.next();!m.done;m=l.next())d(m.value).Kd(h,k)})};b.all=function(g){var h=Vg(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).Kd(n(p.length-1),m),k=h.next();while(!k.done)})};return b});var $g=this||self;
|
|
339
|
+
$g.a=!0;_.x("clpp.utils.obj.cloneItem",_.ch);_.x("clpp.utils.obj.merge",_.bh);var sh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",sh);var qh=0,ph={},At=[];_.x("clpp.log.getLoggers",function(){return _.ch(ph)});_.x("clpp.log.addInterceptor",function(a){a&&At.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=At.indexOf(a),0<=a&&At.splice(a,1))});_.x("clpp.log.getTagLevel",rh);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=ph[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.ih(b)&&(b=th(b)),ph[a]=b)});
|
|
340
|
+
_.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.ih(a)&&(a=th(a));qh=a});_.x("clpp.log.getLogLevel",function(){return qh});
|
|
341
|
+
_.S=class{constructor(a){(this.tag=a)&&void 0===ph[a]&&(ph[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=rh(this.tag);if(0<=d){if(d<c)return}else if(qh<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,
|
|
342
|
+
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of At)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)}ph(a){return a?
|
|
343
|
+
this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.x("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.ph;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var uh=new _.S("clpp");_.x("clpp.log.info",_.vh);_.x("clpp.log.debug",_.wh);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.xh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Xn;Xn=class{constructor(a,b){this.ab=a;this.sourceIndex=b}};_.zh=new _.S("clpp.players");_.yh={};_.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 Dh=new _.S("clpp.ads"),Ch=[];_.Bt=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(tb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(tb);}Lb(){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)}Ja(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
|
|
344
|
+
1)}wc(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}Ka(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.Ja(),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=
|
|
345
|
+
"";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",_.Bt);_.Bt.prototype.bufferedAheadOf=_.Bt.prototype.Ka;_.Bt.prototype.isBuffered=_.Bt.prototype.wc;_.Bt.prototype.bufferEnd=_.Bt.prototype.Ja;_.Bt.prototype.bufferStart=_.Bt.prototype.Lb;_.Bt.prototype.end=_.Bt.prototype.end;_.Bt.prototype.start=_.Bt.prototype.start;var Ih;Ih=new _.S("clpp.Components");_.Gh=new Map;_.x("clpp.install",function(a){Sh(a)});_.x("clpp.uninstall",function(a){Th(a)});_.H=class extends Error{constructor(a,b,c,d,e){super(Uh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.ih(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=Uh(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",_.H);_.C=2;_.H.Severity={RECOVERABLE:1,FATAL:_.C};
|
|
346
|
+
_.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
|
|
347
|
+
_.H.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,
|
|
348
|
+
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,
|
|
349
|
+
MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,MEDIA_DECRYPTION_ERROR:3103,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,
|
|
350
|
+
HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,
|
|
351
|
+
SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID_VERSION:4036,SMOOTH_INVALID_FRAGMENT_METADATA:4037,SMOOTH_REQUIRED_ATTRIBUTE_MISSING:4038,SMOOTH_TRUNCATED_MEDIA_FILE:4039,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4040,HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED:4041,HLS_PLAYLIST_NOT_UTF8:4042,HLS_PLAYLIST_EMPTY:4043,HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_INCOMPATIBLE_PLAYLIST_UPDATE:4047,HLS_DISJOINT_PLAYLISTS:4048,INVALID_STREAMS_CHOSEN:5005,STREAMING_ERROR:5006,
|
|
352
|
+
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,
|
|
353
|
+
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,
|
|
354
|
+
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,
|
|
355
|
+
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};_.kl=class extends Error{constructor(a,b){super(a);this.code=b}};_.Ct=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 Dt,Et;Dt=class{constructor(a,b,c,d){this.f=a;this.Ld=b;this.a=c;this.wi=!!d}Sa(a){try{this.Ld.handleEvent?this.Ld.handleEvent(a):this.Ld.call(this.a,a)}catch(b){_.xh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
|
|
356
|
+
_.G=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};
|
|
357
|
+
Et=class{constructor(a){this.a=new _.Ct;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].Sa(a),b[c].wi&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Dt(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Dt(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].Ld===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Ft;_.Gt=class{constructor(){this.a=new _.Ct}release(){_.Wh(this)}on(a,b,c,d=!1){a=new Ft(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||(Vh(f),this.a.remove(b,f))}}};Ft=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};_.Ht=class{constructor(){this.bd=new Et(this);this.Yc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.bd.on(a,b,c)}one(a,b,c){return this.bd.one(a,b,c)}off(a,b){return this.bd.off(a,b)}forwardEventsTo(a){a&&(0<=this.Yc.indexOf(a)||this.Yc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Yc.indexOf(a),0<=a&&this.Yc.splice(a,1))}trigger(a){this.bd.trigger(a);for(const b of this.Yc)b.dispatchEvent(a)}};
|
|
358
|
+
_.Ht.prototype.off=_.Ht.prototype.off;_.Ht.prototype.one=_.Ht.prototype.one;_.Ht.prototype.on=_.Ht.prototype.on;_.Ht.prototype.removeEventListener=_.Ht.prototype.removeEventListener;_.Ht.prototype.addEventListener=_.Ht.prototype.addEventListener;var It=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.x("clpp.ads.IAdsManager",It);It.prototype.getPosition=It.prototype.getPosition;It.prototype.setVolume=It.prototype.setVolume;It.prototype.getVolume=It.prototype.getVolume;It.prototype.skip=It.prototype.skip;It.prototype.pause=It.prototype.pause;It.prototype.resume=It.prototype.resume;_.x("clpp.events.ERROR",_.Wd);_.x("clpp.events.LOADEDMETADATA",_.te);_.x("clpp.events.BUFFERING_ENDED",_.Mc);_.x("clpp.events.BUFFERING_STARTED",_.Nc);_.x("clpp.events.STATE_CHANGED",_.Pf);_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Ic);_.x("clpp.events.TEXT_TRACK_CHANGED",_.$f);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.Ag);_.x("clpp.events.BITRATE_CHANGED",_.Kc);_.x("clpp.events.TRACKS_ADDED",_.fg);_.x("clpp.events.LOAD_START",ue);_.x("clpp.events.RELEASING",_.wf);_.x("clpp.events.RELEASED",vf);
|
|
359
|
+
_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.zg);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Hc);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_CREATED",Ld);_.x("clpp.events.DRM_SESSION_UPDATE",_.Pd);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Md);_.x("clpp.events.DRM_RENEWAL_STARTED",Kd);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Id);_.x("clpp.events.DRM_LICENSE_REQUESTED",Jd);
|
|
360
|
+
_.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Jc);_.x("clpp.events.PLAY",_.Ve);_.x("clpp.events.SEEKING",_.Hf);_.x("clpp.events.SEEKED",_.Gf);_.x("clpp.events.USER_SEEKING",_.sg);_.x("clpp.events.USER_SEEKED",_.rg);_.rs={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.rs);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.oc);_.x("clpp.events.AD_LOADED",_.ec);_.x("clpp.events.AD_BREAK_STARTED",_.Rb);_.x("clpp.events.AD_STARTED",_.kc);_.x("clpp.events.AD_BUFFERING",_.Tb);_.x("clpp.events.AD_PROGRESS",_.hc);
|
|
361
|
+
_.x("clpp.events.AD_FIRST_QUARTILE",_.Wb);_.x("clpp.events.AD_MIDPOINT",_.fc);_.x("clpp.events.AD_THIRD_QUARTILE",_.mc);_.x("clpp.events.AD_PAUSED",_.gc);_.x("clpp.events.AD_RESUMED",_.ic);_.x("clpp.events.AD_SKIPPED",_.jc);_.x("clpp.events.AD_CLICKED",_.Ub);_.x("clpp.events.AD_IMPRESSION",_.cc);_.x("clpp.events.AD_COMPLETED",_.Vb);_.x("clpp.events.AD_STOPPED",_.lc);_.x("clpp.events.AD_BREAK_STOPPED",_.Sb);_.x("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Xb);
|
|
362
|
+
_.x("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Yb);_.x("clpp.events.AD_HLS_RESOLVED",Zb);_.x("clpp.events.SIMID_CREATIVE_STARTED",_.Jf);_.x("clpp.events.SIMID_CREATIVE_STOPPED",_.Kf);_.x("clpp.events.CASTING_STARTED",_.Qc);_.x("clpp.events.CASTING_ENDED","castingended");_.x("clpp.events.CAST_STATUS_CHANGED",_.Rc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.tc);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.qc);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.pc);_.x("clpp.events.TIMELINE_CUE_ADDED",_.ag);
|
|
363
|
+
_.x("clpp.events.TIMELINE_CUE_ENTER",_.bg);_.x("clpp.events.TIMELINE_CUE_EXIT",_.cg);_.x("clpp.events.TIMELINE_CUES_CHANGED",_.dg);_.x("clpp.events.MPD_TYPE_CHANGED",_.De);_.x("clpp.events.LIVE_TURNED_STATIC",_.qe);_.x("clpp.events.VIMOND_RESPONSE",_.Bg);_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.hf);_.x("clpp.events.PLAYLIST_MODIFIED",_.jf);_.x("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Ef);_.x("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Cf);_.x("clpp.events.SC_PLAYLIST_ENDED",_.Bf);
|
|
364
|
+
_.x("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Df);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.Sc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Ne);_.x("clpp.events.CMSD_EVENT","cmsd-event");_.x("clpp.events.YOSPACE_SESSION_STARTED",_.Qg);_.x("clpp.events.YOSPACE_SESSION_ENDED",_.Pg);_.x("clpp.events.CONTENT_STEERING_CHANGE",_.wd);_.x("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.xd);var T=class{lb(){}nb(){}sb(){}getId(){}getCreativeId(){}Nb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Qb(){}ob(){}getMediaUrl(){}cb(){}bb(){}Na(){}Oa(){}getPodIndex(){}Fb(){}qb(){}eb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Pb(){}canSeek(){}};_.x("clpp.ads.IAd",T);T.prototype.canSeek=T.prototype.canSeek;T.prototype.getVideoElement=T.prototype.Pb;T.prototype.getWrapperCreativeIds=T.prototype.getWrapperCreativeIds;
|
|
365
|
+
T.prototype.getWrapperAdSystems=T.prototype.getWrapperAdSystems;T.prototype.getWrapperAdIds=T.prototype.getWrapperAdIds;T.prototype.getSequenceLength=T.prototype.eb;T.prototype.getPositionInSequence=T.prototype.qb;T.prototype.getPodTimeOffset=T.prototype.Fb;T.prototype.getPodIndex=T.prototype.getPodIndex;T.prototype.getPodType=T.prototype.Oa;T.prototype.getMediaBitrate=T.prototype.Na;T.prototype.getMediaHeight=T.prototype.bb;T.prototype.getMediaWidth=T.prototype.cb;T.prototype.getMediaUrl=T.prototype.getMediaUrl;
|
|
366
|
+
T.prototype.getClickThroughUrl=T.prototype.ob;T.prototype.isBumper=T.prototype.Qb;T.prototype.getSkipTimeOffset=T.prototype.getSkipTimeOffset;T.prototype.getPosition=T.prototype.getPosition;T.prototype.getDuration=T.prototype.getDuration;T.prototype.getTitle=T.prototype.getTitle;T.prototype.getAdvertiserName=T.prototype.getAdvertiserName;T.prototype.getAdSystem=T.prototype.getAdSystem;T.prototype.getApiFramework=T.prototype.getApiFramework;T.prototype.getSourceId=T.prototype.Nb;
|
|
367
|
+
T.prototype.getCreativeId=T.prototype.getCreativeId;T.prototype.getId=T.prototype.getId;T.prototype.getTechnology=T.prototype.sb;T.prototype.getAdManagerVersion=T.prototype.nb;T.prototype.getAdManagerName=T.prototype.lb;var I=class{constructor(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}lb(){return""}nb(){return""}sb(){return 2}getId(){return this.B}getCreativeId(){return""}Nb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}canSeek(){return this.A}Qb(){return!1}ob(){return null}getMediaUrl(){return null}cb(){return 0}bb(){return 0}Na(){return 0}Oa(){return this.F}getPodIndex(){return 0}Fb(){return 0}qb(){return this.f}eb(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Pb(){return this.videoEl}Gh(){return this.C}};
|
|
368
|
+
I.prototype.getCustomAttributes=I.prototype.Gh;I.prototype.getVideoElement=I.prototype.Pb;I.prototype.getWrapperCreativeIds=I.prototype.getWrapperCreativeIds;I.prototype.getWrapperAdSystems=I.prototype.getWrapperAdSystems;I.prototype.getWrapperAdIds=I.prototype.getWrapperAdIds;I.prototype.getSequenceLength=I.prototype.eb;I.prototype.getPositionInSequence=I.prototype.qb;I.prototype.getPodTimeOffset=I.prototype.Fb;I.prototype.getPodIndex=I.prototype.getPodIndex;I.prototype.getPodType=I.prototype.Oa;
|
|
369
|
+
I.prototype.getMediaBitrate=I.prototype.Na;I.prototype.getMediaHeight=I.prototype.bb;I.prototype.getMediaWidth=I.prototype.cb;I.prototype.getMediaUrl=I.prototype.getMediaUrl;I.prototype.getClickThroughUrl=I.prototype.ob;I.prototype.isBumper=I.prototype.Qb;I.prototype.canSeek=I.prototype.canSeek;I.prototype.getSkipTimeOffset=I.prototype.getSkipTimeOffset;I.prototype.getPosition=I.prototype.getPosition;I.prototype.getDuration=I.prototype.getDuration;I.prototype.getTitle=I.prototype.getTitle;
|
|
370
|
+
I.prototype.getAdvertiserName=I.prototype.getAdvertiserName;I.prototype.getAdSystem=I.prototype.getAdSystem;I.prototype.getApiFramework=I.prototype.getApiFramework;I.prototype.getSourceId=I.prototype.Nb;I.prototype.getCreativeId=I.prototype.getCreativeId;I.prototype.getId=I.prototype.getId;I.prototype.getTechnology=I.prototype.sb;I.prototype.getAdManagerVersion=I.prototype.nb;I.prototype.getAdManagerName=I.prototype.lb;var Jt=class{constructor(a){this.a=a.map(b=>({Wb:b.getSurface().getMedia().id,player:b,Jd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.Jd)}get(){const a=this;return _.w(function*(){const b=a.a.find(c=>c.Jd);if(!b)throw Error("No available players in the pool");b.Jd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Jd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
|
|
371
|
+
d)}).then(c)});return b.ready}destroy(){const a=this;return _.w(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Kt=class{};_.x("clpp.utils.BufferUtils",Kt);Kt.toArrayBuffer=mi;Kt.toDataView=_.li;Kt.toInt32Array=_.ki;Kt.toUint32Array=ji;Kt.toUint16Array=ii;Kt.toUint8Array=_.F;Kt.equal=gi;var pi=new _.S("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.oi);_.x("clpp.utils.strings.fromBytesAutoDetect",_.ri);_.x("clpp.utils.strings.toUtf8",_.si);_.x("clpp.utils.strings.toUtf16",_.ti);_.x("clpp.utils.strings.toByteArray",_.ui);_.x("clpp.utils.strings.startsWith",_.vi);_.x("clpp.utils.strings.endsWith",_.wi);_.x("clpp.utils.strings.bitrateToString",_.zi);
|
|
371
372
|
_.x("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)))});
|
|
372
|
-
_.x("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
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
_.x("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 Ai=document.createElement("span");_.x("clpp.utils.dom.createHTMLElement",_.Fi);var Lt=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=Gi(this,a)}get(){return this.a}};_.Mt=class{constructor(a){this.f=a;this.a=null}la(a){return Ii(this,a,!1)}zb(a){return Ii(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Mi=class{constructor(a){this.f=a;this.a=null}kf(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.Mt(()=>{this.f()})).la(a);return this}zb(a){this.stop();this.a=(new _.Mt(()=>{this.f()})).zb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.Mi);_.Mi.prototype.stop=_.Mi.prototype.stop;_.Mi.prototype.tickEvery=_.Mi.prototype.zb;_.Mi.prototype.tickAfter=_.Mi.prototype.la;_.Mi.prototype.tickNow=_.Mi.prototype.kf;var Nt=class{};_.x(md,Nt);Nt.getInfo=_.pj;
|
|
374
|
+
var Li=null,Ki=null,cj=new _.S(md),gj="android",fj="ios",lj="linux",hj="osx",ij="windows",jj="tizen",kj="webos",ej=_.ng,oj=_.ng,Yi={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,
|
|
375
|
+
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,
|
|
376
|
+
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},
|
|
377
|
+
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 uj=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.bh(Ot,b);this.f=new Lt;this.h=null;this.a=new Lt;this.l=Pt;Pt+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Gt;if(null==a)throw new _.H(_.C,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.C,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
|
|
378
|
+
HTMLMediaElement))throw new _.H(_.C,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 _.H(_.C,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Dd);a.parentNode?a.parentNode.replaceChild(c,
|
|
379
|
+
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),_.Di(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Uf);for(d of[_.Lg,_.ae])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Qi()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Hi(this.a,"clpp-container"),
|
|
380
|
+
Hi(this.a,this.o),Hi(this.f,_.ad),Hi(this.f,"clpp-video"));b.webOSStartupPatch&&qj(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?_.Di(a,bd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(bd):
|
|
381
|
+
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&&_.Di(a,_.ad);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){_.Di(a,bd)}show(a){a.classList.remove(bd)}release(){this.j.release()}};
|
|
382
|
+
uj.prototype.removeElementFromContainer=uj.prototype.removeElementFromContainer;uj.prototype.addElementToContainer=uj.prototype.addElementToContainer;uj.prototype.getCastElement=uj.prototype.getCastElement;uj.prototype.getContainer=uj.prototype.getContainer;uj.prototype.getMedia=uj.prototype.getMedia;var Ot={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Pt=1;var Qt=class{constructor(a){this.ka=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.Bg;this.C=tj(a);this.A=[];const b=vj(this,this.C,this.ka.rh);this.l=new Jt(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.fa=this.B=!1;this.G=a.fi||(()=>{});wj(this).forEach(c=>xj(this,c,!1))}getCurrentItem(){return this.f}Rd(){return this.f?this.f.player:null}ag(){return Array.from(this.j.values())}kd(){return 0<this.j.size}play(a){return Mj(this,
|
|
383
|
+
a,_.Ve)}load(a){return Mj(this,a,_.re)}release(){const a=this;return _.w(function*(){yield Promise.all([yield Tj(a),a.f?Jj(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();fk(a)})}isMuted(){return this.B}},ck="preload",ak=_.ve,Cj="primary",Bj="ad";var ik=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",ik);_.x("clpp.net.makeRequest",_.nk);_.mk=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.mk,CONTENT_STEERING:7});var Rt=class extends _.Ht{constructor(a){super();this.ka=_.bh({li:.5},a);this.ue=this.fa=!1;this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.fa)return!1;if(c=Ck(this))return this.g.info("Seek ignored while binding interstitial",c.ca),!1;Dk(this,b);c=Fk(this);const d=Gk(this,b),e=Hk(this,b);if(c){if(d&&d!==c)return Kk(this,d,b),!1;if(e&&e!==c)return Lk(this,e,b),!1;if(b<c.startTime-this.ka.resolutionOffsetSec)return Ik(this,c),!0;if(b<
|
|
384
|
+
c.startTime)return Vj(this.X),this.g.info("Seek inside resolution area of",c.ca),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.ca),Yj(this.X),!1;if(c.Mf)return this.g.info("Jump over a scheduled interstitial",c.ca),Xj(this.X),c.state=wk,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.ca);Yj(this.X);ek(this.X,b,!0);return!1}return d?(Kk(this,d,b),!1):e&&!e.th?(Lk(this,e,b),!1):!0});this.X=new Qt({rh:this.ka.config,Bg:a.player,preloadMedia:!0,ab:a.ab,
|
|
385
|
+
sideAdContainer:this.ka.sideAdContainer,onAudioDecision:this.ka.onAudioDecision,fi:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Tk(this,a.player)}destroy(){const a=this;return _.w(function*(){Uk(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.X.destroy()})}Hb(){return this.j}setMuted(a){var b=this.X;(b.B=a)?(b.a.setMuted(!0),Zj(b,!0)):(a=b.getCurrentItem(),Aj(b,a,a&&a.Ib?Bj:Cj))}isMuted(){return this.X.isMuted()}isLive(){const a=this.X.Rd();return a?a.isLive():
|
|
386
|
+
null}Sa(a){this.f.trigger(a)}},wk=0,Bk=1,gl=2,hl=3,Ek=4,nl=5,xk=6;var Mn=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,ab:b},d.ads.hls||{},{ki:c});this.a=new Rt(a);bl(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=Vk(this.a);a&&a.play()}pause(){const a=Vk(this.a);a&&a.pause()}skip(){}getVolume(){const a=Vk(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Vk(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
|
|
387
|
+
Vk(this.a);return a?a.getPosition():-1}l(){return!this.a.Hb()}h(){return this.a.destroy()}};Mn.prototype.getPosition=Mn.prototype.getPosition;Mn.prototype.setVolume=Mn.prototype.setVolume;Mn.prototype.getVolume=Mn.prototype.getVolume;Mn.prototype.skip=Mn.prototype.skip;Mn.prototype.pause=Mn.prototype.pause;Mn.prototype.resume=Mn.prototype.resume;var St=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Gt;this.h=null;this.f=!0;sl(this)}release(){this.a.release();tl(this);this.m=null}};_.Tt=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.U.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Tl=class{constructor(){this.Cg=this.ne=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.ne=!0;this.value=f;d(f)};b=function(f){this.done=this.Cg=!0;this.error=f;e(f)}});c.ne=!1;c.done=!1;c.Cg=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};var Ut;_.mm=class{constructor(a,b){{var c=[a];let f=yl(...c);if(!f||f.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(f=yl(...c))?c:null}if(!c)throw new _.H(_.C,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(Ut,""):a}};Ut=/^[A-Za-z]+:/;var Bl=class{constructor(){this.a=zl()}};var Rl=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Bl}};var Vt=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};var Ql=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Vt(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Bl}};var Pl=window.fetch,Ml=window.AbortController,Ll=window.Headers;var Sl=window.XMLHttpRequest;var Wt=class{};_.x("clpp.utils.Uint8ArrayUtils",Wt);Wt.toStandardBase64=_.Vl;Wt.concat=_.am;Wt.equal=_.$l;Wt.toHex=_.Zl;Wt.fromHex=_.Yl;Wt.fromBase64=_.Xl;Wt.toBase64Url=_.Wl;_.As=class{constructor(a,b){this.U=a;this.B=b;this.a=!1}abort(){this.a=!0;return this.B()}};var im=class extends _.As{constructor(a,b){super(new _.Tl,()=>Promise.resolve());this.C=a;this.h=null;this.w=this.U;this.f=-1;this.j=this.l=this.o=null;this.A=b||null;fm(this)}then(a,b){this.U=this.U.then(a,b);return this}catch(a){this.U=this.U.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.zn=class{constructor(){this.h=[];this.f=[];this.j=[];this.w=!1;this.o=new _.Tt;this.a={};this.headers=new Map;this.l=0;this.A=null;this.a.data=cm;!window.fetch||!window.AbortController||_.Qi(6)||_.Ti()&&68<_.pj().browserVersion.major?(this.a.http=Ul,this.a.https=Ul):(this.a.http=Ol,this.a.https=Ol)}Ji(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.l=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.h=[];this.f=[];this.j=[];return this.o.destroy()}zf(a){this.h.push(a)}Tc(a){this.j.push(a)}Dg(a){this.h=
|
|
388
|
+
this.h.filter(b=>b!==a)}le(a){this.j=this.j.filter(b=>b!==a)}fetch(a){let b=void 0;1===a.type&&(b={objectType:Xt});return _.lm(this,a,b)}};_.x("clpp.net.NetworkEngine",_.zn);_.zn.prototype.fetch=_.zn.prototype.fetch;_.zn.prototype.removeResponseModifier=_.zn.prototype.le;_.zn.prototype.removeRequestModifier=_.zn.prototype.Dg;_.zn.prototype.addResponseModifier=_.zn.prototype.Tc;_.zn.prototype.addRequestModifier=_.zn.prototype.zf;_.zn.prototype.setRateLimit=_.zn.prototype.Ji;var nm=[];var qm=!!(performance&&performance.mark&&performance.measure),sm=new _.S("clpp.perf");_.x("clpp.version",_.ea);_.x("clpp.name",_.ra);var yn=null;_.x("clpp.configure",a=>{yn=a});_.ll="application/x-mpegurl";_.x("clpp.Type",{DASH:_.vc,HLS:_.ll,SMOOTH_STREAMING:_.Ac,MP4:_.yg,MP3:"audio/mp3"});_.x("clpp.TimelineCueType",{SCTE35:_.Ff,DASH_CALLBACK:_.Ee,HLS_DATERANGE:_.ce,UNKNOWN:_.ng});_.x("clpp.SpeedUpMode",{DECODER:_.Ad,SEEK:"seek"});_.x("clpp.CodecSwitchingStrategy",{PREVENT:_.qf,SMOOTH:_.Mf});var ym=new Map,um=1,Cm=2,Bm=3,Am=4;_.bp=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;
|
|
389
|
+
_.vi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.x("clpp.utils.url.queryString",_.Jm);var Nm;_.J=_.Xf;_.Yt=1/15;Nm={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/]};Nm[_.J]=[/^vtt$/,/^wvtt/,/^stpp/];_.Zt=(new Map).set(_.nd,_.nd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Lg,_.Lg).set(_.ae,_.ae).set("channelsCount","channels");var Xt="m";var $t=class{};_.x("clpp.utils.PlayerConfiguration",$t);$t.create=function(...a){return _.Xm(a,{Bi:!1})};$t.build=_.Xm;_.x("clpp.utils.media.detectType",Zm);var bn=new _.S("clpp.sources");_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.mb,SW_SECURE_DECODE:_.nb,HW_SECURE_CRYPTO:Ga,HW_SECURE_DECODE:Ha,HW_SECURE_ALL:Fa});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Fe,CLEAR_KEY:_.Pe,WIDEVINE:_.ud,PLAYREADY:_.sd,FAIRPLAY:_.qd,PRIMETIME:_.pd});_.dn={};_.x("clpp.drm.registerDrmEnvironment",_.en);var kn=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.oi(_.Xl(a)));this.a=JSON.parse(_.oi(_.Xl(b)));this.j=c}};var hn={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Sm="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var On=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},xn="vod",wn="live";var Bn=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",
|
|
375
390
|
"cs"],["dan","da"],["deu","de"],[_.Dd,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
376
391
|
"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",
|
|
377
392
|
"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",
|
|
378
393
|
"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",
|
|
379
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
this.
|
|
385
|
-
_.
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
_.
|
|
404
|
-
c!==_.Ud);this.fc||(this.fc=this.Bg());this.fc.initialize(this);this.C.showMediaElement()}release(){this.M&&(this.M.destroy(),this.M=null);return Promise.resolve()}destroy(){this.L.release();return this.Oe.release()}canPlay(a,b){return _.wh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.$a)}appendLoad(){return Promise.reject(_.$a)}seekWith(){return Promise.reject(_.$a)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ga)return Promise.reject("No sources specified yet. You need to load content before calling play.");
|
|
405
|
-
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||""};Tl(c)?(this.trigger(new _.C(_.Kc)),this.log.warn(_.ka)):c.name===ab&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ga?new Promise((a,b)=>{const c=this.getState();if(c!==_.lp&&c!==_.hp&&c!==_.sp&&c!==_.rp)b(new _.I(_.F,7,3201,"The player state does not allow pause."));
|
|
406
|
-
else if(this.C.getMedia().pause(),this.getState()===_.sp)this.L.one(this,_.Nf,()=>{a()});else a()}):Promise.reject(new _.I(_.F,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.Gc=a}setCdnErrorCallback(a){this.Cc=a}Jc(){return this.Gc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
|
|
407
|
-
return new _.mu(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)?
|
|
408
|
-
(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.C(_.ng));this.L.on(c,_.Ef,h);this.L.on(c,_.cg,h);this.L.on(c,_.qf,h);this.log.info("Seeking to "+a+". Delta "+d);this.kd=this.Pe=!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,v=l.type===_.Ef,y=l.type===_.qf,A=l.type===_.cg,D=y&&u;p=v||n&&D||A&&p;this.log.debug("Checking seeking state after "+
|
|
409
|
-
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:",D);p?(this.kd=this.Pe=!1,this.L.off(c,_.Ef,h),this.L.off(c,_.cg,h),this.L.off(c,_.qf,h),this.nf(),this.trigger(new _.C(_.mg)),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,_.pe,g)};this.getState()===_.pp?
|
|
410
|
-
(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Nf,()=>{switch(this.getState()){case _.lp:case _.sp:case _.rp: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?_.hh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
|
|
411
|
-
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.ga?this.C.getMedia().duration:-1}getTrackManager(){return this.fc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
|
|
412
|
-
1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Qd=a}getSourceIndex(){return this.Qd}getLoadedSource(){return this.ga&&-1!==this.Qd?this.ga[this.Qd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Oe}setNetworkEngine(a){this.Oe=a}setCmsdManager(a){this.Ke=a}getTextDisplayer(){return this.M}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}Ig(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
|
|
413
|
-
a.type+"' with playhead at: "+c;if(a.type===_.cg||a.type===_.qf)this.pf.debug(d);else{let e="";switch(a.type){case _.tf:e=`Rate: ${this.getPlaybackRate()}`;break;case Pd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Ue:case _.ef:case "suspend":case _.Cg:case Lf:case _.Ff:case _.Ef:case _.cg:case _.qf:case Pc:case Qc:b=this.getBufferInfo().Ka(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
|
|
414
|
-
break;case _.yf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.pf.info(d)}a.type!==_.Ud&&this.trigger(new _.C(a.type,{detail:a}))}nf(){}};var cm;cm=new _.S("clpp.Components");_.am=new Map;_.x("clpp.install",function(a){km(a)});_.x("clpp.uninstall",function(a){lm(a)});var ru=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.nb,SW_SECURE_DECODE:_.ob,HW_SECURE_CRYPTO:Ha,HW_SECURE_DECODE:Ia,HW_SECURE_ALL:Ga});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ee,CLEAR_KEY:_.Oe,WIDEVINE:_.ud,PLAYREADY:_.sd,FAIRPLAY:_.qd,PRIMETIME:_.pd});_.om={};_.x("clpp.drm.registerDrmEnvironment",_.pm);var sm={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,
|
|
394
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var io,Fn,In,Gn;io=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Jn(this);this.f.Tc(this.h);this.a=null}release(){this.a=null;this.f.le(this.h)}};_.au="maxSuggestedBitrateKbps";Fn={du:"duress",etp:_.Xd,mb:_.au,rd:"responseDelay",rtt:"roundTripTime"};In={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:ug};
|
|
395
|
+
Gn=new _.S("clpp.net.CmsdManager");var R=class extends _.Ht{constructor(a,b,c){super();om();this.g=new _.S("clpp.Player");this.g.info("SDK version: 6.28.0");if(!a)throw new _.H(_.C,7,7102);this.da=new _.Gt;this.f=this.C=b||_.Vm();this.l=null;void 0===this.f.license&&(this.f.license=Sm,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 _.H(_.C,7,7101,"No license provided in configuration!");
|
|
396
|
+
this.j=new uj(a,c);this.F=this.A=this.a=this.H=null;this.I=new _.zn;this.h=null;this.Y=[];this.ba=!0;this.K={};this.ha=null;this.R=!0;this.T=this.P=!1;this.L=this.Hc=null;this.Je=!1;this.ia=new St(this);this.B=null;this.on(_.Pf,()=>{this.getState()===_.ks&&(this.a?this.a.unload():Promise.resolve())});this.on(_.qc,()=>{this.Je=!0});this.on(_.pc,()=>{this.Je=!1});this.on(_.dg,()=>Nn(this));Pn(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
|
|
397
|
+
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 Kn)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Rn(this,a);this.M=_.na;Oh(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,
|
|
398
|
+
b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.G(_.Wd,{detail:a}),this.trigger(a)}ed(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.ch(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Un(this);return this.l.finally(()=>{Vn(this);this.g.debug("Player released");
|
|
399
|
+
this.l=null})}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(za);this.trigger(new _.G("destroying"));return _.Qn(this,_.Ke)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.bd.clear();this.ia.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Rh(this);this.A=this.a=null;this.trigger(new _.G("destroyed"))})}load(a){const b=this;return _.w(function*(){try{_.rm(cf);
|
|
400
|
+
b.M=_.na;b.ba=!0;const c=_.an(a),d=Ym(a)?a:{};if(d.license)throw new _.H(_.C,7,7100,"License cannot be passed into the load method.");yield _.co(b,d,c);yield _.eo(b);yield _.go(b);_.rm(bf);_.tm("player.load",cf,bf)}catch(c){Vn(b);if(b.l)throw b.g.info(Na),new _.H(_.C,7,7E3);throw c;}})}preload(a){const b=this;return _.w(function*(){yield _.co(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(ib)}else b.g.warn(fb)})}use(a){(a=Sh(a))&&a.playerConstructed(this)}remove(a){return(this.getState()<=
|
|
401
|
+
_.ts||this.R)&&null!==Mh(a)?(Th(a),this.T=!0):!1}play(){return this.a?!this.h||this.h instanceof Mn||this.a.namespace()===_.fd?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Bt}getState(){return this.a?
|
|
402
|
+
this.a.getState():_.ts}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.ks?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,
|
|
403
|
+
end:0}}tc(){const a=this.a;return a&&a.tc?a.tc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof Mn?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&
|
|
404
|
+
this.a.setMuted(a);this.h&&this.h instanceof Mn&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}eg(){return Object.freeze(this.ha)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&
|
|
405
|
+
this.a.resetAbr()}setDrmCustomDataModifier(a){this.Hc=a;$n(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};_.x("clpp.Player",R);R.registerPlugin=_.Ln;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.eg;
|
|
406
|
+
R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;
|
|
407
|
+
R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;R.prototype.getVolume=R.prototype.getVolume;R.prototype.getTimelineOffset=R.prototype.tc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;
|
|
408
|
+
R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;
|
|
409
|
+
R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.ed;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.ts=0;_.ks=6;_.ss={IDLE:_.ts,PREPARING:1,BUFFERING:2,PLAYING:3,PAUSED:4,ENDED:5,ERROR:_.ks,UNSET:7};R.State=_.ss;var Kn=[];var bu=class{constructor(){this.xc=null;this.f=[];this.h=[];this.Qa=new _.S(ed);this.a=null;this.j=!1}load(a){const b=this;return _.w(function*(){b.xc?yield mo(b,c=>_.w(function*(){yield c.load(a)})):b.Qa.warn("No main player, cannot load.")})}Gi(a){this.j=a;this.Qa.info("Looping set to",a)}bh(a){this.f.push(a)}ah(a){if(this.xc)this.Qa.warn("Main player already set.");else{this.xc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Pf,b);a.on(_.eg,c);a.on(_.Vd,d);this.h.push(()=>
|
|
410
|
+
{a.off(_.Pf,b);a.off(_.eg,c);a.on(_.Vd,d)})}}clear(){this.xc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.w(function*(){a.j&&(a.Qa.info("Looping playback."),yield mo(a,b=>_.w(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,3===a?(this.Qa.info("Mirroring playing."),no(this,b=>_.w(function*(){yield b.play()}))):[4,2,_.ks].includes(a)&&(this.Qa.info("Mirroring paused/buffering/error."),no(this,b=>{const c=this;return _.w(function*(){var d=
|
|
411
|
+
Math.round(c.xc.getPosition())-.1;yield b.seek(d);yield Ji(.2);d=b.getState();if(3===d||2===d)yield b.pause()})})))}w(){this.a||no(this,a=>{const b=this;return _.w(function*(){a.isPaused()&&(yield a.play());const c=b.xc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();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.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Qa.info(`Delta ${d.toFixed(1)} s.`):
|
|
412
|
+
(1===g?b.Qa.info("Secondary caught up."):1>g?b.Qa.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Qa.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.x(ed,bu);bu.prototype.clear=bu.prototype.clear;bu.prototype.addMainPlayer=bu.prototype.ah;bu.prototype.addSecondaryPlayer=bu.prototype.bh;bu.prototype.setLoop=bu.prototype.Gi;bu.prototype.load=bu.prototype.load;var cu=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Gt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.w(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.ju=class{constructor(a,b,c,d){d=void 0===d?_.du:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.eu;this.writingMode=_.fu;this.lineInterpretation=_.gu;this.line=null;this.lineAlign=_.hu;this.direction=iu;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Ic(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
|
|
413
|
+
a.payloadType}};_.x("clpp.text.Cue",_.ju);_.ju.positionAlign={LEFT:_.le,RIGHT:_.me,CENTER:_.Vc,AUTO:"auto"};_.du=_.Xf;_.ju.payloadType={TEXT:_.du,VTT_XML:_.Dg,TTML_XML:_.hg};_.eu=_.Vc;_.ku={LEFT:_.ie,RIGHT:_.Af,CENTER:_.eu,START:_.Of,END:_.Ud};_.ju.textAlign=_.ku;var iu="ltr";_.ju.direction={HORIZONTAL_LEFT_TO_RIGHT:iu,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.fu="horizontal-tb";_.ju.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.fu,VERTICAL_LEFT_TO_RIGHT:_.vg,VERTICAL_RIGHT_TO_LEFT:_.wg};_.gu=0;
|
|
414
|
+
_.ju.lineInterpretation={LINE_NUMBER:_.gu,PERCENTAGE:1};_.hu=_.Of;_.lu={CENTER:_.Vc,START:_.hu,END:_.Ud};_.ju.lineAlign=_.lu;_.ou=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.mu;this.scroll=nu;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.ou);_.mu=1;_.ou.units={PX:0,PERCENTAGE:_.mu,LINES:2};var nu="";
|
|
415
|
+
_.ou.scrollMode={NONE:nu,UP:"up"};_.ou.displayAlign={BEFORE:"flex-end",CENTER:_.Vc,AFTER:"flex-start"};_.ou.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.od,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var pu=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Gt;this.j=!1;this.g=new _.S("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.nc,b=>Fo(this,b)),this.a.on(this.f,Xc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.If&&(d.mode=
|
|
416
|
+
_.be)}}}))}o(a){const b=new _.ju(a.startTime,a.endTime,a.text,_.Dg);if(_.ih(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.vg;break;case "rl":b.writingMode=_.wg}_.jh(a.size)&&(b.size=a.size);if(_.ih(a.align))switch(a.align){case _.ie:case _.Of:b.textAlign=_.Of;break;case _.Vc:b.textAlign=_.eu;break;case _.Af:case _.Ud:b.textAlign=_.Ud}_.jh(a.position)&&(b.position=a.position);if(_.ih(a.positionAlign))switch(a.positionAlign){case _.le:b.positionAlign=_.le;break;case _.Vc:b.positionAlign=
|
|
417
|
+
_.Vc;break;case _.me:b.positionAlign=_.me}_.jh(a.line)&&(b.line=a.line);if(_.ih(a.lineAlign))switch(a.lineAlign){case _.Of:b.lineAlign=_.hu;break;case _.Vc:b.lineAlign=_.Vc;break;case _.Ud:b.lineAlign=_.Ud}typeof a.snapToLines===_.Lc&&(b.lineInterpretation=a.snapToLines?_.gu:1);return b}};var qu;qu={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Ar=(a,b)=>{const c=qu[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===_.J?"":null};_.ru={text:{mp4:_.wc,m4s:_.wc,m4i:_.wc,cmft:_.wc,vtt:_.Yf,ttml:_.zc},video:{mp4:_.yg,m4s:_.yg,m4f:_.yg,m4i:_.yg,m4v:_.yg,cmfv:_.yg,ts:_.xg},audio:{mp4:_.Fc,m4s:_.Fc,m4f:_.Fc,m4i:_.Fc,m4a:_.Fc,cmfa:_.Fc,ts:_.xg,aac:_.Cc,ec3:_.Ec,ac3:_.Dc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Dr=(a,b,c)=>a.map(d=>{d=_.Mm(d)||"";return d=(d=_.ru[b][d])?d:b===_.J?c&&"vtt"!==c?_.wc:_.Yf:null}).filter(Boolean)[0]||null;_.hr=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)}};
|
|
418
|
+
_.gr=class{constructor(a,b){this.name=a;this.value=b}};var su=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};var Io={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,
|
|
415
419
|
96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
|
|
416
420
|
134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
|
|
417
421
|
185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
|
|
@@ -425,101 +429,101 @@ break;case _.yf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=".
|
|
|
425
429
|
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,
|
|
426
430
|
136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
|
|
427
431
|
143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
|
|
428
|
-
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]};_.
|
|
429
|
-
_.x("clpp.utils.dataview.DataViewReader",_.
|
|
430
|
-
this.f[f];if(h){let m=null;var k=null;this.h[f]===
|
|
431
|
-
_.
|
|
432
|
-
var
|
|
433
|
-
42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},
|
|
434
|
-
|
|
435
|
-
for(const a of Object.keys(
|
|
436
|
-
extractContentId:_.
|
|
437
|
-
persistentState:_.
|
|
438
|
-
e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.
|
|
439
|
-
void 0===a?
|
|
440
|
-
b){if(this.l)return Promise.reject(
|
|
441
|
-
d);this.f&&(
|
|
442
|
-
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:
|
|
443
|
-
this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.
|
|
444
|
-
|
|
445
|
-
new
|
|
446
|
-
(f.push(k),e=!0));h||(e=b.canPlayType(_.
|
|
447
|
-
|
|
448
|
-
new
|
|
449
|
-
this.closed;const a=
|
|
450
|
-
b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.
|
|
451
|
-
a.reader.getPosition()!==a.reader.Ma()&&_.B("Mismatch between box size and data size!")}}};var
|
|
452
|
-
_.
|
|
453
|
-
this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.w(function*(){a.j?yield a.ha:(a.j=!0,yield
|
|
454
|
-
_.
|
|
455
|
-
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.
|
|
456
|
-
a)&&c&&!c.
|
|
457
|
-
|
|
458
|
-
a
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
_.
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
this.
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
this.
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
b.
|
|
487
|
-
|
|
488
|
-
this.
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
if(0===
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===pv?b.push(k):h.type===qv&&c.push(k)},g=()=>{e={video:_.Fk(...b),captions:d,audio:_.Fk(...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(_.F,3,3018);return e}};pl(_.Dc,()=>new rv(_.Dc));pl(_.sg,()=>new rv(_.sg));var qv=_.q,pv=_.t;var sv=class{getCuePoints(){}Gb(){}Fb(){}};_.x("clpp.ads.IAdsTimeline",sv);sv.prototype.hasPostroll=sv.prototype.Fb;sv.prototype.hasPreroll=sv.prototype.Gb;sv.prototype.getCuePoints=sv.prototype.getCuePoints;_.uv=class{f(){}a(){}h(){}o(){}};var xv=class extends _.su{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 _.S(hd);_.Li(this.l)?this.g.warn(_.Hb):this.Xa(_.ud,{licenseUrl:this.l,videoRobustness:[_.ob,void 0],audioRobustness:[_.nb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.sd.bind(this)}});_.Li(this.j)?this.g.warn(_.eb):this.Xa(_.sd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.sd.bind(this)}});
|
|
508
|
-
_.Li(this.h)?this.g.warn(_.Ea):_.Li(this.a)?this.g.warn(_.Da):this.Xa(_.qd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.hg.bind(this),licenseResponse:this.ig.bind(this),certificateRequest:this.sd.bind(this),extractContentId:this.Kf.bind(this)}})}sd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Kf(a,b){a=Km(b);switch(this.o){case vv:return a;case wv:return(new _.Lm(a)).a;default:throw Error("Unknown content ID strategy");}}hg(a,b){b.headers[ua]=
|
|
509
|
-
Cc;this.sd(a,b);a={spc:_.zk(b.body)};b.body=_.Hi(_.Ri(a,!0))}ig(a,b){a=_.Bi(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=_.Bk(a).buffer}};_.x(hd,xv);xv.prototype.onFairPlayLicenseResponse=xv.prototype.ig;xv.prototype.onFairPlayLicenseRequest=xv.prototype.hg;xv.prototype.extractFairPlayContentId=xv.prototype.Kf;xv.prototype.onLicenseRequest=xv.prototype.sd;xv.prototype.constructor=xv.prototype.constructor;xv.NAME=Ja;
|
|
510
|
-
var wv="hostname",vv="full-skd";xv.FairPlayContentIdStrategy={HOSTNAME:wv,FULL_SKD:vv};_.x("clpp.drm.HeaderDrmComponent",class extends _.uv{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ja){a=a.drm.customData;if(!a)throw new _.I(_.F,7,7100,_.vd);a=new xv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||vv);_.pm(a)}}a(){delete _.om.HeaderDrm}id(){return"headerdrm"}});_.Er(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})});_.Er(function(){_.uh("mathRound.install")});_.Er(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;Zd in document||(Object.defineProperty(document,Zd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
511
|
-
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ft);document.addEventListener("webkitfullscreenerror",ft);document.addEventListener("mozfullscreenchange",ft);document.addEventListener("mozfullscreenerror",ft);document.addEventListener("MSFullscreenChange",ft);document.addEventListener("MSFullscreenError",ft)}});_.Er(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.uh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ht,document.exitPictureInPicture=it,document.addEventListener("webkitpresentationmodechanged",gt,!0))}});_.Er(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=jt)}});_.Er(function(){if(window.VTTCue)_.th("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.th(Bb),window.VTTCue=kt;else if(6===a)_.th("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=lt;else{try{var b=!!kt(1,2,"")}catch(c){b=!1}b&&(_.th(Bb),window.VTTCue=kt)}}else _.vh("VTTCue not available.")});var mt;_.Er(function(){_.uh("InputEvent.install");_.Pj("Trident/")&&HTMLInputElement.prototype.addEventListener!==nt&&(_.th("Patching input event support on IE."),mt=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=nt)});_.Er(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Er(function(){_.uh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});_.yv=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 zv;_.Av=class{constructor(){this.a=new Blob([zv],{type:_.tg})}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 _.xk;b=b.play();const d=(new _.Mj(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===bb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
|
|
512
|
-
zv=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,
|
|
432
|
+
26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.tu=class{constructor(a){this.I=a;this.f={}}Xa(a,b){this.f[a]=b}};_.x("clpp.drm.DrmEnvironment",_.tu);_.tu.prototype.setDrmSystem=_.tu.prototype.Xa;_.fp=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.jh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Ma(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Lo();this.a=a}};_.Wp=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Ma(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Oo();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Oo();this.a=a}};
|
|
433
|
+
_.x("clpp.utils.dataview.DataViewReader",_.Wp);_.dp=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=Vo(a);this.h[a]=uu;this.f[a]=b;return this}ea(a,b){a=Vo(a);this.h[a]=vu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.F(a);a=new _.Wp(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.No(a)&&!this.a;)this.he(0,a,b)}he(a,b,c){const d=b.getPosition();let e=_.M(b);var f=_.M(b);let g=!1;this.g.debug("Parsing MP4 box",_.Wo(f));switch(e){case 0:e=b.Ma()-d;break;case 1:e=_.So(b),g=!0}const h=
|
|
434
|
+
this.f[f];if(h){let m=null;var k=null;this.h[f]===vu&&(k=_.M(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Ma()&&(l=b.Ma());l-=b.getPosition();b=0<l?_.Uo(b,l):new Uint8Array(0);b=new _.Wp(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.Ma()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.dp);_.dp.typeToString=_.Wo;
|
|
435
|
+
_.dp.allData=_.Zo;_.dp.sampleDescription=_.Yo;_.dp.children=_.Xo;_.dp.prototype.parseNext=_.dp.prototype.he;_.dp.prototype.parse=_.dp.prototype.parse;_.dp.prototype.stop=_.dp.prototype.stop;_.dp.prototype.fullBox=_.dp.prototype.ea;_.dp.prototype.box=_.dp.prototype.N;_.dp.headerSize=_.$o;var uu=0,vu=1;var wu=class{};_.x("clpp.utils.FairplayUtils",wu);wu.parseFairPlayResponse=_.ip;wu.formatFairPlayRequest=_.hp;wu.createFairplayPayload=gp;wu.extractContentId=_.cp;wu.extractExtXKeyUri=ap;var xu=class{};_.x(gd,xu);var op=new _.S(gd),yp="PRODUCTION",zp="STAGING",Ap="DEMO",Bp="TEST",yu={PRODUCTION:yp,STAGING:zp,DEMO:Ap,TEST:Bp};xu.Environment=yu;xu.WidevineCertificates={V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"};
|
|
436
|
+
var kp="/license-proxy-widevine/cenc/",lp="/license-proxy-headerauth/drmtoday/RightsManager.asmx",mp="/license-server-fairplay/",Cp={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
|
|
437
|
+
42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},zu=[Fa,Ha,Ga,_.nb,_.mb],Au=[Fa,Ha,
|
|
438
|
+
Ga,_.nb,_.mb],Bu=["3000","2000","150"],Cu=["2000","150"];
|
|
439
|
+
for(const a of Object.keys(yu)){let b=xa;a!==yp&&(b+=`_${a}`);const c=new _.tu(b);let d=null;switch(a){case yp:case zp:case Ap:d=_.Jo("V2");break;case Bp:d=null}c.Xa(_.ud,{licenseUrl:np(_.ud,a),videoRobustness:zu,audioRobustness:Au,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.qp,licenseResponse:_.rp}});c.Xa(_.qd,{licenseUrl:np(_.qd,a),certificateUrl:jp(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.tp,licenseResponse:_.up,
|
|
440
|
+
extractContentId:_.vp,certificateRequest:_.wp}});c.Xa(_.sd,{licenseUrl:np(_.sd,a),videoRobustness:Bu,audioRobustness:Cu,modifiers:{licenseRequest:xp}});_.en(c)};_.Du=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Fu=class{constructor(){this.size=0;this.a=void 0;this.g=new _.S("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Eu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Eu.value();return this.a&&gi(a,b)?!0:!1}entries(){}keys(){}values(){}},Eu=new _.Du(()=>mi(new Uint8Array([0])));var Gp=new _.Du(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.te],[HTMLMediaElement.HAVE_CURRENT_DATA,_.se],[HTMLMediaElement.HAVE_FUTURE_DATA,Oc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Pc]]));var Hu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&Ip(b,null);return(this.j=a)?Ip(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.wh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Gu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return nq}},Gu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.qd))for(var c of b){a:{a=c;if(a.persistentState===_.yf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
|
|
441
|
+
persistentState:_.Oe,distinctiveIdentifier:_.Oe,initDataTypes:a.initDataTypes,sessionTypes:[Wf],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),
|
|
442
|
+
e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.yg));a=e?b:null}if(a){this.a=a;return}}c=Error(yb);c.name=ab;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Iu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.wh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Iu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Gt;this.j=0;this.g=new _.S(id);this.g.info("Created Media Keys for "+a)}createSession(a){a=
|
|
443
|
+
void 0===a?Wf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Wf)throw new TypeError("Session type "+a+ba);return new Ju(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Ju=class extends _.Ht{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Gt;this.sessionId=b;this.expiration=NaN;this.closed=new _.Tl;this.l=!1;this.keyStatuses=new Fu;this.g=new _.S(id)}generateRequest(a,
|
|
444
|
+
b){if(this.l)return Promise.reject(ob);this.g.debug("generateRequest");this.h=new _.Tl;try{const c=this.o.createSession(_.yg,_.F(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Jg,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 _.G(_.ye,{messageType:void 0===e||e===Qf?ke:je,message:mi(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Hg,d=>{this.g.debug("onWebkitKeyAdded_",
|
|
445
|
+
d);this.f&&(Jp(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Ig,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Qf)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),
|
|
446
|
+
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:Jp(this,"output-not-allowed");break;default:Jp(this,_.ge)}});Jp(this,Qf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.re);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(ob);this.g.debug(og);this.f=new _.Tl;try{this.a.update(_.F(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
|
|
447
|
+
this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Wh(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"))}},Ku=class{a(){return nq}f(){return!!window.WebKitMediaKeys}create(){return new Hu}};var Lu=class{constructor(){this.j=null;this.g=new _.S("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 Rq}},
|
|
448
|
+
Mu=class{a(){return Rq}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Lu}};var Pu=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.wh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Ra);const b=this.w;b&&b!==a&&Mp(b,null);(this.w=a)&&Mp(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.wh("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=
|
|
449
|
+
new Nu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return Ou}},Nu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Pe&&(this.a=Gg,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,this.a)&&
|
|
450
|
+
(f.push(k),e=!0));h||(e=b.canPlayType(_.yg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.yf||a||(e=!1);if(e){this.f=g;return}}b=yb;if(c===_.Pe||c===_.ud)b="None of the requested configurations were supported.";c=Error(b);c.name=ab;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 _.Gt;this.j=[];this.l=new Map}createSession(a=
|
|
451
|
+
Wf){if(a!==Wf&&a!==_.Te)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ka,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 _.Ht{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 _.Tl;this.keyStatuses=
|
|
452
|
+
new Fu}ready(){_.wh("WebkitEmeManager.MediaKeySession.ready");Lp(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.wh("WebkitEmeManager.MediaKeySession.generateRequest");return Op(this,b,null)}load(a){_.wh(Fb);return this.l===_.Te?Op(this,null,a):Promise.reject(Error(Ya))}update(a){_.wh(Fb);const b=new _.Tl;Pp(this,b,a);return b}close(){_.wh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Te){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
|
|
453
|
+
this.closed;const a=Np(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.wh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Te?Promise.reject(Error(Ya)):this.close()}},Su=class{a(){return Ou}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Pu}};var Uu=class{l(){}h(a){_.wh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.wh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return Tu}},Vu=class{a(){return Tu}f(){return!0}create(){return new Uu}};var Wu=class{};_.x(jd,Wu);var Rp=new _.S(jd),Qp=[];Qp=[new Mu,new Ku,new Su,new Vu].filter(a=>a.f());var Rq="STANDARD",nq="APPLE",Ou="WEBKIT",Tu="NOP";Wu.Apis={STANDARD:Rq,APPLE:nq,WEBKIT:Ou,NOP:Tu};_.Xu=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,_.Zf)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
|
|
454
|
+
b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Rg=_.Xu.prototype;_.Rg.zd=_.Tg(19);_.Rg.ke=_.Tg(17);_.Rg.Yd=_.Tg(15);_.Rg.Zd=_.Tg(13);_.Rg.je=_.Tg(11);_.Rg.Ec=_.Tg(9);_.Rg.Qd=_.Tg(7);_.Rg.Z=_.Tg(5);_.Rg.rc=_.Tg(3);_.Rg.Mb=_.Tg(1);_.N=new _.Xu;_.Yu=new _.S("clpp.xml.Parser");_.Um="dom";var Up,Zu,Tp;_.bq=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Up=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];Zu=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Tp=class extends Zu{};_.aq=class extends Zu{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 Eq=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.dp).ea("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=_.Zl(_.Uo(a.reader,16)),c=[];if(0<a.version){var d=_.M(a.reader);for(let e=0;e<d;++e){const f=_.Zl(_.Uo(a.reader,16));c.push(f)}}d=_.M(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
|
|
455
|
+
a.reader.getPosition()!==a.reader.Ma()&&_.B("Mismatch between box size and data size!")}}};var zq,$u;
|
|
456
|
+
_.ws=class{constructor(a,b){this.D=a;this.Za=b;this.J=new Set;this.C=this.I=this.l=null;this.T=!1;this.a=null;this.K=$u;this.B=new _.Gt;this.M=new su;this.h=new Map;this.L=[];this.H=new _.Tl;this.ya=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.ba=new Map;this.V=new _.Mi(()=>qq(this));this.j=!1;this.ha=new _.Tl;this.G=!1;this.Y=[];this.ia=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.da=(new _.Mi(()=>{rq(this)})).zb(1);this.H.catch(()=>{});
|
|
457
|
+
this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.w(function*(){a.j?yield a.ha:(a.j=!0,yield sq(a),a.ha.resolve())})}keySystem(){return this.a?_.fq(this.a.keySystem):""}getDrmInfo(){return this.a}Ua(a){const b=this;return _.w(function*(){b.G&&b.K===zq||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ia?yield Jq(b,a):b.Y.push(a))})}Ta(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
|
|
458
|
+
_.Sf){var g=f;f=e;e=g}if(eq(this.a.keySystem)&&16===f.byteLength&&_.Oi()){g=_.li(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!==Qf&&(c.loaded=!0);c&&c.fb&&c.fb.resolve();"expired"===e&&(d=!0);f=_.F(f);let h=_.Zl(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.qd)&&16!==f.byteLength&&(h=ni(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
|
|
459
|
+
this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.jb.forEach(e=>{this.o.get(e)===Qf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Qe))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Qf&&_.$l(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Qe))}a=b.expiration-Date.now();(0>a||d&&1E3>
|
|
460
|
+
a)&&c&&!c.hc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Gc&&a.Gc.stop(),this.h.delete(b),b.close().catch(()=>{}));Tq(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.la(.5):qq(this))}};zq=0;$u=3;_.av=new _.S("clpp.hls.Utils");_.fr=class{constructor(a){this.f=a;this.a=0}};var lr;
|
|
461
|
+
_.or=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=[]}Ic(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&&ai(this.roles,
|
|
462
|
+
a.roles)&&ai(this.accessibility,a.accessibility,jr)}toString(){return`Track type: ${this.type} id: ${this.id}
|
|
463
|
+
renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.or);_.or.prototype.toString=_.or.prototype.toString;_.sr=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Uc=this.bandwidth=this.height=this.width=null;this.a=!1}};_.x("clpp.Rendition",_.sr);_.nr=1;_.Q=_.t;_.P=_.q;_.O=_.Xf;lr=_.ze;_.bv={VIDEO:_.Q,AUDIO:_.P,TEXT:_.O,METADATA:lr};_.or.Type=_.bv;var cv=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=Em(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 _.w(function*(){let d=null;try{d=yield qr(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 ur(c,d,
|
|
464
|
+
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 wr(d);e.zc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Er=[];_.U=class{ze(){return!0}zh(a){return this.getVideoTracks().find(b=>_.kh(b,a,a&&Object.keys(a)))}vh(a){return this.getAudioTracks().find(b=>_.kh(b,a,a&&Object.keys(a)))}xh(a){return this.pa().find(b=>_.kh(b,a,a&&Object.keys(a)))}yh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.kh(b,a,a&&Object.keys(a)))}uh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.kh(b,a,a&&Object.keys(a)))}wh(a){return this.pa().flatMap(b=>b.renditions).find(b=>_.kh(b,a,a&&Object.keys(a)))}};
|
|
465
|
+
_.x("clpp.TrackManager",_.U);_.U.prototype.isAbrEnabled=_.U.prototype.ua;_.U.prototype.addTextTrack=_.U.prototype.addTextTrack;_.U.prototype.findTextRendition=_.U.prototype.wh;_.U.prototype.findAudioRendition=_.U.prototype.uh;_.U.prototype.findVideoRendition=_.U.prototype.yh;_.U.prototype.findTextTrack=_.U.prototype.xh;_.U.prototype.findAudioTrack=_.U.prototype.vh;_.U.prototype.findVideoTrack=_.U.prototype.zh;_.U.prototype.setTextRendition=_.U.prototype.xb;_.U.prototype.setAudioRendition=_.U.prototype.wb;
|
|
466
|
+
_.U.prototype.setVideoRendition=_.U.prototype.hb;_.U.prototype.setTextTrack=_.U.prototype.Ra;_.U.prototype.setAudioTrack=_.U.prototype.xa;_.U.prototype.setVideoTrack=_.U.prototype.yb;_.U.prototype.getTextTrack=_.U.prototype.ta;_.U.prototype.getAudioTrack=_.U.prototype.oa;_.U.prototype.getVideoTrack=_.U.prototype.Ea;_.U.prototype.getLoadingTextRendition=_.U.prototype.Eb;_.U.prototype.getLoadingAudioRendition=_.U.prototype.Db;_.U.prototype.getLoadingVideoRendition=_.U.prototype.pb;
|
|
467
|
+
_.U.prototype.getTextRendition=_.U.prototype.Pa;_.U.prototype.getAudioRendition=_.U.prototype.La;_.U.prototype.getVideoRendition=_.U.prototype.qa;_.U.prototype.getTextTracks=_.U.prototype.pa;_.U.prototype.getAudioTracks=_.U.prototype.getAudioTracks;_.U.prototype.getVideoTracks=_.U.prototype.getVideoTracks;_.U.prototype.canSelectVideoTracks=_.U.prototype.ze;var V=class extends _.U{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Gt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.O);this.R=this.F.bind(this,_.O);this.P=this.C.bind(this,_.O);this.T=this.B.bind(this,_.Q);this.Y=this.F.bind(this,_.Q);this.V=this.C.bind(this,_.Q);this.J=this.B.bind(this,_.P);this.L=this.F.bind(this,_.P);this.K=this.C.bind(this,_.P);this.j=null}ze(){return!_.$i()}B(a,
|
|
468
|
+
b){const c=this;return _.w(function*(){if(b){var d=b.track;if(d){var e=a===_.Q,f=a===_.O,g=a===_.P||e,h=b.target,k=c.h.find(n=>Hr(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=pr(a,d),m=Ir(d);if(f){if(d.kind===_.ze)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(p=>Hr(l,p,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.uc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.kh(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
|
|
469
|
+
c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.sr(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Kr(c,a,n)?yield Lr(c,l,n):Mr(c,a,n)&&(yield Nr(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.G(_.fg));const p=Or(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${p}`,d);c.a.set(a,l)};m?f():1===p&&
|
|
470
|
+
g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(Xa)}else c.g.warn(Ua)})}F(a,b){if(b){var c=b.track;c?a===_.O&&c.kind!==_.ze&&(b=this.h.find(d=>Hr(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Pr(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(Xa)}else this.g.warn(Ua)}C(a,b){this.g.debug(a+" Track changed",b);a===_.O&&Pr(this);const c=Rr(this,a);if(c)for(let d=0;d<c.length;++d)if(Ir(c[d])){if(b=
|
|
471
|
+
this.h.find(e=>Hr(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.P?this.m.trigger(new _.G(_.Ic)):a===_.O&&this.m.trigger(new _.G(_.$f));break}}initialize(a){this.m=a;this.j=new cv(a.getNetworkEngine())}load(){this.A=!1;var a=Qr(this,_.O);a&&(this.f.on(a,_.nc,this.M),this.f.on(a,xf,this.R),this.f.on(a,Xc,this.P));if(a=Qr(this,_.P))this.f.on(a,_.nc,this.J),this.f.on(a,xf,this.L),this.f.on(a,Xc,this.K);if(a=Qr(this,_.Q))this.f.on(a,
|
|
472
|
+
_.nc,this.T),this.f.on(a,xf,this.Y),this.f.on(a,Xc,this.V);this.f.one(this.m,Pc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Or(this,_.Q)}getAudioTracks(){return Or(this,_.P)}pa(){return Or(this,_.O)}qa(){const a=this.a.get(_.Q)||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]||
|
|
473
|
+
null}La(){return Sr(this,_.P)}Pa(){return Sr(this,_.O)}pb(){return Tr(this,_.Q)}Db(){return Tr(this,_.P)}Eb(){return Tr(this,_.O)}Ea(){return this.a.get(_.Q)||null}oa(){return this.a.get(_.P)||null}ta(){return this.a.get(_.O)||null}yb(a){Ur(this,_.Q,a)}xa(a){Ur(this,_.P,a)}Ra(a){Ur(this,_.O,a)}hb(a){Ur(this,_.Q,a&&a.track)}wb(a){Ur(this,_.P,a&&a.track)}xb(a){Ur(this,_.O,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
|
|
474
|
+
b.o[c]=a;Vr(b,a,c)}else yield Wr(b,a)})}ua(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.w(function*(){const b=a.m.getConfiguration();Xr(a,_.P,b.preferredAudioLanguage);if(!Rr(a,_.O).some(c=>Ir(c))){const c=Qr(a,_.O);yield new Promise(d=>{a.f.one(c,Xc,d);(new _.Mi(d)).la(1)})}a.A||Xr(a,_.O,b.preferredTextLanguage)})}};V.prototype.isAbrEnabled=V.prototype.ua;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.setTextRendition=V.prototype.xb;
|
|
475
|
+
V.prototype.setAudioRendition=V.prototype.wb;V.prototype.setVideoRendition=V.prototype.hb;V.prototype.setTextTrack=V.prototype.Ra;V.prototype.setAudioTrack=V.prototype.xa;V.prototype.setVideoTrack=V.prototype.yb;V.prototype.getTextTrack=V.prototype.ta;V.prototype.getAudioTrack=V.prototype.oa;V.prototype.getVideoTrack=V.prototype.Ea;V.prototype.getLoadingTextRendition=V.prototype.Eb;V.prototype.getLoadingAudioRendition=V.prototype.Db;V.prototype.getLoadingVideoRendition=V.prototype.pb;
|
|
476
|
+
V.prototype.getTextRendition=V.prototype.Pa;V.prototype.getAudioRendition=V.prototype.La;V.prototype.getVideoRendition=V.prototype.qa;V.prototype.getTextTracks=V.prototype.pa;V.prototype.getAudioTracks=V.prototype.getAudioTracks;V.prototype.getVideoTracks=V.prototype.getVideoTracks;V.prototype.canSelectVideoTracks=V.prototype.ze;var Yr=["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 dv=["abort",Oc,Pc,Rd,"emptied",Td,_.Vd,_.Wd,"interruptbegin","interruptend",_.se,_.te,ue,"mozaudioavailable",_.Re,_.Ve,_.ff,_.sf,_.uf,_.Gf,_.Hf,Nf,"suspend",_.eg,"volumechange",_.Eg,_.Fg,_.zf,Kg,Jg,Hg,Ig];_.ev=class extends _.Ht{constructor(a){super();this.log=new _.S(a);this.configuration=this.ha=_.Vm();this.ga=this.C=null;this.pd=this.Ye=!1;this.yf=new _.S("clpp.video.events");this.jc=null;this.Vd=-1;this.Zg=this.Wg.bind(this);this.ic=new _.zn;this.setNetworkEngine(this.ic);this.L=new _.Gt;this.Xe=this.Dc=this.Hc=this.M=null}init(a,b){this.configuration=this.ha=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 dv)this.L.on(a,
|
|
477
|
+
c,this.Zg,c!==_.Wd);this.jc||(this.jc=this.Pg());this.jc.initialize(this);this.C.showMediaElement()}release(){this.M&&(this.M.destroy(),this.M=null);return Promise.resolve()}destroy(){this.L.release();return this.ic.release()}canPlay(a,b){return _.yh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.Za)}appendLoad(){return Promise.reject(_.Za)}seekWith(){return Promise.reject(_.Za)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ga)return Promise.reject("No sources specified yet. You need to load content before calling play.");
|
|
478
|
+
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||""};Zr(c)?(this.trigger(new _.G(_.Jc)),this.log.warn(_.ka)):c.name===$a&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ga?new Promise((a,b)=>{const c=this.getState();if(2!==c&&5!==c&&3!==c&&4!==c)b(new _.H(_.C,7,3201,"The player state does not allow pause."));
|
|
479
|
+
else if(this.C.getMedia().pause(),3===this.getState())this.L.one(this,_.Pf,()=>{a()});else a()}):Promise.reject(new _.H(_.C,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.Hc=a}setCdnErrorCallback(a){this.Dc=a}Kc(){return this.Hc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
|
|
480
|
+
return new _.Bt(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)?
|
|
481
|
+
(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.G(_.sg));this.L.on(c,_.Gf,h);this.L.on(c,_.eg,h);this.L.on(c,_.sf,h);this.log.info("Seeking to "+a+". Delta "+d);this.pd=this.Ye=!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,v=l.type===_.Gf,y=l.type===_.sf,A=l.type===_.eg,D=y&&u;p=v||n&&D||A&&p;this.log.debug("Checking seeking state after "+
|
|
482
|
+
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:",D);p?(this.pd=this.Ye=!1,this.L.off(c,_.Gf,h),this.L.off(c,_.eg,h),this.L.off(c,_.sf,h),this.xf(),this.trigger(new _.G(_.rg)),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,_.te,g)};this.getState()===_.ts?
|
|
483
|
+
(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Pf,()=>{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?_.jh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
|
|
484
|
+
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===_.Lc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ga?this.C.getMedia().duration:-1}getTrackManager(){return this.jc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
|
|
485
|
+
1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Vd=a}getSourceIndex(){return this.Vd}getLoadedSource(){return this.ga&&-1!==this.Vd?this.ga[this.Vd]:null}getPeriods(){return[]}getNetworkEngine(){return this.ic}setNetworkEngine(a){this.ic=a;hm(this.ic,b=>{this.onError(b)})}setCmsdManager(a){this.Xe=a}getTextDisplayer(){return this.M}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}Wg(a){var b=this.getSurface().getMedia();const c=
|
|
486
|
+
this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.eg||a.type===_.sf)this.yf.debug(d);else{let e="";switch(a.type){case _.uf:e=`Rate: ${this.getPlaybackRate()}`;break;case Rd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Ve:case _.ff:case "suspend":case _.Eg:case Nf:case _.Hf:case _.Gf:case _.eg:case _.sf:case Oc:case Pc:b=this.getBufferInfo().Ka(c);e=`State ${this.getSurface().getMedia().readyState} `+
|
|
487
|
+
`Buffer: ${b}`;break;case _.zf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.yf.info(d)}a.type!==_.Wd&&this.trigger(new _.G(a.type,{detail:a}))}xf(){}};_.$r=new Map;_.as=new _.S("clpp.text");var fv=class{constructor(){this.a=null;this.f=[]}};var gv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.hv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new fv;this.f=new gv}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:es(this.a,3),pauseTime:es(this.a,4),bufferingTime:es(this.a,2),stateHistory:fs(this.a),switchHistory:gs(this.f)}}};var iv=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.Gt;this.f=_.ts;this.w=7;this.G=0;this.o=-1;this.J=this.l=this.H=this.A=0;this.h=this.fa=this.C=!1;this.F=0;this.j=null;this.I=0;this.K=_.$i();this.B=!1;this.H=Date.now();os(this)}Sa(a,b){this.m&&this.m.trigger(new _.G(a,{detail:b}))}getState(){return qs(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};var jv=class extends _.ev{constructor(){super(kd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Gt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new iv(this);js(this.j,_.ts)}namespace(){return kd}unload(){const a=this;return _.w(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.M&&(a.M.destroy(),a.M=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
|
|
488
|
+
a.o=null);_.Wh(a.h);a.f&&(a.f=new _.hv);a.F=null;a.ga=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.H(_.C,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Wd),a.h.off(b,_.zf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&js(this.j,_.ts)})}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();
|
|
489
|
+
a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.jc}load(a){const b=this;return _.w(function*(){if(b.w)return Promise.reject(new _.H(_.C,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()/
|
|
490
|
+
1E3;b.f=new _.hv;b.h.on(b,_.Pf,()=>{b.f&&_.ds(b.f.a,b.getState())});js(b.j,1);b.ga=_.an(a);b.configuration=_.Xm([b.ha,a]);b.log.debug(_.Oa,b.configuration);b.log.debug(_.gb,b.ga);const d=_.cs(b.configuration,[_.de,"native"]);b.M=d.create(b);b.M.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Hh(_.Vf)&&!_.bj()&&(b.A=new pu(b),b.A.start(c));b.l?b.l.release():b.l=new cu(b);c.textTracks&&Eo(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||
|
|
491
|
+
b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Oc,()=>{b.trigger(new _.G(_.fg))});null==b.configuration.startTime&&Cs(b,c);_.$i()&&Ds(b,c);try{vs(b,c),yield ys(b),yield Bs(b).U}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.C&&null!==this.j&&js(this.j,_.ks),this.trigger(new _.G(_.Wd,{detail:a})))}Pg(){return new V}getState(){return null!==this.j?this.j.getState().currentState:7}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&
|
|
492
|
+
this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.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 _.hs();this.f&&_.ds(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=
|
|
493
|
+
c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.qa())a.bandwidth&&(this.f.w=a.bandwidth),a.Uc&&(this.f.h=a.Uc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}},kv=class{a(){return kd}canPlay(a,b){a=a.type||"";const c=a===_.vc,d=a===_.Ac,e=a===_.ll;var f;_.Zi()||c||d||e&&
|
|
494
|
+
!_.$i()?f=0:f=""!==Ni().canPlayType(a)?e&&_.$i()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new jv}};var lv=class extends R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.bh(this.C,a);this.f=_.bh(this.f,a);this.G=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.w(function*(){if(c.w)throw new _.H(_.C,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.H(_.C,7,7007,"The index parameter only supports the value of 0.");
|
|
495
|
+
if(0===b.length)throw new _.H(_.C,7,7003,Wa);if(b.some(g=>!g.id||!g.source))throw new _.H(_.C,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.H(_.C,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 _.H(_.C,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.H(_.C,
|
|
496
|
+
7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.H(_.C,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.H(_.C,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{Es(c),c.w="open",yield Hs(c,b),c.G=0,c.o=b,c.V=!0,Is(c,b[0].playlist||{})}finally{c.w=null}})}$g(a){const b=this;return _.w(function*(){if(b.w)throw new _.H(_.C,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
|
|
497
|
+
if(!b.V)throw new _.H(_.C,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.H(_.C,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 _.H(_.C,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield Js(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.G]||null}getCurrentItemIndex(){return this.G}Jh(){return[...this.o]}gd(){return this.o.length}getTimeline(){return this.a?
|
|
498
|
+
this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.G=0;this.V=!1;return super.release()}destroy(){Es(this);return super.destroy()}setCdnErrorCallback(){throw new _.H(1,7,7009,"CDN switching is not supported!");}};_.x("clpp.plist.ScPlaylist",lv);lv.prototype.setCdnErrorCallback=lv.prototype.setCdnErrorCallback;lv.prototype.destroy=lv.prototype.destroy;lv.prototype.release=lv.prototype.release;lv.prototype.seekWith=lv.prototype.seekWith;
|
|
499
|
+
lv.prototype.getTimeline=lv.prototype.getTimeline;lv.prototype.getSize=lv.prototype.gd;lv.prototype.getPlaylist=lv.prototype.Jh;lv.prototype.getCurrentItemIndex=lv.prototype.getCurrentItemIndex;lv.prototype.getCurrentItem=lv.prototype.getCurrentItem;lv.prototype.addItem=lv.prototype.$g;lv.prototype.open=lv.prototype.open;var mv=class extends _.Ht{constructor(a){super();this.ka=_.bh({transition:_.Re,preloadMedia:!1},a);this.h=[];this.a=0;const b=Ks(a.anchorId,this.ka.config);this.o=new Jt(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(ld);this.o.a.forEach(c=>Ls(this,c.player,!1))}dd(){return this.f}Rd(){return this.f?this.f.player:null}$f(){return this.l.get(this.a+1)||null}bg(){return this.l.get(this.a-1)||null}ag(){return[this.bg(),this.$f()].filter(Boolean)}Ei(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
|
|
500
|
+
this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Di(a){if(0===this.h.length)throw Error(Va);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}kd(){return this.a<this.h.length-1}fg(){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(Va);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
|
|
501
|
+
yield Os(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,Ss(a)}}})}yg(){const a=this;return _.w(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===_.Re&&b.player.pause();Xs(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 Ts(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
|
|
502
|
+
d;}finally{a.j=!1,b&&Ws(a,b),Ss(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.fg()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ka.transition===_.Re&&b.player.pause();Xs(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 Ts(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
|
|
503
|
+
d;}finally{a.j=!1,b&&Ws(a,b),Ss(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([Ys(a),a.f?Ws(a,a.f):Promise.resolve()]);yield Zs(a)})}};_.x(ld,mv);mv.prototype.destroy=mv.prototype.destroy;mv.prototype.playPrev=mv.prototype.ji;mv.prototype.playNext=mv.prototype.yg;mv.prototype.playFirst=mv.prototype.ii;mv.prototype.hasPrev=mv.prototype.fg;mv.prototype.hasNext=mv.prototype.kd;
|
|
504
|
+
mv.prototype.setIndex=mv.prototype.Di;mv.prototype.setItems=mv.prototype.Ei;mv.prototype.getPreloading=mv.prototype.ag;mv.prototype.getPrev=mv.prototype.bg;mv.prototype.getNext=mv.prototype.$f;mv.prototype.getCurrentPlayer=mv.prototype.Rd;mv.prototype.getCurrent=mv.prototype.dd;var Vs="preload",Ms=_.ve;var $s=new Map;var pv=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]===_.Cc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.at(Gc);if(b)return _.at(bt(b,a));b=bt(_.q,a);a=bt(_.t,a);return _.at(b)||_.at(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
|
|
505
|
+
b){const c=new Map;c.set(a,b);try{const d=_.Qm(b),e=_.Rm(b).split(","),f=new Map,g=Om(_.q,e),h=Om(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.Pm(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.Pm(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Cc?Gc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?bt(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.F(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
|
|
506
|
+
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===nv?b.push(k):h.type===ov&&c.push(k)},g=()=>{e={video:_.am(...b),captions:d,audio:_.am(...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 _.H(_.C,3,3018);return e}},ov=_.q,nv=_.t;var qv=class{getCuePoints(){}Hb(){}Gb(){}};_.x("clpp.ads.IAdsTimeline",qv);qv.prototype.hasPostroll=qv.prototype.Gb;qv.prototype.hasPreroll=qv.prototype.Hb;qv.prototype.getCuePoints=qv.prototype.getCuePoints;_.rv=class{install(){}uninstall(){}beforeLoad(){}afterLoad(){}playerConstructed(){}playerDestroyed(){}};var vv=class extends _.tu{constructor(a,b,c,d,e){super(Ia);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(hd);_.yi(this.l)?this.g.warn(_.Gb):this.Xa(_.ud,{licenseUrl:this.l,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.vd.bind(this)}});_.yi(this.j)?this.g.warn(_.eb):this.Xa(_.sd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.vd.bind(this)}});
|
|
507
|
+
_.yi(this.h)?this.g.warn(_.Da):_.yi(this.a)?this.g.warn(_.Ca):this.Xa(_.qd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.sg.bind(this),licenseResponse:this.tg.bind(this),certificateRequest:this.vd.bind(this),extractContentId:this.Vf.bind(this)}})}vd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Vf(a,b){a=ap(b);switch(this.o){case sv:return a;case uv:return(new _.bp(a)).a;default:throw Error("Unknown content ID strategy");}}sg(a,b){b.headers[ta]=
|
|
508
|
+
Bc;this.vd(a,b);a={spc:_.Vl(b.body)};b.body=_.ui(_.Jm(a,!0))}tg(a,b){a=_.oi(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=_.Xl(a).buffer}};_.x(hd,vv);vv.prototype.onFairPlayLicenseResponse=vv.prototype.tg;vv.prototype.onFairPlayLicenseRequest=vv.prototype.sg;vv.prototype.extractFairPlayContentId=vv.prototype.Vf;vv.prototype.onLicenseRequest=vv.prototype.vd;vv.prototype.constructor=vv.prototype.constructor;vv.NAME=Ia;
|
|
509
|
+
var uv="hostname",sv="full-skd";vv.FairPlayContentIdStrategy={HOSTNAME:uv,FULL_SKD:sv};_.x("clpp.drm.HeaderDrmComponent",class extends _.rv{beforeLoad(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ia){a=a.drm.customData;if(!a)throw new _.H(_.C,7,7100,_.vd);a=new vv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||sv);_.en(a)}}uninstall(){delete _.dn.HeaderDrm}id(){return"headerdrm"}});var jt;_.wv=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 xv;_.yv=class{constructor(){this.a=new Blob([xv],{type:_.yg})}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 _.Tl;b=b.play();const d=(new _.Mi(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===ab?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
|
|
510
|
+
xv=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,
|
|
513
511
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
514
512
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
515
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,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,
|
|
516
514
|
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,
|
|
517
515
|
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,
|
|
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]);_.
|
|
519
|
-
_.
|
|
520
|
-
a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.
|
|
521
|
-
_.
|
|
522
|
-
_.
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
516
|
+
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]);_.mt={};_.Av=class{constructor(a){a=a.getConfiguration();a=_.ch(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Sf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Sf?a.windowColor:null;this.M=typeof a.fontColor===_.Sf?a.fontColor:null;this.P=typeof a.fontFamily===_.Sf?a.fontFamily:null;this.I=typeof a.fontSize===_.Sf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Sf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
|
|
517
|
+
_.Sf&&(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?zv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
|
|
518
|
+
a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Av.prototype.setEdgeType=_.Av.prototype.setEdgeType;_.Av.prototype.getEdgeType=_.Av.prototype.getEdgeType;_.Av.prototype.setEdgeColor=_.Av.prototype.setEdgeColor;_.Av.prototype.getEdgeColor=_.Av.prototype.getEdgeColor;_.Av.prototype.setFontSizePercent=_.Av.prototype.setFontSizePercent;_.Av.prototype.getFontSizePercent=_.Av.prototype.getFontSizePercent;_.Av.prototype.setFontSize=_.Av.prototype.setFontSize;
|
|
519
|
+
_.Av.prototype.getFontSize=_.Av.prototype.getFontSize;_.Av.prototype.setFontColor=_.Av.prototype.setFontColor;_.Av.prototype.getFontColor=_.Av.prototype.getFontColor;_.Av.prototype.setFontFamily=_.Av.prototype.setFontFamily;_.Av.prototype.getFontFamily=_.Av.prototype.getFontFamily;_.Av.prototype.setWindowColor=_.Av.prototype.setWindowColor;_.Av.prototype.getWindowColor=_.Av.prototype.getWindowColor;_.Av.prototype.setBackgroundColor=_.Av.prototype.setBackgroundColor;
|
|
520
|
+
_.Av.prototype.getBackgroundColor=_.Av.prototype.getBackgroundColor;var zv=1/15;var Bv;
|
|
521
|
+
_.Cv=class extends _.Av{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Bv++}`;this.j=document.createElement(_.Uf);this.l=this.A=!1;_.Di(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":_.ut(this)},b=
|
|
522
|
+
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()}};Bv=0;var Dv=class{a(){return!0}create(a){return new _.Cv(a)}};var Ev=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.ot(_.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=_.ot(_.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=
|
|
523
|
+
b;else throw new _.H(_.C,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.C,2,2011);return this.a.parseMedia(a,b)}};_.pm(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=_.F(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});
|
|
524
|
+
_.pm(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;Zd in document||(Object.defineProperty(document,Zd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
525
|
+
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ct);document.addEventListener("webkitfullscreenerror",ct);document.addEventListener("mozfullscreenchange",ct);document.addEventListener("mozfullscreenerror",ct);document.addEventListener("MSFullscreenChange",ct);document.addEventListener("MSFullscreenError",ct)}});
|
|
526
|
+
_.pm(function(){_.wh("InputEvent.install");_.Pi("Trident/")&&HTMLInputElement.prototype.addEventListener!==kt&&(_.vh("Patching input event support on IE."),jt=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=kt)});_.pm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.pm(function(){_.wh("mathRound.install")});
|
|
527
|
+
_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.wh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=et,document.exitPictureInPicture=ft,document.addEventListener("webkitpresentationmodechanged",dt,!0))}});
|
|
528
|
+
_.pm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=gt)}});_.pm(function(){_.wh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});
|
|
529
|
+
_.pm(function(){if(window.VTTCue)_.vh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.vh(Bb),window.VTTCue=ht;else if(6===a)_.vh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=it;else{try{var b=!!ht(1,2,"")}catch(c){b=!1}b&&(_.vh(Bb),window.VTTCue=ht)}}else _.xh("VTTCue not available.")});_.Ah(new kv);_.nt(_.wc,Ev);_.bs("native",new Dv);zm(_.Cc,()=>new pv(_.Cc));zm(_.xg,()=>new pv(_.xg));_.Fv=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}Ob(){return this.f}od(){return this.h}Ic(a){return this.getId()===a.getId()&&this.Ob()===a.Ob()&&this.getDuration()===a.getDuration()&&this.od()===a.od()}};_.x("clpp.media.TimelineWindow",_.Fv);_.Fv.prototype.isDynamic=_.Fv.prototype.od;_.Fv.prototype.getStart=_.Fv.prototype.Ob;_.Fv.prototype.getId=_.Fv.prototype.getId;_.Fv.prototype.getDuration=_.Fv.prototype.getDuration;_.Gv=new _.S("clpp.media.TimestampParser");_.Hv=class{constructor(){this.a=[];this.f=-1;this.h=null}Mh(a){return this.a[a]||null}Nh(){return this.a.length}Oh(){return this.a}Zf(){return this.a[this.f]||null}Fh(){return this.f}};_.x("clpp.media.Timeline",_.Hv);_.Hv.prototype.getCurrentWindowIndex=_.Hv.prototype.Fh;_.Hv.prototype.getCurrentWindow=_.Hv.prototype.Zf;_.Hv.prototype.getWindows=_.Hv.prototype.Oh;_.Hv.prototype.getWindowCount=_.Hv.prototype.Nh;_.Hv.prototype.getWindow=_.Hv.prototype.Mh;_.xt={};_.yt={};var qt="raised",rt="depressed",tt="dropshadow",st="uniform";_.x("clpp.text.EdgeType",{NONE:_.Fe,RAISED:qt,DEPRESSED:rt,DROP_SHADOW:tt,UNIFORM:st});_.Iv=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;
|