@castlabs/prestoplay 6.22.0 → 6.23.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 +9 -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 +112 -112
- package/cjs/cl.conviva.js +32 -33
- package/cjs/cl.core.js +591 -586
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +81 -80
- package/cjs/cl.externs.js +43 -36
- package/cjs/cl.freewheel.js +24 -24
- package/cjs/cl.hls.js +69 -69
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -29
- package/cjs/cl.ima.js +23 -23
- package/cjs/cl.mse.js +330 -325
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +13 -13
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -16
- package/cjs/cl.simid.js +15 -15
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +72 -72
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -13
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +37 -37
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +88 -88
- package/cl.conviva.js +27 -27
- package/cl.core.js +477 -474
- package/cl.crypto.js +9 -9
- package/cl.dash.js +76 -75
- package/cl.externs.js +43 -36
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +74 -74
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mse.js +295 -291
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +13 -13
- package/cl.smooth.js +59 -59
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +15 -15
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +28 -27
- package/package.json +1 -1
- package/typings.d.ts +53 -6
package/cl.core.js
CHANGED
|
@@ -1,339 +1,341 @@
|
|
|
1
|
-
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ja,ma,ra,sa,ua,va,wa,xa,Pa,Va,Wa,Xa,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
_.da="6.
|
|
5
|
-
va="DRMtoday";wa="DRMtodayOnboard";xa="Destroying player";_.ya="
|
|
6
|
-
_.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_.
|
|
11
|
-
_.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_.
|
|
15
|
-
_.
|
|
16
|
-
_.
|
|
17
|
-
_.
|
|
18
|
-
_.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_.
|
|
22
|
-
|
|
23
|
-
_
|
|
24
|
-
_.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.
|
|
33
|
-
void 0),h=!0):(a.a.add(l),g.add(l));var l={
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_.
|
|
39
|
-
|
|
40
|
-
_.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_.
|
|
46
|
-
|
|
47
|
-
_.
|
|
48
|
-
};_.
|
|
49
|
-
_.
|
|
50
|
-
_.
|
|
51
|
-
_.
|
|
52
|
-
_.
|
|
53
|
-
_.
|
|
54
|
-
_.
|
|
55
|
-
|
|
56
|
-
_.
|
|
57
|
-
[],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:[...
|
|
58
|
-
_.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
_.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
_.
|
|
73
|
-
_.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
_.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
_
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
_.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
_.
|
|
89
|
-
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:
|
|
1
|
+
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ja,ma,ra,sa,ua,va,wa,xa,Oa,Pa,Ta,Ua,Va,Wa,Xa,$a,ab,eb,fb,gb,hb,ib,jb,lb,nb,ob,sb,wb,Ab,Fb,Gb,Kb,Mb,Pb,Qb,Tb,Ub,Wb,Xb,hc,ic,jc,Cc,Hc,Mc,Uc,Vc,dd,ed,fd,hd,id,jd,ld,md,nd,od,pd,vd,xd,Cd,Id,Jd,Kd,Ld,Nd,Pd,Qd,Td,Ud,Wd,ae,he,je,ke,ve,Oe,Ve,Xe,Ye,Ze,$e,af,bf,cf,df,ef,ff,kf,nf,pf,qf,rf,sf,uf,yf,Af,Pf,Sf,Yf,dg,gg,mg,xg,Bg,Cg,Dg,Eg,Fg,Hg,Ig,Jg,Mg,Ng,Og,Rg,Sg,Xg,Ug,eh,fh,hh,kh,mh,uh,xh,vh,zh,Ah,Eh,yh,Fh,Dh,Gh,Hh,Bh,Ch,Kh,Uh,Vh,Nh,Th,Sh,Rh,Yh,$h,Zh,bi,ci,di,ei,hi,ii,ki,mi,qi,si,ui,oi,xi,
|
|
2
|
+
Bi,Di,Fi,Ei,Gi,Hi,Ii,Li,Mi,Pi,oj,pj,sj,vj,wj,yj,zj,Aj,Bj,Dj,Ej,Fj,Gj,Hj,Ij,Lj,Oj,Sj,Tj,Xj,Zj,Uj,Wj,Yj,ak,bk,ck,ek,fk,mk,uk,vk,zk,Ek,Dk,Qk,Jk,Ik,al,bl,el,fl,gl,hl,il,jl,ll,kl,ml,nl,ql,rl,sl,dl,ul,wl,yl,Al,Cl,Hl,Il,Jl,Kl,Ll,Ml,Nl,Ol,Pl,Ql,Wl,em,gm,mm,qm,sm,Cm,Mm,ym,Hm,Sm,Tm,Vm,Wm,gn,hn,pn,sn,tn,vn,xn,yn,zn,qn,wn,An,Bn,Cn,Dn,Nn,Fn,On,En,Gn,Hn,Pn,Un,Wn,Yn,Xn,$n,Sn,ho,eo,go,fo,Vn,io,jo,ko,lo,mo,no,oo,po,vo,wo,xo,Ao,Fo,Go,Io,Co,Bo,Po,Qo,Uo,To,Wo,Yo,Zo,Vo,ap,bp,cp,gp,lp,mp,np,op,pp,qp,sp,tp,up,vp,wp,xp,
|
|
3
|
+
Ip,yp,zp,Ap,Bp,Cp,Dp,Ep,Fp,Gp,Hp,Qp,Rp,Sp,Lp,Tp,Op,Np,Kp,Pp,Up,Vp,Wp,Zp,gq,hq,iq,fq,oq,jq,kq,lq,mq,nq,Xp,Yp,$p,aq,bq,rq,uq,dq,eq,xq,Bq,Cq,Aq,Dq,zq,yq,Fq,Hq,Jq,Lq,Mq,Nq,Oq,Pq,Qq,Rq,Sq,Tq,Uq,Vq,Zq,cr,$q,er,ir,kr,mr,or,pr,qr,rr,tr,Cr,ur,vr,wr,xr,Er,Ar,Fr,Ir,Jr,Kr,Gr,Hr,Lr,Mr,Pr,Tr,Ur,Xr,Zr,$r,Yr,Vr,Or,Sr,Qr,Rr,cs,ds,es,fs,is,gs,hs,js,ns,os,ps,qs,rs,ss,ts,us,vs,xs,ys,zs,Bs,Ds,Is,Js,Ks,Ms,Ns,Os,Qs,Rs,Ps,Ss,Vs,Us,Ts,Zs,Ys,dt,Pg,Qg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
|
|
4
|
+
_.da="6.23.0";_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";ja="Autoplay should not be used for preloaded streams. ";_.ka="BANDWIDTH";_.la="BASIC";ma="CHECKSUM";_.na="CODECS";_.oa="Cannot retrieve buffer information due to platform limitations";_.pa="CastlabsPlayer";_.qa="Configuration is valid";ra="Content-Length";sa="Content-Type";_.ta="Could not find configured DRM environment.";ua="DRM licenses loaded";
|
|
5
|
+
va="DRMtoday";wa="DRMtodayOnboard";xa="Destroying player";_.ya="EXT-X-BYTERANGE";_.za="EXT-X-DATERANGE";_.Ba="EXT-X-DISCONTINUITY";_.Ca="EXT-X-DISCONTINUITY-SEQUENCE";_.Da="EXT-X-ENDLIST";_.Ea="EXT-X-KEY";_.Fa="EXT-X-MAP";_.Ga="EXT-X-MEDIA-SEQUENCE";_.Ha="EXT-X-PART-INF";_.Ia="EXT-X-PLAYLIST-TYPE";_.Ja="EXT-X-PRELOAD-HINT";_.Ka="EXT-X-PROGRAM-DATE-TIME";_.La="EXT-X-SERVER-CONTROL";_.Ma="EXT-X-TARGETDURATION";Oa="Error while decoding string!";Pa="Error while fetching certificate!";_.Qa="FairPlay Certificate URL is not defined";
|
|
6
|
+
_.Ra="FairPlay License URL is not defined";_.Sa="GROUP-ID";Ta="HW_SECURE_ALL";Ua="HW_SECURE_CRYPTO";Va="HW_SECURE_DECODE";Wa="HeaderDrm";Xa="InvalidStateError";_.Za="LANGUAGE";$a="License verification failed: ";ab="Load interrupted while a player release is pending";_.bb="Loading player with configuration";_.cb="MaxHeight";_.db="MaxWidth";eb="Missing media element";fb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";gb="No event provided!";hb="No items in the playlist";
|
|
7
|
+
ib="No sources provided!";jb="No track data attached to the event, unable to add track!";lb="Not a persistent session.";_.mb="Not supported";nb="NotAllowedError";ob="NotSupportedError";_.pb="PLAYLIST";_.qb="POST";_.rb="PlayReady License URL is not defined";sb="Player not ready yet.";_.tb="Player sources";_.vb="Please make sure ";wb="Preloading is not supported by this player.";_.xb="QualityLevel";_.yb="RESOLUTION";_.zb="Representation";Ab="STANDARD";_.Db="SW_SECURE_CRYPTO";_.Eb="SW_SECURE_DECODE";
|
|
8
|
+
Fb="Session is closed";Gb="Skipping Session creation. License for init data was already requested in ";_.Hb="SmoothStreamingMedia";_.Ib="TYPE";Kb="The index is not in the allowed range.";_.Lb="URI";Mb="Unable to translate ";_.Nb="Unhandled/ignored event";_.Ob="Unregistering listeners";Pb="Unsupported keySystem";Qb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Rb="VIDEO";_.Sb="VOD";Tb="Wait for preloading to finish";Ub="WebkitEmeManager.MediaKeySession.load";_.Vb="Widevine License URL is not defined";
|
|
9
|
+
Wb="Will create EME Manager: ";Xb="X-AD-CREATIVE-SIGNALING";_.Yb="X-ASSET-LIST";_.Zb="X-ASSET-URI";_.$b="X-PLAYOUT-LIMIT";_.ac="X-RESUME-OFFSET";_.bc="ad-break-started";_.cc="ad-break-stopped";_.dc="ad-buffering";_.ec="ad-clicked";_.fc="ad-completed";_.gc="ad-first-quartile";hc="ad-hls-asset-list-request";ic="ad-hls-asset-list-response";jc="ad-hls-resoled";_.kc="ad-impression";_.lc="ad-loaded";_.mc="ad-midpoint";_.nc="ad-paused";_.oc="ad-progress";_.pc="ad-resumed";_.rc="ad-skipped";_.sc="ad-started";
|
|
10
|
+
_.tc="ad-stopped";_.uc="ad-third-quartile";_.vc="addtrack";_.wc="ads-timeline-changed";_.xc="airplay-casting-ended";_.yc="airplay-casting-started";_.zc="airplay-status-changed";_.Ac="application/cea-608";_.Bc="application/dash+xml";Cc="application/mp4";_.Dc='application/mp4; codecs\x3d"stpp"';_.Ec='application/mp4; codecs\x3d"wvtt"';_.Fc="application/ttml+xml";_.Gc="application/vnd.ms-sstr+xml";Hc="application/x-www-form-urlencoded";_.p="audio";_.Ic="audio/aac";_.Jc="audio/ac3";_.Kc="audio/eac3";
|
|
11
|
+
_.Lc="audio/mp4";Mc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Nc="audiobufferchanged";_.Oc="autoplaynotallowed";_.Pc="bitratechanged";_.Qc="boolean";_.Rc="bufferingended";_.Sc="bufferingstarted";Uc="canplay";Vc="canplaythrough";_.Zc="castingstarted";_.$c="caststatuschanged";_.ad="cdn-switch-success";_.bd="cenc";_.cd="center";dd="certificate-request";ed="change";fd="chrome";_.gd="clpp-fill";hd="clpp-hidden";id="clpp-mc-playlist";jd="clpp-visible";_.kd="clpp.cast.CastSender";ld="clpp.drm.HeaderDrm";md="clpp.drm.eme.AppleEmeManager";
|
|
12
|
+
nd="clpp.native.Player";od="clpp.plist.McPlaylist";pd="clpp.utils.Platform";_.qd="codecs";_.rd="column-reverse";_.sd="com.adobe.primetime";_.td="com.apple.fps";_.ud="com.apple.hls.interstitial";vd="com.apple.quicktime.HLS";_.wd="com.microsoft.playready";xd="com.microsoft.playready.recommendation";_.yd="com.widevine.alpha";_.zd="config.drm.customData is not defined";_.Ad="content-steering-change";_.Bd="content-steering-location-ban-update";Cd="controls";_.Dd="cuechange";_.Ed="decoder";_.Fd="destroy()";
|
|
13
|
+
_.Gd="disabled";_.Hd="div";Id="drm.mediaKeys.end";Jd="drm.mediaKeys.start";Kd="drm.onPlay.end";Ld="drm.onPlay.start";_.Md="drmexpirationupdate";Nd="drmlicenserequested";Pd="drmrenewalstarted";Qd="drmsessioncreated";_.Rd="drmsessionpersisted";_.Sd="drmsessionupdate";Td="drmtoday";Ud="durationchange";_.Vd="ec-3";Wd="encrypted";_.Xd="end";_.Yd="ended";_.q="error";_.Zd="estimatedThroughputKbps";_.$d="forced";ae="fullscreenElement";_.be="function";_.ce="height";_.de="hidden";_.ee="html";_.fe="image";
|
|
14
|
+
_.ge="internal-error";he="keystatuseschange";_.ie="left";je="license-renewal";ke="license-request";_.le="line-left";_.me="line-right";_.oe="live-turned-static";_.pe="load";_.te="loadeddata";_.ue="loadedmetadata";ve="loadstart";_.we="main";_.xe="mdat";_.ye="mdia";_.ze="message";_.Ae="metadata";_.Be="mimeType";_.Ce="minf";_.De="moov";_.Ee="mpd-type-changed";_.Fe="mpeg-dash-callback-event";_.Ge="none";_.t="number";_.He="object";_.Ie="onBitrateChanged()";_.Je="onContentLoaded";_.Ke="onPlayerError()";
|
|
15
|
+
_.Le="onPlayerWillDestroy";_.Me="onPlayerWillRelease";_.Ne="onStateChanged()";Oe="online-status-changed";_.Pe="optional";_.Qe="org.w3.clearkey";_.Re="output-restricted";_.Se="pause";_.Te="persistent";_.Ue="persistent-license";Ve="picture-in-picture";_.We="play";Xe="player.afterLoad.end";Ye="player.afterLoad.start";Ze="player.appendLoad.end";$e="player.appendLoad.start";af="player.beforeLoad.end";bf="player.beforeLoad.start";cf="player.load.end";df="player.load.start";ef="player.setupPlaylist.end";
|
|
16
|
+
ff="player.setupPlaylist.start";_.gf="playing";_.hf="playlist-item-changed";_.jf="playlist-modified";kf="playlist.next.end";nf="playlist.next.start";pf="preload-aborted";qf="preload-failed";rf="preloaded";sf="preloading";_.tf="prevent";uf="primary-content";_.vf="progress";_.wf="px";_.xf="ratechange";yf="released";_.zf="releasing";Af="removetrack";_.Bf="required";_.Cf="resize";_.Df="right";_.Ef="sc-playlist-ended";_.Ff="sc-playlist-item-changed";_.Gf="sc-playlist-live-turned-static";_.Hf="sc-playlist-timeline-changed";
|
|
17
|
+
_.If="seeked";_.Jf="seeking";_.Kf="showing";_.Lf="simid-creative-started";_.Mf="simid-creative-stopped";_.Nf="sinf";_.Of="smooth";Pf="stalled";_.Qf="start";_.Rf="statechanged";Sf="status-pending";_.Tf="stbl";_.Uf="string";_.Vf="stsd";_.Wf="style";_.Xf="subtitles-htmlcue";Yf="temporary";_.Zf="text/vtt";_.$f="text/xml";_.ag="timeupdate";_.bg="trak";_.cg="ttml-xml";dg="unauthenticated";_.eg="und";_.fg="unknown";gg="update";_.hg="urn:scte:scte35";_.ig="urn:scte:scte35:2014";_.jg="user-seeked";_.kg="user-seeking";
|
|
18
|
+
_.lg="value";mg="version";_.ng="vertical-lr";_.og="vertical-rl";_.w="video";_.sg="video/mp2t";_.tg="video/mp4";_.ug="videobufferchanged";_.vg="videotrackchanged";_.wg="vimond-response";xg="visibilitychange";_.yg="vtt-xml";_.zg="waiting";_.Ag="waitingforkey";Bg="webkit-org.w3.clearkey";Cg="webkitkeyadded";Dg="webkitkeyerror";Eg="webkitkeymessage";Fg="webkitneedkey";_.Gg="width";Hg="x-dt-csl-tracking-token";Ig="x-dt-follow-up-token";Jg="x-dt-resp-code";_.Kg="yospace-session-ended";_.Lg="yospace-session-started";
|
|
19
|
+
Ng=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Og=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Ng(a)}};Rg=function(a,b){if(b){var c=Pg;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&&Qg(c,a,{configurable:!0,writable:!0,value:b})}};
|
|
20
|
+
Sg=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())})};_.x=function(a){return Sg(a())};_.y=function(a,b){a=a.split(".");var c=Tg;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};
|
|
21
|
+
_.Wg=function(a){return _.B(a)||Ug(a)?a:_.Vg(a)};_.Vg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=Xg(b,{merging:a[c]},1));return b.merging||null};_.Yg=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
|
|
22
|
+
Xg=function(a,b,c){const d=c+1;if(_.B(a)||!_.Zg(a))a={};for(const e in b)c=b[e],Ug(c)||_.B(c)||_.$g(c)||c instanceof Element?a[e]=c:_.Zg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.$g(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=Xg([],c,d):!_.B(c)&&_.ah(c)&&20>d&&(a[e]=Xg(a[e],c,d));return a};Ug=function(a){a=typeof a;return a===_.Uf||a===_.t||a===_.Qc};_.B=function(a){return null===a||"undefined"===typeof a};_.Zg=function(a){return typeof a===_.He};
|
|
23
|
+
_.$g=function(a){return typeof a===_.be};_.bh=function(a){return typeof a===_.Uf};_.ch=function(a){return typeof a===_.t};_.ah=function(a){if(_.B(a)||!_.Zg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
|
|
24
|
+
_.dh=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||!_.Zg(a)||!_.Zg(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
|
|
25
|
+
eh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};fh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.gh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};hh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};kh=function(a){return a&&0<=ih[a]?ih[a]:jh};
|
|
26
|
+
mh=function(a){if(!a)return _.C("clpp.log",Mb+a+ca),-1;const b=lh[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Mb+a+ca),-1):b};_.oh=function(a){nh.info.apply(nh,arguments)};_.ph=function(a){nh.debug.apply(nh,arguments)};_.C=function(a){nh.warn.apply(nh,arguments)};_.qh=function(a){nh.error.apply(nh,arguments)};_.th=function(a){if(a){var b=a.a();b in _.rh?_.sh.warn("Player-Factory '"+b+"' already registered"):(_.rh[b]=a,_.sh.info("Registered Player-Factory: '"+b+"'"))}};
|
|
27
|
+
uh=function(a){return Object.values(_.rh).find(a)||null};_.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()};xh=function(a,b,c){var d=[Wd,"msneedkey",Fg,"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};zh=function(a){return yh(a).filter(b=>b.type===vd&&!b.Be)};Ah=function(a){a.forEach(b=>{b.Be=!0})};
|
|
28
|
+
Eh=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,Kf:!1}));a=Bh(a);b&&(a=Ch(a));return new Set(Dh(a))};yh=function(a){const b=[];for(const c of a)b.push(c);return b};Fh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.rf||a.startTime,f=b.rf||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};
|
|
29
|
+
Dh=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Gh(c,a):(a=Hh(c),b.push(a));return b};Gh=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=_.ig,b.type=_.Ih};
|
|
30
|
+
Hh=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:_.Jh,eventElement:null};Gh(a,b);return b};Bh=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Kh));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Kh(d))||(d.Kf=!0)});return Array.from(b.values())};Ch=function(a){a.forEach(b=>{b.Kf&&(b.endTime=b.startTime,b.startTime=0)});return a};Kh=function(a){return`${a.startTime}-${a.endTime}`};
|
|
31
|
+
Uh=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.de;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=zh(d);Ah(c);a.a=Eh(c,a.l);0<a.a.size&&(Nh(a,a.a),a.m.trigger(new _.D(_.Oh)));a.j.on(b,_.Dd,()=>{{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 _.D(_.Ph,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.D(_.Qh,
|
|
32
|
+
{detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.D(_.Ph,{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);Rh(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;Sh(a,b);f=zh(d);var k=Eh(f,a.l);g=new Set;h=!1;for(l of k)(k=Th(a,l))?(l.customAttributes&&(k.customAttributes=_.Vg(k.customAttributes||{},l.customAttributes)||
|
|
33
|
+
void 0),h=!0):(a.a.add(l),g.add(l));var l={rh:g,wg:0<g.size||h};const {rh:m,wg:n}=l;Ah(f);(e||n)&&a.m.trigger(new _.D(_.Oh));Nh(a,m)},6E3))}};Vh=function(a,b){a.j.on(b,_.vc,c=>{c=c.track;c.kind===_.Ae&&Uh(a,c)})};Nh=function(a,b){for(const c of b)a.m.trigger(new _.D(_.Wh,{detail:c}))};Th=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
|
|
34
|
+
Sh=function(a,b){if(b.cues){var c=yh(b.cues).filter(f=>f.type===vd),d=c.filter(f=>f.Be);c=c.filter(f=>!f.Be);var e=[];for(const f of c)for(const g of d)Fh(f,g)&&(e.push(f),g.rf=f.startTime);Rh(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Rh=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.Xh=function(a){return Array.isArray(a)?a:[a]};Yh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
|
|
35
|
+
$h=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 Zh(a,b)&&Zh(b,a)};Zh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.ai=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())};bi=function(a,b){const c=new Set(a),d=new Set(b);return{Eh:a.filter(e=>!d.has(e)),yi:a.filter(e=>d.has(e)),ug:b.filter(e=>!c.has(e))}};
|
|
36
|
+
ci=function(a,b){b=b.track;b.kind!==_.Ae&&(b.mode===_.Kf&&(b.mode=_.de),a.a.on(b,_.Dd,c=>{c=c.target||c.srcElement;c.mode=_.de;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};di=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.bh(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};
|
|
37
|
+
ei=function(a,b){const c=b||Yh;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)}};_.fi=function(a){return null!=a};hi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.gi("No non-null, non-undefined value found");};ii=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
|
|
38
|
+
_.ji=function(a){var b;a instanceof _.ji?(ki(this,a.tb),this.qc=a.qc,_.li(this,a.jb),mi(this,a.Ic),this.Ha=a.Ha,_.ni(this,oi(a.a)),this.jc=a.jc):a&&(b=String(a).match(pi))?(ki(this,b[1]||"",!0),this.qc=qi(b[2]||""),_.li(this,b[3]||"",!0),mi(this,b[4]),this.Ha=qi(b[5]||"",!0),_.ni(this,b[6]||"",!0),this.jc=qi(b[7]||"")):this.a=new _.ri(null)};ki=function(a,b,c){a.tb=c?qi(b,!0):b;a.tb&&(a.tb=a.tb.replace(/:$/,""))};_.li=function(a,b,c){a.jb=c?qi(b,!0):b};
|
|
39
|
+
mi=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ic=b}else a.Ic=null};_.ni=function(a,b,c){b instanceof _.ri?a.a=b:(c||(b=si(b,ti)),a.a=new _.ri(b))};qi=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};si=function(a,b,c){return typeof a===_.Uf?(a=encodeURI(a).replace(b,ui),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};ui=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.ri=function(a){this.f=a||null};
|
|
40
|
+
_.vi=function(a){if(!a.a&&(a.a={},a.h=0,a.f))for(var b=a.f.split("\x26"),c=0;c<b.length;c++){var d=b[c].indexOf("\x3d"),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}};oi=function(a){var b=new _.ri;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.h=a.h}return b};
|
|
41
|
+
xi=function(a,b){const c=wi[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.G?"":null};_.J=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.F,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};_.zi=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=yi.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Ai=function(a,b){a=_.zi(a);b=_.zi(b);return a.split("-")[0]===b.split("-")[0]};
|
|
42
|
+
Bi=function(a){return a.reduce((b,c)=>b+c,0)};_.Ci=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Di=function*(a){for(let b=0;b<a;b++)yield b};Fi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(Ei(a)===Ei(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.K(a);b=_.K(b);for(const d of Di(a.byteLength))if(c[d]!==b[d])return!1;return!0};Ei=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.K=function(a,b=0,c=Infinity){return Gi(a,b,c,Uint8Array)};
|
|
43
|
+
Gi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Ei(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)};Hi=function(a,b=0,c=Infinity){return Gi(a,b,c,Uint16Array)};Ii=function(a,b=0,c=Infinity){return Gi(a,b,c,Uint32Array)};_.Ji=function(a,b=0,c=Infinity){return Gi(a,b,c,Int32Array)};_.Ki=function(a,b=0,c=Infinity){return Gi(a,b,c,DataView)};
|
|
44
|
+
Li=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Mi=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};
|
|
45
|
+
_.Ni=function(a){if(!a)return"";a=_.K(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(Oa);return a}a=escape(Mi(a));try{return decodeURIComponent(a)}catch(b){throw Error(Oa);}};
|
|
46
|
+
Pi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Oi.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.K(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(_.K(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 Mi(c)};
|
|
47
|
+
_.Qi=function(a,b){if(_.bh(a))return a;let c="";b=!!b;const d=_.K(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.Ni(d):254===d[0]&&255===d[1]?c=Pi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=Pi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Oi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=Pi(a,!1):0===d[1]&&0===d[3]?c=Pi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Ni(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
|
|
48
|
+
};_.Ri=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};_.Si=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};
|
|
49
|
+
_.Ti=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Ii(d):2===c?e=Hi(d):e=_.K(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Ui=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Vi=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};_.Wi=function(a){return!!(a&&0<a.length)};_.Xi=function(a){return!a||0===a.length};
|
|
50
|
+
_.Yi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(eh(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""}};_.$i=function(a){a=a.replace(/<[^>]+>/gi,"");Zi.innerHTML=a;a=Zi.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.bj=function(a,b=!0){a=_.aj(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.aj=function(a){a=Mi(_.K(a));return btoa(a)};
|
|
51
|
+
_.cj=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};_.dj=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};_.ej=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};
|
|
52
|
+
_.fj=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};_.gj=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};
|
|
53
|
+
_.hj=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};
|
|
54
|
+
_.lj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.F,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.ij(d);var f;(f=_.hj(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.hj(d,g);)c.push(new _.jj(f[1],f[2]||f[3]||""))}return new _.kj(a,b,c,e)};_.nj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...mj]}};
|
|
55
|
+
oj=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||[...mj]};pj=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
|
|
56
|
+
_.rj=function(a,b){_.bh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.qj,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||
|
|
57
|
+
[],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:[...mj],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&oj(c,b);return c};
|
|
58
|
+
_.xj=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(sj(c))return vj(a);throw wj(a);};sj=function(a){return 200<=a&&299>=a&&202!==a};vj=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}};
|
|
59
|
+
wj=function(a){a=vj(a);try{var b=_.Qi(a.data,!0)}catch(d){b=null}_.ph("HTTP error text:",b);const c=a.request;return new _.H(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.F:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};yj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};zj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
|
|
60
|
+
Aj=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()};Bj=function(a,b){a.U.then(()=>b(!0),()=>b(!1));return a};_.Cj=function(a,b){a.a.push(Bj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Dj=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.Ni(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
|
|
61
|
+
Ej=function(a,b){return _.x(function*(){const c=yield Dj(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.He)throw Error("Not an object");return d}catch(d){throw new _.gi("Failed to parse JSON response","json-failed");}})};Fj=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};
|
|
62
|
+
Gj=function(a,b){const c=new _.ji(b.uris[b.uriIndex]);let d=c.tb;d||(d=location.protocol,d=d.slice(0,-1),ki(c,d),b.uris[b.uriIndex]=c.toString());const e=a.a[d];if(!e)throw new _.H(_.F,1,1E3,{url:c.toString()});return f=>e(f)};Hj=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.rj(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})};
|
|
63
|
+
Ij=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Jj=function(a){return a&&a!==_.eg?a:null};
|
|
64
|
+
Lj=function(a){if(!a)throw new _.H(_.F,3,3101,`Invalid track type: ${a}`);if(!_.bh(a))throw new _.H(_.F,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case Kj:return Kj}throw new _.H(_.F,3,3101,`Unknown track type: ${a}.`);};
|
|
65
|
+
Oj=function(a,b){a=Lj(a);const c=_.Jj(b.kind);let d=b.id;d||(d=String(_.Mj++));a=new _.Nj(d,c===_.Ae?Kj:a);a.kind=c;a.label=_.Jj(b.label);a.language=_.Jj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Pj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
|
|
66
|
+
_.Qj=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)},""):""};_.Rj=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};
|
|
67
|
+
Sj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Tj=function(a,b){return _.x(function*(){const c=_.rj(b);return yield Dj(a.f,c)})};Xj=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Uj(a,b,c),f=new _.Nj("dummy",_.N),g=e.map((h,k)=>{k=new _.Vj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Kc=h.Kc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Wj(g);return{renditions:g,mimeType:d||void 0}})};
|
|
68
|
+
Zj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Yj(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};Uj=function(a,b,c){return _.x(function*(){const d=ak(b),e=bk(b,c);return{mimeType:yield ck(a,e,d[0]?d[0].codec:null),renditions:d}})};
|
|
69
|
+
Wj=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.");};Yj=function(a){const b=_.lj(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Ib);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Sa),name:a("NAME"),language:a(_.Za),gi:a("AUTOSELECT"),default:a("DEFAULT"),oi:a("FORCED"),nf:a("CHARACTERISTICS"),uri:a(_.Lb)}};
|
|
70
|
+
ak=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.lj(0,b);if(c.getAttribute(_.Rb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.yb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.ka);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.na);c=_.dk(_.w,c?c.split(","):[]);return b={bandwidth:e,Kc:f,codec:c,width:b,height:d,mimeType:null}})};
|
|
71
|
+
bk=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Sj(a,b):null};ck=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield Tj(a,b);d=[ek(d,b),fk(d,b)].filter(Boolean);return _.gk(d,_.w,c)})};ek=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Sj(a,b):null};fk=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.lj(0,a),_.Lb))?Sj(a,b):null:null};
|
|
72
|
+
_.ik=function(a,b,c){for(const d of _.hk)if(d.probe(b,c))return d.create(a);return null};_.jk=function(a){a=_.hk.indexOf(a);0<=a&&_.hk.splice(a,1)};mk=function(a,b){var c=kk;lk.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.qk=function(a,b){var c=[nk,ok,pk,kk];for(const d of c)if(c=lk.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
|
|
73
|
+
_.rk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.sk=function(a){return a.split(";")[0]};_.tk=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(","):""};uk=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};
|
|
74
|
+
vk=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};zk=function(){if(wk)return wk;xk||(xk=new _.yk(()=>{wk=null}));(wk=document.querySelector(_.w)||document.querySelector(_.p))||(wk=document.createElement(_.w));xk.fa(1);return wk};_.Ak=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Bk=function(a){return(navigator.userAgent||"").includes(a)};_.Ck=function(a){return _.Bk("Tizen"+(a?" "+String(a):""))};
|
|
75
|
+
Ek=function(a){const b={major:-1,name:_.fg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Dk(a,c[0]));2<=c.length&&(b.minor=Dk(a,c[1]));3<=c.length&&(b.patch=Dk(a,c[2]));4<=c.length&&(b.build=Dk(a,c[3]));return b};_.Fk=function(){return _.Bk("Web0S")};_.Hk=function(){return _.Fk()&&79===_.Gk().major};
|
|
76
|
+
_.Gk=function(){const a=Ik();const b=["ie","edge","opera","firefox","safari",fd];var c=Jk();const d=Kk[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Ek(c[1]);return Ek("")};_.Lk=function(){return _.Bk("CrKey")};_.Mk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Ck()};_.Nk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Mk()&&1<navigator.maxTouchPoints};_.Ok=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
|
|
77
|
+
Dk=function(a,b){try{return parseInt(b,10)}catch(c){Pk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Qk=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};
|
|
78
|
+
Jk=function(){const a=Ik();if(!a)return Rk;var b=a.match(/^.+?(?=\))/);if(!b)return Rk;b=b[0];if(Qk(b,["iphone","ipad"]))return Sk;if(Qk(b,["android"]))return Tk;if(Qk(b,["macintosh"]))return Uk;if(Qk(b,["windows nt"]))return Vk;if(Qk(b,["tizen"]))return Wk;if(Qk(b,["web0s"]))return Xk;if(Qk(b,["linux"]))return Yk;Pk.warn("Unable to identify OS from user agent: "+a);return Rk};Ik=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
|
|
79
|
+
_.$k=function(){var a=Jk();var b=Jk();var c=Kk[b];if(c){c=Ik().match(c.os_version)[1];c=Ek(c);if(b===Vk)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=Ek("");a:{c=Ik();const e=["ie","edge","opera","firefox","safari",fd];var d=Jk();d=Kk[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=Zk}return{os:a,osVersion:b,browser:c,browserVersion:_.Gk()}};
|
|
80
|
+
al=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.dh(a,{kind:_.Jj(b.kind),language:_.Jj(b.language),label:_.Jj(b.label)},["kind","language","label"])};bl=function(a){return a.enabled||a.selected||a.mode===_.Kf||a.mode===_.de};el=function(a,b,c){return dl(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
|
|
81
|
+
fl=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};gl=function(a,b,c){return dl(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
|
|
82
|
+
hl=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Fc&&(d=d.Fc.get(`${b.type}:${b.label}`))&&d.nf&&(b.accessibility=d.nf.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};il=function(a,b){return a.h.filter(c=>c.type===b)};jl=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};ll=function(a,b){if(a=kl(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.Ae));return a};
|
|
83
|
+
kl=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.M:return a.audioTracks;case _.N:return a.videoTracks;case _.L:return a.textTracks;default:return null}};ml=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};nl=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
|
|
84
|
+
ql=function(a,b,c){const d=ll(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.L:f="mode";e=_.Kf;g=_.Gd;break;case _.M:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=al(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
|
|
85
|
+
d&&b===_.L){for(e of d)e.mode=_.Gd;a.a.set(b,null)}b===_.M?a.m.trigger(new _.D(_.ol)):b===_.L&&a.m.trigger(new _.D(_.pl))};rl=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=_.Xi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
|
|
86
|
+
sl=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.ik(c,b.mimeType,_.Zf);if(d){c=_.rj(b.url);var e=yield a.m.getNetworkEngine().fetch(c).U;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.K(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Zf},rl(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};dl=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.tl&&!a.url.endsWith(".m3u8"))&&_.Mk()};
|
|
87
|
+
ul=function(a,b,c){c=_.Xh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=il(a,b);c.some(e=>{const f=_.zi(e);return(e=d.find(g=>{g=_.zi(g.language||"");return _.Ai(f,g)}))?(a.g.info("Will select track with id",e.id),ql(a,b,e),!0):!1})};wl=function(a){return a.name===nb&&vl.some(b=>a.message.startsWith(b))};
|
|
88
|
+
_.zl=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Nk()&&(a=360);const b=_.nj();b.maxAttempts=3;a={source:"",license:xl,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.nj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
|
|
89
|
+
bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:yl(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.nj()},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.we,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,
|
|
90
90
|
streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,
|
|
91
|
-
chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.
|
|
92
|
-
yospace:{enabled:!1}};if(_.
|
|
93
|
-
return a};
|
|
94
|
-
_.
|
|
95
|
-
a=_.
|
|
96
|
-
7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_
|
|
97
|
-
7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_
|
|
98
|
-
|
|
99
|
-
7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.t)throw new _.
|
|
100
|
-
|
|
101
|
-
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 _.
|
|
102
|
-
_.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
_.
|
|
106
|
-
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.
|
|
107
|
-
|
|
108
|
-
_.
|
|
109
|
-
{licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.
|
|
110
|
-
modifiers:g.modifiers});return c};_.
|
|
111
|
-
_
|
|
112
|
-
|
|
113
|
-
_.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
_.
|
|
117
|
-
_.
|
|
118
|
-
_.
|
|
119
|
-
_.
|
|
120
|
-
_.
|
|
121
|
-
_.
|
|
122
|
-
a=["assetId","variantId"];b.f=_.
|
|
123
|
-
|
|
124
|
-
_.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
_.Zm=function(a){var b=_.
|
|
128
|
-
_.
|
|
129
|
-
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(;_.
|
|
130
|
-
_.
|
|
131
|
-
_.
|
|
132
|
-
d,c,b,a,h)};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
_.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
c)}a.
|
|
143
|
-
_.
|
|
144
|
-
_.
|
|
145
|
-
k.label=_.
|
|
146
|
-
a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");
|
|
147
|
-
"Failed to get MediaKeySystemAccess.");});d=d.then(h=>{if(a.
|
|
148
|
-
1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier===_.
|
|
149
|
-
return h.createMediaKeys()}).then(h=>{a.
|
|
150
|
-
|
|
151
|
-
keyIds:[],periodId:null}};
|
|
152
|
-
|
|
153
|
-
a.
|
|
154
|
-
|
|
155
|
-
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(
|
|
156
|
-
"",contentType:h})});c&&_.
|
|
157
|
-
_.
|
|
158
|
-
_.
|
|
159
|
-
|
|
160
|
-
f.data.headers;g=Object.assign({message:
|
|
161
|
-
_.
|
|
162
|
-
_.
|
|
163
|
-
f.
|
|
164
|
-
_.
|
|
165
|
-
c]).then(()=>{a.
|
|
166
|
-
|
|
167
|
-
_.
|
|
168
|
-
a.g.debug("Loaded offline session",b,e);if(!e)return a.
|
|
169
|
-
_.
|
|
91
|
+
chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.tf},restrictions:yl(),tizen:{sideStreamText:_.Ck(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Ed,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Sb,cropTimeline:!1},
|
|
92
|
+
yospace:{enabled:!1}};if(_.Ck()||_.Fk())a.ads.hls.enable=!1;if(_.Bk("Edge/")||_.Ck())a.streaming.gapDetectionThreshold=.5;_.Fk()&&(a.streaming.stallEnabled=!1);_.Hk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Ck()&&(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};
|
|
93
|
+
return a};yl=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}};
|
|
94
|
+
_.Bl=function(...a){if(!a)return _.zl();var b=[_.zl()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.bh(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),c=!0),b.push(d),null!=d.suggestedPresentationDelay&&b.push({manifest:{suggestedPresentationDelay:d.suggestedPresentationDelay}}));
|
|
95
|
+
a=_.Vg.apply(null,b);_.bh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.B(a.volume)&&(!_.ch(a.volume)||eh(a.volume)))throw new _.H(_.F,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.bh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.bh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.F,
|
|
96
|
+
7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_.bh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.bh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.bh(a.drm.env))throw new _.H(_.F,7,
|
|
97
|
+
7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.bh(a.drm.offlineId))throw new _.H(_.F,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(!_.ch(b.bufferingGoal)||eh(b.bufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.ch(b.rebufferingGoal)||
|
|
98
|
+
eh(b.rebufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.ch(b.bufferBehind)||eh(b.bufferBehind))throw new _.H(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.ch(b.smallGapLimit)||eh(b.smallGapLimit))throw new _.H(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.ch(b.durationBackoff)||eh(b.durationBackoff))throw new _.H(_.F,
|
|
99
|
+
7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.t)throw new _.H(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Al(a.restrictions);Al(a.abr.restrictions);a.abr.initialRestrictions&&Al(a.abr.initialRestrictions)}return a};
|
|
100
|
+
Al=function(a){_.B(a.maxPixels)&&(a.maxPixels=Infinity);_.B(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.B(a.maxHeight)&&(a.maxHeight=Infinity);_.B(a.maxWidth)&&(a.maxWidth=Infinity);_.B(a.minPixels)&&(a.minPixels=0);_.B(a.minBandwidth)&&(a.minBandwidth=0);_.B(a.minHeight)&&(a.minHeight=0);_.B(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);
|
|
101
|
+
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(_.F,7,7100,"Restrictions contain NaN");};Cl=function(a){return typeof a===_.He&&!Array.isArray(a)&&"source"in a};_.El=function(a){return _.Dl.get(a)||null};
|
|
102
|
+
_.Gl=function(a){_.Dl.get(a.id())?Fl.warn("Component already in use."):_.Dl.set(a.id(),a)};Hl=function(a){return Array.from(_.Dl.values()).find(b=>b instanceof a)||null};Il=function(a){for(const b of _.Dl.values())a(b)};Jl=function(a){Il(b=>{b.o(a)})};Kl=function(a){Il(b=>{b.h(a)})};Ll=function(){Il(()=>{})};Ml=function(){Il(()=>{})};Nl=function(a){if(null!==Hl(a))return null;a=new a;a.f();_.Gl(a);Fl.info("Installed component:",a.id());return a};
|
|
103
|
+
Ol=function(a){if(a=Hl(a))a.a(),_.Dl.delete(a.id()),Fl.info("Uninstalled component:",a.id())};Pl=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Hg]=a.f),a.a&&(b.headers[Ig]=a.a))};
|
|
104
|
+
Ql=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Hg],a.a=b.headers[Ig],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(_.Ni(_.cj(b))),{delay:a.renewalPeriod,ci:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Sl=function(a){_.Rl[a.I]=a};
|
|
105
|
+
_.Ul=function(a){const b={attemptParameters:_.nj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ka:{},widevineVersion:_.yd};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
|
|
106
|
+
a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Uf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.Rl[a.env]||null;if(!c)throw _.ph(_.ta,_.vb+a.env+_.aa),new _.H(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Ka=_.Tl(c,a.customData)||{};_.Ui(a.env.toLowerCase(),Td)&&(b.enforceSingleSession=!0)}return b};
|
|
107
|
+
Wl=function(a){a=Vl[a];if(!a)return null;const b=_.$k();return b.os===Tk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
|
|
108
|
+
_.Tl=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.f[_.yd];if(g){var h=g.licenseUrl;d=ii(d,g.videoRobustness);e=ii(e,g.audioRobustness);var k=g.modifiers,l=hi(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=hi(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Uf?Wl(f):f;c[_.yd]=
|
|
109
|
+
{licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.td])&&(c[_.td]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.wd])&&(c[_.wd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
|
|
110
|
+
modifiers:g.modifiers});return c};_.Xl=function(){throw new _.H(_.F,3,3E3);};_.Yl=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.K(a.f.buffer);b=_.K(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Xl()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Xl()}};_.Zl=function(a){return a.a<a.f.byteLength};_.$l=function(){throw new _.H(_.F,3,3E3,"Buffer read out of bounds.");};_.am=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.$l()}};
|
|
111
|
+
_.bm=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.$l()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.$l()}};_.cm=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.$l()}};_.dm=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){_.$l()}if(2097151<c)throw new _.H(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
|
|
112
|
+
em=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.am(a);return c};_.fm=function(a,b){a.a+b>a.f.byteLength&&_.$l();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.K(c)};gm=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.hm=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.im=function(a){for(;_.Zl(a.reader)&&!a.parser.a;)a.parser.Od(a.start+a.headerSize,a.reader,a.partialOkay)};
|
|
113
|
+
_.jm=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Od(a.start+a.headerSize,a.reader,a.partialOkay)};_.km=function(a){return b=>{const c=b.reader.Oa()-b.reader.getPosition();a(_.fm(b.reader,c))}};_.lm=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};mm=function(a){let b="";try{b=_.Qi(a)}catch(c){}return b};_.om=function(a){a=mm(a);let b="";a.length&&(b=(new _.nm(a)).a);return b};
|
|
114
|
+
qm=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ni(a)),d=_.cj(c.sinf[0]);(new _.pm).N(_.Nf,_.im).N("schi",_.im).N("tenc",e=>{e.reader.skip(6);_.am(e.reader)&&(e.reader.skip(1),b=_.ej(_.fm(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
|
|
115
|
+
sm=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.F,6,6102);let d;typeof b===_.Uf?d=_.Si(b,!0):d=b;a=_.Si(mm(a),!0);b=new _.rm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.Yl(b,_.K(a));_.O(b,d.byteLength);_.Yl(b,_.K(d));_.O(b,c.byteLength);_.Yl(b,_.K(c));return _.K(b.buffer)};_.tm=function(a){var b=_.K(a.body);b=_.bj(b);a.headers[sa]=Hc;a.body=_.Ri("spc\x3d"+b).buffer};
|
|
116
|
+
_.xm=function(a){let b;try{b=_.Ni(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=Li(_.cj(b))};Cm=function(a,b){b=ym(b);if(a===_.yd)return b+zm;if(a===_.wd)return b+Am;if(a===_.td)return b+Bm;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
|
|
117
|
+
_.Fm=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(va)?c.customData&&(_.Em(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)):Dm.warn(fb)};
|
|
118
|
+
_.Gm=function(a,b){try{const c=_.K(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Dm.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){Dm.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
|
|
119
|
+
_.Im=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Fm(a,b,c,!1);b.headers[sa]=Hc;c={spc:_.aj(b.body)};if((a=a.drm)&&a.env.startsWith(wa)&&d){a={};var e=_.Rj((new _.nm(Hm(d))).f);d=e.keyId;if(e=e.assetId)Dm.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Dm.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Dm.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Dm.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
|
|
120
|
+
_.Ti(_.Qj(c,!0))};_.Jm=function(a,b){Dm.debug("Clearing response data");200===b.status&&(a=_.Ni(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.cj(a).buffer)};
|
|
121
|
+
_.Km=function(a,b,c){b=mm(b);c=c&&c.customData?c.customData:{};b=new _.nm(Hm(b));const d=_.Rj(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Wi(`${a}`)&&(d.assetId=a,Dm.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Wi(`${e}`)&&(d.variantId=e,Dm.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Dm.debug("KeyId found in FPS SKD. Removing other parameters")):
|
|
122
|
+
a=["assetId","variantId"];b.f=_.Qj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Pj(b);return c.fpsContentId=b};_.Lm=function(a,b){a=a.drm;if(!a||!a.env.startsWith(va))Dm.warn(fb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(wa)){const c=new _.ji(b.uris[0]);let d=c.Ha;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.Ha=d;b.uris[0]=c.toString()}};Mm=function(a,b,c){_.Fm(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.ji(b.uris[0]);c.a.add(_.Te,a);b.uris[0]=c.toString()};
|
|
123
|
+
ym=function(a){if(a===Nm)return"https://lic.drmtoday.com";if(a===Om)return"https://lic.staging.drmtoday.com";if(a===Pm)return"https://lic-demo.staging.drmtoday.com";if(a===Qm)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Hm=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
|
|
124
|
+
_.Em=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.Yg(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Sm=function(a){const b={},c=a?a[Jg]:void 0;a=Rm[a?a[Jg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
|
|
125
|
+
Tm=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 Dm.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};Vm=function(a,b){_.oh("Registering EME Factory: "+a.a());a={priority:b,Ca:a};for(let c=0;c<Um.length;++c)if(Um[c].priority<b){Um.splice(c,0,a);return}Um.push(a)};
|
|
126
|
+
Wm=function(a){if(a){const {Ca:b}=Um.find(({Ca:c})=>c.a()===a);if(b&&b.f())return _.oh(Wb+b.a()),b.create();_.oh("Cannot create selected EME manager. Choosing by priority list.")}for(const {Ca:b}of Um)if(b.f())return _.oh(Wb+b.a()),b.create();throw Error("Missing EME managers");};_.Ym=function(a,b){a=_.Xm(a,b);return 1!==a.length?null:a[0]};_.Xm=function(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)};
|
|
127
|
+
_.Zm=function(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null};_.$m=function(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.$f)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==b||0<d.getElementsByTagName("parsererror").length?null:a};_.cn=function(a){var b=_.dj(a);b=parseInt(b.byteLength,10).toString(16);b=_.dj("12"+b+a);return new an(bn,a,b)};
|
|
128
|
+
_.en=function(a){const b=new _.dn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.hm(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.fm(b,16);f=_.ej(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.am(b),v=(u&127)>>>0,z=7;for(;128<=u&&28>=z;)u=_.am(b),v=(v|(u&(28>z?127:15))<<z)>>>0,z+=7;return 28<z?-1:v},k=u=>{switch(u){case 0:do if(!_.Zl(b))throw Error("not enough data to skip!");while(_.am(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
|
|
129
|
+
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(;_.Zl(b);){var n=h(),r=n&7;n>>>=3;if(2===r){r=h();if(0>r)throw Error(`unable to read length of field ${n}`);r=em(b,r);2===n?l.push(r):4===n&&(m=r)}else k(r)}_.ph("Parsed WV PSSH Box","size",a,"name",c,mg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.aj(m):"","keyIds",l.map(u=>_.ej(u)));return 0<l.length?_.cn(_.ej(l[0])):null};
|
|
130
|
+
_.fn=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.K(a);a.set(b,0);return a};
|
|
131
|
+
_.ln=function(a){a:{var b=new _.dn(new DataView(a.buffer),!0);_.P(b);for(_.bm(b);_.Zl(b);)if(1===_.bm(b)){var c=_.bm(b);b=_.fm(b,c);break a}b=null}b||(b=a);a=Pi(b,!0);c=_.$m(a,"WRMHEADER");a=c.getAttribute(mg)||"";var d=_.Ym(c,"DATA");c=(c=_.Ym(d,"LA_URL"))?_.Zm(c):"";var e;if(e=_.Ym(d,"KID"))if(e=_.Zm(e)){var f=_.Ym(d,ma);e={value:e,$d:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=gn(d))?[e]:(d=hn(d))?d:null;const {value:g="",$d:h}=d&&d[0]||{};d=_.cj(g);d=_.fn(d);d=_.ej(d);return new _.jn(_.kn,
|
|
132
|
+
d,c,b,a,h)};gn=function(a){a=_.Ym(a,"PROTECTINFO");if(!a)return null;var b=_.Ym(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ma);b=b.getAttribute("ALGID");return{value:a,$d:c,vg:b}};
|
|
133
|
+
hn=function(a){a=_.Ym(a,"PROTECTINFO");if(!a)return null;a=_.Ym(a,"KIDS");if(!a)return null;var b=_.Xm(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ma),e=c.getAttribute("ALGID");a.push({value:b,$d:d,vg:e})}return a.length?a:null};_.nn=function(a){mn&&performance.mark(a)};_.on=function(a,b,c){mn&&performance.measure(a,b,c)};
|
|
134
|
+
pn=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.yk(c)).fa(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.rn=function(a){return qn(a)?_.wd:a};sn=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};
|
|
135
|
+
tn=function(a,b){b=b[_.rn(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))};
|
|
136
|
+
_.un=function(a,b){b=_.rk(a.mimeType,b||a.codecs);if(_.qk(b,a.type)){a=a.type;var c=_.qk(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};vn=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};xn=function(a){return(a.audioCapabilities||[]).some(wn)||(a.videoCapabilities||[]).some(wn)};
|
|
137
|
+
yn=function(a,b){a=_.om(b);_.ph("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
|
|
138
|
+
zn=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.$g(k)||(k=yn);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.F,6,6103);}if(!l.length)throw new _.H(_.F,6,6101,"Content ID is an empty string");c=sm(c,l,a)}return c};qn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
|
|
139
|
+
wn=function(a){return null!=a.robustness&&""!==a.robustness};An=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.fj(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])}};
|
|
140
|
+
Bn=function(a){var b=a.o;const c=a.X;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(_.F,6,6014));a.D.ve(_.gh(c));a.A||a.g.info(ua);a.A=!0;a.F=!1};Cn=function(a){a.h.forEach((b,c)=>{const d=b.qe;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.ue(c.sessionId,e),b.qe=e)})};
|
|
141
|
+
Dn=function(a){return _.x(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.Y.stop();a.Y=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.xc&&c.xc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield pn(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",
|
|
142
|
+
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.O=null})};_.Jn=function(a,b){const c=En(a,b),d=Fn(b);for(const e of d)Gn(a,e,a.f.Ka);b=Hn(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.nn(Jd);a=_.In(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.nn(Id);_.on("DRM queryMediaKeys_()",Jd,Id)})};
|
|
143
|
+
_.Ln=function(a,b,c){c=void 0===c?[]:c;a.K=Kn;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 _.Jn(a,b)};
|
|
144
|
+
_.In=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.H(_.F,6,6E3));null===a.l&&(a.l=Wm(a.f.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Mn;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.j)return null;if(l===_.wd){if(_.Ak()&&!a.f.Ka[l].useLegacySystem)return k.label=xd,a.l.a(xd,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
|
|
145
|
+
k.label=_.wd;vn(k);return a.l.a(l,[k])});vn(k)}if(l===_.yd&&a.f.widevineVersion!==_.yd){const m=a.f.widevineVersion;if(!m.startsWith(_.yd))return a.g.error(`Invalid "widevineVersion" value "${m}".`),Promise.reject();const n=Object.assign({},k,{label:m,distinctiveIdentifier:_.Pe,persistentState:_.Pe});return a.l.a(m,[n]).catch(()=>a.l.a(l,[k]))}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.yd&&xn(k)){const n=_.$k();if(xn(k)&&n.os===Tk&&n.browser===fd){a.g.warn("requestMediaKeySystemAccess() failed",m);
|
|
146
|
+
a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");vn(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.f.preferredDrmSystem;if(!f){var g=_.$k();if(g.os===Vk&&10<=g.osVersion.major&&"edge"===g.browser)f=_.wd;else if("safari"===g.browser)f=_.td;else if(g.browser===fd||"firefox"===g.browser)f=_.yd}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(()=>{throw new _.H(_.F,6,6001,
|
|
147
|
+
"Failed to get MediaKeySystemAccess.");});d=d.then(h=>{if(a.j)return null;a.J.clear();var k=h.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.J.add(m.contentType.toLowerCase());for(var n of k)a.J.add(n.contentType.toLowerCase());{l=h.keySystem;m=b.get(_.rn(h.keySystem));n=[];k=[];const r=[],u=[];An(m.drmInfos,n,k,r,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");
|
|
148
|
+
1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier===_.Bf,persistentStateRequired:m.persistentState===_.Bf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:"",serverCertificate:k[0],initData:r,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.F,6,6012,a.a.keySystem);
|
|
149
|
+
return h.createMediaKeys()}).then(h=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=h,a.S=!0)}).catch(h=>{if(!a.j){a.a=null;a.J.clear();if(h instanceof _.H)throw h;throw new _.H(_.F,6,6002,{browserError:h.message});}});c.reject();return d};
|
|
150
|
+
Nn=function(a){a=fh(a.f.Ka[_.Qe]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.dj(f);e=_.dj(e);e={kty:"oct",kid:_.bj(f,!1),k:_.bj(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Ri(d),initDataType:"keyids"}];return{keySystem:_.Qe,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
|
|
151
|
+
keyIds:[],periodId:null}};Fn=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};On=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ka[c.keySystem]||(a.f.Ka[c.keySystem]={licenseUrl:""})};
|
|
152
|
+
En=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=fh(a.f.Ka);sn(b,d)}d=a.f.Ka[_.td];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.td));if(!1!==a.f.fi&&_.Mk()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.td,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=Nn(a))for(const g of b)g.drmInfos=[f];b=Fn(b);On(a,b);for(const g of b)tn(g,
|
|
153
|
+
a.f.Ka);return c};Gn=function(a,b,c){const d=_.rn(b.keySystem);c=c[d];d===_.Qe&&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)};
|
|
154
|
+
Hn=function(a,b){var c=new Set(Fn(b));const d=a.G?_.Bf:_.Pe,e=a.G?[_.Ue]:[Yf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.bd],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Pe,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.un(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Ck()&&(h=_.un(b,_.Vd));const k=c?_.un(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Ck()&&(l=_.un(c,_.Vd));
|
|
155
|
+
for(const m of f.drmInfos){const n=a.get(m.keySystem);n.drmInfos.push(m);m.initData&&m.initData.length&&(n.initDataTypes=[...new Set(m.initData.map(r=>r.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.Bf);m.persistentStateRequired&&(n.persistentState=_.Bf);b&&_.Xh(m.audioRobustness).forEach(r=>{const u={robustness:r||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:r||
|
|
156
|
+
"",contentType:h})});c&&_.Xh(m.videoRobustness).forEach(r=>{const u={robustness:r||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:r||"",contentType:l})})}}return a};Pn=function(a){return _.x(function*(){if(!a.l.o())if(a.O)yield a.O;else try{a.O=a.l.h(a.I),yield a.O}catch(b){a.j||a.w(new _.H(_.F,6,6003,b.message,b))}})};
|
|
157
|
+
_.Tn=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==Kn)){var e=a.keySystem();if(!e.startsWith(_.td)&&b===_.bd){const f=new Qn(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||
|
|
158
|
+
_.Ck(2)||a.keySystem().startsWith(_.td)||!_.Rn(a,d,c,!0))&&Sn(a,d,null,b,c)}};Un=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield Pn(a);b.initData&&_.Tn(a,b.initDataType,_.K(b.initData))})};Wn=function(a){return _.x(function*(){_.nn(Ld);const b=a.W.map(c=>Vn(a,c));a.$=!0;a.W=[];yield Promise.all(b);_.nn(Kd);_.on("drm.onPlay",Ld,Kd)})};
|
|
159
|
+
Yn=function(a){const b=a.keySystem(),c=a.f.Ka[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Xn(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.rj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=dd;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.qb.fetch(f).U}).then(f=>{a.a.serverCertificate=_.K(f.data)}).catch(f=>{var g=
|
|
160
|
+
f.data.headers;g=Object.assign({message:Pa,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Sm(g));throw new _.H(_.F,6,6100,g,f);})};
|
|
161
|
+
_.Zn=function(a){return _.x(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.F,6,6004,{browserError:b.message});}})};
|
|
162
|
+
_.bo=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Ck(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.td)){const e=a.h.values();for(const f of e)_.fj(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}.`),$n(c.initData,f)||(f.wd.push(c.initData),c.keyId&&!f.ib.includes(c.keyId)&&
|
|
163
|
+
f.ib.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Sf)),d=!1)}!d||a.G&&a.K===Kn||(_.Rn(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),Sn(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.ao(a,c);b.length||a.L.length||(a.A||a.g.info(ua),a.A=!0,a.F=!1,a.H.resolve());return a.H};
|
|
164
|
+
_.co=function(a,b){if(!a.I)return xh(a.B,b,()=>{a.w(new _.H(_.F,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.We,()=>Wn(a));a.B.on(a.C,_.Ag,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()!==Ab||a.L.length)d=Pn(a);c=Promise.resolve();_.Fk()&&38===_.Gk().major||(a.a&&a.a.keySystem!==_.Qe&&!a.a.serverCertificate&&(c=Yn(a)),c=c.then(()=>_.Zn(a)));return Promise.all([d,
|
|
165
|
+
c]).then(()=>{a.j||(_.bo(a),a.B.on(a.C,Wd,e=>Un(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.yd&&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++,_.co(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
|
|
166
|
+
Xn=function(a,b){return _.x(function*(){const c=a.D.Cc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
|
|
167
|
+
_.ao=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Ue)}catch(e){const f=new _.H(_.F,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.ze,a.za.bind(a));a.B.on(c,he,a.ya.bind(a));const d={initData:null,loaded:!1,qe:Infinity,cc:null,cb:new _.Mn,periodId:null,wd:[],keyId:null,ib:[],initDataType:null,hc:null,sessionContext:{ldlDelay:0,customData:{}}};d.cb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
|
|
168
|
+
a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.H(_.F,6,6013)),null;d.loaded=!0;eo(a)&&(a.A||a.g.info(ua),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.H(_.F,6,6005,{browserError:e.message})))})};$n=function(a,b){if(!a)return!1;for(let c=0;c<b.wd.length;c++)if(_.fj(a,b.wd[c]))return!0;return!1};
|
|
169
|
+
_.Rn=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(_.fj(c,f.initData))return b?f.ib.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.ib.push(b),a.o.get(b)||a.o.set(b,Sf),d&&a.g.info(Gb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(Gb+`Session: '${e.sessionId}'`),!0;if($n(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
|
|
170
170
|
!0}return!1};
|
|
171
|
-
|
|
172
|
-
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.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};
|
|
176
|
-
|
|
177
|
-
_.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
{
|
|
182
|
-
{
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
_.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
()
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
cp=function(a,b){
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
b.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
fq=function(a){
|
|
233
|
-
|
|
234
|
-
|
|
171
|
+
Sn=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.x(function*(){if(e.length){var h=b;if(!h)try{h=fo(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&&go(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);
|
|
172
|
+
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?_.Ue:Yf;var r=a.I.createSession(n);a.D.onEvent(new _.D(Qd,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.H(_.F,6,6005,{browserError:u.message}));return}a.B.on(r,_.ze,a.za.bind(a));a.B.on(r,he,a.ya.bind(a));
|
|
173
|
+
k={hc:f,wd:[],initData:e,initDataType:d,keyId:h,ib:h?[h]:[],loaded:!1,qe:Infinity,periodId:c,cc:null,cb:new _.Mn,sessionContext:{ldlDelay:0,customData:{}}};k.cb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(r,k);h&&!a.o.get(h)&&a.o.set(h,Sf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.ib.includes(m.keyId)&&_.fj(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.ib.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Sf));l=a.D.getConfiguration();m=a.keySystem();
|
|
174
|
+
m=a.f.Ka[m];n=(n=m.modifiers)&&n.transformInitData;_.$g(n)||(n=zn);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(_.F,6,6016,u));k.cb&&k.cb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);r.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
|
|
175
|
+
a.w(new _.H(_.F,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};ho=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};eo=function(a){a=a.h.values();return _.Ci(a,b=>b.loaded)};go=function(a,b,c,d){if(!b&&c!==_.Nf)return!1;d=b||qm(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.ib.includes(b)||c===_.Nf&&(e.keyId||qm(e.initData))===d)return!0;return!1};
|
|
176
|
+
fo=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Ka[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.$g(g)||(g=yn);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===_.Nf)return qm(c)||"";if(b===_.bd){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
|
|
177
|
+
_.en(c);if(m)return m.a}else if(qn(l)){{f=new _.dn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.hm(m);const n=_.P(f);c=n>>>24;k=n&16777215;const r=_.fm(f,16),u=_.ej(r);if(0<c){const E=_.P(f);f.skip(16*E)}const v=_.P(f),z=_.fm(f,v),A=_.ln(z);_.ph("Parsed PR PSSH Box","size",g,"name",h,mg,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""};
|
|
178
|
+
Vn=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(io(a,b))yield jo(a,e,b,c,d);else{var f=a.ea;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield vk(f),a.j))return;var g=a.keySystem(),h=a.f.Ka[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.rj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.qb;k.licenseRequestType=b.messageType===ke&&d.hc?je:b.messageType;
|
|
179
|
+
k.sessionId=c.sessionId;if(k.licenseRequestType===je)a.D.onEvent(new _.D(Pd));qn(a.a.keySystem)&&ko(a,k);Pl(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield lo(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Ql(a.M,f),yield mo(a,c,f.data,d,h))h=ho(a),a.D.onEvent(new _.D(_.Sd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.cc&&d.cc.resolve(),d.hc&&(h=d.hc,a.g.info(`Closing expired session '${h.sessionId}'`),pn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
|
|
180
|
+
(h=a.h.get(d.hc))&&h.xc&&h.xc.stop(),a.h.delete(d.hc),d.hc=null),(new _.yk(()=>{a.j||(d.loaded=!0,d.cb&&d.cb.resolve(),eo(a)&&(a.A||a.g.info(ua),a.A=!0,a.F=!1,a.H.resolve()))})).fa(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.Ui(g,_.td)||_.Ui(g,_.wd)))&&(h=new _.yk(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),qn(g)?Sn(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.td)&&c.update(_.Ri("renew")))}),d.xc=h,h.fa(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
|
|
181
|
+
io=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};jo=function(a,b,c,d,e){return _.x(function*(){var f=_.rj([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.qb;f.licenseRequestType=dd;f.sessionId=d.sessionId;(f=yield no(a,f,e,b,d.sessionId,c.messageType))&&(yield mo(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
|
|
182
|
+
ko=function(a,b){var c=Pi(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(_.lg).textContent;b.body=_.cj(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[sa]="text/xml; charset\x3dutf-8"};
|
|
183
|
+
lo=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield oo(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.D(Nd,{delay:h}));var k=Date.now();_.nn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.qb.fetch(b).U}catch(r){if(a.j)return null;l=r.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:r.data.url,status:r.data.status,response:r.data.response},
|
|
184
|
+
l?{headers:l}:{},Sm(l));l=new _.H(_.F,6,6007,l,r);po(a,l,c);return null}_.nn(`drm.license.req.${d}.end`);_.on(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=Tm(l.headers);m&&(a.ea=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})};
|
|
185
|
+
mo=function(a,b,c,d,e){return _.x(function*(){_.nn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===Fb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.H(_.F,6,6008,{browserError:f.message});po(a,g,d);return!1}_.nn(`drm.sess.update.${e}.end`);_.on(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
|
|
186
|
+
no=function(a,b,c,d,e,f){return _.x(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield oo(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.qb.fetch(b).U}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Pa,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},Sm(h));h=new _.H(_.F,6,6100,h,m);po(a,h,c);return null}g=Date.now()-g;const k=Tm(h.headers);
|
|
187
|
+
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})};
|
|
188
|
+
oo=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield Xn(a,d);const e=a.keySystem();var f=a.f.Ka[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.td)&&b.requestModifiers.push(k=>_.tm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.td)&&b.responseModifiers.push(k=>_.xm(k))})};po=function(a,b,c){a.j||(a.w(b),c.cc&&c.cc.reject(b),c.cb&&c.cb.reject(b))};
|
|
189
|
+
_.so=function(a,b){a&&b&&(_.qo.set(a,b),_.ro.info(`Registered TextDisplayerFactory: '${a}'`))};_.to=function(a,b){b=b.find(c=>(c=_.qo.get(c))?c.a(a):!1);if(null==b)return _.ro.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.ro.info(`Chosen the text displayer: ${b}`);return _.qo.get(b)};
|
|
190
|
+
_.uo=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})}}};vo=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};wo=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};
|
|
191
|
+
xo=function(a){return a.a.map(b=>_.Wg(b))};_.yo=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:[]}};Ao=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=zo.value().get(b),c.one(a,b,d))};
|
|
192
|
+
Fo=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Bo(a,d.type);a.a.on(b,_.Yd,()=>{a.h||(a.j=!1,Co(a,_.Do))});a.a.on(b,Uc,c);a.a.on(b,_.gf,()=>{a.F=!0;a.j=!1;Bo(a,_.gf)});a.a.on(b,_.Se,()=>{a.F=!1;a.j=!1;Bo(a,_.Se)});a.a.on(b,_.ag,c);a.a.on(b,_.xf,c);a.a.on(b,_.If,d=>{a.h=!1;a.j=!1;Bo(a,d.type)});a.a.on(b,_.Jf,d=>{a.h=!0;Bo(a,d.type)});a.a.on(b,Pf,c);a.a.on(b,_.zg,()=>{a.j=!0;Bo(a,_.zg)});a.a.on(b,_.q,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.F&&
|
|
193
|
+
Co(a,_.Eo)});a.a.on(b,_.ue,c);a.a.on(b,Vc,()=>{a.C=!0;Bo(a,Vc)});a.a.on(b,_.kg,d=>{a.h=!0;Bo(a,d.type)});a.a.on(b,_.jg,d=>{a.h=!1;a.j=!1;Bo(a,d.type)})};Go=function(a,b){return Object.keys(b)[a]};Io=function(a,b){const c={type:_.Rf};b===_.Sc||b===_.Rc?(c.reason=a.w,b===_.Sc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.Ho&&(c.reason=a.w),a.A===_.Ho&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
|
|
194
|
+
Co=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Ho;a.A=a.f;a.f=b;a.A===_.Do&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Ho?(a.K=a.o,a.w=a.h?1:2,a.g.info("Buffering started. Reason: "+Go(a.w-1,_.Jo)),b=Io(a,_.Sc),a.Ta(_.Sc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+Go(a.w-1,_.Jo)+". Buffering time: "+a.B+" ms"),b=Io(a,_.Rc),a.Ta(_.Rc,b));b=Go(a.A,_.Ko);c=Go(a.f,_.Ko);a.g.info(`Player state change: ${b} -> ${c}`);a.Ta(_.Rf,Io(a,""));return!0};
|
|
195
|
+
Bo=function(a,b){if(a.f===_.Eo)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.h||(a.j=!1,Co(a,_.Do));else if(b!==_.ag){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ba(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;e=typeof a.l===_.t&&2>a.l&&2===e.networkState;var f=typeof a.l===_.t&&0>=a.G&&a.f===_.Lo,g=typeof a.l===_.t&&2>=a.l&&a.j;e=a.h||
|
|
196
|
+
f||e||g;!a.L||a.m.isLive()||a.f!==_.Ho||e||(f=b===_.If&&4===a.l,(g=a.A===_.Mo)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Co(a,_.Ho):c?f=Co(a,_.No):a.F&&(f=Co(a,_.Oo));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.h+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+Go(a.f,_.Ko))}}};
|
|
197
|
+
Po=function(a){a=(new _.ji(a)).Ha;if(!a)return null;a=a.toUpperCase();return _.Vi(a,".MPD")?_.Bc:_.Vi(a,".M3U8")?_.tl:_.Vi(a,".MP4")?_.tg:_.Vi(a,".MP3")?"audio/mp3":_.Vi(a,"MANIFEST")||_.Vi(a,".ISM")?_.Gc:null};_.Ro=function(a){let b;Cl(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Uf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Qo(b[c]);d&&a.push(d)}return a};
|
|
198
|
+
Qo=function(a){let b=null;_.bh(a)&&(a={url:a});typeof a===_.He&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Qc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Qc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Uf||(b.name=a.name),_.B(a.Ub)||typeof a.Ub!==_.Uf||(b.Ub=a.Ub),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.Uf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Po(a.url),b.type?So.debug("Detect media type "+
|
|
199
|
+
b.type+" for "+a.url):So.warn("Unable to detect media type for "+a.url));return b};Uo=function(a){return a.w?To():new Promise(b=>{if(a.a){const c=a.a;a.h.off(c,_.q);a.h.off(c,_.Cf);a.a=null}b()})};To=function(){return Promise.reject(new _.H(_.F,7,7E3))};
|
|
200
|
+
Wo=function(a,b){return a.w?To():new Promise(c=>{a.a||(a.h.on(b,_.q,()=>{{const d=Vo(a);if(d)a.onError(d)}}),a.h.on(b,_.Cf,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.D(_.Pc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
|
|
201
|
+
Yo=function(a){return _.x(function*(){if(a.w)return To();var b=a.da[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Ul(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.Xo({qb:c,onError:d=>a.onError(d),ve:()=>{},ue:(d,e)=>{a.trigger(new _.D(_.Md,{expirationTime:e}))},onEvent:d=>{d instanceof _.D?a.dispatchEvent(d):a.log.debug(_.Nb,
|
|
202
|
+
d.type)},getConfiguration:()=>a.getConfiguration(),Cc:()=>a.Cc()});a.o.f=b;yield _.Ln(a.o,[{id:0,language:_.eg,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,Ea:0,mimeType:_.tg,codecs:"",encrypted:!0,keyId:null,language:_.eg,originalLanguage:_.eg,label:null,type:_.w,primary:!1,frameRate:void 0,vi:void 0,
|
|
203
|
+
trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,di:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.co(a.o,a.a);return Promise.resolve()})};Zo=function(a,b){Ao(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.Eo&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
|
|
204
|
+
Vo=function(a){if(null===a.da||!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(_.F,3,3016,{code:b,ni:c,message:a.a.error.message})};
|
|
205
|
+
ap=function(a){if(a.w)return new _.$o(To(),()=>{});const b=a.da[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Zo(a,c);if(d.preload!==_.Ge)a.h.one(d,_.ue,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Ck()||_.Fk())&&d.load();const f=new _.Mn;a.h.one(d,Pf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.yk(()=>{f.reject(new _.H(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
|
|
206
|
+
uri:b.url},d.error))})).fa(g))});Ao(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(Vo(a)):d.preload===_.Ge&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.q,()=>{f.reject(Vo(a))});return new _.$o(f,
|
|
207
|
+
()=>{const g=new _.H(_.F,7,7001);f.reject(g);return Promise.resolve()})};bp=function(a,b){Ao(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.Eo){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)}))}})};
|
|
208
|
+
cp=function(a,b){let c=!1;a.h.on(b,_.Jf,()=>{c=b.paused});a.h.on(b,_.If,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.fp=function(a){0<=dp.indexOf(a)?ep.warn(`Factory '${a.name()}' is already registered`):(dp.push(a),ep.info(`Factory '${a.name()}' has been registered.`))};gp=function(a,b){const c=dp.find(d=>d.a(a,b))||null;c&&ep.info(`Chosen ads manager: ${c.name()}`);return c};
|
|
209
|
+
_.hp=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};_.ip=function(a,b){a.classList.add(b)};_.jp=function(a,b){if(a&&typeof b===_.He)for(const c in b)a.style[c]=b[c]};_.kp=function(a){return document.createElement(a)};
|
|
210
|
+
lp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());Zh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};mp=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
|
|
211
|
+
np=function(a,b,c){(_.Fk()&&53===_.Gk().major||_.Fk()&&68===_.Gk().major||_.Hk())&&!b.hasAttribute(Cd)&&(b.style.opacity="0",b.setAttribute(Cd,""),a.j.one(b,Ud,()=>{b.removeAttribute(Cd);b.style.opacity="1";c&&(c.style.opacity="1")}))};op=function(a){if(a.Wb&&0===a.Wb.getDuration()){var b=a.player.getDuration();a.Wb.h=b}a.Nd&&a.Nd()};pp=function(a,b){return _.x(function*(){yield a.release();yield a.load(b)})};
|
|
212
|
+
qp=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Zf.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
|
|
213
|
+
sp=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.w);b.appendChild(f);d=a.ta.Ca.create();f=new rp(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})};tp=function(a){return[a.f,...a.l.a.map(b=>b.player)]};
|
|
214
|
+
up=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(jd),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(jd),d.classList.add("clpp-hide")),a.C&&a.C(d,c))};vp=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.Ec),yield b.player.play(),b.state=_.gf,op(b))})};
|
|
215
|
+
wp=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(),Ec:Promise.resolve()})))};xp=function(a,b){0!==a.h.length&&(b?(a.g.info("Remove items",b),a.h=a.h.filter(c=>!b.includes(c.id))):(a.g.info("Remove all items"),a.h=[]))};
|
|
216
|
+
Ip=function(a,b,c){return _.x(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=yp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.a;e&&(e.player.isPaused()||(a.o?e.primary?e.player.setMuted(!0):e.player.pause():e.player.pause()),e.player.setMuted(!0));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.We?(e&&d.primary?yield zp(a,d):f?yield Ap(a,d):yield Bp(a,d),op(d)):f?a.g.error("Loading preloaded items is not supported"):yield Cp(a,d);Dp(a,d);d.player.setMuted(!1);
|
|
217
|
+
d.Wb&&Ep(a,d,d.Wb);if(d.rb)d.player.one(_.Yd,d.rb);d.Tf&&d.Tf(d.player.getDuration())}catch(g){throw a.g.error(`Item failed to ${c} (ID: ${b})`),g;}finally{a.w=!1,e&&Fp(a,e),Gp(a),Hp(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};yp=function(a,b){return a.h.find(c=>c.id===b)||null};
|
|
218
|
+
zp=function(a,b){return _.x(function*(){if(b.player){if(b.state===sf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=Jp;up(a,b.player,!0);b.state="loading";a.o?b.player.setMuted(!1):yield b.player.play();b.state=_.gf}})};Ap=function(a,b){return _.x(function*(){const c=b.player;if(c){if(b.state===sf){a.g.info(Tb);try{yield b.preloadPromise}catch(d){}}a.a=b;b.role=Jp;up(a,c,!0);b.state===rf?yield c.play():b.state===qf&&(yield pp(c,b.config));b.state=_.gf}})};
|
|
219
|
+
Bp=function(a,b){return _.x(function*(){yield Cp(a,b);yield b.player.play();b.state=_.gf})};Cp=function(a,b){return _.x(function*(){const c=yield Kp(a,!!b.primary);a.a=b;b.role=Jp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();up(a,c,!0);b.state="loading";b.Ec=pp(c,b.config);yield b.Ec;b.state="loaded"})};
|
|
220
|
+
Dp=function(a,b){const c=b.transition;if(c&&!c.Ih){if(c.rb){const d=c.rb,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Yd,e);b.disposers.push(()=>{b.player.off(_.Yd,e)})}c.we&&Lp(a,b,()=>{const d=a.a.Wb;d&&(a.f.trigger(new _.D(_.tc,{ad:d})),a.f.trigger(new _.D(_.fc,{ad:d})),d.a===d.f&&a.f.trigger(new _.D(_.cc,{id:b.Cd})))});c.Ih=!0}};
|
|
221
|
+
Ep=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.f.trigger(new _.D(_.oc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.f.trigger(new _.D(_.gc,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.f.trigger(new _.D(_.mc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.f.trigger(new _.D(_.uc,{ad:c})))},f=()=>{d.isEnded()||a.f.trigger(new _.D(_.nc,{ad:c}))},g=()=>{a.f.trigger(new _.D(_.pc,{ad:c}))},h=()=>{a.f.trigger(new _.D(_.dc,{ad:c}))},k=()=>{a.f.trigger(new _.D(_.tc,{ad:c}));a.f.trigger(new _.D(_.fc,
|
|
222
|
+
{ad:c}));c.a===c.f&&a.f.trigger(new _.D(_.cc,{id:b.Cd}))};d.on(_.ag,e);d.on(_.Se,f);d.on(_.gf,g);d.on(_.Sc,h);d.one(_.Yd,k);b.disposers.push(()=>{d.off(_.ag,e);d.off(_.Se,f);d.off(_.gf,g);d.off(_.Sc,h);d.off(_.Yd,k)});1===c.a&&a.f.trigger(new _.D(_.bc,{id:b.Cd}));c.videoEl=d.getSurface().getMedia();a.f.trigger(new _.D(_.kc,{ad:c}));a.f.trigger(new _.D(_.sc,{ad:c}))};
|
|
223
|
+
Fp=function(a,b){return _.x(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||up(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=Mp,yield Np(a,c),up(a,c,!1))})};Gp=function(a){return Promise.all(Array.from(a.j.keys()).map(b=>Op(a,b)))};
|
|
224
|
+
Hp=function(a,b){_.x(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>Pp(a,d)))}})};Qp=function(a){return a.h.find(b=>!!b.primary)||null};Rp=function(a,b){const c=Qp(a);c?c.ga=b:a.g.error("Failed to get primary item. Cannot configure resume position.")};Sp=function(a){a.A.forEach(b=>a.B.removeChild(b));a.A=[];up(a,a.f,!0)};
|
|
225
|
+
Lp=function(a,b,c){const d=b.transition.we;let e=null;d.ga&&Rp(a,d.ga);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(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=()=>{b.player.off(_.ag,f)};b.player.on(_.ag,f);b.disposers.push(()=>{null!=e&&(cancelAnimationFrame(e),
|
|
226
|
+
e=null)});b.disposers.push(h)};Tp=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],a.a.Wb&&Ep(a,a.a,a.a.Wb),Dp(a,a.a),Gp(a),Hp(a,a.a.next))};Op=function(a,b){return _.x(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield Np(a,c.player)),a.j.delete(b))})};Np=function(a,b){return _.x(function*(){b!==a.f&&(yield a.l.release(b))})};
|
|
227
|
+
Kp=function(a,b){return _.x(function*(){if(b)return a.f;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
|
|
228
|
+
Pp=function(a,b){return _.x(function*(){if(b.primary){b.state=sf;a.j.set(b.id,b);if(b.ga&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.ga);c.setMuted(!0);yield c.seek(b.ga)}b.state=rf}else{c=b.id;var d=yield Kp(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=Mp;b.state=sf;try{a.j.set(c,b),b.config.autoplay&&(a.g.warn(ja+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.preloadPromise=pp(d,b.config),yield b.preloadPromise,b.state=rf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),
|
|
229
|
+
b.state=pf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=qf)}}})};Up=function(a){const b={URI:a.Aa[0].URI,DURATION:a.Aa[0].DURATION};a.cg&&(b[Xb]=a.cg);return{ASSETS:[b]}};Vp=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Uf&&typeof b.DURATION===_.t):!1};Wp=function(a,b){return a.a.find(c=>1===c.ze&&b>c.startTime&&b<c.endTime)||null};Zp=function(a,b){return _.x(function*(){if(!(yield Xp(a,b)))throw Error("Failed to bind");yield Yp(a,b,1,!1)})};
|
|
230
|
+
gq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition(),f=$p(a,e);f&&(a.g.info(`Interstitial ${f.ia} coming up `+`at ${f.startTime} s`),(yield Xp(a,f))&&aq(a,f,b));if((f=bq(a))&&f.state===cq&&b.getDuration()-e<a.ta.resolutionOffsetSec&&(yield Xp(a,f)))if(f.Aa&&0!==f.Aa.length){if(e=a.pa.getCurrentItem()){var g=dq(a,f,2),h=g[0].id;e.next=[h];e.transition={rb:h};eq(a,f,g);a.g.info(`Postroll interstitial ${f.ia} scheduled`)}}else a.g.warn("Postroll interstitial has no assets, ignoring.")});
|
|
231
|
+
b.addEventListener(_.ag,c);a.h.push(()=>{b.removeEventListener(_.ag,c)});const d=()=>{fq(a,!1,!0,!0)};b.addEventListener(_.Oh,d);a.h.push(()=>{b.removeEventListener(_.Oh,d)})};hq=function(a){a.h.forEach(b=>b());a.h=[]};iq=function(a){return(a=a.pa.getCurrentItem())&&!a.primary?a.player:null};
|
|
232
|
+
fq=function(a,b,c,d){const e=jq(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=bi(a.a.map(m=>m.ia),e.map(m=>m.id));kq(a,f.Eh);const l=new Set(f.ug);f=e.filter(m=>l.has(m.id))}if(!lq(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.qb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ta.yh?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]&&mq(a,g[0],b);k.forEach(l=>
|
|
233
|
+
nq(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&nq(a,h[0],2);a.g.info("Interstitials changed",a.a);return 0<g.length};
|
|
234
|
+
oq=function(a){_.x(function*(){var b=a.pa;wp(b,[{id:uf,primary:!0,config:b.f.getConfiguration(),next:[]}]);var c=Qp(b);if(!c)throw Error("Failed to find primary item");b.a=c;c.role=Jp;c.player=b.f;c.videoEl=c.player.getSurface().getMedia();up(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=fq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.pa,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||up(b,b.f,!1),up(b,c,!0)}else c.autoplay&&(yield vp(a.pa))})};
|
|
235
|
+
jq=function(a){return a.f.getTimelineCues().filter(b=>b.schemeIdUri===_.ud&&b.customAttributes)};kq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ia)&&![cq,pq].includes(d.state)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ia))};
|
|
236
|
+
lq=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.ta.resolutionOffsetSec,e=[];for(let g=0;g<c.length-1;g++){const h=c[g],k=c[g+1];k&&k.startTime-h.endTime<d&&e.push(`Interstitials ${h.id} and ${k.id} `+`are too close to each other (less than ${d} s).`);k&&k.startTime<=h.endTime&&e.push(`Interstitials ${h.id} and ${k.id} `+"overlap.")}const f=[];b.forEach(g=>{const h=g.customAttributes[_.Zb],k=g.customAttributes[_.$b];g.customAttributes[_.Yb]||h?null!=k&&1>k&&a.g.warn(`Interstitial cue ${g.id} is invalid `+
|
|
235
237
|
"X-PLAYOUT-LIMIT is less than 1 s.",g):f.push(`Interstitial cue ${g.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<f.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${f.join(" ")}`):0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${e.join(" ")}`);return 0===f.length};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
b.startTime}],a.
|
|
240
|
-
|
|
241
|
-
b,e);a.g.info(`Interstitial ${b.
|
|
242
|
-
|
|
243
|
-
`${g} s`);const h=e[e.length-1],k=g-(h.
|
|
244
|
-
{null==b.ga&&(b.ga=b.startTime+g,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
_.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
d.method="GET";d.headers=b;return(new _.
|
|
256
|
-
break;default:g=Promise.resolve();break a}a.g.error(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
_.
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
a.trigger(b))}).finally(()=>{a.a.off(_.
|
|
264
|
-
|
|
265
|
-
null;if(!b)throw new _.
|
|
266
|
-
_.
|
|
267
|
-
|
|
268
|
-
_.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
{const g=_.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
(a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.
|
|
284
|
-
_.
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
!0);c=_.
|
|
288
|
-
|
|
289
|
-
c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
a.f=null}})).fa(.01)}return a.f};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
_.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
for(var
|
|
303
|
-
7001,{url:b,request:a}));return Promise.resolve()}}};
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
c(!1,k))&&(h=e)}}return h.then(()=>
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
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.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
v&&v.data&&(
|
|
314
|
-
1001===g.code)throw g;_.
|
|
315
|
-
_.
|
|
316
|
-
_.
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
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 _.
|
|
320
|
-
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.
|
|
321
|
-
g.
|
|
322
|
-
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=
|
|
323
|
-
|
|
324
|
-
_.
|
|
325
|
-
_.S=class{constructor(a){(this.tag=a)&&void 0===
|
|
326
|
-
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of
|
|
327
|
-
this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.
|
|
328
|
-
_.
|
|
329
|
-
|
|
330
|
-
a.payloadType}};_.
|
|
331
|
-
_.
|
|
332
|
-
_.
|
|
333
|
-
_.
|
|
334
|
-
_.
|
|
335
|
-
_.
|
|
336
|
-
_.
|
|
238
|
+
mq=function(a,b,c){_.x(function*(){const d=nq(a,b,0),e=yield Xp(a,d),f=d.Aa?d.Aa.length:0;e&&0<f?(Yp(a,d,0,c),a.g.info(`Preroll interstitial ${d.ia} scheduled`)):(e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),c||(yield vp(a.pa)))})};
|
|
239
|
+
nq=function(a,b,c){{const r=b.customAttributes[_.ac];var d=b.id,e=b.startTime,f=b.endTime,g=cq,h=b.customAttributes[_.Yb],k=b.customAttributes[_.Zb],l=null==r?null:b.startTime+r,m=b.customAttributes[_.$b];if(b=b.customAttributes[Xb])try{var n=JSON.parse(atob(b))}catch(u){n=null}else n=null;c={ia:d,startTime:e,endTime:f,state:g,bf:h,cf:k,Aa:null,ga:l,Gh:r,Xf:m,ze:c,cg:n}}a.a.push(c);return c};
|
|
240
|
+
Xp=function(a,b){return _.x(function*(){b.state=qq;if(b.bf)try{a.g.info(`Load X-ASSET-LIST for ${b.ia}`);a.Ta(new _.D(hc));const c=yield rq(a,b.bf);b.Aa=c.ASSETS;b.Aa&&0!==b.Aa.length||a.g.info(`Interstitial ${b.ia} has no assets, `+"will be smoothly skipped");if(null==b.ga){const d=Bi(b.Aa.map(e=>e.DURATION));b.ga=b.startTime+d}b.state=sq;a.Ta(new _.D(ic));a.Ta(new _.D(jc,{id:b.ia,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=tq}else b.cf?(b.Aa=[{URI:b.cf,DURATION:b.endTime-
|
|
241
|
+
b.startTime}],a.Ta(new _.D(jc,{id:b.ia,detail:Up(b)})),b.state=sq):b.state=tq;return b.state===sq})};Yp=function(a,b,c,d){return _.x(function*(){if(a.pa.getCurrentItem()){var e=dq(a,b,c);eq(a,b,e);null!=b.ga&&Rp(a.pa,b.ga);d?yield a.pa.load(e[0].id):yield a.pa.play(e[0].id)}})};$p=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.ze&&[cq,pq].includes(c.state)&&0<d&&d<=a.ta.resolutionOffsetSec})||null};
|
|
242
|
+
aq=function(a,b,c){if(b.Aa)if(0===b.Aa.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ia}`):null!=b.ga&&0!==b.Gh?c.seek(b.ga):a.g.info(`Empty VOD interstitial ${b.ia}, `+"continuing to next segment")};c.one(_.Ph,g);a.h.push(()=>{c.off(_.Ph,g)});a.g.info(`Interstitial ${b.ia} scheduled to `+"be skipped")}else{var d=a.pa.getCurrentItem();if(d){var e=dq(a,b,1),f=e[0].id;null!=b.ga&&Rp(a.pa,b.ga);d.next=[f];d.transition={we:{position:b.startTime,itemId:f,ga:b.ga}};eq(a,
|
|
243
|
+
b,e);a.g.info(`Interstitial ${b.ia} scheduled for `+`${b.startTime} s`)}}};bq=function(a){return a.a.find(b=>2===b.ze)||null};rq=function(a,b){return _.x(function*(){var c=a.pa.xd();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.rj(uq(a,b));c=yield Ej(c,d);if(!Vp(c))throw new _.gi("Invalid X-ASSET-LIST list response");return c})};uq=function(a,b){return(a=a.ta.xh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
|
|
244
|
+
dq=function(a,b,c){let d=0,e=b.Aa.map((g,h)=>{const k=`${b.ia}-${h}`;d+=g.DURATION;return{id:k,config:{source:{url:uq(a,g.URI),type:_.tl}},duration:g.DURATION,Nc:d,Cd:b.ia,next:[],Wb:new Q(c,h+1,b.Aa.length,g.DURATION,b.ia)}});e.forEach((g,h)=>{const k=h===e.length-1;k&&2===c||(k?(g.next=[uf],g.transition={rb:uf}):(h=k?uf:`${g.Cd}-${h+1}`,g.next=[h],g.transition={rb:h}))});e.forEach(g=>{g.Nd=()=>{a.g.info(`Playing interstitial asset ${g.id}`,g)}});if(null!=b.Xf){const g=b.Xf;a.g.info(`Playout limit for ${b.ia} is `+
|
|
245
|
+
`${g} s`);const h=e[e.length-1],k=g-(h.Nc-h.duration);0>=g?e=[]:g<h.Nc?(e=e.filter(l=>l.Nc-l.duration<=g),.1>Math.abs(k-h.duration)?h.transition.rb=uf:h.transition.we={position:k,itemId:uf,ga:null}):g>h.Nc&&a.g.info(`Playout limit (${g}) is`+`larger than total duration: (${h.Nc})`)}const f=e[0].Nd;e[0].Nd=()=>{a.g.info(`Playing interstitial ${c} ${b.ia} with `+`${b.Aa.length} assets and will resume primary `+`content ${b.ga?`at ${b.ga.toFixed(1)} s`:"after interstitial ended"}.`,e);f()};e[0].Tf=g=>
|
|
246
|
+
{null==b.ga&&(b.ga=b.startTime+g,Rp(a.pa,b.ga),a.g.info("Primary content will resume at",b.ga));b.state=vq};e[e.length-1].rb=()=>{b.state=pq;xp(a.pa,e.map(g=>g.id))};return e};eq=function(a,b,c){wp(a.pa,c);Tp(a.pa);b.state=wq;a.Ta(new _.D(_.lc,{detail:null}))};
|
|
247
|
+
xq=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)})}};
|
|
248
|
+
Bq=function(a){a.a.on(window,"offline",()=>{yq(a,!1)});a.a.on(window,"online",()=>{a.f||zq(a)});a.a.on(a.m,Pf,()=>Aq(a));a.a.on(a.m,"suspend",()=>Aq(a));a.a.on(a.m,_.zg,()=>Aq(a));a.a.on(a.m,_.gf,()=>{a.f||zq(a)});a.a.on(a.m,_.vf,()=>{a.f||zq(a)});a.a.on(a.m,_.Rf,()=>{switch(a.m.getState()){case _.Ho:Aq(a);break;default:Aq(a)}})};Cq=function(a){a.h&&(a.h.stop(),a.h=null)};Aq=function(a){a.f&&zq(a)};
|
|
249
|
+
Dq=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Hj(a.j,b.url,b.attemptParameters,b.method),yq(a,b))})};zq=function(a){a.m.getConfiguration().connectivityCheck&&(Cq(a),a.h=(new _.yk(()=>Dq(a))).fa(5))};yq=function(a,b){Cq(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.D(Oe,{online:a.f})))};Fq=function(){for(let a=0;a<Eq.length;++a)Eq[a].uc()};
|
|
250
|
+
_.Gq=function(a,b){b=b||0;a={priority:b,uc:a};for(let c=0;c<Eq.length;c++)if(Eq[c].priority<b){Eq.splice(c,0,a);return}Eq.push(a)};Hq=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
|
|
251
|
+
Jq=function(a){var b=Iq;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=_.Ri(d),n=_.cj(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.gi("Signature Verification failed",dg))}).catch(g)}else f()})};
|
|
252
|
+
Lq=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 Kq(b[0],b[1],b[2]);a.a=b}return a.a};Mq=function(a){return _.x(function*(){var b=Lq(a);try{yield Jq(b)}catch(c){if(c&&c.code===dg)throw c;{b=window.location.href;const d=new _.ji(b);b=d.tb||d.jb?d:new _.ji("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.jb))throw c;}})};
|
|
253
|
+
Nq=function(a){switch((a.da[0]||{src:"",type:""}).type){case _.Bc:a="dash";break;case _.Gc:a="ss";break;case _.tl:a="hls";break;case _.tg:a="mp4";break;default:a=""}return a};Oq=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Pq=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
|
|
254
|
+
Qq=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Rq=function(a){a=a.drmInfo;return(new _.ji(a&&a.licenseServerUri||"")).jb};Sq=function(a){const b=a.configuration;let c="no";b.drm&&!_.dh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Td)||Rq(a).endsWith("drmtoday.com"))&&(c=Td);return c};Tq=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.yd:b="wv";break;case _.wd:b="pr";break;case _.td:b="fps"}return b};
|
|
255
|
+
Uq=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Vq=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Va:case Ta:b="L1";break;case Ua:b="L2";break;case _.Eb:case _.Db:b="L3"}return b};
|
|
256
|
+
Zq=function(a,b){const c="ie"===_.$k().browser;var d=b.configuration;const e=[...Array.from(_.Dl.keys()),...b.Yf];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":Oq(d),"CL-ASSET-ID":Pq(d),"CL-SESSION-ID":Qq(d),"CL-PLAYBACK-TYPE":b.isLive?Wq:Xq,"CL-CONTENT-TYPE":Nq(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Sq(b),"CL-DRM-CDM":Tq(b),"CL-DRM-SEC-LEVEL":Vq(b),"CL-DRM-OFFLINE":Uq(b),"CL-DRM-IP":Rq(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.rj(["https://downloads.castlabs.com/r/register/"]);
|
|
257
|
+
d.method="GET";d.headers=b;return(new _.Yq).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=Lq(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="castLabs Player license is invalid";if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";
|
|
258
|
+
break;default:g=Promise.resolve();break a}a.g.error($a+k);g=Promise.reject(new _.H(_.F,7,g,k))}}return g})};cr=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}=$q(c[e]);Object.keys(ar).includes(f)&&(d[ar[f]]=g)}return d}).filter(c=>_.Yg(c));return 0<b.length?b:null}catch(b){return br.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
|
|
259
|
+
$q=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.gi("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 _.gi(`Parsing CMSD, not recognized value type of ${a}`);};
|
|
260
|
+
er=function(a){return b=>{{var c=b.headers;let e=b=null;var d=hh(c,"cmsd-dynamic");c=hh(c,"cmsd-static");d&&(b=cr(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=$q(f[c]);Object.keys(dr).includes(g)&&(d[dr[g]]=h)}e=_.Yg(d)?d:null}catch(f){br.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.D("cmsd-event",{mi:b,Ai:e}))}}};_.gr=function(a){a&&(0<=fr.indexOf(a)||fr.push(a))};
|
|
261
|
+
ir=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>b.schemeIdUri===_.ud)){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new hr;a.h.o(a.a,a.A,b)}};kr=function(a,b){a.F=new jr(b);Mq(a.F).catch(c=>{setTimeout(()=>{a.g.error($a+c);a.trigger(new _.D(_.q,{detail:new _.H(_.F,7,7101)}));a.destroy()},1E3)})};mr=function(a,b){a.W=b;for(const c of a.W)(b=c.id())&&(a.K[b]=c);_.lr(a,"onPlayerCreated")};
|
|
262
|
+
_.nr=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))};
|
|
263
|
+
or=function(a,b){_.x(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new jr(a.f.license));try{a.g.debug("Verifying license remotely"),yield Zq(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(Hq,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.lr=function(a,b,...c){if(!a.X)return Promise.resolve();const d=a.W.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
|
|
264
|
+
pr=function(a){return _.x(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.Y.off(document,xg);a.trigger(new _.D(_.zf));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(_.Rf,d=>{b=d});return _.lr(a,_.Me).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"),
|
|
265
|
+
a.trigger(b))}).finally(()=>{a.a.off(_.Rf,c);a.trigger(new _.D(yf))})}a.trigger(new _.D(yf));return new Promise(b=>b())})};qr=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};rr=function(a,b){const c=uh(d=>d.f(_.pb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.H(_.F,7,7003,"No compatible player implementing playlist mode found!");return{Ca:c,player:c.create(),sourceIndex:0}};
|
|
266
|
+
tr=function(a,b,c){if(a.M===_.pb)b=rr(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.S){a.S=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.rh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={Ca:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.t&&0<a.confidence?(_.sh.debug("Player Factory '"+a.Ca.a()+"' can play",b[d]),b=new sr(a.Ca,d)):(_.sh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
|
|
267
|
+
null;if(!b)throw new _.H(_.F,7,7003,"No player factory compatible with given sources found!");c=b.Ca;a=c.create();b={Ca:c,player:a,sourceIndex:b.sourceIndex}}else b={Ca:a.A,player:a.a,sourceIndex:0};return b};
|
|
268
|
+
_.yr=function(a,b,c){return _.x(function*(){if(a.O)throw new _.H(_.F,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.H(_.F,7,7E3,"No surface associated with this player!");_.nn(bf);yield a.release();var d=c||_.Ro(b);if(!b||0===d.length)throw new _.H(_.F,7,7003,ib);a.ca=d;a.f=_.Bl(a.C,b,{source:d});a.R=!1;d=tr(a,d,a.f);_.nr(a,d.player,d.Ca);ur(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);vr(a);a.a&&a.a.setCdnErrorCallback(a.L);wr(a,a.f);xr(a);if(a.f.pauseWhenInBackground)a.Y.on(document,
|
|
269
|
+
xg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Kl(a);yield _.lr(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.nn(af);_.on("player.beforeLoad",bf,af)})};_.zr=function(a){return _.x(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.D(ve));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
|
|
270
|
+
_.Br=function(a){return _.x(function*(){_.nn(Ye);or(a,{configuration:a.getConfiguration(),da:a.Ff(),drmInfo:a.getDrmInfo(),Yf:Object.keys(a.K),isLive:a.isLive()});Ar(a);Ll();yield _.lr(a,_.Je);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.nn(Xe);_.on("player.afterLoad",Ye,Xe)})};Cr=function(a){return _.x(function*(){if(a.a){var b=a.a;b.hg?(a.trigger(new _.D(ve)),yield b.hg(),yield _.Br(a)):a.g.warn(wb)}else a.g.warn(sb)})};
|
|
271
|
+
ur=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=xq()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};vr=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.zc&&a.be&&(a.be=!1,yield a.zc(b))}))};wr=function(a,b){if(b=gp(a,b))a.h=b.create(a)};xr=function(a){a.B=new Dr(a);a.a.setCmsdManager(a.B)};
|
|
272
|
+
Er=function(a){const b=_.Xh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ja().filter(f=>c?f.kind===_.$d:f.kind!==_.$d);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().na();e&&e.language?(e=_.zi(e.language||""),b.push(e)):(e=a.getTrackManager().Ga())&&e.language&&(e=_.zi(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=>
|
|
273
|
+
{const g=_.zi(f);if(f=d.find(h=>{h=_.zi(h.language||"");return _.Ai(h,g)}))return a.getTrackManager().Sa(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};Ar=function(a){_.x(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);Er(a)})};Fr=function(a){a.J.forEach(b=>b());a.J=[]};
|
|
274
|
+
Ir=function(a,b){return _.x(function*(){try{_.nn(ff);a.M=_.pb;a.X=!1;const c=b.slice(1).map(d=>({config:d,da:_.Ro(d)}));yield _.yr(a,b[0]);c.forEach(d=>{Gr(a,d.config,d.da)});a.trigger(new _.D(ve));yield a.a.setupPlaylist(b);yield _.Br(a);c.forEach(d=>{Hr(a,d.config,d.da)});_.nn(ef);_.on("player.setupPlaylist",ff,ef)}catch(c){if(a.l)throw a.g.info(ab),new _.H(_.F,7,7E3);throw c;}})};
|
|
275
|
+
Jr=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Ff,c);a.J.push(()=>{a.removeEventListener(_.Ff,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.ag,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.D(_.Ef)),a.pause())};a.addEventListener(_.ag,e);a.J.push(()=>{a.removeEventListener(_.ag,e)})}};
|
|
276
|
+
Kr=function(a,b){return _.x(function*(){try{_.nn($e);const c=_.Ro(b);Gr(a,b,c);yield a.a.appendLoad(b);Hr(a,b,c);_.nn(Ze);_.on("player.appendLoad",$e,Ze)}catch(c){if(a.l)throw a.g.info(ab),new _.H(_.F,7,7E3,{id:b.id});throw c;}})};
|
|
277
|
+
Gr=function(a,b,c){if(0===c.length)throw new _.H(_.F,7,7003,{message:ib,id:b.id});if(1<c.length)throw new _.H(_.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 _.H(_.F,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};Hr=function(a,b,c){or(a,{configuration:b,da:c,drmInfo:a.getDrmInfo(),Yf:Object.keys(a.K),isLive:c[0].isLive})};
|
|
278
|
+
Lr=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(id);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Hd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
|
|
279
|
+
Mr=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(jd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(jd)),a.w&&a.w(d,c))};Pr=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=Nr;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Mr(a,c,!0);yield c.load(b.config);Or(a,b);b.config.autoplay||(yield c.play())})};
|
|
280
|
+
Tr=function(a){_.x(function*(){if(0===a.a)yield Qr(a);else if(a.a===a.h.length-1)yield Rr(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Sr(a,c)))}})};
|
|
281
|
+
Ur=function(a,b){return _.x(function*(){if(b.player){if(b.state===sf){a.g.info(Tb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Nr;Mr(a,b.player,!0);b.state===rf?(_.nn(nf),a.ta.preloadMedia?yield b.player.play():yield Cr(b.player),_.nn(kf),_.on("playlist.next",nf,kf)):b.state===qf&&(yield b.player.load(b.config));Or(a,b);b.config.autoplay||(yield b.player.play())}})};
|
|
282
|
+
Xr=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();Mr(a,b.player,!1);yield Vr(a,b);b.player=null;b.videoEl=null;b.role=Wr})};Zr=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Yr(a,b)))};$r=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.ta.anchorId);b&&(b.classList.remove(id),b.innerHTML="")})};
|
|
283
|
+
Yr=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield Vr(a,c)),a.l.delete(b))})};Vr=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};Or=function(a,b){if(a.ta.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Wf()};b.player.on(_.Yd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Yd,c)})}};
|
|
284
|
+
Sr=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Wr;d.state=sf;a.trigger(new _.D(gg));try{a.l.set(b,d),a.ta.preloadMedia?(d.config.autoplay&&(a.g.warn(ja+`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=rf,a.trigger(new _.D(gg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=pf):
|
|
285
|
+
(a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.D(_.q,{detail:e})),d.state=qf),a.trigger(new _.D(gg))}})};Qr=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Sr(a,b)})};Rr=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Sr(a,b)})};
|
|
286
|
+
_.bs=function(a){if(as.has(a))return as.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);as.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),as.set(a,b),b):!1};cs=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.w,_.p));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
|
|
287
|
+
ds=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
|
|
288
|
+
es=function(a,b){a.f=b;_.wh(a.a);if(!b)return Promise.resolve();a.a.on(b,Wd,c=>{_.ph("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,Fg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.K(c.initData);if(_.Ki(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Pi(c.subarray(4),
|
|
289
|
+
!0);c=_.Ri(c);const d=new Event(Wd);d.initDataType="skd";d.initData=Li(c);a.f.dispatchEvent(d)}});Ao(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};fs=function(a,b){ds(a.keyStatuses,b);b=new _.D(he);a.dispatchEvent(b)};
|
|
290
|
+
is=function(a,b){a.a=b;_.wh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Wd);d.initDataType=_.bd;d.initData=Li(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=gs(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.D(_.ze,{messageType:d?ke:je,message:c.message});d=e;_.ph("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.qh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=gs(a,
|
|
291
|
+
c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=gs(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?hs(d,_.Re):1===e?hs(d,"expired"):hs(d,_.ge))}}}))};
|
|
292
|
+
gs=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};hs=function(a,b){ds(a.keyStatuses,b);b=new _.D(he);a.dispatchEvent(b)};js=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
|
|
293
|
+
ns=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===_.Ue)if(c)d=_.K(_.Ri("LOAD_SESSION|"+c));else{const f=_.Ri("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.K(b),f.byteLength);d=g}else d=_.K(b)}catch(f){return Promise.reject(f)}a.f=new _.Mn;const e=js(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Xa)return a.f=null,Promise.reject(f);(new _.yk(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
|
|
294
|
+
a.f=null}})).fa(.01)}return a.f};os=function(a,b,c){if(a.a)a.a.then(()=>os(a,b,c)).catch(()=>os(a,b,c));else{a.a=b;if(a.h===Bg){var d=_.Ni(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=_.cj(e.keys[0].k);e=_.cj(e.keys[0].kid)}else d=_.K(c),e=null;var f=js(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
|
|
295
|
+
ps=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.be?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};qs=function(a){a=a.target;if(a.webkitPresentationMode===Ve){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)};
|
|
296
|
+
rs=function(){return this.webkitSupportsPresentationMode(Ve)?(this.webkitSetPresentationMode(Ve),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};ss=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
|
|
297
|
+
ts=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};us=function(a,b,c){return new window.TextTrackCue(a,b,c)};vs=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};xs=function(a,b,c){if("input"===a)switch(this.type){case "range":a=ed}ws.call(this,a,b,c)};ys=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
|
|
298
|
+
zs=function(a){return ys()-a.a};Bs=function(a){const b=new As;b.a=a.a;return b};_.Cs=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Es=function(a,b,c,d){return _.x(function*(){try{return new (yield Ds(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
|
|
299
|
+
Ds=function(a,b,c,d){return _.x(function*(){if(d){var e=_.Fs[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.Gs(a)){const f=_.Hs[e];if(f)return f;_.C("Could not determine manifest type for extension ",e)}else _.C("Could not find extension for ",a);if(!d&&(d=yield Is(a,b,c))){if(e=_.Fs[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.F,4,4E3,{url:a});})};
|
|
300
|
+
_.Gs=function(a){a=(new _.ji(a)).Ha.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};Is=function(a,b,c){return _.x(function*(){var d=_.rj(a);oj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};Js=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};
|
|
301
|
+
Ks=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Js(a,e),zj(c,e.byteLength,zs(a.h)),a.h.a=ys());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Ks(a,b,c))})};
|
|
302
|
+
Ms=function(a){const b=a.uris[a.uriIndex],c=new Ls,d=new As,e=Bs(d);let f=0,g;const h=new _.Mn;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=zs(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(ra),yj(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
|
|
303
|
+
const r={};for(const u of n)n=u.split(": "),r[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=zs(e);l||zj(a,m.response?m.response.length:0,u);const v=_.xj(r,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Aj(a.rateLimitBps,zs(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");
|
|
304
|
+
for(var r of n)n=r.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}r=_.xj(u,m.response,m.status,b,m.responseURL,a,zs(e),g);h.resolve(r)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=zs(d);d.a=ys();if(100<n||m.lengthComputable&&m.loaded===m.total)zj(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,
|
|
305
|
+
7001,{url:b,request:a}));return Promise.resolve()}}};Ns=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};Os=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)};
|
|
306
|
+
Qs=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Ps(a);for(;null!==b;){if(b.name===_.xe){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=Ps(a)}return null};
|
|
307
|
+
Rs=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,zs(a.w)),a.w.a=ys());if(f)return e=Ns(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Os(a,g);var k=Qs(a);for(e=[];k;)e.push(k),k=Qs(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=
|
|
308
|
+
c(!1,k))&&(h=e)}}return h.then(()=>Rs(a,b,c,d))})};
|
|
309
|
+
Ps=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Ss(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Ss(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(_.F,3,3E3);}if(2097151<f)throw new _.H(_.F,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};
|
|
310
|
+
Ss=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
|
|
311
|
+
Vs=function(a){a.h=a.B.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Ts(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Ts(e.request.fuzzFactor,.5));a.f*=Ts(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Us(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)});
|
|
312
|
+
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 Vs(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};Us=function(a,b,c){a.o=setTimeout(b,c)};Ts=function(a,b){return null===a||void 0===a?b:a};
|
|
313
|
+
Zs=function(a){var b=new Ws;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Xs,d={Mc:!1,fg:!1};b={U:Ys(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.Mc||(d.Mc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.fg=!0;c.abort()},a);b.U=b.U.finally(()=>{window.clearTimeout(e)})}return b};
|
|
314
|
+
Ys=function(a,b,c,d){return _.x(function*(){const e=new As,f=Bs(e);try{const g=yield $s(a,c),h=pj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:zs(f),request:b};if(!sj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=zs(e),wj(k);const l=g.headers.get(ra);yj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),r=new at(m,!b.disableMergedFragments);k.data=yield Rs(r,n,(u,v)=>{if(d.Mc)return null;
|
|
315
|
+
v&&v.data&&(zj(b,v.data.byteLength,zs(f)),f.a=ys());return b.onFragment&&v?b.rateLimitBps?Aj(b.rateLimitBps,zs(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),r=yield Ks(new bt(m),n,b);b.rateLimitBps&&(yield Aj(b.rateLimitBps,zs(e),r.byteLength));k.data=r}if(d.Mc)throw Error("Request was aborted");k.timeMs=zs(e);return vj(k)}catch(g){if(d.Mc)throw new _.H(1,1,7001,{url:a,request:b});if(d.fg)throw new _.H(1,1,1003,{url:a,request:b});if(g&&
|
|
316
|
+
1001===g.code)throw g;_.qh("Error while fetching data:",g);throw new _.H(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};dt=function(a){try{const b=a.uris[a.uriIndex],c=_.ct(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()}}};
|
|
317
|
+
_.ct=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.qh("Bad data URI, failed to parse scheme"),new _.H(_.F,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.qh("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.F,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?_.cj(a).buffer:_.Ri(a).buffer,contentType:c}};
|
|
318
|
+
_.ft=function(a,b){a=_.rk(_.sk(a),_.tk(a));_.et[a]=b};_.gt=function(a){a=_.rk(_.sk(a),_.tk(a));return _.et[a]||null};_.ht=function(a){a=_.rk(_.sk(a),_.tk(a));delete _.et[a]};_.mt=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case it:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case jt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case kt:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case lt:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ge}};
|
|
319
|
+
Pg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Qg=typeof Object.defineProperties==_.be?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
|
320
|
+
Rg("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=Pg.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=
|
|
321
|
+
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 _.He:var h=null!=g;break a;case _.be:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
|
|
322
|
+
b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.be?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
|
|
323
|
+
g.sd(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(r,u){return typeof r==_.be?function(v){try{l(r(v))}catch(z){m(z)}}:u}var l,m,n=new b(function(r,u){l=r;m=u});this.sd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.sd=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: "+
|
|
324
|
+
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=Og(g),m=l.next();!m.done;m=l.next())d(m.value).sd(h,k)})};b.all=function(g){var h=Og(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(z){r[v]=z;u--;0==u&&l(r)}}var r=[],u=0;do r.push(void 0),u++,d(k.value).sd(n(r.length-1),m),k=h.next();while(!k.done)})};return b});var Tg=this||self;
|
|
325
|
+
Tg.a=!0;_.y("clpp.utils.obj.cloneItem",_.Wg);_.y("clpp.utils.obj.merge",_.Vg);var lh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.y("clpp.log.Level",lh);var jh=3,ih={},nt=[];_.y("clpp.log.getLoggers",function(){return _.Wg(ih)});_.y("clpp.log.addInterceptor",function(a){a&&nt.push(a)});_.y("clpp.log.removeInterceptor",function(a){a&&(a=nt.indexOf(a),0<=a&&nt.splice(a,1))});_.y("clpp.log.getTagLevel",kh);_.y("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=ih[a]});_.y("clpp.log.setTagLevel",function(a,b){a&&(_.bh(b)&&(b=mh(b)),ih[a]=b)});
|
|
326
|
+
_.y("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.bh(a)&&(a=mh(a));jh=a});_.y("clpp.log.getLogLevel",function(){return jh});
|
|
327
|
+
_.S=class{constructor(a){(this.tag=a)&&void 0===ih[a]&&(ih[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=kh(this.tag);if(0<=d){if(d<c)return}else if(jh<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,
|
|
328
|
+
arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of nt)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)}Gg(a){return a?
|
|
329
|
+
this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.y("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.Gg;_.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 nh=new _.S("clpp");_.y("clpp.log.info",_.oh);_.y("clpp.log.debug",_.ph);_.y("clpp.log.warn",_.C);_.y("clpp.log.error",_.qh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var sr;sr=class{constructor(a,b){this.Ca=a;this.sourceIndex=b}};_.sh=new _.S("clpp.players");_.rh={};_.ot=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={}}};var pt,qt;pt=class{constructor(a,b,c,d){this.f=a;this.uc=b;this.a=c;this.Dh=!!d}Ta(a){try{this.uc.handleEvent?this.uc.handleEvent(a):this.uc.call(this.a,a)}catch(b){_.qh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
|
|
330
|
+
_.D=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(){}};
|
|
331
|
+
qt=class{constructor(a){this.a=new _.ot;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].Ta(a),b[c].Dh&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new pt(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new pt(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].uc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var rt;_.st=class{constructor(){this.a=new _.ot}release(){_.wh(this)}on(a,b,c,d=!1){a=new rt(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))}}};rt=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var tt=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.st;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.x(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.At=class{constructor(a,b,c,d){d=void 0===d?_.ut:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.vt;this.writingMode=_.wt;this.lineInterpretation=_.xt;this.line=null;this.lineAlign=_.yt;this.direction=zt;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Ac(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
|
|
332
|
+
a.payloadType}};_.y("clpp.text.Cue",_.At);_.At.positionAlign={LEFT:_.le,RIGHT:_.me,CENTER:_.cd,AUTO:"auto"};_.ut="text";_.At.payloadType={TEXT:_.ut,VTT_XML:_.yg,TTML_XML:_.cg};_.vt=_.cd;_.Bt={LEFT:_.ie,RIGHT:_.Df,CENTER:_.vt,START:_.ie,END:_.Df};_.At.textAlign=_.Bt;var zt="ltr";_.At.direction={HORIZONTAL_LEFT_TO_RIGHT:zt,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.wt="horizontal-tb";_.At.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.wt,VERTICAL_LEFT_TO_RIGHT:_.ng,VERTICAL_RIGHT_TO_LEFT:_.og};_.xt=0;
|
|
333
|
+
_.At.lineInterpretation={LINE_NUMBER:_.xt,PERCENTAGE:1};_.yt=_.Qf;_.Ct={CENTER:_.cd,START:_.yt,END:_.Xd};_.At.lineAlign=_.Ct;_.Ft=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Dt;this.scroll=Et;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.y("clpp.text.CueRegion",_.Ft);_.Dt=1;_.Ft.units={PX:0,PERCENTAGE:_.Dt,LINES:2};var Et="";
|
|
334
|
+
_.Ft.scrollMode={NONE:Et,UP:"up"};_.Ft.displayAlign={BEFORE:"flex-end",CENTER:_.cd,AFTER:"flex-start"};_.Ft.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.rd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Gt=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.st;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,_.vc,b=>ci(this,b)),this.a.on(this.f,ed,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Kf&&(d.mode=
|
|
335
|
+
_.de)}}}))}o(a){const b=new _.At(a.startTime,a.endTime,a.text,_.yg);if(_.bh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.ng;break;case "rl":b.writingMode=_.og}_.ch(a.size)&&(b.size=a.size);if(_.bh(a.align))switch(a.align){case _.ie:case _.Qf:b.textAlign=_.ie;break;case _.cd:b.textAlign=_.vt;break;case _.Df:case _.Xd:b.textAlign=_.Df}_.ch(a.position)&&(b.position=a.position);if(_.bh(a.positionAlign))switch(a.positionAlign){case _.le:b.positionAlign=_.le;break;case _.cd:b.positionAlign=
|
|
336
|
+
_.cd;break;case _.me:b.positionAlign=_.me}_.ch(a.line)&&(b.line=a.line);if(_.bh(a.lineAlign))switch(a.lineAlign){case _.Qf:b.lineAlign=_.yt;break;case _.cd:b.lineAlign=_.cd;break;case _.Xd:b.lineAlign=_.Xd}typeof a.snapToLines===_.Qc&&(b.lineInterpretation=a.snapToLines?_.xt:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(di(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.bh(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=di(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.y("clpp.Error",_.H);_.F=2;_.H.Severity={RECOVERABLE:1,FATAL:_.F};
|
|
337
|
+
_.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
|
|
338
|
+
_.H.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
|
|
337
339
|
TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
|
|
338
340
|
MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,
|
|
339
341
|
DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
|
|
@@ -342,64 +344,65 @@ HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEAT
|
|
|
342
344
|
NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,
|
|
343
345
|
INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,
|
|
344
346
|
YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,
|
|
345
|
-
SESSIONS_INVALID_CONFIGURATION:15E3};_.
|
|
346
|
-
|
|
347
|
-
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ha=d:c=""!==a.a.toString();c?_.
|
|
348
|
-
_.
|
|
349
|
-
_.
|
|
350
|
-
|
|
347
|
+
SESSIONS_INVALID_CONFIGURATION:15E3};_.gi=class extends Error{constructor(a,b){super(a);this.code=b}};var pi=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Mg=_.ji.prototype;Mg.tb="";Mg.qc="";Mg.jb="";Mg.Ic=null;Mg.Ha="";Mg.jc="";Mg.toString=function(){var a=[],b=this.tb;b&&a.push(si(b,Ht,!0),":");if(b=this.jb){a.push("//");var c=this.qc;c&&a.push(si(c,Ht,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ic;null!=b&&a.push(":",String(b))}if(b=this.Ha)this.jb&&"/"!=b.charAt(0)&&a.push("/"),a.push(si(b,"/"==b.charAt(0)?It:Jt,!0));(b=this.a.toString())&&a.push("?",b);(b=this.jc)&&a.push("#",si(b,Kt));return a.join("")};
|
|
348
|
+
Mg.resolve=function(a){var b=new _.ji(this);"data"===b.tb&&(b=new _.ji);var c=!!a.tb;c?ki(b,a.tb):c=!!a.qc;c?b.qc=a.qc:c=!!a.jb;c?_.li(b,a.jb):c=null!=a.Ic;var d=a.Ha;if(c)mi(b,a.Ic);else if(c=!!a.Ha){if("/"!=d.charAt(0))if(this.jb&&!this.Ha)d="/"+d;else{var e=b.Ha.lastIndexOf("/");-1!=e&&(d=b.Ha.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
|
|
349
|
+
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ha=d:c=""!==a.a.toString();c?_.ni(b,oi(a.a)):c=!!a.jc;c&&(b.jc=a.jc);return b};var Ht=/[#\/\?@]/g,Jt=/[#\?:]/g,It=/[#\?]/g,ti=/[#\?@]/g,Kt=/#/g;_.ri.prototype.a=null;_.ri.prototype.h=null;_.ri.prototype.add=function(a,b){_.vi(this);this.f=null;var c=this.a.hasOwnProperty(a)&&this.a[a];c||(this.a[a]=c=[]);c.push(b);null!==this.h&&this.h++;return this};
|
|
350
|
+
_.ri.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var wi;_.G="text";_.Lt=1/15;wi={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/]};wi[_.G]=[/^vtt$/,/^wvtt/,/^stpp/];var Mt;Mt={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.dk=(a,b)=>{const c=Mt[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===_.G?"":null};_.Nt={text:{mp4:Cc,m4s:Cc,m4i:Cc,cmft:Cc,vtt:_.Zf,ttml:_.Fc},video:{mp4:_.tg,m4s:_.tg,m4i:_.tg,m4v:_.tg,cmfv:_.tg,ts:_.sg},audio:{mp4:_.Lc,m4s:_.Lc,m4i:_.Lc,m4a:_.Lc,cmfa:_.Lc,ts:_.sg,aac:_.Ic,ec3:_.Kc,ac3:_.Jc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.gk=(a,b,c)=>a.map(d=>{d=_.Ot(d)||"";return d=(d=_.Nt[b][d])?d:b===_.G?c&&"vtt"!==c?Cc:_.Zf:null}).filter(Boolean)[0]||null;
|
|
351
|
+
_.Ot=a=>{a=(new _.ji(a)).Ha.split(".");return 1>=a.length?null:a.pop()};_.kj=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)}};
|
|
352
|
+
_.jj=class{constructor(a,b){this.name=a;this.value=b}};var yi=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",
|
|
353
|
+
"cs"],["dan","da"],["deu","de"],[_.Hd,"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",
|
|
351
354
|
"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",
|
|
352
355
|
"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",
|
|
353
356
|
"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",
|
|
354
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var
|
|
355
|
-
_.
|
|
356
|
-
_.
|
|
357
|
-
this.f.filter(b=>b!==a)}
|
|
358
|
-
d.then(g=>{if(e.a)throw new _.
|
|
359
|
-
if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.
|
|
360
|
-
_.
|
|
361
|
-
_.
|
|
362
|
-
a.roles)
|
|
363
|
-
renditions size: ${this.renditions.length}`}};_.
|
|
364
|
-
_.
|
|
365
|
-
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
|
|
366
|
-
_.
|
|
367
|
-
_.T.prototype.setVideoRendition=_.T.prototype.
|
|
368
|
-
_.T.prototype.getTextRendition=_.T.prototype.
|
|
369
|
-
var
|
|
357
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Pt=class{};_.y("clpp.utils.BufferUtils",Pt);Pt.toArrayBuffer=Li;Pt.toDataView=_.Ki;Pt.toInt32Array=_.Ji;Pt.toUint32Array=Ii;Pt.toUint16Array=Hi;Pt.toUint8Array=_.K;Pt.equal=Fi;var Oi=new _.S("clpp.utils.strings");_.y("clpp.utils.strings.fromUtf8",_.Ni);_.y("clpp.utils.strings.fromBytesAutoDetect",_.Qi);_.y("clpp.utils.strings.toUtf8",_.Ri);_.y("clpp.utils.strings.toUtf16",_.Si);_.y("clpp.utils.strings.toByteArray",_.Ti);_.y("clpp.utils.strings.startsWith",_.Ui);_.y("clpp.utils.strings.endsWith",_.Vi);_.y("clpp.utils.strings.bitrateToString",_.Yi);
|
|
358
|
+
_.y("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)))});
|
|
359
|
+
_.y("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 Zi=document.createElement("span");var Qt=class{};_.y("clpp.utils.Uint8ArrayUtils",Qt);Qt.toStandardBase64=_.aj;Qt.concat=_.gj;Qt.equal=_.fj;Qt.toHex=_.ej;Qt.fromHex=_.dj;Qt.fromBase64=_.cj;Qt.toBase64Url=_.bj;_.Rt=new _.S("clpp.hls.Utils");_.ij=class{constructor(a){this.f=a;this.a=0}};_.St=new Set([_.Ca,_.Da,"EXT-X-I-FRAMES-ONLY",_.Ga,_.Ha,_.Ia,_.La,_.Ma]);_.Tt=new Set(["EXTINF",_.ya,_.Ba,_.Ea,_.Fa,_.Ka]);_.Ut=new Set(["EXT-X-PART",_.Ja]);_.Vt=new Set([_.za]);var mj=[403,401];_.y("clpp.net.DEFAULT_FATAL_STATUS_CODES",mj);_.y("clpp.net.makeRequest",_.rj);_.qj=6;_.y("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.qj,CONTENT_STEERING:7});_.Mn=class{constructor(){this.$f=this.Qd=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.Qd=!0;this.value=f;d(f)};b=function(f){this.done=this.$f=!0;this.error=f;e(f)}});c.Qd=!1;c.done=!1;c.$f=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.$o=class{constructor(a,b){this.U=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.Wt=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)}};_.Yq=class{constructor(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.Wt;this.a={};this.headers=new Map;this.l=0;this.a.data=dt;!window.fetch||!window.AbortController||_.Ck(6)||_.Fk()&&68<_.$k().browserVersion.major?(this.a.http=Ms,this.a.https=Ms):(this.a.http=Zs,this.a.https=Zs)}Oh(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.l=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.f=[];this.h=[];return this.o.destroy()}Vd(a){this.f.push(a)}tc(a){this.h.push(a)}Fe(a){this.f=
|
|
360
|
+
this.f.filter(b=>b!==a)}jd(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.w)return new Xt(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;Fj(this,a);b=[];for(var c of this.h)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Mn;try{for(const f of a.requestModifiers)d=
|
|
361
|
+
d.then(g=>{if(e.a)throw new _.H(_.F,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1006,null,g);});d=d.then(f=>({request:f,plugin:Gj(this,f)}));e=new Xt(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.F,1,7001,g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.H&&g.data&&g.data.response){const h=f(g.data.response);
|
|
362
|
+
if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1007,null,g);});for(const f of this.j)e.catch(g=>{g instanceof _.H&&g.data&&g.data.response||f({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1007,null,g);});_.Cj(this.o,e);c.resolve(a);return e}catch(f){return new Xt(Promise.reject(f))}}};
|
|
363
|
+
_.y("clpp.net.NetworkEngine",_.Yq);_.Yq.prototype.fetch=_.Yq.prototype.fetch;_.Yq.prototype.removeResponseModifier=_.Yq.prototype.jd;_.Yq.prototype.removeRequestModifier=_.Yq.prototype.Fe;_.Yq.prototype.addResponseModifier=_.Yq.prototype.tc;_.Yq.prototype.addRequestModifier=_.Yq.prototype.Vd;_.Yq.prototype.setRateLimit=_.Yq.prototype.Oh;var Kj;
|
|
364
|
+
_.Nj=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=[]}Ac(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&&$h(this.roles,
|
|
365
|
+
a.roles)&&$h(this.accessibility,a.accessibility,Ij)}toString(){return`Track type: ${this.type} id: ${this.id}
|
|
366
|
+
renditions size: ${this.renditions.length}`}};_.y("clpp.Track",_.Nj);_.Nj.prototype.toString=_.Nj.prototype.toString;_.Vj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Kc=this.bandwidth=this.height=this.width=null}};_.y("clpp.Rendition",_.Vj);_.Mj=1;_.N=_.w;_.M=_.p;_.L="text";Kj=_.Ae;_.Yt={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:Kj};_.Nj.Type=_.Yt;_.nm=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;
|
|
367
|
+
_.Ui(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.y("clpp.utils.url.queryString",_.Qj);var Zt=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=ei(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield Tj(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 Xj(c,d,
|
|
368
|
+
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 Zj(d);e.Fc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.hk=[];_.T=class{Zd(){return!0}Pg(a){return this.getVideoTracks().find(b=>_.dh(b,a,a&&Object.keys(a)))}Lg(a){return this.getAudioTracks().find(b=>_.dh(b,a,a&&Object.keys(a)))}Ng(a){return this.ja().find(b=>_.dh(b,a,a&&Object.keys(a)))}Og(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.dh(b,a,a&&Object.keys(a)))}Kg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.dh(b,a,a&&Object.keys(a)))}Mg(a){return this.ja().flatMap(b=>b.renditions).find(b=>_.dh(b,a,a&&Object.keys(a)))}};
|
|
369
|
+
_.y("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.sa;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.Mg;_.T.prototype.findAudioRendition=_.T.prototype.Kg;_.T.prototype.findVideoRendition=_.T.prototype.Og;_.T.prototype.findTextTrack=_.T.prototype.Ng;_.T.prototype.findAudioTrack=_.T.prototype.Lg;_.T.prototype.findVideoTrack=_.T.prototype.Pg;_.T.prototype.setTextRendition=_.T.prototype.vb;_.T.prototype.setAudioRendition=_.T.prototype.ub;
|
|
370
|
+
_.T.prototype.setVideoRendition=_.T.prototype.fb;_.T.prototype.setTextTrack=_.T.prototype.Sa;_.T.prototype.setAudioTrack=_.T.prototype.wa;_.T.prototype.setVideoTrack=_.T.prototype.wb;_.T.prototype.getTextTrack=_.T.prototype.va;_.T.prototype.getAudioTrack=_.T.prototype.na;_.T.prototype.getVideoTrack=_.T.prototype.Ga;_.T.prototype.getLoadingTextRendition=_.T.prototype.Ab;_.T.prototype.getLoadingAudioRendition=_.T.prototype.zb;_.T.prototype.getLoadingVideoRendition=_.T.prototype.ob;
|
|
371
|
+
_.T.prototype.getTextRendition=_.T.prototype.Ra;_.T.prototype.getAudioRendition=_.T.prototype.Wa;_.T.prototype.getVideoRendition=_.T.prototype.ka;_.T.prototype.getTextTracks=_.T.prototype.ja;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.Zd;var lk=new Map,kk=1,pk=2,ok=3,nk=4;_.$t=(new Map).set(_.qd,_.qd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Gg,_.Gg).set(_.ce,_.ce).set("channelsCount","channels");_.au=class{constructor(a){this.f=a;this.a=null}fa(a){return uk(this,a,!1)}xb(a){return uk(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.yk=class{constructor(a){this.f=a;this.a=null}Qe(){this.stop();this.f();return this}fa(a){this.stop();this.a=(new _.au(()=>{this.f()})).fa(a);return this}xb(a){this.stop();this.a=(new _.au(()=>{this.f()})).xb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.y("clpp.utils.Timer",_.yk);_.yk.prototype.stop=_.yk.prototype.stop;_.yk.prototype.tickEvery=_.yk.prototype.xb;_.yk.prototype.tickAfter=_.yk.prototype.fa;_.yk.prototype.tickNow=_.yk.prototype.Qe;var bu=class{};_.y(pd,bu);bu.getInfo=_.$k;
|
|
372
|
+
var xk=null,wk=null,Pk=new _.S(pd),Tk="android",Sk="ios",Yk="linux",Uk="osx",Vk="windows",Wk="tizen",Xk="webos",Rk=_.fg,Zk=_.fg,Kk={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,
|
|
370
373
|
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,
|
|
371
374
|
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},
|
|
372
|
-
webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.
|
|
373
|
-
b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.L,g=a===_.M||e,h=b.target,k=c.h.find(n=>
|
|
374
|
-
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 _.
|
|
375
|
-
g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(
|
|
376
|
-
this.h.find(e=>
|
|
377
|
-
_.
|
|
378
|
-
null}
|
|
379
|
-
b.o[c]=a;
|
|
380
|
-
U.prototype.setAudioRendition=U.prototype.ub;U.prototype.setVideoRendition=U.prototype.
|
|
381
|
-
U.prototype.getTextRendition=U.prototype.
|
|
382
|
-
1)}
|
|
383
|
-
"";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.
|
|
384
|
-
_.
|
|
385
|
-
_.
|
|
386
|
-
_.
|
|
387
|
-
_.
|
|
388
|
-
_.
|
|
389
|
-
_.
|
|
390
|
-
_.
|
|
391
|
-
_.
|
|
392
|
-
c!==_.
|
|
393
|
-
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||""};
|
|
394
|
-
else if(this.C.getMedia().pause(),this.getState()===_.
|
|
395
|
-
return new _.
|
|
396
|
-
(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.
|
|
397
|
-
l.type+" event. Seek completed:",
|
|
398
|
-
(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.
|
|
399
|
-
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===_.
|
|
400
|
-
1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.
|
|
401
|
-
a.type+"' with playhead at: "+c;if(a.type===_.
|
|
402
|
-
break;case _.
|
|
375
|
+
webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.st;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.L);this.R=this.F.bind(this,_.L);this.O=this.C.bind(this,_.L);this.S=this.B.bind(this,_.N);this.W=this.F.bind(this,_.N);this.V=this.C.bind(this,_.N);this.J=this.B.bind(this,_.M);this.L=this.F.bind(this,_.M);this.K=this.C.bind(this,_.M);this.j=null}Zd(){return!_.Mk()}B(a,
|
|
376
|
+
b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.L,g=a===_.M||e,h=b.target,k=c.h.find(n=>al(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Oj(a,d),m=bl(d);if(f){if(d.kind===_.Ae)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(r=>al(l,r,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.Ac);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.dh(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
|
|
377
|
+
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 _.Vj(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;el(c,a,n)?yield fl(c,l,n):gl(c,a,n)&&(yield hl(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.D(_.cu));const r=il(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${r}`,d);c.a.set(a,l)};m?f():1===r&&
|
|
378
|
+
g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(jb)}else c.g.warn(gb)})}F(a,b){if(b){var c=b.track;c?a===_.L&&c.kind!==_.Ae&&(b=this.h.find(d=>al(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),jl(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(jb)}else this.g.warn(gb)}C(a,b){this.g.debug(a+" Track changed",b);a===_.L&&jl(this);const c=ll(this,a);if(c)for(let d=0;d<c.length;++d)if(bl(c[d])){if(b=
|
|
379
|
+
this.h.find(e=>al(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.M?this.m.trigger(new _.D(_.ol)):a===_.L&&this.m.trigger(new _.D(_.pl));break}}initialize(a){this.m=a;this.j=new Zt(a.getNetworkEngine())}load(){this.A=!1;var a=kl(this,_.L);a&&(this.f.on(a,_.vc,this.M),this.f.on(a,Af,this.R),this.f.on(a,ed,this.O));if(a=kl(this,_.M))this.f.on(a,_.vc,this.J),this.f.on(a,Af,this.L),this.f.on(a,ed,this.K);if(a=kl(this,_.N))this.f.on(a,
|
|
380
|
+
_.vc,this.S),this.f.on(a,Af,this.W),this.f.on(a,ed,this.V);this.f.one(this.m,Vc,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 il(this,_.N)}getAudioTracks(){return il(this,_.M)}ja(){return il(this,_.L)}ka(){const a=this.a.get(_.N)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
|
|
381
|
+
null}Wa(){return ml(this,_.M)}Ra(){return ml(this,_.L)}ob(){return nl(this,_.N)}zb(){return nl(this,_.M)}Ab(){return nl(this,_.L)}Ga(){return this.a.get(_.N)||null}na(){return this.a.get(_.M)||null}va(){return this.a.get(_.L)||null}wb(a){ql(this,_.N,a)}wa(a){ql(this,_.M,a)}Sa(a){ql(this,_.L,a)}fb(a){ql(this,_.N,a&&a.track)}ub(a){ql(this,_.M,a&&a.track)}vb(a){ql(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
|
|
382
|
+
b.o[c]=a;rl(b,a,c)}else yield sl(b,a)})}sa(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();ul(a,_.M,b.preferredAudioLanguage);if(!ll(a,_.L).some(c=>bl(c))){const c=kl(a,_.L);yield new Promise(d=>{a.f.one(c,ed,d);(new _.yk(d)).fa(1)})}a.A||ul(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.sa;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.vb;
|
|
383
|
+
U.prototype.setAudioRendition=U.prototype.ub;U.prototype.setVideoRendition=U.prototype.fb;U.prototype.setTextTrack=U.prototype.Sa;U.prototype.setAudioTrack=U.prototype.wa;U.prototype.setVideoTrack=U.prototype.wb;U.prototype.getTextTrack=U.prototype.va;U.prototype.getAudioTrack=U.prototype.na;U.prototype.getVideoTrack=U.prototype.Ga;U.prototype.getLoadingTextRendition=U.prototype.Ab;U.prototype.getLoadingAudioRendition=U.prototype.zb;U.prototype.getLoadingVideoRendition=U.prototype.ob;
|
|
384
|
+
U.prototype.getTextRendition=U.prototype.Ra;U.prototype.getAudioRendition=U.prototype.Wa;U.prototype.getVideoRendition=U.prototype.ka;U.prototype.getTextTracks=U.prototype.ja;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.Zd;_.du=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(Kb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Kb);}Na(){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)}ha(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
|
|
385
|
+
1)}Fb(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}Ba(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.ha(),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=
|
|
386
|
+
"";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.y("clpp.BufferInfo",_.du);_.du.prototype.bufferedAheadOf=_.du.prototype.Ba;_.du.prototype.isBuffered=_.du.prototype.Fb;_.du.prototype.bufferEnd=_.du.prototype.ha;_.du.prototype.bufferStart=_.du.prototype.Na;_.du.prototype.end=_.du.prototype.end;_.du.prototype.start=_.du.prototype.start;_.eu=class{constructor(){this.Rc=new qt(this);this.Pc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Rc.on(a,b,c)}one(a,b,c){return this.Rc.one(a,b,c)}off(a,b){return this.Rc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Pc.indexOf(a)||this.Pc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Pc.indexOf(a),0<=a&&this.Pc.splice(a,1))}trigger(a){this.Rc.trigger(a);for(const b of this.Pc)b.dispatchEvent(a)}};
|
|
387
|
+
_.eu.prototype.off=_.eu.prototype.off;_.eu.prototype.one=_.eu.prototype.one;_.eu.prototype.on=_.eu.prototype.on;_.eu.prototype.removeEventListener=_.eu.prototype.removeEventListener;_.eu.prototype.addEventListener=_.eu.prototype.addEventListener;_.y("clpp.events.ERROR",_.q);_.y("clpp.events.LOADEDMETADATA",_.ue);_.y("clpp.events.BUFFERING_ENDED",_.Rc);_.y("clpp.events.BUFFERING_STARTED",_.Sc);_.y("clpp.events.STATE_CHANGED",_.Rf);_.ol="audiotrackchanged";_.y("clpp.events.AUDIO_TRACK_CHANGED",_.ol);_.pl="texttrackchanged";_.y("clpp.events.TEXT_TRACK_CHANGED",_.pl);_.y("clpp.events.VIDEO_TRACK_CHANGED",_.vg);_.y("clpp.events.BITRATE_CHANGED",_.Pc);_.cu="tracksadded";_.y("clpp.events.TRACKS_ADDED",_.cu);_.y("clpp.events.LOAD_START",ve);
|
|
388
|
+
_.y("clpp.events.RELEASING",_.zf);_.y("clpp.events.RELEASED",yf);_.y("clpp.events.DESTROYING","destroying");_.y("clpp.events.DESTROYED","destroyed");_.y("clpp.events.VIDEO_BUFFER_CHANGED",_.ug);_.y("clpp.events.AUDIO_BUFFER_CHANGED",_.Nc);_.y("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.y("clpp.events.DRM_SESSION_CREATED",Qd);_.y("clpp.events.DRM_SESSION_UPDATE",_.Sd);_.y("clpp.events.DRM_SESSION_PERSISTED",_.Rd);_.y("clpp.events.DRM_RENEWAL_STARTED",Pd);
|
|
389
|
+
_.y("clpp.events.DRM_EXPIRATION_UPDATE",_.Md);_.y("clpp.events.DRM_LICENSE_REQUESTED",Nd);_.y("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Oc);_.y("clpp.events.PLAY",_.We);_.y("clpp.events.SEEKING",_.Jf);_.y("clpp.events.SEEKED",_.If);_.y("clpp.events.USER_SEEKING",_.kg);_.y("clpp.events.USER_SEEKED",_.jg);_.Jo={SEEKING:1,NO_DATA:2};_.y("clpp.events.BufferingReasons",_.Jo);_.y("clpp.events.ADS_TIMELINE_CHANGED",_.wc);_.y("clpp.events.AD_LOADED",_.lc);_.y("clpp.events.AD_BREAK_STARTED",_.bc);
|
|
390
|
+
_.y("clpp.events.AD_STARTED",_.sc);_.y("clpp.events.AD_BUFFERING",_.dc);_.y("clpp.events.AD_PROGRESS",_.oc);_.y("clpp.events.AD_FIRST_QUARTILE",_.gc);_.y("clpp.events.AD_MIDPOINT",_.mc);_.y("clpp.events.AD_THIRD_QUARTILE",_.uc);_.y("clpp.events.AD_PAUSED",_.nc);_.y("clpp.events.AD_RESUMED",_.pc);_.y("clpp.events.AD_SKIPPED",_.rc);_.y("clpp.events.AD_CLICKED",_.ec);_.y("clpp.events.AD_IMPRESSION",_.kc);_.y("clpp.events.AD_COMPLETED",_.fc);_.y("clpp.events.AD_STOPPED",_.tc);
|
|
391
|
+
_.y("clpp.events.AD_BREAK_STOPPED",_.cc);_.y("clpp.events.AD_HLS_ASSET_LIST_REQUEST",hc);_.y("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",ic);_.y("clpp.events.AD_HLS_RESOLVED",jc);_.y("clpp.events.SIMID_CREATIVE_STARTED",_.Lf);_.y("clpp.events.SIMID_CREATIVE_STOPPED",_.Mf);_.y("clpp.events.CASTING_STARTED",_.Zc);_.y("clpp.events.CASTING_ENDED","castingended");_.y("clpp.events.CAST_STATUS_CHANGED",_.$c);_.y("clpp.events.AIRPLAY_STATUS_CHANGED",_.zc);_.y("clpp.events.AIRPLAY_CASTING_STARTED",_.yc);
|
|
392
|
+
_.y("clpp.events.AIRPLAY_CASTING_ENDED",_.xc);_.Wh="timeline-cue-added";_.y("clpp.events.TIMELINE_CUE_ADDED",_.Wh);_.Ph="timeline-cue-enter";_.y("clpp.events.TIMELINE_CUE_ENTER",_.Ph);_.Qh="timeline-cue-exit";_.y("clpp.events.TIMELINE_CUE_EXIT",_.Qh);_.Oh="timeline-cues-changed";_.y("clpp.events.TIMELINE_CUES_CHANGED",_.Oh);_.y("clpp.events.MPD_TYPE_CHANGED",_.Ee);_.y("clpp.events.LIVE_TURNED_STATIC",_.oe);_.y("clpp.events.VIMOND_RESPONSE",_.wg);_.y("clpp.events.PLAYLIST_ITEM_CHANGED",_.hf);
|
|
393
|
+
_.y("clpp.events.PLAYLIST_MODIFIED",_.jf);_.y("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Hf);_.y("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Ff);_.y("clpp.events.SC_PLAYLIST_ENDED",_.Ef);_.y("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Gf);_.y("clpp.events.CDN_SWITCH_SUCCESS",_.ad);_.y("clpp.events.ONLINE_STATUS_CHANGED",Oe);_.y("clpp.events.CMSD_EVENT","cmsd-event");_.y("clpp.events.YOSPACE_SESSION_STARTED",_.Lg);_.y("clpp.events.YOSPACE_SESSION_ENDED",_.Kg);
|
|
394
|
+
_.y("clpp.events.CONTENT_STEERING_CHANGE",_.Ad);_.y("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.Bd);var vl=["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"];_.y("clpp.version",_.da);_.y("clpp.name",_.pa);_.tl="application/x-mpegurl";_.y("clpp.Type",{DASH:_.Bc,HLS:_.tl,SMOOTH_STREAMING:_.Gc,MP4:_.tg,MP3:"audio/mp3"});_.Ih="scte35";_.Jh="hls-daterange";_.y("clpp.TimelineCueType",{SCTE35:_.Ih,DASH_CALLBACK:_.Fe,HLS_DATERANGE:_.Jh,UNKNOWN:_.fg});_.y("clpp.SpeedUpMode",{DECODER:_.Ed,SEEK:"seek"});_.y("clpp.CodecSwitchingStrategy",{PREVENT:_.tf,SMOOTH:_.Of});var fu=class{};_.y("clpp.utils.PlayerConfiguration",fu);fu.create=_.Bl;var gu=["abort",Uc,Vc,Ud,"emptied",Wd,_.Yd,_.q,"interruptbegin","interruptend",_.te,_.ue,ve,"mozaudioavailable",_.Se,_.We,_.gf,_.vf,_.xf,_.If,_.Jf,Pf,"suspend",_.ag,"volumechange",_.zg,_.Ag,_.Cf,Fg,Eg,Cg,Dg];_.hu=class extends _.eu{constructor(a){super();this.log=new _.S(a);this.configuration=this.ca=_.zl();this.da=this.C=null;this.Xc=this.Ce=!1;this.af=new _.S("clpp.video.events");this.hb=null;this.Bd=-1;this.sg=this.pg.bind(this);this.xe=new _.Yq;this.L=new _.st;this.pe=this.vc=this.zc=this.O=null}init(a,b){this.configuration=this.ca=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 gu)this.L.on(a,c,this.sg,
|
|
395
|
+
c!==_.q);this.hb||(this.hb=this.ig());this.hb.initialize(this);this.C.showMediaElement()}release(){this.O&&(this.O.destroy(),this.O=null);return Promise.resolve()}destroy(){this.L.release();return this.xe.release()}canPlay(a,b){return _.rh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.mb)}appendLoad(){return Promise.reject(_.mb)}seekWith(){return Promise.reject(_.mb)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}play(){if(!this.da)return Promise.reject("No sources specified yet. You need to load content before calling play.");
|
|
396
|
+
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||""};wl(c)?(this.trigger(new _.D(_.Oc)),this.log.warn(_.ia)):c.name===nb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.da?new Promise((a,b)=>{const c=this.getState();if(c!==_.Ho&&c!==_.Do&&c!==_.Oo&&c!==_.No)b(new _.H(_.F,7,3201,"The player state does not allow pause."));
|
|
397
|
+
else if(this.C.getMedia().pause(),this.getState()===_.Oo)this.L.one(this,_.Rf,()=>{a()});else a()}):Promise.reject(new _.H(_.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.zc=a}setCdnErrorCallback(a){this.vc=a}Cc(){return this.zc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
|
|
398
|
+
return new _.du(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!==_.t||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)?
|
|
399
|
+
(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.D(_.kg));this.L.on(c,_.If,h);this.L.on(c,_.ag,h);this.L.on(c,_.vf,h);this.log.info("Seeking to "+a+". Delta "+d);this.Xc=this.Ce=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var r=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.If,z=l.type===_.vf,A=l.type===_.ag,E=z&&u;r=v||n&&E||A&&r;this.log.debug("Checking seeking state after "+
|
|
400
|
+
l.type+" event. Seek completed:",r,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",z,"ReadyState:",u,"Progress Ready:",E);r?(this.Xc=this.Ce=!1,this.L.off(c,_.If,h),this.L.off(c,_.ag,h),this.L.off(c,_.vf,h),this.$e(),this.trigger(new _.D(_.jg)),e()):z&&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,_.ue,g)};this.getState()===_.Lo?
|
|
401
|
+
(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Rf,()=>{switch(this.getState()){case _.Ho:case _.Oo:case _.No: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?_.ch(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
|
|
402
|
+
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===_.Qc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.da?this.C.getMedia().duration:-1}getTrackManager(){return this.hb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
|
|
403
|
+
1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Bd=a}getSourceIndex(){return this.Bd}getLoadedSource(){return this.da&&-1!==this.Bd?this.da[this.Bd]:null}getPeriods(){return[]}getNetworkEngine(){return this.xe}setNetworkEngine(a){this.xe=a}setCmsdManager(a){this.pe=a}getTextDisplayer(){return this.O}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}pg(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
|
|
404
|
+
a.type+"' with playhead at: "+c;if(a.type===_.ag||a.type===_.vf)this.af.debug(d);else{let e="";switch(a.type){case _.xf:e=`Rate: ${this.getPlaybackRate()}`;break;case Ud:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.We:case _.gf:case "suspend":case _.zg:case Pf:case _.Jf:case _.If:case _.ag:case _.vf:case Uc:case Vc:b=this.getBufferInfo().Ba(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
|
|
405
|
+
break;case _.Cf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.af.info(d)}a.type!==_.q&&this.trigger(new _.D(a.type,{detail:a}))}$e(){}};var Fl;Fl=new _.S("clpp.Components");_.Dl=new Map;_.y("clpp.install",function(a){Nl(a)});_.y("clpp.uninstall",function(a){Ol(a)});var iu=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.y("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Db,SW_SECURE_DECODE:_.Eb,HW_SECURE_CRYPTO:Ua,HW_SECURE_DECODE:Va,HW_SECURE_ALL:Ta});_.y("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.y("clpp.drm.KeySystem",{NONE:_.Ge,CLEAR_KEY:_.Qe,WIDEVINE:_.yd,PLAYREADY:_.wd,FAIRPLAY:_.td,PRIMETIME:_.sd});_.Rl={};_.y("clpp.drm.registerDrmEnvironment",_.Sl);var Vl={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,
|
|
403
406
|
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,
|
|
404
407
|
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,
|
|
405
408
|
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,
|
|
@@ -413,98 +416,98 @@ break;case _.Af:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=".
|
|
|
413
416
|
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,
|
|
414
417
|
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,
|
|
415
418
|
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,
|
|
416
|
-
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]};_.
|
|
417
|
-
_.
|
|
418
|
-
this.f[f];if(h){let m=null;var k=null;this.h[f]===
|
|
419
|
-
_.
|
|
420
|
-
var
|
|
421
|
-
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"},
|
|
422
|
-
|
|
423
|
-
for(const a of Object.keys(
|
|
424
|
-
certificateRequest:_.
|
|
425
|
-
a.reader.getPosition()!==a.reader.
|
|
426
|
-
_.
|
|
427
|
-
null}destroy(){const a=this;return _.x(function*(){a.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
a.o=null);_.
|
|
432
|
-
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.
|
|
433
|
-
b.configuration);b.log.debug(_.
|
|
434
|
-
null==b.configuration.startTime&&
|
|
435
|
-
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 _.
|
|
436
|
-
a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.
|
|
437
|
-
_.
|
|
438
|
-
V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.
|
|
439
|
-
V.prototype.getClickThroughUrl=V.prototype.
|
|
440
|
-
V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.
|
|
441
|
-
Q.prototype.getVideoElement=Q.prototype.
|
|
442
|
-
Q.prototype.getMediaHeight=Q.prototype
|
|
443
|
-
Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.
|
|
444
|
-
d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.
|
|
445
|
-
HTMLMediaElement))throw new _.
|
|
446
|
-
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),_
|
|
447
|
-
|
|
448
|
-
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&&_
|
|
449
|
-
|
|
450
|
-
this;return _.x(function*(){yield Promise.all([
|
|
451
|
-
a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
this.F=null;this.I=new _.
|
|
455
|
-
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
|
|
456
|
-
this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.
|
|
457
|
-
new Promise(a=>a());this.
|
|
458
|
-
"License cannot be passed into the load method.");yield _.
|
|
459
|
-
|
|
460
|
-
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()===_.
|
|
419
|
+
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]};_.ju=class{constructor(a){this.I=a;this.f={}}Ya(a,b){this.f[a]=b}};_.y("clpp.drm.DrmEnvironment",_.ju);_.ju.prototype.setDrmSystem=_.ju.prototype.Ya;_.rm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.ch(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Oa(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Xl();this.a=a}};_.dn=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Oa(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.$l();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.$l();this.a=a}};
|
|
420
|
+
_.y("clpp.utils.dataview.DataViewReader",_.dn);_.pm=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=gm(a);this.h[a]=ku;this.f[a]=b;return this}ba(a,b){a=gm(a);this.h[a]=lu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.dn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Zl(a)&&!this.a;)this.Od(0,a,b)}Od(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.hm(f));switch(e){case 0:e=b.Oa()-d;break;case 1:e=_.dm(b),g=!0}const h=
|
|
421
|
+
this.f[f];if(h){let m=null;var k=null;this.h[f]===lu&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Oa()&&(l=b.Oa());l-=b.getPosition();b=0<l?_.fm(b,l):new Uint8Array(0);b=new _.dn(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.Oa()-b.getPosition()),b.skip(a)}};_.y("clpp.utils.Mp4Parser",_.pm);_.pm.typeToString=_.hm;
|
|
422
|
+
_.pm.allData=_.km;_.pm.sampleDescription=_.jm;_.pm.children=_.im;_.pm.prototype.parseNext=_.pm.prototype.Od;_.pm.prototype.parse=_.pm.prototype.parse;_.pm.prototype.stop=_.pm.prototype.stop;_.pm.prototype.fullBox=_.pm.prototype.ba;_.pm.prototype.box=_.pm.prototype.N;_.pm.headerSize=_.lm;var ku=0,lu=1;var mu=class{};_.y("clpp.utils.FairplayUtils",mu);mu.parseFairPlayResponse=_.xm;mu.formatFairPlayRequest=_.tm;mu.createFairplayPayload=sm;mu.extractContentId=_.om;mu.extractExtXKeyUri=mm;var Dm=new _.S("clpp.drm.DrmToday"),Nm="PRODUCTION",Om="STAGING",Pm="DEMO",Qm="TEST",nu={PRODUCTION:Nm,STAGING:Om,DEMO:Pm,TEST:Qm};_.y("clpp.drm.DrmToday.Environment",nu);_.y("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
|
|
423
|
+
var zm="/license-proxy-widevine/cenc/",Am="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Bm="/license-server-fairplay/",Rm={"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",
|
|
424
|
+
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"},ou=[Ta,Va,Ua,_.Eb,_.Db],pu=[Ta,Va,
|
|
425
|
+
Ua,_.Eb,_.Db],qu=["3000","2000","150"],ru=["2000","150"];
|
|
426
|
+
for(const a of Object.keys(nu)){let b=va;a!==Nm&&(b+=`_${a}`);const c=new _.ju(b);let d=null;switch(a){case Nm:case Om:case Pm:d=Wl("V2");break;case Qm:d=null}c.Ya(_.yd,{licenseUrl:Cm(_.yd,a),videoRobustness:ou,audioRobustness:pu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Fm,licenseResponse:_.Gm}});c.Ya(_.td,{licenseUrl:Cm(_.td,a),certificateUrl:ym(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Im,licenseResponse:_.Jm,
|
|
427
|
+
extractContentId:_.Km,certificateRequest:_.Lm}});c.Ya(_.wd,{licenseUrl:Cm(_.wd,a),videoRobustness:qu,audioRobustness:ru,modifiers:{licenseRequest:Mm}});_.Sl(c)};var su=class{};_.y("clpp.drm.eme.EmeFactory",su);var Um=[];su.Apis={STANDARD:Ab,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var bn,tu,an;_.kn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];bn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];tu=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};an=class extends tu{};_.jn=class extends tu{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 mn=!!(performance&&performance.mark&&performance.measure);var Qn=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.pm).ba("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.ej(_.fm(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.ej(_.fm(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
|
|
428
|
+
a.reader.getPosition()!==a.reader.Oa()&&_.C("Mismatch between box size and data size!")}}};var Kn,uu;
|
|
429
|
+
_.Xo=class{constructor(a){this.D=a;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=uu;this.B=new _.st;this.M=new iu;this.h=new Map;this.L=[];this.H=new _.Mn;this.ea=0;this.f=null;this.w=b=>{this.A=!0;this.F=!1;this.H.reject(b);a.onError(b)};this.o=new Map;this.X=new Map;this.V=new _.yk(()=>Bn(this));this.j=!1;this.ca=new _.Mn;this.G=!1;this.W=[];this.$=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.Y=(new _.yk(()=>{Cn(this)})).xb(1);this.H.catch(()=>{});this.A=this.F=
|
|
430
|
+
!1;this.O=null}destroy(){const a=this;return _.x(function*(){a.j?yield a.ca:(a.j=!0,yield Dn(a),a.ca.resolve())})}keySystem(){return this.a?_.rn(this.a.keySystem):""}getDrmInfo(){return this.a}za(a){const b=this;return _.x(function*(){b.G&&b.K===Kn||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.$?yield Vn(b,a):b.W.push(a))})}ya(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===_.Uf){var g=
|
|
431
|
+
f;f=e;e=g}if(qn(this.a.keySystem)&&16===f.byteLength&&_.Ak()){g=_.Ki(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!==Sf&&(c.loaded=!0);c&&c.cb&&c.cb.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.ej(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.td)&&16!==f.byteLength&&(h=Mi(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);this.o.set(f,
|
|
432
|
+
e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.ib.forEach(e=>{this.o.get(e)===Sf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Re))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Sf&&_.fj(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Re))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.cc&&
|
|
433
|
+
(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.xc&&a.xc.stop(),this.h.delete(b),b.close().catch(()=>{}));eo(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.fa(.5):Bn(this))}};Kn=0;uu=3;_.qo=new Map;_.ro=new _.S("clpp.text");var vu=class{constructor(){this.a=null;this.f=[]}};var wu=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.xu=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.h=this.w=NaN;this.a=new vu;this.B=new wu}getStats(){return{width:this.w,height:this.h,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:vo(this.a,_.Oo),pauseTime:vo(this.a,_.No),bufferingTime:vo(this.a,_.Ho),stateHistory:wo(this.a),switchHistory:xo(this.B)}}};_.yu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var zo=new _.yu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.ue],[HTMLMediaElement.HAVE_CURRENT_DATA,_.te],[HTMLMediaElement.HAVE_FUTURE_DATA,Uc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Vc]]));var Au=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.st;this.f=_.Lo;this.A=_.zu;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.Mk();this.C=!1;this.I=Date.now();Fo(this)}Ta(a,b){this.m&&this.m.trigger(new _.D(a,{detail:b}))}getState(){return Io(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.y("clpp.utils.media.detectType",Po);var So=new _.S("clpp.sources");var Bu=class extends _.hu{constructor(){super(nd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.st;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new Au(this);Co(this.j,_.Lo)}namespace(){return nd}unload(){const a=this;return _.x(function*(){if(a.da){a.log.debug("Releasing player with source",a.da);a.B&&(a.B.stop(),a.B=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.O&&(a.O.destroy(),a.O=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
|
|
434
|
+
a.o=null);_.wh(a.h);a.f&&(a.f=new _.xu);a.F=null;a.da=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Uo(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Co(this.j,_.Lo)})}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(xa);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
|
|
435
|
+
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.hb}load(a){const b=this;return _.x(function*(){if(b.w)return To();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()/1E3;b.f=new _.xu;b.h.on(b,_.Rf,()=>{b.f&&_.uo(b.f.a,b.getState())});Co(b.j,_.Mo);b.da=_.Ro(a);b.configuration=_.Bl(b.ca,a);b.log.debug(_.bb,
|
|
436
|
+
b.configuration);b.log.debug(_.tb,b.da);const d=_.to(b.configuration,[_.ee,"native"]);b.O=d.create(b);b.O.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.El(_.Xf)&&!_.Ok()&&(b.A=new Gt(b),b.A.start(c));b.l?b.l.release():b.l=new tt(b);c.textTracks&&Vh(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Uc,()=>{b.trigger(new _.D(_.cu))});
|
|
437
|
+
null==b.configuration.startTime&&bp(b,c);_.Mk()&&cp(b,c);try{yield Wo(b,c),yield Yo(b),yield ap(b).U}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&Co(this.j,_.Eo),this.trigger(new _.D(_.q,{detail:a})))}ig(){return new U}getState(){return null!==this.j?this.j.getState().currentState:_.zu}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=
|
|
438
|
+
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 _.yo();this.f&&_.uo(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.h=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),
|
|
439
|
+
a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ka())a.bandwidth&&(this.f.o=a.bandwidth),a.Kc&&(this.f.f=a.Kc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
|
|
440
|
+
_.th(new class{a(){return nd}canPlay(a,b){a=a.type||"";const c=a===_.Bc,d=a===_.Gc,e=a===_.tl;var f;_.Lk()||c||d||e&&!_.Mk()?f=0:f=""!==zk().canPlayType(a)?e&&_.Mk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.la}create(){return new Bu}});_.y("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.y("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.y("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var ep=new _.S("clpp.ads"),dp=[];var Cu=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.y("clpp.ads.IAdsManager",Cu);Cu.prototype.getPosition=Cu.prototype.getPosition;Cu.prototype.setVolume=Cu.prototype.setVolume;Cu.prototype.getVolume=Cu.prototype.getVolume;Cu.prototype.skip=Cu.prototype.skip;Cu.prototype.pause=Cu.prototype.pause;Cu.prototype.resume=Cu.prototype.resume;var V=class{kb(){}lb(){}pb(){}getId(){}getCreativeId(){}Lb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Ob(){}nb(){}getMediaUrl(){}ab(){}$a(){}Pa(){}Qa(){}getPodIndex(){}Bb(){}Cb(){}bb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Nb(){}};_.y("clpp.ads.IAd",V);V.prototype.getVideoElement=V.prototype.Nb;V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;
|
|
441
|
+
V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.bb;V.prototype.getPositionInSequence=V.prototype.Cb;V.prototype.getPodTimeOffset=V.prototype.Bb;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.Qa;V.prototype.getMediaBitrate=V.prototype.Pa;V.prototype.getMediaHeight=V.prototype.$a;V.prototype.getMediaWidth=V.prototype.ab;V.prototype.getMediaUrl=V.prototype.getMediaUrl;
|
|
442
|
+
V.prototype.getClickThroughUrl=V.prototype.nb;V.prototype.isBumper=V.prototype.Ob;V.prototype.getSkipTimeOffset=V.prototype.getSkipTimeOffset;V.prototype.getPosition=V.prototype.getPosition;V.prototype.getDuration=V.prototype.getDuration;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getAdSystem=V.prototype.getAdSystem;V.prototype.getApiFramework=V.prototype.getApiFramework;V.prototype.getSourceId=V.prototype.Lb;
|
|
443
|
+
V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.pb;V.prototype.getAdManagerVersion=V.prototype.lb;V.prototype.getAdManagerName=V.prototype.kb;var Q=class{constructor(a,b,c,d,e){this.w=this.o=this.l=!1;this.B=a;this.a=b;this.f=c;this.h=d;this.j=0;this.A=`${e}:${b}`;this.C=e;this.videoEl=null}kb(){return""}lb(){return""}pb(){return 2}getId(){return this.A}getCreativeId(){return""}Lb(){return this.C}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}Ob(){return!1}nb(){return null}getMediaUrl(){return null}ab(){return 0}$a(){return 0}Pa(){return 0}Qa(){return this.B}getPodIndex(){return 0}Bb(){return 0}Cb(){return this.a}bb(){return this.f}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Nb(){return this.videoEl}};
|
|
444
|
+
Q.prototype.getVideoElement=Q.prototype.Nb;Q.prototype.getWrapperCreativeIds=Q.prototype.getWrapperCreativeIds;Q.prototype.getWrapperAdSystems=Q.prototype.getWrapperAdSystems;Q.prototype.getWrapperAdIds=Q.prototype.getWrapperAdIds;Q.prototype.getSequenceLength=Q.prototype.bb;Q.prototype.getPositionInSequence=Q.prototype.Cb;Q.prototype.getPodTimeOffset=Q.prototype.Bb;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Qa;Q.prototype.getMediaBitrate=Q.prototype.Pa;
|
|
445
|
+
Q.prototype.getMediaHeight=Q.prototype.$a;Q.prototype.getMediaWidth=Q.prototype.ab;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.nb;Q.prototype.isBumper=Q.prototype.Ob;Q.prototype.getSkipTimeOffset=Q.prototype.getSkipTimeOffset;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.getTitle=Q.prototype.getTitle;Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;
|
|
446
|
+
Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.Lb;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.pb;Q.prototype.getAdManagerVersion=Q.prototype.lb;Q.prototype.getAdManagerName=Q.prototype.kb;var Du=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,qd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.qd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.qd);if(!b)throw Error("No available players in the pool");b.qd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.qd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
|
|
447
|
+
d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.y("clpp.utils.dom.createHTMLElement",_.kp);var Eu=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=lp(this,a)}get(){return this.a}};var rp=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.Vg(Fu,b);this.f=new Eu;this.h=null;this.a=new Eu;this.l=Gu;Gu+=1;this.o=`clpp-video-${this.l}`;this.j=new _.st;if(null==a)throw new _.H(_.F,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.F,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
|
|
448
|
+
HTMLMediaElement))throw new _.H(_.F,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(_.F,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Hd);a.parentNode?a.parentNode.replaceChild(c,
|
|
449
|
+
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),_.ip(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Wf);for(d of[_.Gg,_.ce])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Ck()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),mp(this.a,"clpp-container"),
|
|
450
|
+
mp(this.a,this.o),mp(this.f,_.gd),mp(this.f,"clpp-video"));b.webOSStartupPatch&&np(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?_.ip(a,hd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(hd):
|
|
451
|
+
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&&_.ip(a,_.gd);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){_.ip(a,hd)}show(a){a.classList.remove(hd)}release(){this.j.release()}};
|
|
452
|
+
rp.prototype.removeElementFromContainer=rp.prototype.removeElementFromContainer;rp.prototype.addElementToContainer=rp.prototype.addElementToContainer;rp.prototype.getCastElement=rp.prototype.getCastElement;rp.prototype.getContainer=rp.prototype.getContainer;rp.prototype.getMedia=rp.prototype.getMedia;var Fu={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Gu=1;var Hu=class{constructor(a){this.ta=a;this.o=!!a.sideAdContainer;this.h=[];this.f=a.Zf;this.B=qp(a);this.A=[];const b=sp(this,this.B,this.ta.Ig);this.l=new Du(b);this.a=null;this.w=!1;this.j=new Map;this.C=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");tp(this).forEach(c=>up(this,c,!1))}getCurrentItem(){return this.a}xd(){return this.a?this.a.player:null}Bf(){return Array.from(this.j.values())}Yc(){return 0<this.j.size}play(a){return Ip(this,a,_.We)}load(a){return Ip(this,a,_.pe)}release(){const a=
|
|
453
|
+
this;return _.x(function*(){yield Promise.all([Gp(a),a.a?Fp(a,a.a):Promise.resolve()]);a.a=null;a.w=!1;xp(a)})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();Sp(a)})}},Mp="preload",Jp=_.we;var Iu=class extends _.eu{constructor(a){super();this.ta=_.Vg({yh:.5},a);this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor(b=>{const c=Wp(this,b);return c&&[cq,pq].includes(c.state)?(this.g.info("Seeking into an interstitial",c.ia),Zp(this,c).catch(()=>{this.f.seek(b)}),!1):!0});this.pa=new Hu({Ig:this.ta.config,Zf:a.player,preloadMedia:!0,Ca:a.Ca,sideAdContainer:this.ta.sideAdContainer});this.h=[];this.a=[];this.j=!1;gq(this,a.player)}destroy(){const a=this;return _.x(function*(){hq(a);
|
|
454
|
+
a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.pa.destroy()})}Eb(){return this.j}isLive(){const a=this.pa.xd();return a?a.isLive():null}Ta(a){this.f.trigger(a)}},cq=0,qq=1,sq=2,tq=3,wq=4,vq=5,pq=6;var hr=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,Ca:b},d.ads.hls||{},{xh:c});this.a=new Iu(a);oq(this.a)}resume(){const a=iq(this.a);a&&a.play()}pause(){const a=iq(this.a);a&&a.pause()}skip(){}getVolume(){const a=iq(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=iq(this.a);if(b)return b.setVolume(a)}getPosition(){const a=iq(this.a);return a?a.getPosition():-1}l(){return!this.a.Eb()}h(){return this.a.destroy()}};
|
|
455
|
+
hr.prototype.getPosition=hr.prototype.getPosition;hr.prototype.setVolume=hr.prototype.setVolume;hr.prototype.getVolume=hr.prototype.getVolume;hr.prototype.skip=hr.prototype.skip;hr.prototype.pause=hr.prototype.pause;hr.prototype.resume=hr.prototype.resume;var Ju=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.st;this.h=null;this.f=!0;Bq(this)}release(){this.a.release();Cq(this);this.m=null}};_.y("clpp.polyfill.installAll",Fq);var Eq=[];_.y("clpp.polyfill.register",_.Gq);var Kq=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Ni(_.cj(a)));this.a=JSON.parse(_.Ni(_.cj(b)));this.j=c}};var Iq={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},xl="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var jr=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},Xq="vod",Wq="live";var Dr,ar,dr,br;Dr=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=er(this);this.f.tc(this.h);this.a=null}release(){this.a=null;this.f.jd(this.h)}};_.Ku="maxSuggestedBitrateKbps";ar={du:"duress",etp:_.Zd,mb:_.Ku,rd:"responseDelay",rtt:"roundTripTime"};dr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:mg};
|
|
456
|
+
br=new _.S("clpp.net.CmsdManager");var R=class extends _.eu{constructor(a,b,c){super();Fq();this.g=new _.S("clpp.Player");if(!a)throw new _.H(_.F,7,7102);this.Y=new _.st;this.f=this.C=b||_.zl();this.l=null;void 0===this.f.license&&(this.f.license=xl,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(_.F,7,7101,"No license provided in configuration!");this.j=new rp(a,c);this.G=this.A=this.a=
|
|
457
|
+
this.F=null;this.I=new _.Yq;this.h=null;this.W=[];this.X=!0;this.K={};this.ca=null;this.R=!0;this.S=this.O=!1;this.L=this.zc=null;this.be=!1;this.ea=new Ju(this);this.B=null;this.on(_.Rf,()=>{this.getState()===_.Eo&&(this.a?this.a.unload():Promise.resolve())});this.on(_.yc,this.$.bind(this));this.on(_.xc,this.$.bind(this));this.on(_.Oh,()=>ir(this));kr(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
|
|
458
|
+
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 fr)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}mr(this,a);this.M=_.la;Jl(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.D(_.q,{detail:a}),this.trigger(a)}Uc(a){a=
|
|
459
|
+
this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.Wg(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=pr(this);return this.l.finally(()=>{qr(this);this.g.debug("Player released");this.l=null})}destroy(){if(this.O)return this.g.debug("The player is already destroyed. No-op"),
|
|
460
|
+
new Promise(a=>a());this.O=!0;return this.release().then(()=>{this.g.debug(xa);this.trigger(new _.D("destroying"));return _.lr(this,_.Le)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Rc.clear();this.ea.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Ml();this.A=this.a=null;this.trigger(new _.D("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.nn(df);b.M=_.la;b.X=!0;const c=_.Ro(a),d=Cl(a)?a:{};if(d.license)throw new _.H(_.F,7,7100,
|
|
461
|
+
"License cannot be passed into the load method.");yield _.yr(b,d,c);yield _.zr(b);yield _.Br(b);_.nn(cf);_.on("player.load",df,cf)}catch(c){qr(b);if(b.l)throw b.g.info(ab),new _.H(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.yr(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(wb)}else b.g.warn(sb)})}use(a){(a=Nl(a))&&a.o(this)}remove(a){return(this.getState()<=_.Lo||this.R)&&null!==Hl(a)?(Ol(a),this.S=!0):!1}play(){return this.a?!this.h||this.h instanceof
|
|
462
|
+
hr||this.a.namespace()===_.kd?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 _.du}getState(){return this.a?this.a.getState():_.Lo}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
|
|
463
|
+
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()===_.Eo?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}lc(){const a=this.a;return a&&a.lc?a.lc():null}getVolume(){return this.a?this.a.getVolume():
|
|
461
464
|
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.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&
|
|
462
|
-
this.a.isLive()}getStats(){return this.a?this.a.getStats():null}
|
|
463
|
-
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.
|
|
465
|
+
this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Ff(){return Object.freeze(this.ca)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.zc=a;vr(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}$(){this.be=!0}};_.y("clpp.Player",R);R.registerPlugin=_.gr;
|
|
466
|
+
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.Ff;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;
|
|
464
467
|
R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;R.prototype.getVolume=R.prototype.getVolume;
|
|
465
|
-
R.prototype.getTimelineOffset=R.prototype.
|
|
466
|
-
R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.
|
|
467
|
-
R.prototype.on=R.prototype.on;_.
|
|
468
|
-
if(0===b.length)throw new _.
|
|
469
|
-
7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.
|
|
470
|
-
if(!b.V)throw new _.
|
|
471
|
-
this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.V=!1;return super.release()}destroy(){
|
|
472
|
-
|
|
473
|
-
this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}
|
|
474
|
-
yield
|
|
475
|
-
d;}finally{a.j=!1,b&&
|
|
476
|
-
d;}finally{a.j=!1,b&&
|
|
477
|
-
|
|
478
|
-
b){const c=new Map;c.set(a,b);try{const d=_.
|
|
479
|
-
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===
|
|
480
|
-
|
|
481
|
-
persistentState:_.
|
|
482
|
-
e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.
|
|
483
|
-
void 0===a?
|
|
484
|
-
b){if(this.l)return Promise.reject(
|
|
485
|
-
d);this.f&&(
|
|
486
|
-
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:
|
|
487
|
-
this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.
|
|
488
|
-
new
|
|
489
|
-
this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.
|
|
490
|
-
|
|
491
|
-
new
|
|
492
|
-
this.closed;const a=
|
|
493
|
-
_.
|
|
494
|
-
|
|
495
|
-
var
|
|
496
|
-
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
497
|
-
|
|
468
|
+
R.prototype.getTimelineOffset=R.prototype.lc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;
|
|
469
|
+
R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Uc;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;
|
|
470
|
+
R.prototype.on=R.prototype.on;_.Lo=0;_.Mo=1;_.Ho=2;_.Oo=3;_.No=4;_.Do=5;_.Eo=6;_.zu=7;_.Ko={IDLE:_.Lo,PREPARING:_.Mo,BUFFERING:_.Ho,PLAYING:_.Oo,PAUSED:_.No,ENDED:_.Do,ERROR:_.Eo,UNSET:_.zu};R.State=_.Ko;var fr=[];var Lu=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=_.Vg(this.C,a);this.f=_.Vg(this.f,a);this.H=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.x(function*(){if(c.w)throw new _.H(_.F,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.H(_.F,7,7007,"The index parameter only supports the value of 0.");
|
|
471
|
+
if(0===b.length)throw new _.H(_.F,7,7003,ib);if(b.some(g=>!g.id||!g.source))throw new _.H(_.F,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(_.F,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(_.F,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.t||0>e))throw new _.H(_.F,
|
|
472
|
+
7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.H(_.F,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.H(_.F,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{Fr(c),c.w="open",yield Ir(c,b),c.H=0,c.o=b,c.V=!0,Jr(c,b[0].playlist||{})}finally{c.w=null}})}tg(a){const b=this;return _.x(function*(){if(b.w)throw new _.H(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
|
|
473
|
+
if(!b.V)throw new _.H(_.F,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.H(_.F,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(_.F,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield Kr(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}Yg(){return[...this.o]}Vc(){return this.o.length}getTimeline(){return this.a?
|
|
474
|
+
this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.V=!1;return super.release()}destroy(){Fr(this);return super.destroy()}setCdnErrorCallback(){throw new _.H(1,7,7009,"CDN switching is not supported!");}};_.y("clpp.plist.ScPlaylist",Lu);Lu.prototype.setCdnErrorCallback=Lu.prototype.setCdnErrorCallback;Lu.prototype.destroy=Lu.prototype.destroy;Lu.prototype.release=Lu.prototype.release;Lu.prototype.seekWith=Lu.prototype.seekWith;
|
|
475
|
+
Lu.prototype.getTimeline=Lu.prototype.getTimeline;Lu.prototype.getSize=Lu.prototype.Vc;Lu.prototype.getPlaylist=Lu.prototype.Yg;Lu.prototype.getCurrentItemIndex=Lu.prototype.getCurrentItemIndex;Lu.prototype.getCurrentItem=Lu.prototype.getCurrentItem;Lu.prototype.addItem=Lu.prototype.tg;Lu.prototype.open=Lu.prototype.open;var Mu=class extends _.eu{constructor(a){super();this.ta=_.Vg({transition:_.Se,preloadMedia:!1},a);this.h=[];this.a=0;const b=Lr(a.anchorId,this.ta.config);this.o=new Du(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(od);this.o.a.forEach(c=>Mr(this,c.player,!1))}Tc(){return this.f}xd(){return this.f?this.f.player:null}Af(){return this.l.get(this.a+1)||null}Cf(){return this.l.get(this.a-1)||null}Bf(){return[this.Cf(),this.Af()].filter(Boolean)}Lh(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
|
|
476
|
+
this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Kh(a){if(0===this.h.length)throw Error(hb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}Yc(){return this.a<this.h.length-1}Gf(){return 0<this.a}vh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(hb);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})`),
|
|
477
|
+
yield Pr(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,Tr(a)}}})}Wf(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.Yc()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ta.transition===_.Se&&b.player.pause();Yr(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 Ur(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
|
|
478
|
+
d;}finally{a.j=!1,b&&Xr(a,b),Tr(a)}}else a.g.warn("There are no more items in the playlist")})}wh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.Gf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ta.transition===_.Se&&b.player.pause();Yr(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 Ur(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
|
|
479
|
+
d;}finally{a.j=!1,b&&Xr(a,b),Tr(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([Zr(a),a.f?Xr(a,a.f):Promise.resolve()]);yield $r(a)})}};_.y(od,Mu);Mu.prototype.destroy=Mu.prototype.destroy;Mu.prototype.playPrev=Mu.prototype.wh;Mu.prototype.playNext=Mu.prototype.Wf;Mu.prototype.playFirst=Mu.prototype.vh;Mu.prototype.hasPrev=Mu.prototype.Gf;Mu.prototype.hasNext=Mu.prototype.Yc;
|
|
480
|
+
Mu.prototype.setIndex=Mu.prototype.Kh;Mu.prototype.setItems=Mu.prototype.Lh;Mu.prototype.getPreloading=Mu.prototype.Bf;Mu.prototype.getPrev=Mu.prototype.Cf;Mu.prototype.getNext=Mu.prototype.Af;Mu.prototype.getCurrentPlayer=Mu.prototype.xd;Mu.prototype.getCurrent=Mu.prototype.Tc;var Wr="preload",Nr=_.we;var as=new Map;var Pu=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]===_.Ic;if(!window.muxjs||!c&&!d)return!1;if(d)return _.bs(Mc);if(b)return _.bs(cs(b,a));b=cs(_.p,a);a=cs(_.w,a);return _.bs(b)||_.bs(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
|
|
481
|
+
b){const c=new Map;c.set(a,b);try{const d=_.sk(b),e=_.tk(b).split(","),f=new Map,g=xi(_.p,e),h=xi(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.rk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.rk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Ic?Mc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?cs(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.K(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
|
|
482
|
+
h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===Nu?b.push(k):h.type===Ou&&c.push(k)},g=()=>{e={video:_.gj(...b),captions:d,audio:_.gj(...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(_.F,3,3018);return e}};mk(_.Ic,()=>new Pu(_.Ic));mk(_.sg,()=>new Pu(_.sg));var Ou=_.p,Nu=_.w;var Qu=class{getCuePoints(){}Eb(){}Db(){}};_.y("clpp.ads.IAdsTimeline",Qu);Qu.prototype.hasPostroll=Qu.prototype.Db;Qu.prototype.hasPreroll=Qu.prototype.Eb;Qu.prototype.getCuePoints=Qu.prototype.getCuePoints;_.Ru=class{f(){}a(){}h(){}o(){}};var Su=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(eb)}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 Ab}};
|
|
483
|
+
Vm(new class{a(){return Ab}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Su}},3);var Uu=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,Tu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Tu.value();return this.a&&Fi(a,b)?!0:!1}entries(){}keys(){}values(){}},Tu=new _.yu(()=>Li(new Uint8Array([0])));var Vu=class{l(){}h(a){_.ph("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.ph("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};Vm(new class{a(){return"NOP"}f(){return!0}create(){return new Vu}},0);var Xu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&es(b,null);return(this.j=a)?es(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.ph("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Wu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Wu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.td))for(var c of b){a:{a=c;if(a.persistentState===_.Bf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
|
|
484
|
+
persistentState:_.Pe,distinctiveIdentifier:_.Pe,initDataTypes:a.initDataTypes,sessionTypes:[Yf],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),
|
|
485
|
+
e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.tg));a=e?b:null}if(a){this.a=a;return}}c=Error(Pb);c.name=ob;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Yu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.ph("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Yu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.st;this.j=0;this.g=new _.S(md);this.g.info("Created Media Keys for "+a)}createSession(a){a=
|
|
486
|
+
void 0===a?Yf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Yf)throw new TypeError("Session type "+a+ba);return new Zu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Zu=class extends _.eu{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.st;this.sessionId=b;this.expiration=NaN;this.closed=new _.Mn;this.l=!1;this.keyStatuses=new Uu;this.g=new _.S(md)}generateRequest(a,
|
|
487
|
+
b){if(this.l)return Promise.reject(Fb);this.g.debug("generateRequest");this.h=new _.Mn;try{const c=this.o.createSession(_.tg,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Eg,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 _.D(_.ze,{messageType:void 0===e||e===Sf?ke:je,message:Li(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Cg,d=>{this.g.debug("onWebkitKeyAdded_",
|
|
488
|
+
d);this.f&&(fs(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Dg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Sf)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),
|
|
489
|
+
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:fs(this,"output-not-allowed");break;default:fs(this,_.ge)}});fs(this,Sf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.pe);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Fb);this.g.debug(gg);this.f=new _.Mn;try{this.a.update(_.K(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
|
|
490
|
+
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"))}};Vm(new class{a(){return"APPLE"}f(){return!!window.WebKitMediaKeys}create(){return new Xu}},2);var av=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.ph("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(eb);const b=this.w;b&&b!==a&&is(b,null);(this.w=a)&&is(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.ph("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
|
|
491
|
+
new $u(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},$u=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Qe&&(this.a=Bg,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,
|
|
492
|
+
this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.tg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.Bf||a||(e=!1);if(e){this.f=g;return}}b=Pb;if(c===_.Qe||c===_.yd)b="None of the requested configurations were supported.";c=Error(b);c.name=ob;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new bv(this.h,this.a))}getConfiguration(){return this.f}},bv=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.st;this.j=[];this.l=new Map}createSession(a=
|
|
493
|
+
Yf){if(a!==Yf&&a!==_.Ue)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Xa,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new cv(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},cv=class extends _.eu{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 _.Mn;this.keyStatuses=
|
|
494
|
+
new Uu}ready(){_.ph("WebkitEmeManager.MediaKeySession.ready");hs(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.ph("WebkitEmeManager.MediaKeySession.generateRequest");return ns(this,b,null)}load(a){_.ph(Ub);return this.l===_.Ue?ns(this,null,a):Promise.reject(Error(lb))}update(a){_.ph(Ub);const b=new _.Mn;os(this,b,a);return b}close(){_.ph("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Ue){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
|
|
495
|
+
this.closed;const a=js(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.ph("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Ue?Promise.reject(Error(lb)):this.close()}};Vm(new class{a(){return"WEBKIT"}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new av}},1);var fv=class extends _.ju{constructor(a,b,c,d,e){super(Wa);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(ld);_.Xi(this.l)?this.g.warn(_.Vb):this.Ya(_.yd,{licenseUrl:this.l,videoRobustness:[_.Eb,void 0],audioRobustness:[_.Db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.gd.bind(this)}});_.Xi(this.j)?this.g.warn(_.rb):this.Ya(_.wd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.gd.bind(this)}});
|
|
496
|
+
_.Xi(this.h)?this.g.warn(_.Ra):_.Xi(this.a)?this.g.warn(_.Qa):this.Ya(_.td,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Rf.bind(this),licenseResponse:this.Sf.bind(this),certificateRequest:this.gd.bind(this),extractContentId:this.vf.bind(this)}})}gd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}vf(a,b){a=mm(b);switch(this.o){case dv:return a;case ev:return(new _.nm(a)).a;default:throw Error("Unknown content ID strategy");}}Rf(a,b){b.headers[sa]=
|
|
497
|
+
Hc;this.gd(a,b);a={spc:_.aj(b.body)};b.body=_.Ti(_.Qj(a,!0))}Sf(a,b){a=_.Ni(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.cj(a).buffer}};_.y(ld,fv);fv.prototype.onFairPlayLicenseResponse=fv.prototype.Sf;fv.prototype.onFairPlayLicenseRequest=fv.prototype.Rf;fv.prototype.extractFairPlayContentId=fv.prototype.vf;fv.prototype.onLicenseRequest=fv.prototype.gd;fv.prototype.constructor=fv.prototype.constructor;fv.NAME=Wa;
|
|
498
|
+
var ev="hostname",dv="full-skd";fv.FairPlayContentIdStrategy={HOSTNAME:ev,FULL_SKD:dv};_.y("clpp.drm.HeaderDrmComponent",class extends _.Ru{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Wa){a=a.drm.customData;if(!a)throw new _.H(_.F,7,7100,_.zd);a=new fv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||dv);_.Sl(a)}}a(){delete _.Rl.HeaderDrm}id(){return"headerdrm"}});_.Gq(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Gq(function(){_.ph("mathRound.install")});_.Gq(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;ae in document||(Object.defineProperty(document,ae,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
499
|
+
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ps);document.addEventListener("webkitfullscreenerror",ps);document.addEventListener("mozfullscreenchange",ps);document.addEventListener("mozfullscreenerror",ps);document.addEventListener("MSFullscreenChange",ps);document.addEventListener("MSFullscreenError",ps)}});_.Gq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.ph("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=rs,document.exitPictureInPicture=ss,document.addEventListener("webkitpresentationmodechanged",qs,!0))}});_.Gq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=ts)}});_.Gq(function(){if(window.VTTCue)_.oh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.oh(Qb),window.VTTCue=us;else if(6===a)_.oh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=vs;else{try{var b=!!us(1,2,"")}catch(c){b=!1}b&&(_.oh(Qb),window.VTTCue=us)}}else _.qh("VTTCue not available.")});var ws;_.Gq(function(){_.ph("InputEvent.install");_.Bk("Trident/")&&HTMLInputElement.prototype.addEventListener!==xs&&(_.oh("Patching input event support on IE."),ws=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=xs)});_.Gq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Gq(function(){_.ph("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var As=class{constructor(){this.a=ys()}};var gv=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.hv=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 iv;_.jv=class{constructor(){this.a=new Blob([iv],{type:_.tg})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Mn;b=b.play();const d=(new _.yk(()=>{d.stop();c.resolve(a)})).fa(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===ob?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
|
|
500
|
+
iv=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,
|
|
498
501
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
499
502
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
500
503
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
501
504
|
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,
|
|
502
505
|
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,
|
|
503
|
-
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]);_.
|
|
504
|
-
_.
|
|
505
|
-
a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.
|
|
506
|
-
_.
|
|
507
|
-
_.
|
|
508
|
-
b;else throw new _.
|
|
509
|
-
_.
|
|
510
|
-
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()}};
|
|
506
|
+
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]);_.kv=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}Mb(){return this.f}bd(){return this.h}Ac(a){return this.getId()===a.getId()&&this.Mb()===a.Mb()&&this.getDuration()===a.getDuration()&&this.bd()===a.bd()}};_.y("clpp.media.TimelineWindow",_.kv);_.kv.prototype.isDynamic=_.kv.prototype.bd;_.kv.prototype.getStart=_.kv.prototype.Mb;_.kv.prototype.getId=_.kv.prototype.getId;_.kv.prototype.getDuration=_.kv.prototype.getDuration;_.lv=new _.S("clpp.media.TimestampParser");_.mv=class{constructor(){this.a=[];this.f=-1;this.h=null}ah(a){return this.a[a]||null}bh(){return this.a.length}dh(){return this.a}zf(){return this.a[this.f]||null}Vg(){return this.f}};_.y("clpp.media.Timeline",_.mv);_.mv.prototype.getCurrentWindowIndex=_.mv.prototype.Vg;_.mv.prototype.getCurrentWindow=_.mv.prototype.zf;_.mv.prototype.getWindows=_.mv.prototype.dh;_.mv.prototype.getWindowCount=_.mv.prototype.bh;_.mv.prototype.getWindow=_.mv.prototype.ah;_.Fs={};_.Hs={};var bt=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new As}};var Ls=window.XMLHttpRequest;var at=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new gv(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new As}};var Xt=class extends _.$o{constructor(a){super(new _.Mn,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.U;this.f=-1;this.j=this.l=this.o=null;Vs(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(()=>{})}};var $s=window.fetch,Xs=window.AbortController,Ws=window.Headers;_.et={};_.ov=class{constructor(a){a=a.getConfiguration();a=_.Wg(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Uf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Uf?a.windowColor:null;this.M=typeof a.fontColor===_.Uf?a.fontColor:null;this.O=typeof a.fontFamily===_.Uf?a.fontFamily:null;this.I=typeof a.fontSize===_.Uf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Uf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
|
|
507
|
+
_.Uf&&(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.O}setFontFamily(a){this.O=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?nv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
|
|
508
|
+
a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.ov.prototype.setEdgeType=_.ov.prototype.setEdgeType;_.ov.prototype.getEdgeType=_.ov.prototype.getEdgeType;_.ov.prototype.setEdgeColor=_.ov.prototype.setEdgeColor;_.ov.prototype.getEdgeColor=_.ov.prototype.getEdgeColor;_.ov.prototype.setFontSizePercent=_.ov.prototype.setFontSizePercent;_.ov.prototype.getFontSizePercent=_.ov.prototype.getFontSizePercent;_.ov.prototype.setFontSize=_.ov.prototype.setFontSize;
|
|
509
|
+
_.ov.prototype.getFontSize=_.ov.prototype.getFontSize;_.ov.prototype.setFontColor=_.ov.prototype.setFontColor;_.ov.prototype.getFontColor=_.ov.prototype.getFontColor;_.ov.prototype.setFontFamily=_.ov.prototype.setFontFamily;_.ov.prototype.getFontFamily=_.ov.prototype.getFontFamily;_.ov.prototype.setWindowColor=_.ov.prototype.setWindowColor;_.ov.prototype.getWindowColor=_.ov.prototype.getWindowColor;_.ov.prototype.setBackgroundColor=_.ov.prototype.setBackgroundColor;
|
|
510
|
+
_.ov.prototype.getBackgroundColor=_.ov.prototype.getBackgroundColor;var nv=1/15;var it="raised",jt="depressed",lt="dropshadow",kt="uniform";_.y("clpp.text.EdgeType",{NONE:_.Ge,RAISED:it,DEPRESSED:jt,DROP_SHADOW:lt,UNIFORM:kt});_.ft(Cc,class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.gt(_.Dc);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=_.gt(_.Ec);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=
|
|
511
|
+
b;else throw new _.H(_.F,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.F,2,2011);return this.a.parseMedia(a,b)}});var pv;
|
|
512
|
+
_.qv=class extends _.ov{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${pv++}`;this.j=document.createElement(_.Wf);this.l=this.A=!1;_.ip(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":_.mt(this)},b=
|
|
513
|
+
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()}};pv=0;_.so("native",new class{a(){return!0}create(a){return new _.qv(a)}});_.rv=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;
|