@castlabs/prestoplay 6.4.0 → 6.5.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 +57 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +6 -6
- package/cjs/cl.cast.js +110 -110
- package/cjs/cl.conviva.js +33 -33
- package/cjs/cl.core.js +421 -402
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +72 -72
- package/cjs/cl.externs.js +54 -133
- package/cjs/cl.freewheel.js +24 -24
- package/cjs/cl.hls.js +47 -49
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +31 -32
- package/cjs/cl.ima.js +22 -22
- package/cjs/cl.mse.js +258 -255
- package/cjs/cl.muxdata.js +12 -12
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.smooth.js +69 -69
- package/cjs/cl.thumbnails.js +24 -24
- package/cjs/cl.tizen.js +71 -71
- package/cjs/cl.ttml.js +27 -27
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +13 -13
- package/cjs/cl.vr.js +19 -18
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.youbora.js +20 -20
- 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 +363 -351
- package/cl.crypto.js +8 -8
- package/cl.dash.js +67 -67
- package/cl.externs.js +49 -132
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +40 -40
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +25 -25
- package/cl.ima.js +16 -16
- package/cl.mse.js +230 -231
- package/cl.muxdata.js +8 -8
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +9 -9
- package/cl.playlist.js +5 -5
- package/cl.smooth.js +58 -58
- package/cl.thumbnails.js +17 -17
- 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 -14
- package/cl.vtt.js +12 -12
- package/cl.youbora.js +15 -16
- package/package.json +8 -2
package/cl.core.js
CHANGED
|
@@ -1,244 +1,257 @@
|
|
|
1
|
-
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,
|
|
2
|
-
|
|
3
|
-
_.ha="Already released. No-op";_.
|
|
4
|
-
_.Aa="FairPlay License URL is not defined";
|
|
5
|
-
Sa="NotSupportedError";_.
|
|
6
|
-
_.
|
|
7
|
-
_.Eb="ad-
|
|
8
|
-
_.
|
|
9
|
-
|
|
10
|
-
_.
|
|
11
|
-
_.
|
|
12
|
-
|
|
13
|
-
_.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
_.
|
|
17
|
-
|
|
18
|
-
_.
|
|
19
|
-
|
|
20
|
-
_.B=function(a){
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
_.
|
|
32
|
-
|
|
33
|
-
_.
|
|
34
|
-
|
|
35
|
-
_.
|
|
36
|
-
_.
|
|
37
|
-
|
|
38
|
-
_.
|
|
39
|
-
[],
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
c))
|
|
90
|
-
_.
|
|
91
|
-
_.
|
|
92
|
-
_.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_.
|
|
97
|
-
_.
|
|
98
|
-
_.
|
|
99
|
-
|
|
100
|
-
_.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
_.
|
|
105
|
-
|
|
106
|
-
b.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
_.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
a.
|
|
118
|
-
|
|
1
|
+
let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,qa,ra,ta,ua,va,wa,za,Da,Ea,Fa,Ga,Ha,Ma,Oa,Pa,Qa,Sa,Ta,Ua,bb,fb,gb,hb,kb,mb,pb,qb,rb,tb,Xb,lc,mc,sc,tc,uc,wc,yc,zc,Ac,Bc,Jc,Pc,Sc,Tc,Uc,Yc,ed,jd,kd,pd,sd,Hd,Qd,Yd,$d,he,ke,re,ye,Me,Qe,Re,Se,Te,Ue,We,Xe,Ye,Ze,$e,af,df,ef,kf,gf,rf,sf,zf,Ff,Nf,Xf,Yf,Rf,Uf,Zf,bg,cg,gg,ig,kg,hg,eg,mg,pg,sg,rg,tg,ug,vg,yg,zg,Cg,Wg,$g,ah,bh,ch,dh,fh,gh,lh,oh,rh,sh,wh,xh,th,vh,yh,zh,Ah,Bh,Dh,Eh,Nh,Rh,Wh,Yh,Vh,hi,ai,$h,ui,vi,xi,zi,Ai,Bi,Di,Ci,Ei,Fi,Ii,Ji,Ki,Li,Ni,Pi,Ri,Yi,fj,gj,hj,nj,oj,wj,zj,Ej,Ij,
|
|
2
|
+
Kj,Rj,ak,Nj,Vj,fk,hk,ik,tk,uk,yk,Bk,Ck,Gk,Hk,zk,Ik,Jk,Kk,Lk,Mk,Nk,Tk,Yk,$k,bl,al,el,Wk,ll,il,kl,jl,Zk,ml,nl,ol,ul,vl,wl,zl,Dl,El,Gl,Bl,Al,Ol,Pl,Tl,Sl,Vl,Xl,Yl,Ul,$l,am,fm,km,lm,mm,qm,rm,pm,sm,om,nm,um,wm,ym,zm,Am,Bm,Cm,Dm,Em,Fm,Gm,Hm,Lm,Pm,Qm,Sm,Um,Xm,Ym,Zm,bn,dn,en,fn,jn,gn,hn,kn,ln,mn,nn,on,pn,qn,rn,sn,tn,vn,wn,xn,zn,Bn,Gn,Hn,In,Kn,Ln,Mn,On,Pn,Nn,Qn,Tn,Sn,Rn,Xn,Wn,bo,bf,cf;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="6.5.0";
|
|
3
|
+
_.ea="AdaptationSet";_.fa="Already destroyed. No-op";_.ha="Already released. No-op";_.ia="Autoplay is not allowed due to browser policy.";_.ja="BANDWIDTH";ka="CHECKSUM";_.la="CODECS";_.oa="Cannot retrieve buffer information due to platform limitations";_.pa="CastlabsPlayer";qa="Content-Length";ra="Content-Type";_.sa="Could not find configured DRM environment.";ta="DRM licenses loaded";ua="DRMtoday";va="DRMtodayOnboard";wa="Destroying player";_.ya="Disable track type ";za="Error while decoding string!";
|
|
4
|
+
_.Aa="Error while fetching license!";_.Ba="FairPlay Certificate URL is not defined";_.Ca="FairPlay License URL is not defined";Da="HW_SECURE_CRYPTO";Ea="HW_SECURE_DECODE";Fa="HeaderDrm";Ga="InvalidStateError";Ha="License verification failed: ";_.Ja="Loading player with configuration";_.Ka="MaxHeight";_.La="MaxWidth";Ma="Missing media element";Oa="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Pa="No event provided!";Qa="No track data attached to the event, unable to add track!";
|
|
5
|
+
Sa="Not a persistent session.";Ta="NotAllowedError";Ua="NotSupportedError";_.Va="PlayReady License URL is not defined";_.Wa="Player sources";_.Xa="Please make sure ";_.Ya="QualityLevel";_.Za="RESOLUTION";_.$a="Releasing player with source";_.ab="Representation";bb="STANDARD";_.db="SW_SECURE_CRYPTO";_.eb="SW_SECURE_DECODE";fb="Session is closed";gb="Signature Verification failed";hb="Skipping Session creation. License for init data was already requested in ";_.jb="SmoothStreamingMedia";kb="The index is not in the allowed range.";
|
|
6
|
+
_.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="WebkitEmeManager.MediaKeySession.load";_.sb="Widevine License URL is not defined";tb="Will create EME Manager: ";_.ub="ad-break-started";_.vb="ad-break-stopped";_.wb="ad-buffering";_.xb="ad-clicked";_.yb="ad-completed";_.zb="ad-first-quartile";_.Ab="ad-impression";_.Bb="ad-loaded";_.Cb="ad-midpoint";_.Db="ad-paused";
|
|
7
|
+
_.Eb="ad-progress";_.Fb="ad-resumed";_.Gb="ad-skipped";_.Hb="ad-started";_.Ib="ad-stopped";_.Jb="ad-third-quartile";_.Kb="addtrack";_.Lb="ads-timeline-changed";_.Mb="airplay-casting-ended";_.Nb="airplay-casting-started";_.Pb="airplay-status-changed";_.Qb="application/cea-608";_.Rb="application/dash+xml";_.Sb="application/mp4";_.Tb='application/mp4; codecs\x3d"stpp"';_.Ub='application/mp4; codecs\x3d"wvtt"';_.Vb="application/ttml+xml";_.Wb="application/vnd.ms-sstr+xml";Xb="application/x-www-form-urlencoded";
|
|
8
|
+
_.Yb="audio";_.Zb="audio/aac";_.$b="audio/ac3";_.ac="audio/eac3";_.bc="audio/mp4";_.cc="audiobufferchanged";_.dc="autoplaynotallowed";_.ec="bitratechanged";_.fc="boolean";_.gc="bufferingended";_.hc="bufferingstarted";lc="canplay";mc="canplaythrough";_.nc="castingstarted";_.oc="caststatuschanged";_.pc="cdn-switch-success";_.qc="cenc";_.rc="center";sc="certificate-request";tc="change";uc="chrome";_.vc="clpp-fill";wc="clpp-hidden";_.xc="clpp.cast.CastSender";yc="clpp.drm.HeaderDrm";zc="clpp.drm.eme.AppleEmeManager";
|
|
9
|
+
Ac="clpp.native.Player";Bc="clpp.utils.Platform";_.Cc="codecs";_.Dc="column-reverse";_.Ec="com.adobe.primetime";_.Fc="com.apple.fps";_.Gc="com.microsoft.playready";_.Hc="com.widevine.alpha";_.Ic="config.drm.customData is not defined";Jc="controls";_.Kc="cuechange";_.Lc="destroy()";_.Mc="disabled";_.Nc="div";_.Oc="drmexpirationupdate";Pc="drmrenewalstarted";_.Qc="drmsessionpersisted";_.Rc="drmsessionupdate";Sc="drmtoday";Tc="durationchange";Uc="encrypted";_.Vc="end";_.Wc="ended";_.Xc="error";Yc="fullscreenElement";
|
|
10
|
+
_.Zc="function";_.$c="height";_.ad="hidden";_.bd="image";_.cd="image/jpeg";_.dd="internal-error";ed="keystatuseschange";_.gd="left";jd="license-renewal";kd="license-request";_.ld="line-left";_.md="line-right";_.nd="loadeddata";_.od="loadedmetadata";pd="loadstart";_.qd="mdat";_.rd="mdia";sd="message";_.td="metadata";_.ud="mimeType";_.vd="minf";_.wd="moov";_.xd="mp4";_.yd="mpd-type-changed";_.zd="mpeg-dash-callback-event";_.Ad="none";_.p="number";_.Bd="object";_.Cd="onBitrateChanged()";_.Dd="onPlayerError()";
|
|
11
|
+
_.Ed="onPlayerWillDestroy";_.Fd="onPlayerWillRelease";_.Gd="onStateChanged()";Hd="online-status-changed";_.Id="optional";_.Jd="org.w3.clearkey";_.Md="output-restricted";_.Nd="pause";_.Od="persistent";_.Pd="persistent-license";Qd="picture-in-picture";_.Rd="play";_.Sd="playing";_.Td="playlist-item-changed";_.Ud="playlist-modified";_.Vd="progress";_.Wd="px";_.Xd="ratechange";Yd="released";_.Zd="releasing";$d="removetrack";_.ae="required";_.be="resize";_.ce="right";_.de="seeked";_.ee="seeking";_.fe="showing";
|
|
12
|
+
_.ge="sinf";he="stalled";_.ie="start";_.je="statechanged";ke="status-pending";_.le="stbl";_.me="string";_.ne="stsd";_.oe="style";_.pe="subtitles-htmlcue";_.qe="subtitles-ttml";re="temporary";_.r="text";_.se="text/vtt";_.te="text/xml";_.ue="timeupdate";_.ve="trak";_.we="ttml-xml";_.xe="und";ye="unknown";_.ze="urn:scte:scte35";_.Ae="urn:scte:scte35:2014";_.Be="user-seeked";_.Ce="user-seeking";_.De="value";_.Ee="vertical-lr";_.Ge="vertical-rl";_.v="video";_.He="video/mp2t";_.Ie="video/mp4";_.Je="videobufferchanged";
|
|
13
|
+
_.Ke="videotrackchanged";_.Le="vimond-response";Me="visibilitychange";_.Ne="vtt-xml";_.Oe="waiting";_.Pe="waitingforkey";Qe="webkit-org.w3.clearkey";Re="webkitkeyadded";Se="webkitkeyerror";Te="webkitkeymessage";Ue="webkitneedkey";_.Ve="width";We="x-dt-csl-tracking-token";Xe="x-dt-follow-up-token";Ye="x-dt-resp-code";$e=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};
|
|
14
|
+
af=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:$e(a)}};df=function(a,b){if(b){var c=bf;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&&cf(c,a,{configurable:!0,writable:!0,value:b})}};
|
|
15
|
+
ef=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.w=function(a){return ef(a())};_.x=function(a,b){a=a.split(".");var c=ff;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};
|
|
16
|
+
_.jf=function(a){return _.z(a)||gf(a)?a:_.hf(a)};_.hf=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=kf(b,{merging:a[c]},1));return b.merging||null};kf=function(a,b,c){const d=c+1;if(_.z(a)||!_.lf(a))a={};for(const e in b)c=b[e],gf(c)||_.z(c)||_.mf(c)||c instanceof Element?a[e]=c:_.lf(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.mf(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=kf([],c,d):!_.z(c)&&_.nf(c)&&20>d&&(a[e]=kf(a[e],c,d));return a};
|
|
17
|
+
gf=function(a){a=typeof a;return a===_.me||a===_.p||a===_.fc};_.z=function(a){return null===a||"undefined"===typeof a};_.lf=function(a){return typeof a===_.Bd};_.mf=function(a){return typeof a===_.Zc};_.of=function(a){return typeof a===_.me};_.pf=function(a){return typeof a===_.p};_.nf=function(a){if(_.z(a)||!_.lf(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
|
|
18
|
+
_.qf=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||!_.lf(a)||!_.lf(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.z(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.z(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.z(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
|
|
19
|
+
rf=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};sf=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.tf=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};zf=function(a){return a&&0<=xf[a]?xf[a]:yf};Ff=function(a){if(!a)return _.B("clpp.log",mb+a+ca),-1;const b=Ef[a.toUpperCase()];return void 0===b?(_.B("clpp.log",mb+a+ca),-1):b};_.Hf=function(a){Gf.info.apply(Gf,arguments)};_.If=function(a){Gf.debug.apply(Gf,arguments)};
|
|
20
|
+
_.B=function(a){Gf.warn.apply(Gf,arguments)};_.Jf=function(a){Gf.error.apply(Gf,arguments)};_.Mf=function(a){if(a){var b=a.a();b in _.Kf?_.Lf.warn("Player-Factory '"+b+"' already registered"):(_.Kf[b]=a,_.Lf.info("Registered Player-Factory: '"+b+"'"))}};_.Of=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)Nf(b[c]);a.a.clear()};_.Pf=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};
|
|
21
|
+
Nf=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
|
|
22
|
+
Xf=function(a,b){a.o.debug("onMetadata_()");b.mode=_.ad;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.Qf,eventElement:null};a.m&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(Rf(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
|
|
23
|
+
_.Ae;g.type=_.Sf;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.l.trigger(new _.C(_.Tf,{detail:f}));Array.prototype.push.apply(a.g,c);Uf(a,c,b);a.f.off(b,_.Kc);a.f.on(b,_.Kc,f=>{f=f.target.activeCues;f=f.length?Rf(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.l.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.l.trigger(new _.C(_.Vf,{detail:f}));else{if(f=a.a)f=a.a,g=a.l.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.l.trigger(new _.C(_.Wf,{detail:f})))}})}};
|
|
24
|
+
Yf=function(a,b){a.h=b;a.j=a.h.textTracks;a.f.on(a.j,_.Kb,c=>{c=c.track;c.kind===_.td&&Xf(a,c)})};Rf=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};Uf=function(a,b,c){if(a.m){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};
|
|
25
|
+
Zf=function(a,b){b=b.track;b.kind!==_.td&&(b.mode===_.fe&&(b.mode=_.ad),a.a.on(b,_.Kc,c=>{c=c.target||c.srcElement;c.mode=_.ad;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.j.append(c,[]))}))};_.$f=function(a){return null!=a};
|
|
26
|
+
_.ag=function(a){var b;a instanceof _.ag?(bg(this,a.Sa),this.ec=a.ec,this.Ja=a.Ja,cg(this,a.rc),this.pa=a.pa,_.dg(this,eg(a.a)),this.Ub=a.Ub):a&&(b=String(a).match(fg))?(bg(this,b[1]||"",!0),this.ec=gg(b[2]||""),this.Ja=gg(b[3]||"",!0),cg(this,b[4]),this.pa=gg(b[5]||"",!0),_.dg(this,b[6]||"",!0),this.Ub=gg(b[7]||"")):this.a=new hg(null)};bg=function(a,b,c){a.Sa=c?gg(b,!0):b;a.Sa&&(a.Sa=a.Sa.replace(/:$/,""))};
|
|
27
|
+
cg=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.rc=b}else a.rc=null};_.dg=function(a,b,c){b instanceof hg?a.a=b:(c||(b=ig(b,jg)),a.a=new hg(b))};gg=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};ig=function(a,b,c){return typeof a===_.me?(a=encodeURI(a).replace(b,kg),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};kg=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};hg=function(a){this.f=a||null};
|
|
28
|
+
_.lg=function(a){if(!a.a&&(a.a={},a.g=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," ")))}};eg=function(a){var b=new hg;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.g=a.g}return b};
|
|
29
|
+
mg=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.of(d))a+=": "+d;else if(null!=d&&void 0!=d)if(null!=d.message&&void 0!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};_.ng=function(a,b,c){return(a=a.getAttribute(b))?a.value:c||null};_.og=function(a,b){for(const c of a)if(!b(c))return!1;return!0};pg=function*(a){for(let b=0;b<a;b++)yield b};
|
|
30
|
+
_.qg=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};sg=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(rg(a)==rg(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;const c=_.G(a);b=_.G(b);for(const d of pg(a.byteLength))if(c[d]!=b[d])return!1;return!0};rg=function(a){return a instanceof ArrayBuffer?a:a.buffer};
|
|
31
|
+
_.G=function(a,b=0,c=Infinity){return tg(a,b,c,Uint8Array)};tg=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=rg(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)};ug=function(a,b=0,c=Infinity){return tg(a,b,c,Uint16Array)};vg=function(a,b=0,c=Infinity){return tg(a,b,c,Uint32Array)};_.wg=function(a,b=0,c=Infinity){return tg(a,b,c,Int32Array)};_.xg=function(a,b=0,c=Infinity){return tg(a,b,c,DataView)};
|
|
32
|
+
yg=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};zg=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};
|
|
33
|
+
_.Ag=function(a){if(!a)return"";a=_.G(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(za);return a}a=escape(zg(a));try{return decodeURIComponent(a)}catch(b){throw Error(za);}};
|
|
34
|
+
Cg=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Bg.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.G(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.G(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return zg(c)};
|
|
35
|
+
_.Dg=function(a,b){if(_.of(a))return a;let c="";b=!!b;const d=_.G(a);239==d[0]&&187==d[1]&&191==d[2]?c=_.Ag(d):254==d[0]&&255==d[1]?c=Cg(d.subarray(2),!1):255==d[0]&&254==d[1]&&(c=Cg(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Bg.debug("Unable to find byte-order-mark, making an educated guess.");0==d[0]&&0==d[2]?c=Cg(a,!1):0==d[1]&&0==d[3]?c=Cg(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Ag(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
|
|
36
|
+
};_.Eg=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};_.Fg=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};
|
|
37
|
+
_.Gg=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=vg(d):2===c?e=ug(d):e=_.G(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Hg=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Ig=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};_.Jg=function(a){return!!(a&&0<a.length)};_.Kg=function(a){return!a||0===a.length};
|
|
38
|
+
_.Lg=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(rf(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""}};_.Ng=function(a){a=a.replace(/<[^>]+>/gi,"");Mg.innerHTML=a;a=Mg.textContent;return a=a.replace(/<[^>]+>/gi,"")};
|
|
39
|
+
_.Tg=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 _.Og(d);var f;(f=_.qg(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.qg(d,g);)c.push(new _.Pg(f[1],f[2]||f[3]))}return new _.Sg(a,b,c,e)};_.Vg=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Ug]}};
|
|
40
|
+
Wg=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||[...Ug]};
|
|
41
|
+
_.Yg=function(a,b){_.of(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.Xg,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||
|
|
42
|
+
[],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:[...Ug]};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&Wg(c,b);return c};
|
|
43
|
+
_.Zg=function(a,b,c,d,e,f,g){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.Dg(b,!0)}catch(h){}_.If("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.F:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};$g=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};
|
|
44
|
+
ah=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};bh=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()};ch=function(a,b,c){try{const d=a(b);if(d&&d.R&&d.abort)return c.resolve(d.R),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};
|
|
45
|
+
dh=function(a,b){a.R.then(()=>b(!0),()=>b(!1));return a};_.eh=function(a,b){a.a.push(dh(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};fh=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.Ag(c.data)})};gh=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Yg(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).R}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
|
|
46
|
+
_.hh=function(a){return Array.isArray(a)?a:[a]};_.ih=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.jh=function(a){return a&&a!==_.xe?a:null};lh=function(a){if(!a)throw new _.H(_.F,3,3101,`Invalid track type: ${a}`);if(!_.of(a))throw new _.H(_.F,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.I:return _.I;case _.J:return _.J;case _.K:return _.K;case kh:return kh}throw new _.H(_.F,3,3101,`Unknown track type: ${a}.`);};
|
|
47
|
+
oh=function(a,b){a=lh(a);const c=_.jh(b.kind);let d=b.id;d||(d=String(_.mh++));a=new _.nh(d,c===_.td?kh:a);a.kind=c;a.label=_.jh(b.label);a.language=_.jh(b.language);return a};_.ph=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
|
|
48
|
+
_.qh=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)},""):""};rh=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};
|
|
49
|
+
sh=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};wh=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield th(a,b),f=e.map((g,h)=>{h=new _.uh(`R${h}`,c);h.bandwidth=g.bandwidth;h.uc=g.uc;h.codec=g.codec;h.width=g.width;h.height=g.height;return h});vh(f);return{renditions:f,mimeType:d}})};
|
|
50
|
+
xh=function(a,b,c){return _.w(function*(){try{return yield wh(a,b,c)}catch(d){_.B("clpp.native.trackParser: Failed to parse video rendition info from HLS playlist.",d)}return Promise.resolve(null)})};th=function(a,b){return _.w(function*(){var c=yield yh(a,b);const d=zh(c);c=Ah(c,b);return{mimeType:yield Bh(a,c,d[0]?d[0].codec:null),renditions:d}})};
|
|
51
|
+
vh=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.");};yh=function(a,b){return _.w(function*(){const c=_.Yg(b);return yield fh(a.a,c)})};
|
|
52
|
+
zh=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Tg(0,b);if(c.getAttribute("VIDEO"))throw Error("Playlist contains alternative video streams.");var d=_.ng(c,_.Za);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.ng(c,_.ja);e=e?Number(e):null;var f=_.ng(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.ng(c,_.la);c=_.Ch(_.v,c?c.split(","):[]);return b={bandwidth:e,uc:f,codec:c,width:b,height:d,mimeType:null}})};
|
|
53
|
+
Ah=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?sh(a,b):null};Bh=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield yh(a,b);d=[Dh(d,b),Eh(d,b)].filter(Boolean);return Fh(d)})};Dh=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?sh(a,b):null};Eh=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.ng(_.Tg(0,a),_.lb))?sh(a,b):null:null};
|
|
54
|
+
_.Hh=function(a,b,c){for(const d of _.Gh)if(d.probe(b,c))return d.create(a);return null};_.Ih=function(a){a=_.Gh.indexOf(a);0<=a&&_.Gh.splice(a,1)};_.Kh=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Jh.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Lh=function(a,b){a=_.Kh(a);b=_.Kh(b);return a.split("-")[0]==b.split("-")[0]};_.Mh=function(a,b){b&&(a+='; codecs\x3d"'+b+'"');return a};
|
|
55
|
+
Nh=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};Rh=function(){if(Oh)return Oh;Ph||(Ph=new _.Qh(()=>{Oh=null}));(Oh=document.querySelector(_.v)||document.querySelector(_.Yb))||(Oh=document.createElement(_.v));Ph.aa(1);return Oh};_.Sh=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Th=function(a){return(navigator.userAgent||"").includes(a)};
|
|
56
|
+
_.Uh=function(a){return _.Th("Tizen"+(a?" "+String(a):""))};Wh=function(a){const b={major:-1,name:ye};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Vh(a,c[0]));2<=c.length&&(b.minor=Vh(a,c[1]));3<=c.length&&(b.patch=Vh(a,c[2]));4<=c.length&&(b.build=Vh(a,c[3]));return b};_.Xh=function(){return _.Th("Web0S")};_.Zh=function(){return _.Xh()&&79===Yh().major};
|
|
57
|
+
Yh=function(){const a=$h();const b=["ie","edge","opera","firefox","safari",uc];var c=ai();const d=bi[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Wh(c[1]);return Wh("")};_.ci=function(){return _.Th("CrKey")};_.di=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Uh()};_.ei=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.di()&&1<navigator.maxTouchPoints};_.fi=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
|
|
58
|
+
Vh=function(a,b){try{return parseInt(b,10)}catch(c){gi.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};hi=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};
|
|
59
|
+
ai=function(){const a=$h();if(!a)return ii;var b=a.match(/^.+?(?=\))/);if(!b)return ii;b=b[0];if(hi(b,["iphone","ipad"]))return ji;if(hi(b,["android"]))return ki;if(hi(b,["macintosh"]))return ni;if(hi(b,["windows nt"]))return oi;if(hi(b,["tizen"]))return pi;if(hi(b,["web0s"]))return qi;if(hi(b,["linux"]))return ri;gi.warn("Unable to identify OS from user agent: "+a);return ii};$h=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
|
|
60
|
+
_.ti=function(){var a=ai();var b=ai();var c=bi[b];if(c){c=$h().match(c.os_version)[1];c=Wh(c);if(b===oi)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=Wh("");a:{c=$h();const e=["ie","edge","opera","firefox","safari",uc];var d=ai();d=bi[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=si}return{os:a,osVersion:b,browser:c,browserVersion:Yh()}};
|
|
61
|
+
ui=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.qf(a,{kind:_.jh(b.kind),language:_.jh(b.language),label:_.jh(b.label)},["kind","language","label"])};vi=function(a){return a.enabled||a.selected||a.mode===_.fe||a.mode===_.ad};xi=function(a,b){var c=a.l.getConfiguration();a=a.l.getLoadedSource();c=!(!c.safari||!c.safari.enableHlsVideoTrackInfo);return!(!a||a.type!==_.wi&&!a.url.endsWith(".m3u8"))&&_.di()&&b===_.K&&c};
|
|
62
|
+
zi=function(a,b){return _.w(function*(){var c=a.l.getLoadedSource();if(c){var d=a.l.getNetworkEngine();c=yield xh(new yi(d),c.url,b);c.mimeType&&(b.mimeType=c.mimeType);0<c.renditions.length&&(b.renditions=c.renditions)}})};Ai=function(a,b){return a.h.filter(c=>c.type===b)};Bi=function(a){(a=a.l.getTextDisplayer())&&a.remove(0,Infinity)};Di=function(a,b){if(a=Ci(a,b))a=Array.from(a),b===_.I&&(a=a.filter(c=>c.kind!==_.td));return a};
|
|
63
|
+
Ci=function(a,b){if(!a.l)return null;a=a.l.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.J:return a.audioTracks;case _.K:return a.videoTracks;case _.I:return a.textTracks;default:return null}};Ei=function(a,b){return(a=a.f.get(b)||null)&&a.renditions[0]};Fi=function(a,b){return(a=a.j.get(b))&&a.renditions[0]};
|
|
64
|
+
Ii=function(a,b,c){const d=Di(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.a.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.j.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.I:f="mode";e=_.fe;g=_.Mc;break;case _.J:f="enabled";break;case _.K:f="selected"}if(f)for(const h of d)h[f]=ui(c,h,c.type)?e:g}}else if(a.a.debug(_.ya+b),a.f.get(b)&&d&&b===_.I){for(e of d)e.mode=
|
|
65
|
+
_.Mc;a.f.set(b,null)}b===_.J?a.l.trigger(new _.C(_.Gi)):b===_.I&&a.l.trigger(new _.C(_.Hi))};Ji=function(a,b,c){if(a.l){var d=a.l.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=_.Kg(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
|
|
66
|
+
Ki=function(a,b){return _.w(function*(){var c=a.l.getConfiguration(),d=_.Hh(c,b.mimeType,_.se);if(d){c=_.Yg(b.url);var e=yield a.l.getNetworkEngine().fetch(c).R;e&&e.data&&(c="External_"+`${a.F++}`,a.m[c]=b,d=d.a(_.G(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.se},Ji(a,d,c))}else a.a.warn("Track mimetype is not supported",b)})};
|
|
67
|
+
Li=function(a,b,c){c=_.hh(c).filter(e=>e);a.a.info("Find preferred tracks for",b,c);const d=Ai(a,b);c.some(e=>{const f=_.Kh(e);return(e=d.find(g=>{g=_.Kh(g.language||"");return _.Lh(f,g)}))?(a.a.info("Will select track with id",e.id),Ii(a,b,e),!0):!1})};Ni=function(a){return a.name===Ta&&Mi.some(b=>a.message.startsWith(b))};
|
|
68
|
+
_.Qi=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.ei()&&(a=360);const b=_.Vg();b.maxAttempts=3;a={source:"",license:Oi,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.Vg(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
|
|
69
|
+
restrictions:Pi(a)},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:"main",preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,
|
|
70
|
+
gapDetectionThreshold:.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,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1},restrictions:Pi(),tizen:{sideStreamText:_.Uh(2)},safari:{enableHlsVideoTrackInfo:!1}};
|
|
71
|
+
if(_.Th("Edge/")||_.Uh())a.streaming.gapDetectionThreshold=.5;_.Xh()&&(a.streaming.stallEnabled=!1);_.Zh()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Uh()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};
|
|
72
|
+
Pi=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}};
|
|
73
|
+
_.Si=function(...a){if(!a)return _.Qi();var b=[_.Qi()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.of(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({suggestedPresentationDelay:0,streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{hlsLowLatency:!0}}),c=!0),b.push(d));a=_.hf.apply(null,b);_.of(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));
|
|
74
|
+
if(!_.z(a.volume)&&(!_.pf(a.volume)||rf(a.volume)))throw new _.H(_.F,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.of(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.of(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.F,7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&
|
|
75
|
+
!_.of(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.of(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.of(a.drm.env))throw new _.H(_.F,7,7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.of(a.drm.offlineId))throw new _.H(_.F,
|
|
76
|
+
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(!_.pf(b.bufferingGoal)||rf(b.bufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.pf(b.rebufferingGoal)||rf(b.rebufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal is not a number");
|
|
77
|
+
if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.pf(b.bufferBehind)||rf(b.bufferBehind))throw new _.H(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.pf(b.smallGapLimit)||rf(b.smallGapLimit))throw new _.H(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.pf(b.durationBackoff)||rf(b.durationBackoff))throw new _.H(_.F,7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;
|
|
78
|
+
if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.p)throw new _.H(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Ri(a.restrictions);Ri(a.abr.restrictions);a.abr.initialRestrictions&&Ri(a.abr.initialRestrictions)}return a};
|
|
79
|
+
Ri=function(a){_.z(a.maxPixels)&&(a.maxPixels=Infinity);_.z(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.z(a.maxHeight)&&(a.maxHeight=Infinity);_.z(a.maxWidth)&&(a.maxWidth=Infinity);_.z(a.minPixels)&&(a.minPixels=0);_.z(a.minBandwidth)&&(a.minBandwidth=0);_.z(a.minHeight)&&(a.minHeight=0);_.z(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
|
|
80
|
+
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");};_.Ti=function(a){return typeof a===_.Bd&&!Array.isArray(a)&&"source"in a};_.Vi=function(a){return _.Ui.get(a)||null};
|
|
81
|
+
_.Xi=function(a){_.Ui.get(a.id())?Wi.warn("Component already in use."):_.Ui.set(a.id(),a)};Yi=function(a){for(const b of _.Ui.values())a(b)};_.$i=function(a,b){b=void 0==b?!0:b;a=_.Zi(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.Zi=function(a){a=zg(_.G(a));return btoa(a)};_.aj=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};
|
|
82
|
+
_.bj=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};_.cj=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};_.dj=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};
|
|
83
|
+
_.ej=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};fj=function(a){return _.Hg(a,_.Fc)||_.Hg(a,_.Gc)};gj=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[We]=a.f),a.a&&(b.headers[Xe]=a.a))};
|
|
84
|
+
hj=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[We],a.a=b.headers[Xe],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(_.Ag(_.aj(b))),{delay:a.renewalPeriod,fg:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.jj=function(a){_.ij[a.J]=a};
|
|
85
|
+
_.lj=function(a){const b={attemptParameters:_.Vg(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,Ma:{}};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,a.env)){const c=_.ij[a.env]||null;if(!c)throw _.If(_.sa,
|
|
86
|
+
_.Xa+a.env+_.aa),new _.H(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Ma=_.kj(c,a.customData)||{};_.Hg(a.env.toLowerCase(),Sc)&&(b.enforceSingleSession=!0)}return b};nj=function(a){a=mj[a];if(!a)return null;const b=_.ti();return b.os===ki&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
|
|
87
|
+
_.kj=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.g[_.Hc];if(g){var h=g.licenseUrl;d=oj(d,g.videoRobustness);e=oj(e,g.audioRobustness);var k=g.modifiers,l=g.distinctiveIdentifierRequired,m=g.persistentStateRequired;g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.me?nj(f):f;c[_.Hc]={licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,
|
|
88
|
+
serverCertificate:g}}(g=a.g[_.Fc])&&(c[_.Fc]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.g[_.Gc])&&(c[_.Gc]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
|
|
89
|
+
oj=function(a,b){const c=_.ti();if(c.os!==ki||c.browser!==uc)return a||b};_.pj=function(){throw new _.H(_.F,3,3E3);};_.qj=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.G(a.f.buffer);b=_.G(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.pj()}};_.L=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.pj()}};_.rj=function(a){return a.a<a.f.byteLength};_.sj=function(){throw new _.H(_.F,3,3E3);};_.tj=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.sj()}};
|
|
90
|
+
_.uj=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.sj()}};_.M=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.sj()}};_.vj=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.sj()}};wj=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.tj(a);return c};
|
|
91
|
+
_.xj=function(a){let b,c=0;try{a.g?(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){_.sj()}if(2097151<c)throw new _.H(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};_.yj=function(a,b){a.a+b>a.f.byteLength&&_.sj();const c=a.f.buffer.slice(a.a,a.a+b);a.a+=b;return _.G(c)};zj=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Aj=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};
|
|
92
|
+
_.N=function(a){for(;_.rj(a.H)&&!a.Qa.a;)a.Qa.$c(a.start+a.ud,a.H,a.Ee)};_.Bj=function(a){for(let b=_.M(a.H);0<b&&!a.Qa.a;--b)a.Qa.$c(a.start+a.ud,a.H,a.Ee)};_.Cj=function(a){return b=>{const c=b.H.wa()-b.H.getPosition();a(_.yj(b.H,c))}};_.Dj=function(a){return 8+(a.zf?8:0)+(null!=a.flags?4:0)};Ej=function(a){let b="";try{b=_.Dg(a)}catch(c){}return b};_.Gj=function(a){a=Ej(a);let b="";a.length&&(b=(new _.Fj(a)).a);return b};
|
|
93
|
+
Ij=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ag(a)),d=_.aj(c.sinf[0]);(new _.Hj).N(_.ge,_.N).N("schi",_.N).N("tenc",e=>{e.H.skip(6);_.tj(e.H)&&(e.H.skip(1),b=_.cj(_.yj(e.H,16)));e.Qa.stop()}).parse(d)}catch(c){}return b};
|
|
94
|
+
Kj=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.F,6,6102);let d;typeof b===_.me?d=_.Fg(b,!0):d=b;a=_.Fg(Ej(a),!0);b=new _.Jj(12+a.byteLength+d.byteLength+c.byteLength,!0);_.L(b,a.byteLength);_.qj(b,_.G(a));_.L(b,d.byteLength);_.qj(b,_.G(d));_.L(b,c.byteLength);_.qj(b,_.G(c));return _.G(b.buffer)};_.Lj=function(a){var b=_.G(a.body);b=_.$i(b);a.headers[ra]=Xb;a.body=_.Eg("spc\x3d"+b).buffer};
|
|
95
|
+
_.Mj=function(a){let b;try{b=_.Ag(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=yg(_.aj(b))};Rj=function(a,b){b=Nj(b);if(a==_.Hc)return b+Oj;if(a==_.Gc)return b+Pj;if(a==_.Fc)return b+Qj;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
|
|
96
|
+
_.Tj=function(a,b,c,d){d=void 0===d?!0:d;a=a.drm;a&&a.env.startsWith(ua)?a.customData&&(c=btoa(JSON.stringify({userId:a.customData.userId,sessionId:a.customData.sessionId,merchant:a.customData.merchant})),b.headers["dt-custom-data"]=c,a.customData.authToken&&(b.headers["x-dt-auth-token"]=`${a.customData.authToken}`),c=b.uris[0],d&&a.customData.assetId&&(c+="?assetId\x3d"+encodeURI(`${a.customData.assetId}`),a.customData.variantId&&(c+="\x26variantId\x3d"+encodeURI(`${a.customData.variantId}`)),b.uris[0]=
|
|
97
|
+
c)):Sj.warn(Oa)};_.Uj=function(a,b){try{const c=_.G(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Sj.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){Sj.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
|
|
98
|
+
_.Wj=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Tj(a,b,c,!1);b.headers[ra]=Xb;c={spc:_.Zi(b.body)};if((a=a.drm)&&a.env.startsWith(va)&&d){a={};var e=rh((new _.Fj(Vj(d))).f);d=e.keyId;if(e=e.assetId)Sj.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Sj.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Sj.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Sj.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
|
|
99
|
+
_.Gg(_.qh(c,!0))};_.Xj=function(a,b){Sj.debug("Clearing response data");200===b.status&&(a=_.Ag(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.aj(a).buffer)};
|
|
100
|
+
_.Yj=function(a,b,c){b=Ej(b);c=c&&c.customData?c.customData:{};b=new _.Fj(Vj(b));const d=rh(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.Jg(`${a}`)&&(d.assetId=a,Sj.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.Jg(`${e}`)&&(d.variantId=e,Sj.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Sj.debug("KeyId found in FPS SKD. Removing other parameters")):
|
|
101
|
+
a=["assetId","variantId"];b.f=_.qh(d,!1,a);"/"!==b.path||b.h.includes(`${b.a}/`)||(b.path="");b=_.ph(b);return c.fpsContentId=b};_.Zj=function(a,b){a=a.drm;if(!a||!a.env.startsWith(ua))Sj.warn(Oa);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(va)){const c=new _.ag(b.uris[0]);let d=c.pa;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.pa=d;b.uris[0]=c.toString()}};ak=function(a,b,c){_.Tj(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.ag(b.uris[0]);c.a.add(_.Od,a);b.uris[0]=c.toString()};
|
|
102
|
+
Nj=function(a){if(a===bk)return"https://lic.drmtoday.com";if(a===ck)return"https://lic.staging.drmtoday.com";if(a===dk)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Vj=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};fk=function(a){const b={},c=a?a[Ye]:void 0;a=ek[a?a[Ye]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
|
|
103
|
+
hk=function(a,b=0){_.Hf("Registering EME Factory: "+a.a());a={priority:b,Db:a};for(let c=0;c<gk.length;++c)if(gk[c].priority<b){gk.splice(c,0,a);return}gk.push(a)};ik=function(a){if(a){const {Db:b}=gk.find(({Db:c})=>c.a()===a);if(b&&b.ba())return _.Hf(tb+b.a()),b.create();_.Hf("Cannot create selected EME manager. Choosing by priority list.")}for(const {Db:b}of gk)if(b.ba())return _.Hf(tb+b.a()),b.create();throw Error("Missing EME managers");};
|
|
104
|
+
_.kk=function(a,b){a=_.jk(a,b);return 1!=a.length?null:a[0]};_.jk=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName==b)};_.lk=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE)?a.textContent.trim():null};
|
|
105
|
+
_.mk=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.te)}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.pk=function(a){var b=_.bj(a);b=parseInt(b.byteLength,10).toString(16);b=_.bj("12"+b+a);return new nk(ok,a,b)};
|
|
106
|
+
_.rk=function(a){const b=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.M(b);var c=_.M(b);c=_.Aj(c);var d=_.M(b);const e=d>>>24;d&=16777215;var f=_.yj(b,16);f=_.cj(f);if(0<e){var g=_.M(b);b.skip(16*g)}g=_.M(b);const h=()=>{let t=_.tj(b),u=(t&127)>>>0,y=7;for(;128<=t&&28>=y;)t=_.tj(b),u=(u|(t&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:u},k=t=>{switch(t){case 0:do if(!_.rj(b))throw Error("not enough data to skip!");while(_.tj(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
|
|
107
|
+
break;case 3:for(;4!==(t=h()&7);)k(t);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+t);}},l=[];let m=null;for(;_.rj(b);){var n=h(),q=n&7;n>>>=3;if(2===q){q=h();if(0>q)throw Error(`unable to read length of field ${n}`);q=wj(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.If("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.Zi(m):"","keyIds",l.map(t=>_.cj(t)));return 0<l.length?_.pk(_.cj(l[0])):null};
|
|
108
|
+
_.sk=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.G(a);a.set(b,0);return a};
|
|
109
|
+
_.xk=function(a){a:{a=new _.qk(new DataView(a.buffer),!0);_.M(a);for(_.uj(a);_.rj(a);)if(1===_.uj(a)){var b=_.uj(a);a=_.yj(a,b);break a}a=null}b=Cg(a,!0);var c=_.mk(b,"WRMHEADER");b=c.getAttribute("version");var d=_.kk(c,"DATA");c=(c=_.kk(d,"LA_URL"))?_.lk(c):"";var e;if(e=_.kk(d,"KID"))if(e=_.lk(e)){var f=_.kk(d,ka);e={value:e,kd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=tk(d))?[e]:(d=uk(d))?d:null;const {value:g="",kd:h}=d&&d[0]||{};d=_.aj(g);d=_.sk(d);d=_.cj(d);return new _.vk(_.wk,
|
|
110
|
+
d,c,a,b,h)};tk=function(a){a=_.kk(a,"PROTECTINFO");if(!a)return null;var b=_.kk(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(ka);b=b.getAttribute("ALGID");return{value:a,kd:c,Xe:b}};
|
|
111
|
+
uk=function(a){a=_.kk(a,"PROTECTINFO");if(!a)return null;a=_.kk(a,"KIDS");if(!a)return null;var b=_.jk(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(ka),e=c.getAttribute("ALGID");a.push({value:b,kd:d,Xe:e})}return a.length?a:null};yk=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.Qh(c)).aa(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};
|
|
112
|
+
_.Ak=function(a){return zk(a)?_.Gc:a};Bk=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};
|
|
113
|
+
Ck=function(a,b){if(a.keySystem){var c=_.Ak(a.keySystem);b=b[c];c===_.Jd&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),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=
|
|
114
|
+
b.serverCertificate||null)))}};Gk=function(a,b){a=_.Gj(b);_.If("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
|
|
115
|
+
Hk=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;_.mf(k)||(k=Gk);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=Kj(c,l,a)}return c};zk=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
|
|
116
|
+
Ik=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.dj(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])}};
|
|
117
|
+
Jk=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"==d)&&a.U(new _.H(_.F,6,6014));a.D.Md(_.tf(c));a.o||a.a.info(ta);a.o=!0;a.B=!1};Kk=function(a){a.g.forEach((b,c)=>{const d=b.Hd;let e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Hd=e)})};
|
|
118
|
+
Lk=function(a){return _.w(function*(){a.w.release();a.w=null;a.L.release();a.L=null;a.o=!1;a.B=!1;a.F.reject();a.X.stop();a.X=null;a.T.stop();a.T=null;const b=Array.from(a.g.keys());for(const c of a.g.values())c.ic&&c.ic.stop();a.g.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.a.debug("Closing session",c.sessionId);try{yield yk(c)}catch(d){a.a.warn("Error while closing session",d)}}))));if(a.A){try{yield a.m.g(null)}catch(c){a.a.warn("Error while resetting media keys",
|
|
119
|
+
c)}a.A=null}a.m=null;a.f=null;a.K.clear();a.G=null;a.J=[];a.h=null;a.U=null;a.D=null;a.O=0;a.M=null})};_.Pk=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=sf(a.h.Ma);Bk(b,d)}if(d=Mk(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Ck(f,a.h.Ma);b=Nk(a,b);if(!b.size)return a.S=!0,Promise.resolve();a=_.Ok(a,b);return c?a:a.catch(()=>{})};
|
|
120
|
+
_.Rk=function(a,b,c){a.I=Qk;a.J=c;a.C=0<c.length;a.a.debug("Using Persisted Licenses: "+a.C);a.h&&a.h.enableSessionCacheForSkd&&a.a.info("Enabled session cache for SKD license requests");return _.Pk(a,b)};
|
|
121
|
+
_.Ok=function(a,b){if(1==b.size&&b.has(""))return Promise.reject(new _.H(_.F,6,6E3));null===a.m&&(a.m=ik(a.h.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 _.Sk;const e=k=>{for(const l of k.audioCapabilities)delete l.robustness;for(const l of k.videoCapabilities)delete l.robustness},f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)==k&&(d=d.catch(()=>{if(a.ma)return null;if(m===_.Gc){const n=
|
|
122
|
+
a.D.getConfiguration();if(!_.Sh()||n.streaming.patchEdgeWhenMixedContent||a.h.Ma[m].useLegacySystem)e(l);else return a.m.a("com.microsoft.playready.recommendation",[l]).catch(()=>{e(l);return a.m.a(m,[l])})}return a.m.a(m,[l])}))};let g=a.h.preferredDrmSystem;if(!g){var h=_.ti();if(h.os===oi&&10<=h.osVersion.major&&"edge"===h.browser)g=_.Gc;else if("safari"===h.browser)g=_.Fc;else if(h.browser===uc||"firefox"===h.browser)g=_.Hc}g&&(h=b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,
|
|
123
|
+
m)=>{m!==g&&f(k,l,m)});d=d.catch(k=>{throw new _.H(_.F,6,6001,null,k);});d=d.then(k=>{if(a.ma)return null;a.K.clear();var l=k.getConfiguration();a.a.debug("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.K.add(n.contentType);for(var q of l)a.K.add(q.contentType);{m=k.keySystem;n=b.get(_.Ak(k.keySystem));q=[];l=[];const t=[],u=[];Ik(n.drmInfos,q,l,t,u);1<l.length&&_.B("Multiple unique server certificates found! Only the first will be used.");
|
|
124
|
+
1<q.length&&_.B("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:q[0],distinctiveIdentifierRequired:n.distinctiveIdentifier==_.ae,persistentStateRequired:n.persistentState==_.ae,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:"",serverCertificate:l[0],initData:t,keyIds:u,periodId:null}}a.f=m;if(!a.f.licenseServerUri)throw new _.H(_.F,6,6012,a.f.keySystem);
|
|
125
|
+
return k.createMediaKeys()}).then(k=>{a.ma||(a.a.info("Created MediaKeys for key system",a.f.keySystem),a.G=k,a.S=!0)}).catch(k=>{if(!a.ma){a.f=null;a.K.clear();if(k instanceof _.H)throw k;throw new _.H(_.F,6,6002,{browserError:k.message});}});c.reject();return d};
|
|
126
|
+
Mk=function(a){a=sf(a.h.Ma[_.Jd]||{});if(0==a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.bj(f);e=_.bj(e);e={kty:"oct",kid:_.$i(f,!1),k:_.$i(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Eg(d),initDataType:"keyids"}];return{keySystem:_.Jd,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
|
|
119
127
|
keyIds:[],periodId:null}};
|
|
120
|
-
|
|
121
|
-
l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.
|
|
122
|
-
|
|
123
|
-
_.
|
|
124
|
-
_.
|
|
125
|
-
|
|
126
|
-
f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},
|
|
127
|
-
_.
|
|
128
|
-
_.
|
|
129
|
-
f.
|
|
130
|
-
_.
|
|
131
|
-
c=c.then(()=>_.
|
|
132
|
-
|
|
133
|
-
_.
|
|
134
|
-
a.a.debug("Loaded offline session",b,e);if(!e)return a.g.delete(c),a.U(new _.
|
|
135
|
-
_.
|
|
128
|
+
Nk=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)c.add(e);for(const f of c)Ck(f,a.h.Ma);d=a.C?_.ae:_.Id;e=a.C?[_.Pd]:[re];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.qc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Id,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Mh(b.mimeType,b.codecs):"",h=c?_.Mh(c.mimeType,c.codecs):"";for(const k of f.drmInfos){const l=a.get(k.keySystem);
|
|
129
|
+
l.drmInfos.push(k);k.initData&&k.initData.length&&(l.initDataTypes=[...new Set(k.initData.map(m=>m.initDataType))]);k.distinctiveIdentifierRequired&&(l.distinctiveIdentifier=_.ae);k.persistentStateRequired&&(l.persistentState=_.ae);b&&_.hh(k.audioRobustness).forEach(m=>{l.audioCapabilities.push({robustness:m||"",contentType:g})});c&&_.hh(k.videoRobustness).forEach(m=>{l.videoCapabilities.push({robustness:m||"",contentType:h})})}}return a};
|
|
130
|
+
Tk=function(a){return _.w(function*(){if(!a.m.m())if(a.M)yield a.M;else try{a.M=a.m.g(a.G),yield a.M}catch(b){a.ma||a.U(new _.H(_.F,6,6003,b.message,b))}})};
|
|
131
|
+
_.Xk=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.I!==Qk)){var e=a.keySystem();if(!e.startsWith(_.Fc)){const f=new Uk(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.A.webkitCurrentPlaybackTargetIsWireless||
|
|
132
|
+
_.Uh(2)||a.keySystem().startsWith(_.Fc)||!_.Vk(a,d,c,!0))&&Wk(a,d,null,b,c)}};Yk=function(a,b){return _.w(function*(){a.a.info(`Handle encrypted event for type ${b.initDataType}`);yield Tk(a);b.initData&&_.Xk(a,b.initDataType,_.G(b.initData))})};$k=function(a){return _.w(function*(){const b=a.V.map(c=>Zk(a,c));a.ca=!0;a.V=[];yield Promise.all(b)})};
|
|
133
|
+
bl=function(a){const b=a.keySystem(),c=a.h.Ma[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return al(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Yg([d],a.h.attemptParameters);f.type=3;f.licenseRequestType=sc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.a.debug("Fetching certificate");return a.D.vb.fetch(f).R}).then(f=>{a.f.serverCertificate=_.G(f.data)}).catch(f=>{var g=
|
|
134
|
+
f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},fk(g));throw new _.H(_.F,6,6100,g,f);})};
|
|
135
|
+
_.dl=function(a){return _.w(function*(){if(a.G&&a.f&&a.f.serverCertificate&&a.f.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.f.serverCertificate);void 0===b||b||a.a.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});}})};
|
|
136
|
+
_.gl=function(a){const b=a.f?a.f.initData||[]:[];for(const c of b){let d=!_.Uh(2);if(a.h.enforceSingleSession&&!a.keySystem().startsWith(_.Fc)){const e=a.g.values();for(const f of e)_.dj(c.initData,f.initData)?(a.a.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.a.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),el(c.initData,f)||(f.Pc.push(c.initData),c.keyId&&!f.$a.includes(c.keyId)&&
|
|
137
|
+
f.$a.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,ke)),d=!1)}!d||a.C&&a.I===Qk||(_.Vk(a,c.keyId,c.initData)&&(d=!1),d&&(a.a.info("Request new media key session on create"),Wk(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.fl(a,c);b.length||a.J.length||(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve());return a.F};
|
|
138
|
+
_.hl=function(a,b){if(!a.G)return _.Pf(a.w,b,[Uc,"msneedkey",Ue,"needkey"],()=>{a.U(new _.H(_.F,6,6010))}),Promise.resolve();a.A=b;a.m.j(b);a.w.one(a.A,_.Rd,()=>$k(a));a.w.on(a.A,_.Pe,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.a.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.f.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.m.f()!==bb||a.J.length)d=Tk(a);c=Promise.resolve();_.Xh()&&38===Yh().major||(a.f&&a.f.keySystem!==_.Jd&&!a.f.serverCertificate&&(c=bl(a)),
|
|
139
|
+
c=c.then(()=>_.dl(a)));return Promise.all([d,c]).then(()=>{a.ma||(_.gl(a),a.w.on(a.A,Uc,e=>Yk(a,e)))}).catch(e=>{if(!a.ma){if(6004===e.code&&a.f&&a.f.keySystem===_.Hc&&1>a.O&&a.f.serverCertificate&&a.f.serverCertificate.length)return a.a.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.f.serverCertificate=null,a.O++,_.hl(a,b);1<=a.O&&a.a.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
|
|
140
|
+
al=function(a,b){return _.w(function*(){const c=a.D.oc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
|
|
141
|
+
_.fl=function(a,b){let c;try{a.a.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Pd)}catch(e){const f=new _.H(_.F,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,sd,a.ja.bind(a));a.w.on(c,ed,a.ea.bind(a));const d={initData:null,loaded:!1,Hd:Infinity,kb:null,xa:new _.Sk,periodId:null,Pc:[],keyId:null,$a:[],initDataType:null,Tb:null,sessionContext:{ldlDelay:0,customData:{}}};d.xa.catch(()=>{});a.g.set(c,d);return c.load(b).then(e=>{if(a.ma)return null;
|
|
142
|
+
a.a.debug("Loaded offline session",b,e);if(!e)return a.g.delete(c),a.U(new _.H(_.F,6,6013)),null;d.loaded=!0;il(a)&&(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.ma||(a.g.delete(c),a.U(new _.H(_.F,6,6005,{browserError:e.message})))})};el=function(a,b){if(!a)return!1;for(let c=0;c<b.Pc.length;c++)if(_.dj(a,b.Pc[c]))return!0;return!1};
|
|
143
|
+
_.Vk=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.g.keys()){const f=a.g.get(e);if(_.dj(c,f.initData))return b?f.$a.includes(b)?d&&a.a.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.$a.push(b),a.j.get(b)||a.j.set(b,ke),d&&a.a.info(hb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.a.info(hb+`Session: '${e.sessionId}'`),!0;if(el(c,f))return d&&a.a.info("Skipping Session creation. License for init data was already requested [extra]"),
|
|
136
144
|
!0}return!1};
|
|
137
|
-
|
|
138
|
-
6005,{browserError:t.message}));return}a.
|
|
139
|
-
a.j.get(m.keyId)||a.j.set(m.keyId,
|
|
140
|
-
(u=t.errorCode.systemCode,0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16));a.U(new _.
|
|
141
|
-
|
|
142
|
-
if(e.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
a
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
()
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
a.
|
|
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
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
145
|
+
Wk=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.w(function*(){if(e.length){var h=b||jl(a,d,e,f);if(!g&&kl(a,h,d,e)){var k=!0;if("skd"===d&&!a.h.enableSessionCacheForSkd)for(var l of a.g.keys()){var m=a.g.get(l);if(h&&m.keyId===h){a.a.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(t){a.a.warn("Unable to close session",t)}k=!1}}if(k){a.a.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Pd:re;var q=a.G.createSession(n);a.a.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(t){a.U(new _.H(_.F,
|
|
146
|
+
6,6005,{browserError:t.message}));return}a.w.on(q,sd,a.ja.bind(a));a.w.on(q,ed,a.ea.bind(a));k={Tb:f,Pc:[],initData:e,initDataType:d,keyId:h,$a:h?[h]:[],loaded:!1,Hd:Infinity,periodId:c,kb:null,xa:new _.Sk,sessionContext:{ldlDelay:0,customData:{}}};k.xa.catch(()=>{});f&&(l=a.g.get(f),k.sessionContext=l.sessionContext);a.g.set(q,k);h&&!a.j.get(h)&&a.j.set(h,ke);if(e)for(l=0;l<a.f.initData.length;l++)m=a.f.initData[l],m.keyId&&!k.$a.includes(m.keyId)&&_.dj(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),
|
|
147
|
+
k.$a.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,ke));l=a.D.getConfiguration();m=a.keySystem();m=a.h.Ma[m];n=(n=m.modifiers)&&n.transformInitData;_.mf(n)||(n=Hk);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.f,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.m.f()})}catch(t){h=t;t instanceof _.H||(h=new _.H(_.F,6,6016,t));k.xa&&k.xa.reject(t);a.U(h);return}a.a.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(t=>{if(!a.ma){var u=null;
|
|
148
|
+
t.errorCode&&t.errorCode.systemCode&&(u=t.errorCode.systemCode,0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16));a.U(new _.H(_.F,6,6006,{browserError:t.message,error:t,extended:u},t))}})}})};ll=function(a){let b=Infinity;a=a.g.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};il=function(a){a=a.g.values();return _.og(a,b=>b.loaded)};
|
|
149
|
+
kl=function(a,b,c,d){if(!b&&c!==_.ge)return!1;d=b||Ij(d);for(const e of a.g.values())if(b&&e.keyId===b||c===_.ge&&(e.keyId||Ij(e.initData))===d)return!0;return!1};
|
|
150
|
+
jl=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{b=d;b=void 0===b?null:b;d=a.keySystem();var e=a.h.Ma[d];d=a.D.getConfiguration();e=e&&e.modifiers&&e.modifiers.extractContentId;_.mf(e)||(e=Gk);try{var f={ldlDelay:0,customData:{}};b&&(f=a.g.get(b).sessionContext);const h=e(d,c,f);a.a.debug(`Extracted Content ID '${h}' from SKD`);var g=h;break a}catch(h){a.a.warn("Unable to extract Content ID from SKD",h)}g=""}return g}if(b===_.ge)return Ij(c)||"";if(b===_.qc)try{e=a.keySystem();if(zk(e))return _.xk(c).a;
|
|
151
|
+
if(e.match(/^com\.widevine\.alpha/)&&(f=_.rk(c)))return f.a}catch(h){a.a.warn("Unable to extract Key ID from PSSH data",h)}return""};
|
|
152
|
+
Zk=function(a,b){const c=b.target,d=a.g.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.a.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.a.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.f.licenseServerUri;e=a.h.Ma[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
|
|
153
|
+
const h=_.Yg([g],a.h.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===kd&&d.Tb?jd:f?sc:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===jd)a.D.onEvent(new _.C(Pc));zk(a.f.keySystem)&&ml(a,h);gj(a.L,h);const k=Date.now();return nl(a,h,d.sessionContext).then(()=>{a.a.debug("Sending DRM license request to",g,h);return a.D.vb.fetch(h).R}).then(l=>{if(a.ma)return Promise.reject();const m=Date.now()-k;var n=ol(a,l);let q="";n&&(q=` RID:${n}`);
|
|
154
|
+
n=l&&l.data?l.data.byteLength:-1;f?a.a.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${n} bytes `+`in ${m}ms${q}`):a.a.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${n} bytes `+`in ${m}ms${q}`);const t=hj(a.L,l);return c.update(l.data).then(()=>{if(!f){var u=ll(a),y=t?Date.now()+1E3*t.delay:Number.NaN;u=new _.C(_.Rc,{keySystem:a.keySystem(),expirationTime:u,expectedRenewalTime:y});a.D.onEvent(u);d&&(d.kb&&d.kb.resolve(),d.Tb&&(u=d.Tb,a.a.info(`Closing expired session '${u.sessionId}'`),
|
|
155
|
+
yk(u).catch(()=>{a.a.warn("Unable to close expired session in time")}),(u=a.g.get(d.Tb))&&u.ic&&u.ic.stop(),a.g.delete(d.Tb),d.Tb=null),(new _.Qh(()=>{a.ma||(d.loaded=!0,d.xa&&d.xa.resolve(),il(a)&&(a.o||a.a.info(ta),a.o=!0,a.B=!1,a.F.resolve()))})).aa(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||t&&fj(a.keySystem()))&&(u=new _.Qh(()=>{!a.ma&&a.L&&(a.a.info("Updating CSL Sessions"),zk(a.keySystem())?Wk(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.Fc)&&c.update(_.Eg("renew")))}),
|
|
156
|
+
d.ic=u,u.aa(t?t.delay:d.sessionContext.ldlDelay)))}})},l=>_.w(function*(){if(!a.ma){var m=l.data.headers;m=Object.assign({message:_.Aa,url:l.data.url,status:l.data.status,response:l.data.response},m?{headers:m}:{},fk(m));m=new _.H(_.F,6,6007,m,l);a.U(m);d&&d.kb&&d.kb.reject(m);d&&d.xa&&d.xa.reject(m)}})).catch(l=>{a.ma||(l===fb?a.a.info("Ignore update for closed sessions"):(l=new _.H(_.F,6,6008,{browserError:l.message}),a.U(l),d&&d.kb&&d.kb.reject(l),d&&d.xa&&d.xa.reject(l)))})};
|
|
157
|
+
ml=function(a,b){var c=Cg(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.a.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(_.De).textContent;b.body=_.aj(a.querySelector("Challenge").textContent).buffer}else a.a.debug("PlayReady request is already unwrapped."),b.headers[ra]="text/xml; charset\x3dutf-8"};
|
|
158
|
+
nl=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield al(a,d);const e=a.keySystem();var f=a.h.Ma[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Fc)&&b.requestModifiers.push(k=>_.Lj(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Fc)&&b.responseModifiers.push(k=>_.Mj(k))})};
|
|
159
|
+
ol=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.Ag(_.aj(b))).ti}catch(c){a.a.warn("Unable to parse DRMtoday Request ID",c)}return""};_.rl=function(a,b){a&&b&&(pl.set(a,b),ql.info(`Registered TextDisplayerFactory: '${a}'`))};_.sl=function(a,b){b=b.find(c=>(c=pl.get(c))?c.ba(a):!1);if(null==b)return ql.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;ql.info(`Chosen the text displayer: ${b}`);return pl.get(b)};
|
|
160
|
+
_.tl=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})}}};ul=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};vl=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};
|
|
161
|
+
wl=function(a){return a.a.map(b=>_.jf(b))};_.xl=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:[]}};zl=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yl.value().get(b),c.one(a,b,d))};
|
|
162
|
+
Dl=function(a){a.g.debug("Start watching for video events for "+a.l.namespace());const b=a.l,c=d=>Al(a,d.type);a.a.on(b,_.Wc,()=>{a.j=!1;Bl(a,_.Cl)});a.a.on(b,lc,c);a.a.on(b,_.Sd,()=>{a.F=!0;a.j=!1;Al(a,_.Sd)});a.a.on(b,_.Nd,()=>{a.F=!1;a.j=!1;Al(a,_.Nd)});a.a.on(b,_.ue,c);a.a.on(b,_.Xd,c);a.a.on(b,_.de,d=>{a.m=!1;a.j=!1;Al(a,d.type)});a.a.on(b,_.ee,d=>{a.m=!0;Al(a,d.type)});a.a.on(b,he,c);a.a.on(b,_.Oe,()=>{a.j=!0;Al(a,_.Oe)});a.a.on(b,_.Xc,d=>a.U(d));a.a.on(b,_.od,c);a.a.on(b,mc,()=>{a.C=!0;Al(a,
|
|
163
|
+
mc)});a.a.on(b,_.Ce,d=>{a.m=!0;Al(a,d.type)});a.a.on(b,_.Be,d=>{a.m=!1;a.j=!1;Al(a,d.type)})};El=function(a,b){return Object.keys(b)[a]};Gl=function(a,b){const c={type:_.je};b===_.hc||b===_.gc?(c.reason=a.w,b===_.hc?c.timeSinceLastStateChangeMS=a.I:c.bufferedTimeMS=a.B):(a.f===_.Fl&&(c.reason=a.w),a.A===_.Fl&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.I);return c};
|
|
164
|
+
Bl=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Fl;a.A=a.f;a.f=b;a.A===_.Cl&&(a.J=c,a.o=0);a.o||(a.o=a.J||c);a.I=c-a.o;a.o=c;b===_.Fl?(a.L=a.o,a.w=a.m?1:2,a.g.info("Buffering started. Reason: "+El(a.w-1,_.Hl)),b=Gl(a,_.hc),a.Nb(_.hc,b)):d&&(a.B=a.o-a.L,a.g.info("Buffering finished. Reason: "+El(a.w-1,_.Hl)+". Buffering time: "+a.B+" ms"),b=Gl(a,_.gc),a.Nb(_.gc,b));b=El(a.A,_.Il);c=El(a.f,_.Il);a.g.info(`Player state change: ${b} -> ${c}`);a.Nb(_.je,Gl(a,""));return!0};
|
|
165
|
+
Al=function(a,b){if(a.f===_.Jl)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.l.isPaused();var d=a.l.getPosition();var e=a.l.getDuration();if(d=a.l.isEnded()||a.f===_.Cl&&1>=Math.abs(d-e)||c&&d>=e)Bl(a,_.Cl)&&a.g.debug("Player claims to be in ended state, not checking more");else if(b!==_.ue){e=a.l.getPosition();e=null!==e&&void 0!==e&&0<=e?a.l.getBufferInfo().Aa(e,!0):-1;a.G=e;e=a.l.getSurface().getMedia();a.h=e?e.readyState:null;a.K=a.l.getPlaybackRate()||1;
|
|
166
|
+
e=typeof a.h===_.p&&2>a.h&&2===e.networkState;var f=typeof a.h===_.p&&0>=a.G&&a.f===_.Kl,g=typeof a.h===_.p&&2>=a.h&&a.j;e=a.m||f||e||g;!a.M||a.l.isLive()||a.f!==_.Fl||e||(f=b===_.de&&4===a.h,(g=a.A===_.Ll)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Bl(a,_.Fl):c?f=Bl(a,_.Ml):a.F&&(f=Bl(a,_.Nl));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.m+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.h+", rate: "+a.K+", buffer: "+a.G+", ended: "+d+". Changed state: "+
|
|
167
|
+
f+", Current state: "+El(a.f,_.Il))}}};Ol=function(a){a=(new _.ag(a)).pa;if(!a)return null;a=a.toUpperCase();return _.Ig(a,".MPD")?_.Rb:_.Ig(a,".M3U8")?_.wi:_.Ig(a,".MP4")?_.Ie:_.Ig(a,"MANIFEST")||_.Ig(a,".ISM")?_.Wb:null};_.Ql=function(a){let b;_.Ti(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.me||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Pl(b[c]);d&&a.push(d)}return a};
|
|
168
|
+
Pl=function(a){let b=null;_.of(a)&&(a={url:a});typeof a===_.Bd&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.fc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.fc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.me||(b.name=a.name),_.z(a.zb)||typeof a.zb!==_.me||(b.zb=a.zb),_.z(a.audioMimeType)||typeof a.audioMimeType!==_.me||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Ol(a.url),b.type?Rl.debug("Detect media type "+
|
|
169
|
+
b.type+" for "+a.url):Rl.warn("Unable to detect media type for "+a.url));return b};Tl=function(a){return a.w?Sl():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.Xc);a.g.off(c,_.be);a.a=null}b()})};Sl=function(){return Promise.reject(new _.H(_.F,7,7E3))};
|
|
170
|
+
Vl=function(a,b){return a.w?Sl():new Promise(c=>{a.a||(a.g.on(b,_.Xc,()=>{{const d=Ul(a);if(d)a.onError(d)}}),a.g.on(b,_.be,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.o={width:d,height:e});a.trigger(new _.C(_.ec,{detail:{width:d,height:e}}))}),a.a=b);c()})};
|
|
171
|
+
Xl=function(a){return _.w(function*(){if(a.w)return Sl();var b=a.o[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.lj(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.m=new _.Wl({vb:c,onError:d=>a.onError(d),Md:()=>{},onExpirationUpdated:(d,e)=>{a.trigger(new _.C(_.Oc,{expirationTime:e}))},onEvent:d=>{d instanceof _.C?a.dispatchEvent(d):
|
|
172
|
+
a.log.debug(_.nb,d.type)},getConfiguration:()=>a.getConfiguration(),oc:()=>a.oc()});a.m.h=b;yield _.Rk(a.m,[{id:0,language:_.xe,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,ya:0,mimeType:_.Ie,codecs:"",encrypted:!0,keyId:null,language:_.xe,label:null,type:_.v,primary:!1,frameRate:void 0,sg:void 0,trickModeVideo:null,
|
|
173
|
+
emsgSchemeIdUris:null,roles:[],channelsCount:null,gg:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}],[]);yield _.hl(a.m,a.a);return Promise.resolve()})};Yl=function(a,b){zl(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Jl&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
|
|
174
|
+
Ul=function(a){if(null===a.o||!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,ng:c,message:a.a.error.message})};
|
|
175
|
+
$l=function(a){if(a.w)return new _.Zl(Sl(),()=>{});const b=a.o[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.I;c&&Yl(a,c);if(d.preload!==_.Ad)a.g.one(d,_.od,()=>{const g=Date.now()/1E3-e;a.f.w=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Uh()||_.Xh())&&d.load();const f=new _.Sk;a.g.one(d,he,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.C||(a.C=(new _.Qh(()=>{f.reject(new _.H(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
|
|
176
|
+
uri:b.url},d.error))})).aa(g))});zl(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(Ul(a)):d.preload===_.Ad&&(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.g.one(d,_.Xc,()=>{f.reject(Ul(a))});return new _.Zl(f,
|
|
177
|
+
()=>{const g=new _.H(_.F,7,7001);f.reject(g);return Promise.resolve()})};am=function(a,b){zl(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Jl){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)}))}})};
|
|
178
|
+
_.dm=function(a){a&&(0<=bm.indexOf(a)?cm.warn(`Factory '${a.name()}' is already registered`):(bm.push(a),cm.info(`Factory ${a.name()}' has been registered.`)))};fm=function(a,b){let c=bm.find(d=>d.ba(a,b));c||(c=new em);cm.info(`Chosen ads: ${c.name()}`);return c};_.gm=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};_.hm=function(a,b){a.classList.add(b)};
|
|
179
|
+
_.im=function(a,b){if(a&&typeof b===_.Bd)for(const c in b)a.style[c]=b[c]};_.jm=function(a){return document.createElement(a)};km=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());_.ih(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};lm=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
|
|
180
|
+
mm=function(a,b,c){(_.Xh()&&53===Yh().major||_.Xh()&&68===Yh().major||_.Zh())&&!b.hasAttribute(Jc)&&(b.style.opacity="0",b.setAttribute(Jc,""),a.j.one(b,Tc,()=>{b.removeAttribute(Jc);b.style.opacity="1";c&&(c.style.opacity="1")}))};
|
|
181
|
+
qm=function(a){a.a.on(window,"offline",()=>{nm(a,!1)});a.a.on(window,"online",()=>{a.f||om(a)});a.a.on(a.l,he,()=>pm(a));a.a.on(a.l,"suspend",()=>pm(a));a.a.on(a.l,_.Oe,()=>pm(a));a.a.on(a.l,_.Sd,()=>{a.f||om(a)});a.a.on(a.l,_.Vd,()=>{a.f||om(a)});a.a.on(a.l,_.je,()=>{switch(a.l.getState()){case _.Fl:pm(a);break;default:pm(a)}})};rm=function(a){a.g&&(a.g.stop(),a.g=null)};pm=function(a){a.f&&om(a)};
|
|
182
|
+
sm=function(a){return _.w(function*(){var b=a.l.getConfiguration().connectivityCheck;b&&a.l&&(b=yield gh(a.h,b.url,b.attemptParameters,b.method),nm(a,b))})};om=function(a){a.l.getConfiguration().connectivityCheck&&(rm(a),a.g=(new _.Qh(()=>sm(a))).aa(5))};nm=function(a,b){rm(a);a.f!==b&&(a.f=b,a.l&&a.l.getConfiguration().connectivityCheck&&a.l.trigger(new _.C(Hd,{online:a.f})))};um=function(){for(let a=0;a<tm.length;++a)tm[a].hc()};
|
|
183
|
+
_.vm=function(a,b){b=b||0;a={priority:b,hc:a};for(let c=0;c<tm.length;c++)if(tm[c].priority<b){tm.splice(c,0,a);return}tm.push(a)};wm=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};ym=function(a){if(!a.a){var b=a.license.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new xm(b[0],b[1],b[2]);a.a=b}return a.a};
|
|
184
|
+
zm=function(a){switch((a.Tc()[0]||{src:"",type:""}).type){case _.Rb:a="dash";break;case _.Wb:a="ss";break;case _.wi:a="hls";break;case _.Ie:a=_.xd;break;default:a=""}return a};Am=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Bm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
|
|
185
|
+
Cm=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Dm=function(a){a=a.getDrmInfo();return(new _.ag(a&&a.licenseServerUri||"")).Ja};Em=function(a){const b=a.getConfiguration();let c="no";b.drm&&!_.qf(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Sc)||Dm(a).endsWith("drmtoday.com"))&&(c=Sc);return c};
|
|
186
|
+
Fm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.keySystem){case _.Hc:b="wv";break;case _.Gc:b="pr";break;case _.Fc:b="fps"}return b};Gm=function(a){a=a.getDrmInfo();let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Hm=function(a){a=a.getDrmInfo();let b="";if(a)switch(a.videoRobustness){case Ea:case "HW_SECURE_ALL":b="L1";break;case Da:b="L2";break;case _.eb:case _.db:b="L3"}return b};
|
|
187
|
+
Lm=function(a,b){const c="ie"===_.ti().browser;var d=b.getConfiguration();const e=[...Array.from(_.Ui.keys()),...b.uf()];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.da,"CL-USER-ID":Am(d),"CL-ASSET-ID":Bm(d),"CL-SESSION-ID":Cm(d),"CL-PLAYBACK-TYPE":b.isLive()?Im:Jm,"CL-CONTENT-TYPE":zm(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Em(b),"CL-DRM-CDM":Fm(b),"CL-DRM-SEC-LEVEL":Hm(b),"CL-DRM-OFFLINE":Gm(b),"CL-DRM-IP":Dm(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=
|
|
188
|
+
d);d=_.Yg(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Km).fetch(d).R.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=ym(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=
|
|
189
|
+
k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.f.error(Ha+k);g=Promise.reject(new _.H(_.F,7,g,k))}}return g})};_.Nm=function(a){a&&(0<=Mm.indexOf(a)||Mm.push(a))};
|
|
190
|
+
Pm=function(a){if(!a.M){a.M=!0;a.h.getMedia()||a.h.getCastElement();a.w||(a.w=new Om(a.f.license));var b=Object.keys(a.L);Lm(a.w,{getConfiguration:a.getConfiguration.bind(a),Tc:a.Tc.bind(a),getDrmInfo:a.getDrmInfo.bind(a),uf:()=>b,isLive:a.isLive.bind(a)}).then(()=>{a.g.debug("License verified remotely")}).catch(c=>{setTimeout(wm,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)})}};
|
|
191
|
+
Qm=function(a,b){a.w=new Om(b);a.w.verify().catch(c=>{setTimeout(()=>{a.g.error(Ha+c);a.trigger(new _.C(_.Xc,{detail:new _.H(_.F,7,7101)}));a.destroy()},1E3)})};Sm=function(a,b){a.K=b;for(const c of a.K)(b=c.id())&&(a.L[b]=c);_.Rm(a,"onPlayerCreated")};_.Tm=function(a,b){b!==a.a&&(a.a&&(a.a.removeDelegate(a),a.a.destroy()),a.a=b,a.a&&(a.a.init(a.h,a.f),a.a.setNetworkEngine(a.getNetworkEngine()),a.a.addDelegate(a)))};
|
|
192
|
+
_.Rm=function(a,b,...c){const d=a.K.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
|
|
193
|
+
Um=function(a){return _.w(function*(){if(a.I)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.off(_.je,a.B);a.A.off(a,_.je,a.B);a.A.off(document,Me);a.trigger(new _.C(_.Zd));a.M=!1;a.h&&a.h.release();a.j&&(yield a.j.dispose(),a.j=null);Yi(b=>{b.release()});if(a.a){let b=null;const c=a.a.on(_.je,d=>{b=d});return _.Rm(a,_.Fd).then(()=>{a.a.removeDelegate(a);return Promise.all([a.a.release(),a.G.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
|
|
194
|
+
a.trigger(b))}).finally(()=>{a.a.off(_.je,c);a.trigger(new _.C(Yd))})}a.trigger(new _.C(Yd));return new Promise(b=>b())})};
|
|
195
|
+
Xm=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.Kf);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Db:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.p&&0<f.confidence?(_.Lf.debug("Player Factory '"+f.Db.a()+"' can play",b[g]),f=new Vm(f.Db,g)):(_.Lf.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Db.create(),d(new Wm(e,f.a))):
|
|
196
|
+
(d=new _.C(_.Xc,{detail:new _.H(_.F,7,7003)}),a.trigger(d),e(d))})};
|
|
197
|
+
_.$m=function(a,b){return _.w(function*(){if(a.F)throw Error("Player is already destroyed.");if(!a.h)throw Error("No surface associated with this player!");yield a.release();a.o=_.Ql(b);a.f=_.Si(a.O,_.Ti(b)?b:{},{source:a.o});if(0===a.o.length)throw Error("Invalid request to load: could not find source to load");a.I=!1;let c;var d=0;if(a.J||2!==a.canPlay(a.o[0],a.f))d=yield Xm(a,a.o,a.f),c=d.a,d=d.f,a.J=!1;c?_.Tm(a,c):a.a.addDelegate(a);Ym(a);a.a&&a.a.setCdnErrorCallback(a.C);Zm(a,a.f);a.setSourceIndex(d);
|
|
198
|
+
if(a.f.pauseWhenInBackground)a.A.on(document,Me,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Yi(e=>{e.g()});yield _.Rm(a,"onContentWillLoad",a.f.source[d])})};_.an=function(a){return _.w(function*(){a.h.getMedia()||a.h.getCastElement();a.A.on(a,_.je,a.B);a.trigger(new _.C(pd));yield Promise.all([a.a.load(a.f),a.j.load()])})};
|
|
199
|
+
_.cn=function(a){return _.w(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);bn(a);Yi(()=>{});yield _.Rm(a,"onContentLoaded");a.f.autoplay&&(yield a.play())})};Ym=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.kc&&a.md&&(a.md=!1,yield a.kc(b))}))};Zm=function(a,b){a.j=fm(a,b).create(a)};
|
|
200
|
+
bn=function(a){const b=_.hh(a.f.preferredTextLanguage).filter(d=>d),c=a.getTrackManager().ga();b.some(d=>{const e=_.Kh(d);return(d=c.find(f=>{f=_.Kh(f.language||"");return _.Lh(f,e)}))?(a.getTrackManager().za(d),!0):!1})};dn=function(a,b){a.size=void 0===b?0:1;a.f.debug("Setting key status to",b);a.a=b};
|
|
201
|
+
en=function(a,b){a.g=b;_.Of(a.f);if(!b)return Promise.resolve();a.f.on(b,Uc,c=>{_.If("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.a.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.f.on(b,Ue,c=>{{a.a.debug("Handle webkitNeedKey event");c=_.G(c.initData);if(_.xg(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Cg(c.subarray(4),
|
|
202
|
+
!0);c=_.Eg(c);const d=new Event(Uc);d.initDataType="skd";d.initData=yg(c);a.g.dispatchEvent(d)}});zl(b,HTMLMediaElement.HAVE_METADATA,a.f,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};fn=function(a,b){dn(a.keyStatuses,b);b=new _.C(ed);a.dispatchEvent(b)};
|
|
203
|
+
jn=function(a,b){a.a=b;_.Of(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Uc);d.initDataType=_.qc;d.initData=yg(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=gn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.C(sd,{messageType:d?kd:jd,message:c.message});d=e;_.If("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.Jf("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{if(c=gn(a,
|
|
204
|
+
c.sessionId))_.If("WebkitEmeManager.MediaKeySession.ready"),hn(c,"usable"),c.a&&c.a.resolve(),c.a=null}),a.f.on(b,a.g+"keyerror",c=>{var d=gn(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?hn(d,_.Md):1===e?hn(d,"expired"):
|
|
205
|
+
hn(d,_.dd))}}}))};gn=function(a,b){let c=a.j.get(b);return c?c:(c=a.h.shift())?(c.sessionId=b,a.j.set(b,c),c):null};hn=function(a,b){dn(a.keyStatuses,b);b=new _.C(ed);a.dispatchEvent(b)};kn=function(a,b){return a.o?a.o+b.charAt(0).toUpperCase()+b.slice(1):b};
|
|
206
|
+
ln=function(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;let d;try{if(a.j===_.Pd)if(c)d=_.G(_.Eg("LOAD_SESSION|"+c));else{const f=_.Eg("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.G(b),f.byteLength);d=g}else d=_.G(b)}catch(f){return Promise.reject(f)}a.f=new _.Sk;const e=kn(a,"generateKeyRequest");try{a.h[e](a.g,d)}catch(f){if(f.name!==Ga)return a.f=null,Promise.reject(f);(new _.Qh(()=>{try{a.h[e](a.g,d)}catch(g){a.f.reject(g),
|
|
207
|
+
a.f=null}})).aa(.01)}return a.f};mn=function(a,b,c){if(a.a)a.a.then(()=>mn(a,b,c)).catch(()=>mn(a,b,c));else{a.a=b;if(a.g===Qe){var d=_.Ag(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=_.aj(e.keys[0].k);e=_.aj(e.keys[0].kid)}else d=_.G(c),e=null;var f=kn(a,"addKey");try{a.h[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
|
|
208
|
+
nn=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Zc?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};on=function(a){a=a.target;if(a.webkitPresentationMode===Qd){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)};
|
|
209
|
+
pn=function(){return this.webkitSupportsPresentationMode(Qd)?(this.webkitSetPresentationMode(Qd),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};qn=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
|
|
210
|
+
rn=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};sn=function(a,b,c){return new window.TextTrackCue(a,b,c)};tn=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};vn=function(a,b,c){if("input"===a)switch(this.type){case "range":a=tc}un.call(this,a,b,c)};wn=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
|
|
211
|
+
xn=function(a){return wn()-a.a};zn=function(a){const b=new yn;b.a=a.a;return b};_.An=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Cn=function(a,b,c,d){return _.w(function*(){try{return new (yield Bn(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
|
|
212
|
+
Bn=function(a,b,c,d){return _.w(function*(){if(d){var e=_.Dn[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.En(a)){const f=_.Fn[e];if(f)return f;_.B("Could not determine manifest type for extension ",e)}else _.B("Could not find extension for ",a);if(!d&&(d=yield Gn(a,b,c))){if(e=_.Dn[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.H(_.F,4,4E3,{url:a});})};
|
|
213
|
+
_.En=function(a){a=(new _.ag(a)).pa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};Gn=function(a,b,c){return _.w(function*(){var d=_.Yg(a);Wg(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).R).headers["content-type"])?d.toLowerCase():""})};Hn=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};
|
|
214
|
+
In=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Hn(a,e),ah(c,e.byteLength,xn(a.g)),a.g.a=wn());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>In(a,b,c))})};
|
|
215
|
+
Kn=function(a){const b=a.uris[a.uriIndex],c=new Jn,d=new yn,e=zn(d);let f=0;const g=new _.Sk;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let h=!1,k=!1;c.onreadystatechange=function(l){l=l.target;l.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!h&&(l=l.getResponseHeader(qa),$g(a,l),h=!0)};c.onload=function(l){l=l.target;var m=(l.getAllResponseHeaders()||"").trim().split("\r\n");const n={};for(const q of m)m=q.split(": "),n[m[0].toLowerCase()]=
|
|
216
|
+
m.slice(1).join(": ");try{const q=xn(e);k||ah(a,l.response?l.response.length:0,q);const t=_.Zg(n,l.response,l.status,b,l.responseURL,a,q);a.rateLimitBps?bh(a.rateLimitBps,xn(e),a.bytesLoaded).then(()=>{g.resolve(t)}):g.resolve(t)}catch(q){g.reject(q)}};c.onerror=function(l){l=l.target;if(0>=l.status)g.reject(new _.H(1,1,1002,{url:b,request:a,status:l.status}));else{var m=l.getAllResponseHeaders();const q={};if(m){m=m.trim().split("\r\n");for(var n of m)m=n.split(": "),q[m[0].toLowerCase()]=m.slice(1).join(": ")}n=
|
|
217
|
+
_.Zg(q,l.response,l.status,b,l.responseURL,a,xn(e));g.resolve(n)}};c.ontimeout=function(){g.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(l){const m=xn(d);d.a=wn();if(100<m||l.lengthComputable&&l.loaded===l.total)ah(a,l.loaded-f,m),f=l.loaded,k=!0};for(const l in a.headers)c.setRequestHeader(l.toLowerCase(),a.headers[l]);c.send(a.body);return{R:g,request:a,abort:()=>{c.abort();g.reject(new _.H(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};
|
|
218
|
+
Ln=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.h.a.buffer,a.g,a.f-a.g),count:-1});return b};Mn=function(a,b){{var c=a.h;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.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.h.f;a.j=new DataView(a.h.a.buffer,0,a.h.f)};
|
|
219
|
+
On=function(a){if(0<=a.m&&a.f<a.m)return null;let b=Nn(a);for(;null!==b;){if(b.name===_.qd){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.h.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=Nn(a)}return null};
|
|
220
|
+
Pn=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,xn(a.o)),a.o.a=wn());if(f)return e=Ln(a),(e=c(!0,e))?e.then(()=>a.h.a.buffer):Promise.resolve(a.h.a.buffer);let h=Promise.resolve();if(null!=g){Mn(a,g);var k=On(a);for(e=[];k;)e.push(k),k=On(a);if(!a.w)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.h.a.buffer,k.start,m),count:e.length}}(e=
|
|
221
|
+
c(!1,k))&&(h=e)}}return h.then(()=>Pn(a,b,c,d))})};
|
|
222
|
+
Nn=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Qn(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Qn(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.j.getUint32(a.a,!1),e=a.j.getUint32(a.a+4,!1)}catch(g){throw new _.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.m=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
|
|
223
|
+
Qn=function(a){const b=a.j.getUint32(a.a,!1);a.a+=4;return b};
|
|
224
|
+
Tn=function(a){a.g=a.A.then(e=>{a.h=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=Rn(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Rn(e.request.fuzzFactor,.5));a.f*=Rn(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.j=h;Sn(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)});
|
|
225
|
+
let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.R}).then(e=>{a.o.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 Tn(a);g&&e.a(_.F);a.o.reject(e)}else a.o.reject(e)})};Sn=function(a,b,c){a.m=setTimeout(b,c)};Rn=function(a,b){return null===a||void 0===a?b:a};
|
|
226
|
+
Xn=function(a){var b=new Un;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Vn,d={vc:!1,Ne:!1};b={R:Wn(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.vc||(d.vc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Ne=!0;c.abort()},a);b.R=b.R.finally(()=>{window.clearTimeout(e)})}return b};
|
|
227
|
+
Wn=function(a,b,c,d){return _.w(function*(){let e,f;const g=new yn,h=zn(g);try{e=yield Yn(a,c);const l=e.headers.get(qa);$g(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=e.body.getReader();f=yield Pn(new Zn(m,!b.disableMergedFragments),n,(q,t)=>{if(d.vc)return null;t&&t.data&&(ah(b,t.data.byteLength,xn(g)),g.a=wn());return b.onFragment&&t?b.rateLimitBps?bh(b.rateLimitBps,xn(h),b.bytesLoaded).then(()=>b.onFragment(t)):b.onFragment(t):null},b.onProgress)}else{const n=
|
|
228
|
+
e.body.getReader();f=yield In(new $n(m),n,b);b.rateLimitBps&&(yield bh(b.rateLimitBps,xn(h),f.byteLength))}}catch(l){if(d.vc)throw new _.H(1,1,7001,{url:a,request:b});if(d.Ne)throw new _.H(1,1,1003,{url:a,request:b});_.Jf("Error while fetching data:",l);throw new _.H(1,1,1002,{url:a,error:l,request:b,status:-1},l);}const k={};e.headers.forEach((l,m)=>{k[m.trim()]=l});if(d.vc)throw new _.H(1,1,7001,{url:a,request:b});return _.Zg(k,f,e.status,a,e.url,b,xn(h))})};
|
|
229
|
+
bo=function(a){try{const b=a.uris[a.uriIndex],c=_.ao(b);return{R:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{R:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
|
|
230
|
+
_.ao=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Jf("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 _.Jf("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?_.aj(a).buffer:_.Eg(a).buffer,contentType:c}};_.eo=function(a){delete _.co[a]};
|
|
231
|
+
_.jo=function(a){if(!a.o)return null;const b=a.G;switch(a.o){case fo:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case go:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case ho:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case io:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ad}};bf="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
|
|
232
|
+
cf=typeof Object.defineProperties==_.Zc?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
|
233
|
+
df("Promise",function(a){function b(g){this.f=0;this.j=void 0;this.a=[];var h=this.g();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.g(function(){h.j()})}this.a.push(g)};var e=bf.setTimeout;c.prototype.g=function(g){e(g,0)};c.prototype.j=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
|
|
234
|
+
g[h];g[h]=null;try{k()}catch(l){this.h(l)}}}this.a=null};c.prototype.h=function(g){this.g(function(){throw g;})};b.prototype.g=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.B),reject:g(this.h)}};b.prototype.B=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.C(g);else{a:switch(typeof g){case _.Bd:var h=null!=g;break a;case _.Zc:h=!0;break a;default:h=!1}h?this.A(g):this.m(g)}};
|
|
235
|
+
b.prototype.A=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.Zc?this.F(h,g):this.m(g)};b.prototype.h=function(g){this.o(2,g)};b.prototype.m=function(g){this.o(1,g)};b.prototype.o=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.j=h;this.w()};b.prototype.w=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.C=function(g){var h=this.g();
|
|
236
|
+
g.Kc(h.resolve,h.reject)};b.prototype.F=function(g,h){var k=this.g();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,t){return typeof q==_.Zc?function(u){try{l(q(u))}catch(y){m(y)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Kc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Kc=function(g,h){function k(){switch(l.f){case 1:g(l.j);break;case 2:h(l.j);break;default:throw Error("Unexpected state: "+
|
|
237
|
+
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=af(g),m=l.next();!m.done;m=l.next())d(m.value).Kc(h,k)})};b.all=function(g){var h=af(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(y){q[u]=y;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Kc(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var ff=this||self;
|
|
238
|
+
ff.a=!0;_.x("clpp.utils.obj.cloneItem",_.jf);_.x("clpp.utils.obj.merge",_.hf);var Ef={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",Ef);var yf=3,xf={},ko=[];_.x("clpp.log.getLoggers",function(){return _.jf(xf)});_.x("clpp.log.addInterceptor",function(a){a&&ko.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=ko.indexOf(a),0<=a&&ko.splice(a,1))});_.x("clpp.log.getTagLevel",zf);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=xf[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.of(b)&&(b=Ff(b)),xf[a]=b)});
|
|
239
|
+
_.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.of(a)&&(a=Ff(a));yf=a});_.x("clpp.log.getLogLevel",function(){return yf});
|
|
240
|
+
_.O=class{constructor(a){(this.a=a)&&void 0===xf[a]&&(xf[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=zf(this.a);if(0<=d){if(d<c)return}else if(yf<c)return;this.a&&Array.prototype.unshift.call(arguments,"["+this.a+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,arguments):
|
|
241
|
+
2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of ko)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)}df(a){return a?
|
|
242
|
+
this.a?new _.O(this.a+"."+a):new _.O(a):this}};_.x("clpp.log.Logger",_.O);_.O.prototype.createChild=_.O.prototype.df;_.O.prototype.error=_.O.prototype.error;_.O.prototype.warn=_.O.prototype.warn;_.O.prototype.debug=_.O.prototype.debug;_.O.prototype.info=_.O.prototype.info;_.O.prototype.log=_.O.prototype.log;var Gf=new _.O("clpp");_.x("clpp.log.info",_.Hf);_.x("clpp.log.debug",_.If);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.Jf);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Vm,Wm;Vm=class{constructor(a,b){this.Db=a;this.a=b}};Wm=class{constructor(a,b){this.a=a;this.f=b}};_.Lf=new _.O("clpp.players");_.Kf={};_.lo=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]==b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var mo,no;mo=class{constructor(a,b,c,d){this.f=a;this.hc=b;this.a=c;this.Nf=!!d}Nb(a){try{this.hc.handleEvent?this.hc.handleEvent(a):this.hc.call(this.a,a)}catch(b){_.Jf("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
|
|
232
243
|
_.C=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(){}};
|
|
233
|
-
|
|
234
|
-
_.
|
|
235
|
-
_.
|
|
236
|
-
_
|
|
237
|
-
_
|
|
238
|
-
_.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
_.
|
|
244
|
+
no=class{constructor(a){this.a=new _.lo;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].Nb(a),b[c].Nf&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new mo(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new mo(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].hc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var oo;_.po=class{constructor(){this.a=new _.lo}release(){_.Of(this)}on(a,b,c,d=!1){a=new oo(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||(Nf(f),this.a.remove(b,f))}}};oo=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 qo=class{constructor(a){this.l=a;this.m=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.h=null;this.f=new _.po;this.a=this.j=null;this.g=[];this.o=new _.O("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.w(function*(){a.release();a.j=null;a.h=null})}getTimelineCues(){return this.g}};_.xo=class{constructor(a,b,c,d){d=void 0===d?_.ro:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.so;this.writingMode=_.to;this.lineInterpretation=_.uo;this.line=null;this.lineAlign=_.vo;this.direction=wo;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}};_.x("clpp.text.Cue",_.xo);_.xo.positionAlign={LEFT:_.ld,RIGHT:_.md,CENTER:_.rc,AUTO:"auto"};_.ro=_.r;
|
|
245
|
+
_.xo.payloadType={TEXT:_.ro,VTT_XML:_.Ne,TTML_XML:_.we};_.so=_.rc;_.yo={LEFT:_.gd,RIGHT:_.ce,CENTER:_.so,START:_.gd,END:_.ce};_.xo.textAlign=_.yo;var wo="ltr";_.xo.direction={HORIZONTAL_LEFT_TO_RIGHT:wo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.to="horizontal-tb";_.xo.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.to,VERTICAL_LEFT_TO_RIGHT:_.Ee,VERTICAL_RIGHT_TO_LEFT:_.Ge};_.uo=0;_.xo.lineInterpretation={LINE_NUMBER:_.uo,PERCENTAGE:1};_.vo=_.ie;_.zo={CENTER:_.rc,START:_.vo,END:_.Vc};_.xo.lineAlign=_.zo;
|
|
246
|
+
_.Co=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.Ao;this.scroll=Bo;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.Co);_.Ao=1;_.Co.units={PX:0,PERCENTAGE:_.Ao,LINES:2};var Bo="";_.Co.scrollMode={NONE:Bo,UP:"up"};_.Co.displayAlign={BEFORE:"flex-end",CENTER:_.rc,AFTER:"flex-start"};
|
|
247
|
+
_.Co.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Dc,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Do=class{constructor(a){this.l=a;this.j=a.getTextDisplayer();this.f=this.g=null;this.a=new _.po;this.h=!1;this.m=new _.O("clpp.native.CueHandler")}destroy(){this.a.release();this.h=!1;this.j=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.h?this.m.warn("Already started. Ignoring request..."):(this.h=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.Kb,b=>Zf(this,b)),this.a.on(this.f,tc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.fe&&(d.mode=
|
|
248
|
+
_.ad)}}}))}o(a){const b=new _.xo(a.startTime,a.endTime,a.text,_.Ne);if(_.of(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Ee;break;case "rl":b.writingMode=_.Ge}_.pf(a.size)&&(b.size=a.size);if(_.of(a.align))switch(a.align){case _.gd:case _.ie:b.textAlign=_.gd;break;case _.rc:b.textAlign=_.so;break;case _.ce:case _.Vc:b.textAlign=_.ce}_.pf(a.position)&&(b.position=a.position);if(_.of(a.positionAlign))switch(a.positionAlign){case _.ld:b.positionAlign=_.ld;break;case _.rc:b.positionAlign=
|
|
249
|
+
_.rc;break;case _.md:b.positionAlign=_.md}_.pf(a.line)&&(b.line=a.line);if(_.of(a.lineAlign))switch(a.lineAlign){case _.ie:b.lineAlign=_.vo;break;case _.rc:b.lineAlign=_.rc;break;case _.Vc:b.lineAlign=_.Vc}typeof a.snapToLines===_.fc&&(b.lineInterpretation=a.snapToLines?_.uo:1);return b}};var fg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Ze=_.ag.prototype;Ze.Sa="";Ze.ec="";Ze.Ja="";Ze.rc=null;Ze.pa="";Ze.Ub="";Ze.toString=function(){var a=[],b=this.Sa;b&&a.push(ig(b,Eo,!0),":");if(b=this.Ja){a.push("//");var c=this.ec;c&&a.push(ig(c,Eo,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.rc;null!=b&&a.push(":",String(b))}if(b=this.pa)this.Ja&&"/"!=b.charAt(0)&&a.push("/"),a.push(ig(b,"/"==b.charAt(0)?Fo:Go,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Ub)&&a.push("#",ig(b,Ho));return a.join("")};
|
|
250
|
+
Ze.resolve=function(a){var b=new _.ag(this);"data"===b.Sa&&(b=new _.ag);var c=!!a.Sa;c?bg(b,a.Sa):c=!!a.ec;c?b.ec=a.ec:c=!!a.Ja;c?b.Ja=a.Ja:c=null!=a.rc;var d=a.pa;if(c)cg(b,a.rc);else if(c=!!a.pa){if("/"!=d.charAt(0))if(this.Ja&&!this.pa)d="/"+d;else{var e=b.pa.lastIndexOf("/");-1!=e&&(d=b.pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
|
|
251
|
+
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.pa=d:c=""!==a.a.toString();c?_.dg(b,eg(a.a)):c=!!a.Ub;c&&(b.Ub=a.Ub);return b};var Eo=/[#\/\?@]/g,Go=/[#\?:]/g,Fo=/[#\?]/g,jg=/[#\?@]/g,Ho=/#/g;hg.prototype.a=null;hg.prototype.g=null;hg.prototype.add=function(a,b){_.lg(this);this.f=null;var c=this.a.hasOwnProperty(a)&&this.a[a];c||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
|
|
252
|
+
hg.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")};_.Io=1/15;var Jo;Jo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Ch=(a,b)=>{const c=Jo[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===_.r?"":null};var Ko={text:{mp4:_.Sb,m4s:_.Sb,m4i:_.Sb,cmft:_.Sb,vtt:_.se,ttml:_.Vb},video:{mp4:_.Ie,m4s:_.Ie,m4i:_.Ie,m4v:_.Ie,cmfv:_.Ie,ts:_.He},audio:{mp4:_.bc,m4s:_.bc,m4i:_.bc,m4a:_.bc,cmfa:_.bc,ts:_.He,aac:_.Zb,ec3:_.ac,ac3:_.$b},image:{jpg:_.cd,jpeg:_.cd,png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Fh=a=>a.map(b=>{b=(new _.ag(b)).pa.split(".");b=1>=b.length?null:b.pop();return b=(b=Ko.video[b||""])?b:null}).filter(Boolean)[0]||null;_.H=class extends Error{constructor(a,b,c,d,e){super(mg(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.of(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=mg(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.H);_.F=2;_.H.Severity={RECOVERABLE:1,FATAL:_.F};
|
|
253
|
+
_.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
|
|
254
|
+
_.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,
|
|
242
255
|
TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,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,
|
|
243
256
|
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,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,
|
|
244
257
|
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,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,
|
|
@@ -246,56 +259,55 @@ DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_
|
|
|
246
259
|
FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,
|
|
247
260
|
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,INVALID_CONTAINER_ELEMENT:7006,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,
|
|
248
261
|
ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,
|
|
249
|
-
BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};
|
|
250
|
-
|
|
251
|
-
_.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
_.
|
|
256
|
-
"
|
|
262
|
+
BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3};_.Sg=class{constructor(a,b,c,d=null){this.id=a;this.name=b;this.attributes=c;this.value=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}};_.Pg=class{constructor(a,b){this.name=a;this.value=b}};_.Og=class{constructor(a){this.f=a;this.a=0}};var Lo=class{};_.x("clpp.utils.BufferUtils",Lo);Lo.toArrayBuffer=yg;Lo.toDataView=_.xg;Lo.toInt32Array=_.wg;Lo.toUint32Array=vg;Lo.toUint16Array=ug;Lo.toUint8Array=_.G;Lo.equal=sg;var Bg=new _.O("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.Ag);_.x("clpp.utils.strings.fromBytesAutoDetect",_.Dg);_.x("clpp.utils.strings.toUtf8",_.Eg);_.x("clpp.utils.strings.toUtf16",_.Fg);_.x("clpp.utils.strings.toByteArray",_.Gg);_.x("clpp.utils.strings.startsWith",_.Hg);_.x("clpp.utils.strings.endsWith",_.Ig);_.x("clpp.utils.strings.bitrateToString",_.Lg);
|
|
263
|
+
_.x("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
|
|
264
|
+
_.x("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var Mg=document.createElement("span");var Ug=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",Ug);_.x("clpp.net.makeRequest",_.Yg);_.Xg=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Xg});_.Sk=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.Zl=class{constructor(a,b){this.R=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Lc(a,b){const c=new _.Sk;let d=()=>{c.reject(new _.H(_.F,7,7001));return this.abort()};this.R.then(e=>{this.a?c.reject(new _.H(_.F,7,7001)):a?d=ch(a,e,c):c.resolve(e)},e=>{b?d=ch(b,e,c):c.reject(e)});return new _.Zl(c,()=>d())}};_.Zl.aborted=function(){const a=Promise.reject(new _.H(_.F,7,7001));a.catch(()=>{});return new _.Zl(a,()=>Promise.resolve())};_.Zl.prototype.chain=_.Zl.prototype.Lc;_.Mo=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.R.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Km=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.Mo;this.a={};this.h=0;this.a.data=bo;!window.fetch||!window.AbortController||_.Uh(6)||_.Xh()&&68<_.ti().browserVersion.major?(this.a.http=Kn,this.a.https=Kn):(this.a.http=Xn,this.a.https=Xn)}Tf(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.h=a}release(){return this.j.destroy()}destroy(){this.m=!0;this.f=[];this.g=[];return this.j.destroy()}We(a){this.f.push(a)}ed(a){this.g.push(a)}Of(a){this.f=this.f.filter(b=>
|
|
265
|
+
b!==a)}Rd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new No(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.h&&0<this.h&&(a.rateLimitBps=this.h);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;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.Sk;try{for(const f of a.requestModifiers)d=d.then(g=>
|
|
266
|
+
{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=>{var g=new _.ag(f.uris[f.uriIndex]);var h=g.Sa;h||(h=location.protocol,h=h.slice(0,-1),bg(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.F,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new No(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.F,1,7001,
|
|
267
|
+
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);if(h)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);});_.eh(this.j,e);c.resolve(a);return e}catch(f){return new No(Promise.reject(f))}}};_.Km.prototype.fetch=_.Km.prototype.fetch;_.Km.prototype.removeResponseModifier=_.Km.prototype.Rd;
|
|
268
|
+
_.Km.prototype.removeRequestModifier=_.Km.prototype.Of;_.Km.prototype.addResponseModifier=_.Km.prototype.ed;_.Km.prototype.addRequestModifier=_.Km.prototype.We;_.Km.prototype.setRateLimit=_.Km.prototype.Tf;var kh;_.nh=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.channelsCount=this.src=this.mimeType=this.frameRate=this.label=this.language=this.kind=null;this.renditions=[];this.accessibility=[]}toString(){return`Track type: ${this.type} id: ${this.id}
|
|
269
|
+
renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.nh);_.nh.prototype.toString=_.nh.prototype.toString;_.uh=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.uc=this.bandwidth=this.height=this.width=null}};_.x("clpp.Rendition",_.uh);_.mh=1;_.K=_.v;_.J=_.Yb;_.I=_.r;kh=_.td;_.Oo={VIDEO:_.K,AUDIO:_.J,TEXT:_.I,METADATA:kh};_.nh.Type=_.Oo;_.Fj=class{constructor(a){this.h=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;
|
|
270
|
+
_.Hg(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.x("clpp.utils.url.queryString",_.qh);var yi=class{constructor(a){this.a=a}};_.Gh=[];_.P=class{jd(){return!0}mf(a){return this.getVideoTracks().find(b=>_.qf(b,a,a&&Object.keys(a)))}hf(a){return this.getAudioTracks().find(b=>_.qf(b,a,a&&Object.keys(a)))}kf(a){return this.ga().find(b=>_.qf(b,a,a&&Object.keys(a)))}lf(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.qf(b,a,a&&Object.keys(a)))}gf(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.qf(b,a,a&&Object.keys(a)))}jf(a){return this.ga().flatMap(b=>b.renditions).find(b=>_.qf(b,a,a&&Object.keys(a)))}};
|
|
271
|
+
_.x("clpp.TrackManager",_.P);_.P.prototype.isAbrEnabled=_.P.prototype.ia;_.P.prototype.addTextTrack=_.P.prototype.addTextTrack;_.P.prototype.findTextRendition=_.P.prototype.jf;_.P.prototype.findAudioRendition=_.P.prototype.gf;_.P.prototype.findVideoRendition=_.P.prototype.lf;_.P.prototype.findTextTrack=_.P.prototype.kf;_.P.prototype.findAudioTrack=_.P.prototype.hf;_.P.prototype.findVideoTrack=_.P.prototype.mf;_.P.prototype.setTextRendition=_.P.prototype.jb;_.P.prototype.setAudioRendition=_.P.prototype.ib;
|
|
272
|
+
_.P.prototype.setVideoRendition=_.P.prototype.Ta;_.P.prototype.setTextTrack=_.P.prototype.za;_.P.prototype.setAudioTrack=_.P.prototype.qa;_.P.prototype.setVideoTrack=_.P.prototype.Ua;_.P.prototype.getTextTrack=_.P.prototype.la;_.P.prototype.getAudioTrack=_.P.prototype.ka;_.P.prototype.getVideoTrack=_.P.prototype.Fa;_.P.prototype.getLoadingTextRendition=_.P.prototype.cb;_.P.prototype.getLoadingAudioRendition=_.P.prototype.bb;_.P.prototype.getLoadingVideoRendition=_.P.prototype.Oa;
|
|
273
|
+
_.P.prototype.getTextRendition=_.P.prototype.Da;_.P.prototype.getAudioRendition=_.P.prototype.Ca;_.P.prototype.getVideoRendition=_.P.prototype.fa;_.P.prototype.getTextTracks=_.P.prototype.ga;_.P.prototype.getAudioTracks=_.P.prototype.getAudioTracks;_.P.prototype.getVideoTracks=_.P.prototype.getVideoTracks;_.P.prototype.canSelectVideoTracks=_.P.prototype.jd;var Jh=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",
|
|
274
|
+
"cs"],["dan","da"],["deu","de"],[_.Nc,"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",
|
|
257
275
|
"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",
|
|
258
276
|
"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",
|
|
259
277
|
"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",
|
|
260
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.
|
|
261
|
-
|
|
262
|
-
c);return}try{e.renditions.push(new _.bo(e.id,e));this.h.push(e);this.a.debug(a+" Track added",e);this.l.trigger(new _.C(_.ho));const g=Yg(this,a).length;f=a===_.J||a===_.I;if(b||1===g&&f)this.a.debug(`Setting native ${a} track active. `+`Native track active: ${b}. `+`Number of tracks: ${g}`,c),this.f.set(a,e)}catch(g){this.a.error("Error while converting track data",g)}}}else this.a.warn(Oa)}else this.a.warn(Na)}B(a,b){if(b){var c=b.track;c?a===_.H&&c.kind!==_.od&&(b=this.h.find(d=>Wg(d,c,a)))&&
|
|
263
|
-
(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Zg(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Oa)}else this.a.warn(Na)}A(a,b){this.a.debug(a+" Track changed",b);a===_.H&&Zg(this);const c=ah(this,a);if(c)for(let d=0;d<c.length;++d)if(Xg(c[d])){if(b=this.h.find(e=>Wg(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",b.id),b===this.j.get(a)&&this.j.set(a,null),a===_.I?this.l.trigger(new _.C(_.dh)):a===_.H&&this.l.trigger(new _.C(_.eh));
|
|
264
|
-
break}}initialize(a){this.l=a}load(){this.o=!1;var a=$g(this,_.H);a&&(this.g.on(a,_.Gb,this.K),this.g.on(a,Wd,this.N),this.g.on(a,qc,this.M));if(a=$g(this,_.I))this.g.on(a,_.Gb,this.H),this.g.on(a,Wd,this.J),this.g.on(a,qc,this.I);if(a=$g(this,_.J))this.g.on(a,_.Gb,this.R),this.g.on(a,Wd,this.T),this.g.on(a,qc,this.S);this.g.one(this.l,jc,this.D.bind(this))}release(){this.o=!0;this.h=[];this.m={};this.f.clear();this.j.clear();this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Yg(this,
|
|
265
|
-
_.J)}getAudioTracks(){return Yg(this,_.I)}da(){return Yg(this,_.H)}ea(){return bh(this,_.J)}Ca(){return bh(this,_.I)}Da(){return bh(this,_.H)}Na(){return ch(this,_.J)}ab(){return ch(this,_.I)}bb(){return ch(this,_.H)}Fa(){return this.f.get(_.J)||null}ia(){return this.f.get(_.I)||null}ja(){return this.f.get(_.H)||null}Ta(a){fh(this,_.J,a)}na(a){fh(this,_.I,a)}ya(a){fh(this,_.H,a)}Sa(a){fh(this,_.J,a&&a.track)}hb(a){fh(this,_.I,a&&a.track)}ib(a){fh(this,_.H,a&&a.track)}addTextTrack(a){const b=this;
|
|
266
|
-
return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.C++}`;b.m[c]=a;gh(b,a,c)}else yield hh(b,a)})}D(){const a=this;return _.w(function*(){const b=a.l.getConfiguration();ih(a,_.I,b.preferredAudioLanguage);if(!ah(a,_.H).some(c=>Xg(c))){const c=$g(a,_.H);yield new Promise(d=>{a.g.one(c,qc,d);(new _.Dh(d)).ba(1)})}a.o||ih(a,_.H,b.preferredTextLanguage)})}ga(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}};P.prototype.isAbrEnabled=P.prototype.ga;
|
|
267
|
-
P.prototype.addTextTrack=P.prototype.addTextTrack;P.prototype.setTextRendition=P.prototype.ib;P.prototype.setAudioRendition=P.prototype.hb;P.prototype.setVideoRendition=P.prototype.Sa;P.prototype.setTextTrack=P.prototype.ya;P.prototype.setAudioTrack=P.prototype.na;P.prototype.setVideoTrack=P.prototype.Ta;P.prototype.getTextTrack=P.prototype.ja;P.prototype.getAudioTrack=P.prototype.ia;P.prototype.getVideoTrack=P.prototype.Fa;P.prototype.getLoadingTextRendition=P.prototype.bb;
|
|
268
|
-
P.prototype.getLoadingAudioRendition=P.prototype.ab;P.prototype.getLoadingVideoRendition=P.prototype.Na;P.prototype.getTextRendition=P.prototype.Da;P.prototype.getAudioRendition=P.prototype.Ca;P.prototype.getVideoRendition=P.prototype.ea;P.prototype.getTextTracks=P.prototype.da;P.prototype.getAudioTracks=P.prototype.getAudioTracks;P.prototype.getVideoTracks=P.prototype.getVideoTracks;_.io=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(gb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(gb);}lb(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}ua(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
|
|
269
|
-
1)}Ub(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}Aa(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.ua(),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}};
|
|
270
|
-
_.y("clpp.BufferInfo",_.io);_.io.prototype.bufferedAheadOf=_.io.prototype.Aa;_.io.prototype.isBuffered=_.io.prototype.Ub;_.io.prototype.bufferEnd=_.io.prototype.ua;_.io.prototype.bufferStart=_.io.prototype.lb;_.io.prototype.end=_.io.prototype.end;_.io.prototype.start=_.io.prototype.start;_.jo=class{constructor(){this.wc=new Ln(this);this.uc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.wc.on(a,b,c)}one(a,b,c){return this.wc.one(a,b,c)}off(a,b){return this.wc.off(a,b)}addDelegate(a){a&&(0<=this.uc.indexOf(a)||this.uc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.uc.indexOf(a),0<=a&&this.uc.splice(a,1))}trigger(a){this.wc.trigger(a);for(const b of this.uc)b.dispatchEvent(a)}};
|
|
271
|
-
_.jo.prototype.off=_.jo.prototype.off;_.jo.prototype.one=_.jo.prototype.one;_.jo.prototype.on=_.jo.prototype.on;_.jo.prototype.removeEventListener=_.jo.prototype.removeEventListener;_.jo.prototype.addEventListener=_.jo.prototype.addEventListener;_.y("clpp.events.ERROR",_.Tc);_.y("clpp.events.LOADEDMETADATA",_.jd);_.y("clpp.events.BUFFERING_ENDED",_.dc);_.y("clpp.events.BUFFERING_STARTED",_.ec);_.y("clpp.events.STATE_CHANGED",_.ge);_.dh="audiotrackchanged";_.y("clpp.events.AUDIO_TRACK_CHANGED",_.dh);_.eh="texttrackchanged";_.y("clpp.events.TEXT_TRACK_CHANGED",_.eh);_.y("clpp.events.VIDEO_TRACK_CHANGED",_.He);_.y("clpp.events.BITRATE_CHANGED",_.bc);_.ho="tracksadded";_.y("clpp.events.TRACKS_ADDED",_.ho);_.y("clpp.events.LOAD_START",kd);
|
|
272
|
-
_.y("clpp.events.RELEASING",_.Vd);_.y("clpp.events.RELEASED",Ud);_.y("clpp.events.DESTROYING","destroying");_.y("clpp.events.DESTROYED","destroyed");_.y("clpp.events.VIDEO_BUFFER_CHANGED",_.Ge);_.y("clpp.events.AUDIO_BUFFER_CHANGED",_.$b);_.y("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.y("clpp.events.DRM_SESSION_UPDATE",_.Nc);_.y("clpp.events.DRM_SESSION_PERSISTED",_.Mc);_.y("clpp.events.DRM_RENEWAL_STARTED",Lc);_.y("clpp.events.DRM_EXPIRATION_UPDATE",_.Kc);
|
|
273
|
-
_.y("clpp.events.AUTOPLAY_NOT_ALLOWED",_.ac);_.y("clpp.events.PLAY",_.Nd);_.y("clpp.events.SEEKING",_.ae);_.y("clpp.events.SEEKED",_.$d);_.y("clpp.events.USER_SEEKING",_.ze);_.y("clpp.events.USER_SEEKED",_.ye);_.fl={SEEKING:1,NO_DATA:2};_.y("clpp.events.BufferingReasons",_.fl);_.y("clpp.events.ADS_TIMELINE_CHANGED",_.Hb);_.y("clpp.events.AD_LOADED",_.xb);_.y("clpp.events.AD_BREAK_STARTED",_.qb);_.y("clpp.events.AD_STARTED",_.Db);_.y("clpp.events.AD_BUFFERING",_.sb);_.y("clpp.events.AD_PROGRESS",_.Ab);
|
|
274
|
-
_.y("clpp.events.AD_FIRST_QUARTILE",_.vb);_.y("clpp.events.AD_MIDPOINT",_.yb);_.y("clpp.events.AD_THIRD_QUARTILE",_.Fb);_.y("clpp.events.AD_PAUSED",_.zb);_.y("clpp.events.AD_RESUMED",_.Bb);_.y("clpp.events.AD_SKIPPED",_.Cb);_.y("clpp.events.AD_CLICKED",_.tb);_.y("clpp.events.AD_IMPRESSION",_.wb);_.y("clpp.events.AD_COMPLETED",_.ub);_.y("clpp.events.AD_STOPPED",_.Eb);_.y("clpp.events.AD_BREAK_STOPPED",_.rb);_.y("clpp.events.CASTING_STARTED",_.kc);_.y("clpp.events.CASTING_ENDED","castingended");
|
|
275
|
-
_.y("clpp.events.CAST_STATUS_CHANGED",_.lc);_.y("clpp.events.AIRPLAY_STATUS_CHANGED",_.Kb);_.y("clpp.events.AIRPLAY_CASTING_STARTED",_.Jb);_.y("clpp.events.AIRPLAY_CASTING_ENDED",_.Ib);_.Pf="timeline-cue-added";_.y("clpp.events.TIMELINE_CUE_ADDED",_.Pf);_.Rf="timeline-cue-enter";_.y("clpp.events.TIMELINE_CUE_ENTER",_.Rf);_.Sf="timeline-cue-exit";_.y("clpp.events.TIMELINE_CUE_EXIT",_.Sf);_.y("clpp.events.MPD_TYPE_CHANGED",_.td);_.y("clpp.events.VIMOND_RESPONSE",_.Ie);
|
|
276
|
-
_.y("clpp.events.PLAYLIST_ITEM_CHANGED",_.Pd);_.y("clpp.events.PLAYLIST_MODIFIED",_.Qd);_.y("clpp.events.CDN_SWITCH_SUCCESS",_.mc);_.y("clpp.events.ONLINE_STATUS_CHANGED",Dd);_.mk=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.xl=class{constructor(a,b){this.P=a;this.w=b;this.a=!1}abort(){this.a=!0;return this.w()}Ic(a,b){const c=new _.mk;let d=()=>{c.reject(new _.G(_.F,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.G(_.F,7,7001)):a?d=jh(a,e,c):c.resolve(e)},e=>{b?d=jh(b,e,c):c.reject(e)});return new _.xl(c,()=>d())}};_.xl.aborted=function(){const a=Promise.reject(new _.G(_.F,7,7001));a.catch(()=>{});return new _.xl(a,()=>Promise.resolve())};_.xl.prototype.chain=_.xl.prototype.Ic;_.ko=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};var rh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;We=_.mh.prototype;We.Ra="";We.bc="";We.Ia="";We.pc=null;We.pa="";We.Qb="";We.toString=function(){var a=[],b=this.Ra;b&&a.push(uh(b,lo,!0),":");if(b=this.Ia){a.push("//");var c=this.bc;c&&a.push(uh(c,lo,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.pc;null!=b&&a.push(":",String(b))}if(b=this.pa)this.Ia&&"/"!=b.charAt(0)&&a.push("/"),a.push(uh(b,"/"==b.charAt(0)?mo:no,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Qb)&&a.push("#",uh(b,oo));return a.join("")};
|
|
277
|
-
We.resolve=function(a){var b=new _.mh(this);"data"===b.Ra&&(b=new _.mh);var c=!!a.Ra;c?nh(b,a.Ra):c=!!a.bc;c?b.bc=a.bc:c=!!a.Ia;c?b.Ia=a.Ia:c=null!=a.pc;var d=a.pa;if(c)oh(b,a.pc);else if(c=!!a.pa){if("/"!=d.charAt(0))if(this.Ia&&!this.pa)d="/"+d;else{var e=b.pa.lastIndexOf("/");-1!=e&&(d=b.pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
|
|
278
|
-
".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.pa=d:c=""!==a.a.toString();c?_.ph(b,qh(a.a)):c=!!a.Qb;c&&(b.Qb=a.Qb);return b};var lo=/[#\/\?@]/g,no=/[#\?:]/g,mo=/[#\?]/g,vh=/[#\?@]/g,oo=/#/g;th.prototype.a=null;th.prototype.g=null;th.prototype.add=function(a,b){_.xh(this);this.f=null;var c=this.a.hasOwnProperty(a)&&this.a[a];c||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
|
|
279
|
-
th.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")};_.hm=class{constructor(){this.f=[];this.g=[];this.m=!1;this.j=new _.ko;this.a={};this.h=0;this.a.data=An;!window.fetch||!window.AbortController||_.Hh(6)||_.Kh()&&68<_.ei().browserVersion.major?(this.a.http=hn,this.a.https=hn):(this.a.http=vn,this.a.https=vn)}Nf(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.h=a}release(){return this.j.destroy()}destroy(){this.m=!0;this.f=[];this.g=[];return this.j.destroy()}Se(a){this.f.push(a)}bd(a){this.g.push(a)}If(a){this.f=this.f.filter(b=>
|
|
280
|
-
b!==a)}Nd(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.m)return new po(Promise.reject(new _.G(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.h&&0<this.h&&(a.rateLimitBps=this.h);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;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.mk;try{for(const f of a.requestModifiers)d=d.then(g=>
|
|
281
|
-
{if(e.a)throw new _.G(_.F,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.F,1,1006,null,g);});d=d.then(f=>{var g=new _.mh(f.uris[f.uriIndex]);var h=g.Ra;h||(h=location.protocol,h=h.slice(0,-1),nh(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.G(_.F,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new po(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.G(_.F,1,7001,
|
|
282
|
-
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 _.G&&g.data&&g.data.response){const h=f(g.data.response);if(h)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.G)throw g;throw new _.G(_.F,1,1007,null,g);});_.lh(this.j,e);c.resolve(a);return e}catch(f){return new po(Promise.reject(f))}}};_.hm.prototype.fetch=_.hm.prototype.fetch;_.hm.prototype.removeResponseModifier=_.hm.prototype.Nd;
|
|
283
|
-
_.hm.prototype.removeRequestModifier=_.hm.prototype.If;_.hm.prototype.addResponseModifier=_.hm.prototype.bd;_.hm.prototype.addRequestModifier=_.hm.prototype.Se;_.hm.prototype.setRateLimit=_.hm.prototype.Nf;var zh=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];var qo=class{};_.y(xc,qo);qo.getInfo=_.ei;
|
|
284
|
-
var Ch=null,Bh=null,Uh=new _.N(xc),Yh="android",Xh="ios",ci="linux",Zh="osx",$h="windows",ai="tizen",bi="webos",Wh=ve,di=ve,Ph={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,
|
|
278
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);_.Po=(new Map).set(_.Cc,_.Cc).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Ve,_.Ve).set(_.$c,_.$c).set("channelsCount","channels");_.Qo=class{constructor(a){this.f=a;this.a=null}aa(a){return Nh(this,a,!1)}Va(a){return Nh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Qh=class{constructor(a){this.f=a;this.a=null}Zd(){this.stop();this.f();return this}aa(a){this.stop();this.a=(new _.Qo(()=>{this.f()})).aa(a);return this}Va(a){this.stop();this.a=(new _.Qo(()=>{this.f()})).Va(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.Qh);_.Qh.prototype.stop=_.Qh.prototype.stop;_.Qh.prototype.tickEvery=_.Qh.prototype.Va;_.Qh.prototype.tickAfter=_.Qh.prototype.aa;_.Qh.prototype.tickNow=_.Qh.prototype.Zd;var Ro=class{};_.x(Bc,Ro);Ro.getInfo=_.ti;
|
|
279
|
+
var Ph=null,Oh=null,gi=new _.O(Bc),ki="android",ji="ios",ri="linux",ni="osx",oi="windows",pi="tizen",qi="webos",ii=ye,si=ye,bi={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,
|
|
285
280
|
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,
|
|
286
281
|
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},
|
|
287
|
-
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
|
|
288
|
-
this.
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
282
|
+
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 Q=class extends _.P{constructor(){super();this.a=new _.O("clpp.native.TrackManager");this.l=null;this.g=new _.po;this.h=[];this.F=0;this.m={};this.I=[];this.f=new Map;this.o=null;this.j=new Map;this.w=!0;this.M=this.A.bind(this,_.I);this.S=this.C.bind(this,_.I);this.O=this.B.bind(this,_.I);this.T=this.A.bind(this,_.K);this.W=this.C.bind(this,_.K);this.V=this.B.bind(this,_.K);this.J=this.A.bind(this,_.J);this.L=this.C.bind(this,_.J);this.K=this.B.bind(this,_.J)}jd(){return!_.di()}A(a,b){const c=
|
|
283
|
+
this;return _.w(function*(){if(b){var d=b.track;if(d){var e=c.h.find(h=>ui(h,d,a));if(e)c.a.warn("Track from event already exists",d,e);else{var f=oh(a,d),g=vi(d);if(a===_.I){if(d.kind===_.td)return;let h;void 0!==d.id?h=c.m[d.id]:h=Object.values(c.m).find(k=>ui(f,k,a));f.kind&&"captions"===f.kind&&(f.mimeType=_.Qb);h&&(f.src=h.url,f.mimeType=h.mimeType)}else if(e=c.h.find(h=>h.type===a&&_.qf(h,f,["kind","label","language"]))){e.id=d.id;g&&(c.a.debug(`Setting native ${a} track active`),c.f.set(a,
|
|
284
|
+
e));c.a.debug("Track from event seems to already exists, flipped native track to",d);return}try{f.renditions.push(new _.uh(f.id,f));c.h.push(f);xi(c,a)&&(yield zi(c,f));c.a.debug(a+" Track added",f);c.l.trigger(new _.C(_.So));const h=Ai(c,a).length;e=a===_.K||a===_.J;if(g||1===h&&e)c.a.debug(`Setting native ${a} track active. `+`Native track active: ${g}. `+`Number of tracks: ${h}`,d),c.f.set(a,f)}catch(h){c.a.error("Error while converting track data",h)}}}else c.a.warn(Qa)}else c.a.warn(Pa)})}C(a,
|
|
285
|
+
b){if(b){var c=b.track;c?a===_.I&&c.kind!==_.td&&(b=this.h.find(d=>ui(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.f.get(a)||null)===b&&(this.f.set(a,null),Bi(this)),this.a.debug(a+" Track removed, id: ",b.id)):this.a.warn(Qa)}else this.a.warn(Pa)}B(a,b){this.a.debug(a+" Track changed",b);a===_.I&&Bi(this);const c=Di(this,a);if(c)for(let d=0;d<c.length;++d)if(vi(c[d])){if(b=this.h.find(e=>ui(e,c[d],a)))this.f.set(a,b),this.a.debug("Track change detected, id:",b.id),b===this.j.get(a)&&this.j.set(a,
|
|
286
|
+
null),a===_.J?this.l.trigger(new _.C(_.Gi)):a===_.I&&this.l.trigger(new _.C(_.Hi));break}}initialize(a){this.l=a}load(){this.w=!1;var a=Ci(this,_.I);a&&(this.g.on(a,_.Kb,this.M),this.g.on(a,$d,this.S),this.g.on(a,tc,this.O));if(a=Ci(this,_.J))this.g.on(a,_.Kb,this.J),this.g.on(a,$d,this.L),this.g.on(a,tc,this.K);if(a=Ci(this,_.K))this.g.on(a,_.Kb,this.T),this.g.on(a,$d,this.W),this.g.on(a,tc,this.V);this.g.one(this.l,mc,this.G.bind(this))}release(){this.w=!0;this.h=[];this.m={};this.f.clear();this.j.clear();
|
|
287
|
+
this.g.release()}destroy(){this.release();this.l=null}getVideoTracks(){return Ai(this,_.K)}getAudioTracks(){return Ai(this,_.J)}ga(){return Ai(this,_.I)}fa(){const a=this.f.get(_.K)||null;if(!a)return null;if(this.o){const b=a.renditions.find(c=>c.width===this.o.width&&c.height===this.o.height);if(b)return b}return a.renditions[0]||null}Ca(){return Ei(this,_.J)}Da(){return Ei(this,_.I)}Oa(){return Fi(this,_.K)}bb(){return Fi(this,_.J)}cb(){return Fi(this,_.I)}Fa(){return this.f.get(_.K)||null}ka(){return this.f.get(_.J)||
|
|
288
|
+
null}la(){return this.f.get(_.I)||null}Ua(a){Ii(this,_.K,a)}qa(a){Ii(this,_.J,a)}za(a){Ii(this,_.I,a)}Ta(a){Ii(this,_.K,a&&a.track)}ib(a){Ii(this,_.J,a&&a.track)}jb(a){Ii(this,_.I,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.F++}`;b.m[c]=a;Ji(b,a,c)}else yield Ki(b,a)})}ia(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}G(){const a=this;return _.w(function*(){const b=a.l.getConfiguration();Li(a,_.J,b.preferredAudioLanguage);
|
|
289
|
+
if(!Di(a,_.I).some(c=>vi(c))){const c=Ci(a,_.I);yield new Promise(d=>{a.g.one(c,tc,d);(new _.Qh(d)).aa(1)})}a.w||Li(a,_.I,b.preferredTextLanguage)})}};Q.prototype.isAbrEnabled=Q.prototype.ia;Q.prototype.addTextTrack=Q.prototype.addTextTrack;Q.prototype.setTextRendition=Q.prototype.jb;Q.prototype.setAudioRendition=Q.prototype.ib;Q.prototype.setVideoRendition=Q.prototype.Ta;Q.prototype.setTextTrack=Q.prototype.za;Q.prototype.setAudioTrack=Q.prototype.qa;Q.prototype.setVideoTrack=Q.prototype.Ua;
|
|
290
|
+
Q.prototype.getTextTrack=Q.prototype.la;Q.prototype.getAudioTrack=Q.prototype.ka;Q.prototype.getVideoTrack=Q.prototype.Fa;Q.prototype.getLoadingTextRendition=Q.prototype.cb;Q.prototype.getLoadingAudioRendition=Q.prototype.bb;Q.prototype.getLoadingVideoRendition=Q.prototype.Oa;Q.prototype.getTextRendition=Q.prototype.Da;Q.prototype.getAudioRendition=Q.prototype.Ca;Q.prototype.getVideoRendition=Q.prototype.fa;Q.prototype.getTextTracks=Q.prototype.ga;Q.prototype.getAudioTracks=Q.prototype.getAudioTracks;
|
|
291
|
+
Q.prototype.getVideoTracks=Q.prototype.getVideoTracks;Q.prototype.canSelectVideoTracks=Q.prototype.jd;_.To=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);}mb(){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)}va(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
|
|
292
|
+
1)}Yb(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}Aa(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.va(),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}};
|
|
293
|
+
_.x("clpp.BufferInfo",_.To);_.To.prototype.bufferedAheadOf=_.To.prototype.Aa;_.To.prototype.isBuffered=_.To.prototype.Yb;_.To.prototype.bufferEnd=_.To.prototype.va;_.To.prototype.bufferStart=_.To.prototype.mb;_.To.prototype.end=_.To.prototype.end;_.To.prototype.start=_.To.prototype.start;_.Uo=class{constructor(){this.zc=new no(this);this.xc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.zc.on(a,b,c)}one(a,b,c){return this.zc.one(a,b,c)}off(a,b){return this.zc.off(a,b)}addDelegate(a){a&&(0<=this.xc.indexOf(a)||this.xc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}removeDelegate(a){a&&(a=this.xc.indexOf(a),0<=a&&this.xc.splice(a,1))}trigger(a){this.zc.trigger(a);for(const b of this.xc)b.dispatchEvent(a)}};
|
|
294
|
+
_.Uo.prototype.off=_.Uo.prototype.off;_.Uo.prototype.one=_.Uo.prototype.one;_.Uo.prototype.on=_.Uo.prototype.on;_.Uo.prototype.removeEventListener=_.Uo.prototype.removeEventListener;_.Uo.prototype.addEventListener=_.Uo.prototype.addEventListener;_.x("clpp.events.ERROR",_.Xc);_.x("clpp.events.LOADEDMETADATA",_.od);_.x("clpp.events.BUFFERING_ENDED",_.gc);_.x("clpp.events.BUFFERING_STARTED",_.hc);_.x("clpp.events.STATE_CHANGED",_.je);_.Gi="audiotrackchanged";_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Gi);_.Hi="texttrackchanged";_.x("clpp.events.TEXT_TRACK_CHANGED",_.Hi);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.Ke);_.x("clpp.events.BITRATE_CHANGED",_.ec);_.So="tracksadded";_.x("clpp.events.TRACKS_ADDED",_.So);_.x("clpp.events.LOAD_START",pd);
|
|
295
|
+
_.x("clpp.events.RELEASING",_.Zd);_.x("clpp.events.RELEASED",Yd);_.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.Je);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.cc);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_UPDATE",_.Rc);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Qc);_.x("clpp.events.DRM_RENEWAL_STARTED",Pc);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Oc);
|
|
296
|
+
_.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.dc);_.x("clpp.events.PLAY",_.Rd);_.x("clpp.events.SEEKING",_.ee);_.x("clpp.events.SEEKED",_.de);_.x("clpp.events.USER_SEEKING",_.Ce);_.x("clpp.events.USER_SEEKED",_.Be);_.Hl={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.Hl);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.Lb);_.x("clpp.events.AD_LOADED",_.Bb);_.x("clpp.events.AD_BREAK_STARTED",_.ub);_.x("clpp.events.AD_STARTED",_.Hb);_.x("clpp.events.AD_BUFFERING",_.wb);_.x("clpp.events.AD_PROGRESS",_.Eb);
|
|
297
|
+
_.x("clpp.events.AD_FIRST_QUARTILE",_.zb);_.x("clpp.events.AD_MIDPOINT",_.Cb);_.x("clpp.events.AD_THIRD_QUARTILE",_.Jb);_.x("clpp.events.AD_PAUSED",_.Db);_.x("clpp.events.AD_RESUMED",_.Fb);_.x("clpp.events.AD_SKIPPED",_.Gb);_.x("clpp.events.AD_CLICKED",_.xb);_.x("clpp.events.AD_IMPRESSION",_.Ab);_.x("clpp.events.AD_COMPLETED",_.yb);_.x("clpp.events.AD_STOPPED",_.Ib);_.x("clpp.events.AD_BREAK_STOPPED",_.vb);_.x("clpp.events.CASTING_STARTED",_.nc);_.x("clpp.events.CASTING_ENDED","castingended");
|
|
298
|
+
_.x("clpp.events.CAST_STATUS_CHANGED",_.oc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.Pb);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.Nb);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.Mb);_.Tf="timeline-cue-added";_.x("clpp.events.TIMELINE_CUE_ADDED",_.Tf);_.Vf="timeline-cue-enter";_.x("clpp.events.TIMELINE_CUE_ENTER",_.Vf);_.Wf="timeline-cue-exit";_.x("clpp.events.TIMELINE_CUE_EXIT",_.Wf);_.x("clpp.events.MPD_TYPE_CHANGED",_.yd);_.x("clpp.events.VIMOND_RESPONSE",_.Le);
|
|
299
|
+
_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.Td);_.x("clpp.events.PLAYLIST_MODIFIED",_.Ud);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.pc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Hd);var Mi=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];var Vo=class{};_.x("clpp.utils.PlayerConfiguration",Vo);Vo.create=_.Si;var Wo=["abort",lc,mc,Tc,"emptied",Uc,_.Wc,_.Xc,"interruptbegin","interruptend",_.nd,_.od,pd,"mozaudioavailable",_.Nd,_.Rd,_.Sd,_.Vd,_.Xd,_.de,_.ee,he,"suspend",_.ue,"volumechange",_.Oe,_.Pe,_.be,Ue,Te,Re,Se];_.Xo=class extends _.Uo{constructor(a){super();this.log=new _.O(a);this.configuration=this.jc=_.Qi();this.o=this.B=null;this.Vc=this.vd=!1;this.Pe=new _.O("clpp.video.events");this.Ob=null;this.mc=-1;this.Ue=this.Se.bind(this);this.we=new _.Km;this.K=new _.po;this.ea=this.kc=this.J=null}init(a,b){this.configuration=this.jc=b;this.B=a;this.log.info("Initializing Player surface");a=this.B.getMedia();this.log.info("Attaching media element listeners");for(const c of Wo)this.K.on(a,c,this.Ue,c!==_.Xc);
|
|
300
|
+
this.Ob||(this.Ob=this.De());this.Ob.initialize(this);this.B.showMediaElement()}release(){this.J&&(this.J.destroy(),this.J=null);return Promise.resolve()}destroy(){this.K.release();return Promise.resolve()}canPlay(a,b){return _.Kf[this.namespace()].canPlay(a,b)}play(){if(!this.o)return Promise.reject("No sources specified yet. You need to load content before calling play.");const a=this.B.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c=
|
|
301
|
+
{name:b.name||"",message:b.message||"",stack:b.stack||""};Ni(c)?(this.trigger(new _.C(_.dc)),this.log.warn(_.ia)):c.name===Ta&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.o?new Promise((a,b)=>{const c=this.getState();if(c!==_.Fl&&c!==_.Cl&&c!==_.Nl&&c!==_.Ml)b();else if(this.B.getMedia().pause(),this.getState()===_.Nl)this.K.one(this,_.je,()=>{a()});else a()}):Promise.reject("No sources specified yet. You need to load content before calling pause.")}isPaused(){return this.B.getMedia().paused}isEnded(){return this.B.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.kc=
|
|
302
|
+
a}setCdnErrorCallback(a){this.ea=a}oc(){return this.kc}getSurface(){return this.B}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.To(b?b.buffered:void 0,a)}getPosition(){const a=this.B.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.getPosition();if(void 0===a||null===a||typeof a!==_.p||a===b)return Promise.resolve();const c=this.B.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),
|
|
303
|
+
Promise.reject();const d=a-b;return.1>=Math.abs(d)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.C(_.Ce));this.K.on(c,_.de,h);this.K.on(c,_.ue,h);this.K.on(c,_.Vd,h);this.log.info("Seeking to "+a+". Delta "+d);this.Vc=this.vd=!0;c.currentTime=a},h=l=>{const m=this.getPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const t=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,u=l.type===_.de,y=l.type===_.Vd,A=l.type===_.ue,
|
|
304
|
+
E=y&&t;q=u||n&&E||A&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",u,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",t,"Progress Ready:",E);q?(this.Vc=this.vd=!1,this.K.off(c,_.de,h),this.K.off(c,_.ue,h),this.K.off(c,_.Vd,h),this.Oe(),this.trigger(new _.C(_.Be)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();
|
|
305
|
+
else this.K.one(c,_.od,g)};this.getState()===_.Kl?(this.log.debug("Player is in IDLE state. Postpone seek."),this.K.one(this,_.je,()=>{switch(this.getState()){case _.Fl:case _.Nl:case _.Ml: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.B.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.B.getMedia();
|
|
306
|
+
b?_.pf(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
|
|
307
|
+
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.B.getMedia().muted}setMuted(a){const b=this.B.getMedia();typeof a===_.fc&&(b.muted=a)}getDuration(){return this.o?this.B.getMedia().duration:-1}getTrackManager(){return this.Ob}getPlaybackRate(){const a=this.B.getMedia();return a&&a.playbackRate||1}setPlaybackRate(a){const b=this.B.getMedia();
|
|
308
|
+
void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.mc=a}getSourceIndex(){return this.mc}getLoadedSource(){return this.o&&-1!==this.mc?this.o[this.mc]:null}getPeriods(){return[]}getNetworkEngine(){return this.we}setNetworkEngine(a){this.we=a}getTextDisplayer(){return this.J}getTimelineCues(){return[]}resetAbr(){}Se(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.ue||a.type===_.Vd)this.Pe.debug(d);
|
|
309
|
+
else{let e="";switch(a.type){case _.Xd:e=`Rate: ${this.getPlaybackRate()}`;break;case Tc:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Rd:case _.Sd:case "suspend":case _.Oe:case he:case _.ee:case _.de:case _.ue:case _.Vd:case lc:case mc:b=this.getBufferInfo().Aa(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.be:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+
|
|
310
|
+
e);this.Pe.info(d)}a.type!==_.Xc&&this.trigger(new _.C(a.type,{detail:a}))}Oe(){}};_.Xo.prototype.getTextDisplayer=_.Xo.prototype.getTextDisplayer;_.Xo.prototype.setNetworkEngine=_.Xo.prototype.setNetworkEngine;_.Xo.prototype.getNetworkEngine=_.Xo.prototype.getNetworkEngine;var Wi;Wi=new _.O("clpp.Components");_.Ui=new Map;var Yo=class{};_.x("clpp.utils.Uint8ArrayUtils",Yo);Yo.toStandardBase64=_.Zi;Yo.concat=_.ej;Yo.equal=_.dj;Yo.toHex=_.cj;Yo.fromHex=_.bj;Yo.fromBase64=_.aj;Yo.toBase64Url=_.$i;var Zo=class{constructor(){this.a=this.f=null;this.g=new _.O("clpp.drm.csl")}release(){this.a=this.f=null}};_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.db,SW_SECURE_DECODE:_.eb,HW_SECURE_CRYPTO:Da,HW_SECURE_DECODE:Ea,HW_SECURE_ALL:"HW_SECURE_ALL"});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ad,CLEAR_KEY:_.Jd,WIDEVINE:_.Hc,PLAYREADY:_.Gc,FAIRPLAY:_.Fc,PRIMETIME:_.Ec});_.ij={};_.x("clpp.drm.registerDrmEnvironment",_.jj);var mj={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,
|
|
299
311
|
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,
|
|
300
312
|
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,
|
|
301
313
|
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,
|
|
@@ -309,77 +321,77 @@ e);this.Le.info(d)}a.type!==_.Tc&&this.trigger(new _.C(a.type,{detail:a}))}Ke(){
|
|
|
309
321
|
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,
|
|
310
322
|
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,
|
|
311
323
|
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,
|
|
312
|
-
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]};_
|
|
313
|
-
_.
|
|
314
|
-
this.f[f];if(h){let m=null;var k=null;this.g[f]==
|
|
315
|
-
_.
|
|
316
|
-
"/"
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
_.B(
|
|
322
|
-
_.
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
b
|
|
329
|
-
b.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
HTMLMediaElement))throw new _.
|
|
334
|
-
a):this.a.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");c=[];for(let f=0;f<a.classList.length;f++)c.push(a.classList[f]);for(var e of c)a.classList.remove(e),_.
|
|
335
|
-
|
|
336
|
-
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&&_.
|
|
337
|
-
|
|
338
|
-
g("Web Crypto API is not supported"):f()})}};var
|
|
339
|
-
this.
|
|
340
|
-
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
|
|
341
|
-
this.
|
|
342
|
-
new Promise(a=>a());this.
|
|
343
|
-
new _.
|
|
344
|
-
this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.
|
|
324
|
+
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]};_.$o=class{constructor(a){this.J=a;this.g={}}Ga(a,b){this.g[a]=b}};_.x("clpp.drm.DrmEnvironment",_.$o);_.$o.prototype.setDrmSystem=_.$o.prototype.Ga;_.Jj=class{constructor(a,b){this.f=_.pf(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=!!b;this.buffer=this.f.buffer}getPosition(){return this.a}wa(){return this.f.byteLength}seek(a){(0>a||a>this.f.byteLength)&&_.pj();this.a=a}};_.Jj.prototype.seek=_.Jj.prototype.seek;
|
|
325
|
+
_.qk=class{constructor(a,b=!0){this.f=a;this.g=b;this.a=0}getPosition(){return this.a}wa(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.sj();this.a+=a}seek(a){if(0>a||a>this.f.byteLength)throw _.sj();this.a=a}};_.x("clpp.utils.dataview.DataViewReader",_.qk);_.Hj=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.O("clpp.mp4")}N(a,b){a=zj(a);this.g[a]=ap;this.f[a]=b;return this}Y(a,b){a=zj(a);this.g[a]=bp;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.G(a);a=new _.qk(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.rj(a)&&!this.a;)this.$c(0,a,b)}$c(a,b,c){const d=b.getPosition();let e=_.M(b);var f=_.M(b);let g=!1;this.h.debug("Parsing MP4 box",_.Aj(f));switch(e){case 0:e=b.wa()-d;break;case 1:e=_.xj(b),g=!0}const h=
|
|
326
|
+
this.f[f];if(h){let m=null;var k=null;this.g[f]==bp&&(k=_.M(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.wa()&&(l=b.wa());l-=b.getPosition();b=0<l?_.yj(b,l):new Uint8Array(0);b=new _.qk(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({Qa:this,Ee:c||!1,version:m,flags:k,H:b,size:e,start:d+a,ud:f,zf:g})}else a=Math.min(d+e-b.getPosition(),b.wa()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.Hj);_.Hj.typeToString=_.Aj;_.Hj.allData=_.Cj;_.Hj.sampleDescription=_.Bj;
|
|
327
|
+
_.Hj.children=_.N;_.Hj.prototype.parseNext=_.Hj.prototype.$c;_.Hj.prototype.parse=_.Hj.prototype.parse;_.Hj.prototype.stop=_.Hj.prototype.stop;_.Hj.prototype.fullBox=_.Hj.prototype.Y;_.Hj.prototype.box=_.Hj.prototype.N;_.Hj.headerSize=_.Dj;var ap=0,bp=1;var cp=class{};_.x("clpp.utils.FairplayUtils",cp);cp.parseFairPlayResponse=_.Mj;cp.formatFairPlayRequest=_.Lj;cp.createFairplayPayload=Kj;cp.extractContentId=_.Gj;cp.extractExtXKeyUri=Ej;var Sj=new _.O("clpp.drm.DrmToday"),bk="PRODUCTION",ck="STAGING",dk="TEST",dp={PRODUCTION:bk,STAGING:ck,TEST:dk};_.x("clpp.drm.DrmToday.Environment",dp);_.x("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
|
|
328
|
+
var Oj="/license-proxy-widevine/cenc/",Pj="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Qj="/license-server-fairplay/",ek={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",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",42E3:"General Playready error",
|
|
329
|
+
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"},ep=[_.eb,void 0],fp=[_.db,void 0],gp=["3000"],hp=["2000"];
|
|
330
|
+
for(const a of Object.keys(dp)){let b=ua;a!==bk&&(b+=`_${a}`);const c=new _.$o(b);let d=null;switch(a){case bk:d=nj("V1_PROD");break;case ck:d=nj("V2");break;case dk:d=null}c.Ga(_.Hc,{licenseUrl:Rj(_.Hc,a),videoRobustness:ep,audioRobustness:fp,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Tj,licenseResponse:_.Uj}});c.Ga(_.Fc,{licenseUrl:Rj(_.Fc,a),certificateUrl:Nj(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Wj,licenseResponse:_.Xj,
|
|
331
|
+
extractContentId:_.Yj,certificateRequest:_.Zj}});c.Ga(_.Gc,{licenseUrl:Rj(_.Gc,a),videoRobustness:gp,audioRobustness:hp,modifiers:{licenseRequest:ak}});_.jj(c)};var ip=class{};_.x("clpp.drm.eme.EmeFactory",ip);var gk=[];ip.Apis={STANDARD:bb,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var ok,jp,nk;_.wk=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];ok=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];jp=class{constructor(a,b,c){this.h=new Uint8Array(a);this.a=b;this.f=c}};nk=class extends jp{};_.vk=class extends jp{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.j=f}};var Uk=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Hj).Y("pssh",this.h.bind(this)).parse(a.buffer);0==this.a.length&&_.B("No pssh box found!")}h(a){if(1<a.version)_.B("Unrecognized PSSH version found!");else{var b=_.cj(_.yj(a.H,16)),c=[];if(0<a.version){var d=_.M(a.H);for(let e=0;e<d;++e){const f=_.cj(_.yj(a.H,16));c.push(f)}}d=_.M(a.H);a.H.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});a.H.getPosition()!=a.H.wa()&&
|
|
332
|
+
_.B("Mismatch between box size and data size!")}}};var Qk,kp;
|
|
333
|
+
_.Wl=class{constructor(a){this.D=a;this.K=new Set;this.A=this.G=this.m=null;this.S=!1;this.f=null;this.I=kp;this.w=new _.po;this.L=new Zo;this.g=new Map;this.J=[];this.F=new _.Sk;this.h=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.T=new _.Qh(()=>Jk(this));this.ma=!1;this.$=new _.Sk;this.C=!1;this.V=[];this.ca=!1;this.O=0;this.a=new _.O("clpp.drm.DrmEngine");this.X=(new _.Qh(()=>{Kk(this)})).Va(1);this.F.catch(()=>{});this.o=this.B=!1;this.M=
|
|
334
|
+
null}destroy(){const a=this;return _.w(function*(){a.ma?yield a.$:(a.ma=!0,yield Lk(a),a.$.resolve())})}keySystem(){return this.f?_.Ak(this.f.keySystem):""}getDrmInfo(){return this.f}ja(a){const b=this;return _.w(function*(){b.C&&b.I===Qk||(!b.h.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.ca?yield Zk(b,a):b.V.push(a))})}ea(a){const b=a.target;this.a.info("Key status changed for session",b.sessionId);const c=this.g.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f==_.me){var g=f;f=
|
|
335
|
+
e;e=g}if(zk(this.f.keySystem)&&16===f.byteLength&&_.Sh()){g=_.xg(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!==ke&&(c.loaded=!0);c&&c.xa&&c.xa.resolve();"expired"===e&&(d=!0);f=_.G(f);let h=_.cj(f);"00"===h&&c&&c.keyId?h=c.keyId:this.f.keySystem.startsWith(_.Fc)&&16!==f.byteLength&&(h=zg(f));(f=h||"")?this.a.info(`Key status for Key ID '${h}': ${e}`):this.a.info(`Key status global keys: ${e}`);this.j.set(f,e);
|
|
336
|
+
c&&!c.keyId&&this.g.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.$a.forEach(e=>{this.j.get(e)===ke&&(this.a.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Md))});for(a=0;a<this.f.initData.length;a++){const e=this.f.initData[a];e.keyId&&this.j.get(e.keyId)===ke&&_.dj(e.initData,c.initData)&&(this.a.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,_.Md))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.kb&&
|
|
337
|
+
(this.a.debug("Session has expired",b.sessionId),(a=this.g.get(b))&&a.ic&&a.ic.stop(),this.g.delete(b),b.close().catch(()=>{}));il(this)&&(this.F.resolve(),1!==this.g.size||d?this.T.aa(.5):Jk(this))}};Qk=0;kp=3;var pl=new Map,ql=new _.O("clpp.text");var lp=class{constructor(){this.a=null;this.f=[]}};var op=class{constructor(){this.g=this.f=this.h=null;this.a=[]}};_.pp=class{constructor(){this.f=this.m=this.w=this.B=this.h=this.j=this.g=this.o=NaN;this.a=new lp;this.A=new op}getStats(){return{width:this.o,height:this.g,streamBandwidth:this.m,decodedFrames:this.h,droppedFrames:this.j,corruptedFrames:this.B,estimatedBandwidth:this.f,loadLatency:this.w,playTime:ul(this.a,_.Nl),pauseTime:ul(this.a,_.Ml),bufferingTime:ul(this.a,_.Fl),stateHistory:vl(this.a),switchHistory:wl(this.A)}}};_.qp=class{constructor(a){this.f=a;this.a=void 0}value(){void 0==this.a&&(this.a=this.f());return this.a}};var yl=new _.qp(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.od],[HTMLMediaElement.HAVE_CURRENT_DATA,_.nd],[HTMLMediaElement.HAVE_FUTURE_DATA,lc],[HTMLMediaElement.HAVE_ENOUGH_DATA,mc]]));var sp=class{constructor(a){this.g=new _.O("clpp.StateManager");this.l=a;this.a=new _.po;this.f=_.Kl;this.A=_.rp;this.I=0;this.w=-1;this.L=this.o=this.J=this.B=0;this.j=this.m=this.F=!1;this.G=0;this.h=null;this.K=0;this.M=_.di();this.C=!1;this.J=Date.now();Dl(this)}Nb(a,b){this.l&&this.l.trigger(new _.C(a,{detail:b}))}getState(){return Gl(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.F&&Bl(this,_.Jl)}destroy(){this.g.debug("Stop watching for video events for "+this.l.namespace());this.a.release()}};_.x("clpp.version",_.da);_.x("clpp.name",_.pa);_.wi="application/x-mpegurl";_.x("clpp.Type",{DASH:_.Rb,HLS:_.wi,SMOOTH_STREAMING:_.Wb,MP4:_.Ie});_.Sf="scte35";_.Qf=ye;_.x("clpp.TimelineCueType",{SCTE35:_.Sf,DASH_CALLBACK:_.zd,UNKNOWN:_.Qf});_.x("clpp.utils.media.detectType",Ol);var Rl=new _.O("clpp.sources");var tp=class extends _.Xo{constructor(){super(Ac);this.w=this.G=!1;this.j=this.A=this.m=this.a=this.h=null;this.g=new _.po;this.F=this.C=this.f=this.I=null}init(a,b){super.init(a,b);this.h=new sp(this);Bl(this.h,_.Kl)}namespace(){return Ac}unload(){const a=this;return _.w(function*(){if(a.o){a.log.debug(_.$a,a.o);a.C&&(a.C.stop(),a.C=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.J&&(a.J.destroy(),a.J=null);a.j&&a.j.release();a.m&&(a.m.destroy(),a.m=null);_.Of(a.g);
|
|
338
|
+
a.f&&(a.f=new _.pp);a.F=null;a.o=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield Tl(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.h&&Bl(this.h,_.Kl)})}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(wa);const a=this.getTrackManager();a&&a.destroy();this.j&&(this.j.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
|
|
339
|
+
b)}),this.j=null);this.h&&(this.h.destroy(),this.h=null);this.f=null})}getDrmInfo(){return this.m?this.m.getDrmInfo():null}getTrackManager(){return this.Ob}load(a){const b=this;return _.w(function*(){if(b.w)return Sl();if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.B.getMedia();b.I=Date.now()/1E3;b.f=new _.pp;b.g.on(b,_.je,()=>{b.f&&_.tl(b.f.a,b.getState())});Bl(b.h,_.Ll);b.o=_.Ql(a);_.Ti(a)&&(b.configuration=_.Si(b.jc,a));
|
|
340
|
+
b.log.debug(_.Ja,b.configuration);b.log.debug(_.Wa,b.o);const d=_.sl(b.configuration,["html","native"]);b.J=d.create(b);b.J.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Vi(_.pe)&&!_.fi()&&(b.A=new Do(b),b.A.start(c));b.j?b.j.release():b.j=new qo(b);Yf(b.j,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,lc,()=>{b.trigger(new _.C(_.So))});null==
|
|
341
|
+
b.configuration.startTime&&am(b,c);try{yield Vl(b,c),yield Xl(b),yield $l(b).R}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.h&&Bl(this.h,_.Jl),this.trigger(new _.C(_.Xc,{detail:a})))}De(){return new Q}getState(){return null!==this.h?this.h.getState().currentState:_.rp}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
|
|
342
|
+
null):a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.xl();this.f&&_.tl(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.o=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
|
|
343
|
+
b=Number(c.totalVideoFrames),a.j=Number(c.droppedVideoFrames),a.h=b,this.f.B=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.fa())a.bandwidth&&(this.f.m=a.bandwidth),a.uc&&(this.f.f=a.uc);return this.f.getStats()}getTimelineCues(){return this.j?this.j.getTimelineCues():[]}};
|
|
344
|
+
_.Mf(new class{a(){return Ac}canPlay(a,b){a=a.type||"";const c=a===_.Rb,d=a===_.Wb,e=a===_.wi;var f;_.ci()||c||d||e&&!_.di()?f=0:f=""!==Rh().canPlayType(a)?e&&_.di()&&window.MediaSource&&MediaSource.isTypeSupported&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}create(){return new tp}});_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var cm=new _.O("clpp.ads"),bm=[];_.x("clpp.utils.dom.createHTMLElement",_.jm);var up=class{constructor(a){this.a=null;this.g=new Set;this.f=null;this.set(a||null)}set(a){this.g.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=km(this,a)}get(){return this.a}};var xp=class{constructor(a,b){this.a=new _.O("clpp.PlayerSurface");this.w=_.hf(vp,b);this.g=new up;this.h=null;this.f=new up;this.m=wp;wp+=1;this.o=`clpp-video-${this.m}`;this.j=new _.po;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.a.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
|
|
345
|
+
HTMLMediaElement))throw new _.H(_.F,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.a.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.g.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{b=document.createElement(_.Nc);a.parentNode?a.parentNode.replaceChild(b,
|
|
346
|
+
a):this.a.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");c=[];for(let f=0;f<a.classList.length;f++)c.push(a.classList[f]);for(var e of c)a.classList.remove(e),_.hm(b,e);b.style.cssText=a.style.cssText;a.removeAttribute(_.oe);for(d of[_.Ve,_.$c])e=a.getAttribute(d),e=parseInt(e,10),isNaN(e)||(b.style[d]=`${e}px`),_.Uh()||a.removeAttribute(d);b.appendChild(a);d=b}d&&(this.f.set(d),lm(this.f,"clpp-container"),
|
|
347
|
+
lm(this.f,this.o),lm(this.g,_.vc),lm(this.g,"clpp-video"));mm(this,a,d)}}getMedia(){return this.g.get()}getContainer(){return this.f.get()}getSafeContainer(){return this.f}getId(){return this.m}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.hm(a,wc):this.a.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(wc):this.a.debug("No media element available that could be shown")}addElementToContainer(a,
|
|
348
|
+
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&&_.hm(a,_.vc);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){_.hm(a,wc)}show(a){a.classList.remove(wc)}release(){this.j.release()}};xp.prototype.removeElementFromContainer=xp.prototype.removeElementFromContainer;
|
|
349
|
+
xp.prototype.addElementToContainer=xp.prototype.addElementToContainer;xp.prototype.getCastElement=xp.prototype.getCastElement;xp.prototype.getContainer=xp.prototype.getContainer;xp.prototype.getMedia=xp.prototype.getMedia;var vp={disableContainer:!1,crossorigin:"anonymous",containerEl:null},wp=1;var yp=class{constructor(a){this.l=a;this.h=this.l.getNetworkEngine();this.a=new _.po;this.g=null;this.f=!0;qm(this)}release(){this.a.release();rm(this);this.l=null}};_.x("clpp.polyfill.installAll",um);var tm=[];_.x("clpp.polyfill.register",_.vm);var xm=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.Ag(_.aj(a)));this.a=JSON.parse(_.Ag(_.aj(b)));this.h=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.h;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=_.Eg(d),n=_.aj(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(gb)}).catch(g)}else b?
|
|
350
|
+
g("Web Crypto API is not supported"):f()})}};var zp={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Oi="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Om=class{constructor(a){this.license=a;this.a=null;this.f=new _.O("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=ym(this);a(c)}catch(c){b()}})).then(a=>a.verify(zp)).catch(a=>{if(a&&a!==gb){{var b=window.location.href;const c=new _.ag(b);b=c.Sa||c.Ja?c:new _.ag("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ja))return Promise.resolve()}throw a;})}},Jm="vod",Im="live";var R=class extends _.Uo{constructor(a,b,c){super();um();this.g=new _.O("clpp.Player");if(!a)throw new _.H(_.F,7,7102);this.A=new _.po;this.f=this.O=b||_.Qi();this.m=null;void 0===this.f.license&&(this.f.license=Oi,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.h=new xp(a,c);this.a=this.w=null;
|
|
351
|
+
this.G=new _.Km;this.j=null;this.K=[];this.L={};this.o=null;this.I=!0;this.J=this.F=!1;this.C=this.kc=null;this.md=!1;this.T=new yp(this);this.M=!1;this.B=d=>{(d=d.detail)&&d.currentState===_.Nl&&(this.off(_.je,this.B),Pm(this))};this.on(_.je,()=>{this.getState()===_.Jl&&this.unload()});this.on(_.Nb,this.S.bind(this));this.on(_.Mb,this.S.bind(this));Qm(this,this.f.license);this.h.getMedia()&&(a=this.h.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
|
|
352
|
+
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 Mm)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Sm(this,a);_.Ui.clear()}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)}init(){}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.C(_.Xc,{detail:a}),this.trigger(a)}Vb(a){a=
|
|
353
|
+
this.L[a];void 0===a&&(a=null);return a}getSurface(){return this.h}getConfiguration(){return _.jf(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}unload(){return this.a?this.a.unload():Promise.resolve()}release(){if(null!=this.m)return this.g.info("Player release already in progress"),this.m;this.g.debug("Releasing player");this.m=Um(this);return this.m.finally(()=>{this.g.debug("Player released");this.m=null})}destroy(){if(this.F)return this.g.debug("The player is already destroyed. No-op"),
|
|
354
|
+
new Promise(a=>a());this.F=!0;return this.release().then(()=>{this.g.debug(wa);this.trigger(new _.C("destroying"));return _.Rm(this,_.Ed)}).then(()=>{this.a&&this.a.removeDelegate(this);this.zc.clear();this.T.release();if(this.a)return this.a.destroy()}).then(()=>{Yi(a=>{a.a()});_.Ui.clear();this.a=null;this.trigger(new _.C("destroyed"))})}load(a){const b=this;return _.w(function*(){try{yield _.$m(b,a),yield _.an(b),yield _.cn(b)}catch(c){if(b.m)throw b.g.info("Load interrupted while a player release is pending"),
|
|
355
|
+
new _.H(_.F,7,7E3);throw c;}})}use(a){a=new a;a.f(this);_.Xi(a)}remove(a){if(this.getState()<=_.Kl||this.I){let b="";Yi(c=>{c instanceof a&&(b=c.id(),c.a())});if(b)return _.Ui.delete(b),this.J=!0}return!1}play(){return this.a?this.j&&this.a.namespace()!==_.xc?this.j.start(this.a):this.a.play():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&&
|
|
356
|
+
this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.To}getState(){return this.a?this.a.getState():_.Kl}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.Jl?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?
|
|
345
357
|
this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.j}namespace(){return this.a&&this.a.namespace()||"Undefined"}canPlay(a,b){return this.a?this.a.canPlay(a,b):0}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a){this.a&&this.a.setPlaybackRate(a)}isMuted(){return this.a&&
|
|
346
|
-
this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.
|
|
347
|
-
this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
persistentState:_.
|
|
357
|
-
e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.
|
|
358
|
-
void 0===a?
|
|
359
|
-
b){if(this.m)return Promise.reject(
|
|
360
|
-
d);this.g&&(
|
|
361
|
-
this.h=null;else if(null!==this.g)this.g.reject(d),this.g=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
362
|
-
this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.
|
|
363
|
-
new
|
|
364
|
-
this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.
|
|
365
|
-
|
|
366
|
-
new
|
|
367
|
-
return this.closed}remove(){_.
|
|
368
|
-
_.
|
|
369
|
-
|
|
370
|
-
var
|
|
371
|
-
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
372
|
-
|
|
358
|
+
this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.G}setNetworkEngine(a){this.G=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Tc(){return Object.freeze(this.o)}setSourceIndex(a){this.a&&this.a.setSourceIndex(a)}getSourceIndex(){return this.a?this.a.getSourceIndex():-1}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?
|
|
359
|
+
this.a.getTimelineCues():[]}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.kc=a;Ym(this)}setCdnErrorCallback(a){this.C=a;this.a&&this.a.setCdnErrorCallback(this.C)}S(){this.md=!0}};_.x("clpp.Player",R);R.registerPlugin=_.Nm;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;
|
|
360
|
+
R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Tc;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;
|
|
361
|
+
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;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;
|
|
362
|
+
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;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;
|
|
363
|
+
R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Vb;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.Kl=0;_.Ll=1;_.Fl=2;_.Nl=3;_.Ml=4;_.Cl=5;_.Jl=6;_.rp=7;_.Il={IDLE:_.Kl,PREPARING:_.Ll,BUFFERING:_.Fl,PLAYING:_.Nl,PAUSED:_.Ml,ENDED:_.Cl,ERROR:_.Jl,UNSET:_.rp};R.State=_.Il;var Mm=[];var S=class{nb(){}ob(){}tb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}Zb(){}Eb(){}getMediaUrl(){}qb(){}pb(){}eb(){}Pa(){}getPodIndex(){}Fb(){}Gb(){}sb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.x("clpp.ads.IAd",S);S.prototype.getWrapperCreativeIds=S.prototype.getWrapperCreativeIds;S.prototype.getWrapperAdSystems=S.prototype.getWrapperAdSystems;S.prototype.getWrapperAdIds=S.prototype.getWrapperAdIds;
|
|
364
|
+
S.prototype.getSequenceLength=S.prototype.sb;S.prototype.getPositionInSequence=S.prototype.Gb;S.prototype.getPodTimeOffset=S.prototype.Fb;S.prototype.getPodIndex=S.prototype.getPodIndex;S.prototype.getPodType=S.prototype.Pa;S.prototype.getMediaBitrate=S.prototype.eb;S.prototype.getMediaHeight=S.prototype.pb;S.prototype.getMediaWidth=S.prototype.qb;S.prototype.getMediaUrl=S.prototype.getMediaUrl;S.prototype.getClickThroughUrl=S.prototype.Eb;S.prototype.isBumper=S.prototype.Zb;
|
|
365
|
+
S.prototype.getSkipTimeOffset=S.prototype.getSkipTimeOffset;S.prototype.getDuration=S.prototype.getDuration;S.prototype.getTitle=S.prototype.getTitle;S.prototype.getAdvertiserName=S.prototype.getAdvertiserName;S.prototype.getAdSystem=S.prototype.getAdSystem;S.prototype.getApiFramework=S.prototype.getApiFramework;S.prototype.getCreativeId=S.prototype.getCreativeId;S.prototype.getId=S.prototype.getId;S.prototype.getTechnology=S.prototype.tb;S.prototype.getAdManagerVersion=S.prototype.ob;
|
|
366
|
+
S.prototype.getAdManagerName=S.prototype.nb;var Ap=class{name(){}ba(){}create(){}};_.x("clpp.ads.IAdsManagerFactory",Ap);Ap.prototype.create=Ap.prototype.create;Ap.prototype.isSupported=Ap.prototype.ba;Ap.prototype.name=Ap.prototype.name;var Bp=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.x("clpp.ads.IAdsManager",Bp);Bp.prototype.getPosition=Bp.prototype.getPosition;Bp.prototype.setVolume=Bp.prototype.setVolume;Bp.prototype.getVolume=Bp.prototype.getVolume;Bp.prototype.skip=Bp.prototype.skip;Bp.prototype.pause=Bp.prototype.pause;Bp.prototype.resume=Bp.prototype.resume;var Cp=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.w(function*(){})}};Cp.prototype.dispose=Cp.prototype.dispose;Cp.prototype.getPosition=Cp.prototype.getPosition;Cp.prototype.setVolume=Cp.prototype.setVolume;Cp.prototype.getVolume=Cp.prototype.getVolume;Cp.prototype.skip=Cp.prototype.skip;Cp.prototype.pause=Cp.prototype.pause;Cp.prototype.resume=Cp.prototype.resume;
|
|
367
|
+
Cp.prototype.start=Cp.prototype.start;Cp.prototype.load=Cp.prototype.load;var em=class{name(){return"clpp.ads.NopAdsManagerFactory"}ba(){return!0}create(){return new Cp}};em.prototype.create=em.prototype.create;em.prototype.isSupported=em.prototype.ba;em.prototype.name=em.prototype.name;var Dp=class{getCuePoints(){}Hb(){}fb(){}};_.x("clpp.ads.IAdsTimeline",Dp);Dp.prototype.hasPostroll=Dp.prototype.fb;Dp.prototype.hasPreroll=Dp.prototype.Hb;Dp.prototype.getCuePoints=Dp.prototype.getCuePoints;_.Ep=class{g(){}release(){}};var Fp=class{constructor(){this.h=null}j(a){this.h=a}g(a){return this.h?this.h.setMediaKeys(a):Promise.reject(Ma)}m(){return this.h&&this.h.mediaKeys}a(a,b){return navigator.requestMediaKeySystemAccess(a,b)}f(){return bb}};hk(new class{a(){return bb}ba(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Fp}},1E3);var Hp=class{constructor(){this.size=0;this.a=void 0;this.f=new _.O("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Gp.value())}get(a){if(this.has(a))return this.a}has(a){const b=Gp.value();return this.a&&sg(a,b)?!0:!1}entries(){}keys(){}values(){}},Gp=new _.qp(()=>yg(new Uint8Array([0])));var Ip=class{j(){}g(a){_.If("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}m(){return null}a(){_.If("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};hk(new class{a(){return"NOP"}ba(){return!0}create(){return new Ip}},-1);var Kp=class{constructor(){this.h=this.o=null}j(a){this.o=a}g(a){const b=this.h;b&&b!==a&&en(b,null);return(this.h=a)?en(a,this.o):Promise.resolve()}m(){return this.h}a(a,b){_.If("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Jp(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Jp=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Fc))for(var c of b){a:{a=c;if(a.persistentState===_.ae){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
|
|
368
|
+
persistentState:_.Id,distinctiveIdentifier:_.Id,initDataTypes:a.initDataTypes,sessionTypes:[re],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),
|
|
369
|
+
e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Ie));a=e?b:null}if(a){this.a=a;return}}c=Error(pb);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Lp(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.If("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Lp=class{constructor(a){this.g=null;this.h=new WebKitMediaKeys(a);this.f=new _.po;this.j=0;this.a=new _.O(zc);this.a.info("Created Media Keys for "+a)}createSession(a){a=
|
|
370
|
+
void 0===a?re:a;this.a.debug("Creating Apple MediaKeys Session");if(a!==re)throw new TypeError("Session type "+a+ba);return new Mp(this.h,`__session_${this.j++}`)}setServerCertificate(){this.a.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Mp=class extends _.Uo{constructor(a,b){super();this.a=null;this.o=a;this.g=this.h=null;this.j=new _.po;this.sessionId=b;this.expiration=NaN;this.closed=new _.Sk;this.m=!1;this.keyStatuses=new Hp;this.f=new _.O(zc)}generateRequest(a,
|
|
371
|
+
b){if(this.m)return Promise.reject(fb);this.f.debug("generateRequest");this.h=new _.Sk;try{const c=this.o.createSession(_.Ie,_.G(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Te,d=>{{const e=this.keyStatuses.getStatus();this.f.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.C(sd,{messageType:void 0===e||e===ke?kd:jd,message:yg(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Re,d=>{this.f.debug("onWebkitKeyAdded_",
|
|
372
|
+
d);this.g&&(fn(this,"usable"),this.g.resolve(),this.g=null)});this.j.on(c,Se,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===ke)this.f.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.f.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),
|
|
373
|
+
this.h=null;else if(null!==this.g)this.g.reject(d),this.g=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:fn(this,"output-not-allowed");break;default:fn(this,_.dd)}});fn(this,ke)}catch(c){this.h.reject(c)}return this.h}load(){this.f.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.m)return Promise.reject(fb);this.f.debug("update");this.g=new _.Sk;try{this.a.update(_.G(a))}catch(b){this.g.reject(b)}return this.g}close(){if(this.m)return this.closed;
|
|
374
|
+
this.f.info(`Closing Key Session ${this.sessionId}`);this.m=!0;try{this.a.close(),this.closed.resolve(),_.Of(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.f.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};hk(new class{a(){return"APPLE"}ba(){return!!window.WebKitMediaKeys}create(){return new Kp}},1100);var Op=class{constructor(){this.o=this.h=null;this.w="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.w="webkit")}j(a){this.h=a}g(a){_.If("WebkitEmeManager.setMediaKeys");if(!this.h)return Promise.reject(Ma);const b=this.o;b&&b!==a&&jn(b,null);(this.o=a)&&jn(a,this.h);return Promise.resolve()}m(){return this.o}a(a,b){_.If("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.h)var c=this.h;else{var d=document.getElementsByTagName(_.v);c=d.length?d[0]:document.createElement(_.v)}const e=
|
|
375
|
+
new Np(this.w,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Np=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Jd&&(this.a=Qe,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,
|
|
376
|
+
this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.Ie,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.ae||a||(e=!1);if(e){this.f=g;return}}b=pb;if(c===_.Jd||c===_.Hc)b="None of the requested configurations were supported.";c=Error(b);c.name=Ua;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Pp(this.g,this.a))}getConfiguration(){return this.f}},Pp=class{constructor(a,b){this.g=a;this.m=b;this.a=null;this.f=new _.po;this.h=[];this.j=new Map}createSession(a=
|
|
377
|
+
re){if(a!==re&&a!==_.Pd)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ga,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Qp(this.g,this.a,this.m,a);this.h.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Qp=class extends _.Uo{constructor(a,b,c,d){super();this.o=a;this.h=b;this.m=!1;this.a=this.f=null;this.g=c;this.j=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Sk;this.keyStatuses=
|
|
378
|
+
new Hp}generateRequest(a,b){_.If("WebkitEmeManager.MediaKeySession.generateRequest");return ln(this,b,null)}load(a){_.If(rb);return this.j===_.Pd?ln(this,null,a):Promise.reject(Error(Sa))}update(a){_.If(rb);const b=new _.Sk;mn(this,b,a);return b}close(){_.If("WebkitEmeManager.MediaKeySession.close");if(this.j!==_.Pd){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;const a=kn(this,"cancelKeyRequest");try{this.h[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();
|
|
379
|
+
return this.closed}remove(){_.If("WebkitEmeManager.MediaKeySession.remove");return this.j!==_.Pd?Promise.reject(Error(Sa)):this.close()}};hk(new class{a(){return"WEBKIT"}ba(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Op}});var Tp=class extends _.$o{constructor(a,b,c,d,e){super(Fa);this.m=a;this.j=b;this.h=c;this.f=d;this.o=e;this.a=new _.O(yc);_.Kg(this.m)?this.a.warn(_.sb):this.Ga(_.Hc,{licenseUrl:this.m,videoRobustness:[_.eb,void 0],audioRobustness:[_.db,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Gc.bind(this)}});_.Kg(this.j)?this.a.warn(_.Va):this.Ga(_.Gc,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Gc.bind(this)}});
|
|
380
|
+
_.Kg(this.h)?this.a.warn(_.Ca):_.Kg(this.f)?this.a.warn(_.Ba):this.Ga(_.Fc,{licenseUrl:this.h,certificateUrl:this.f,modifiers:{licenseRequest:this.Ae.bind(this),licenseResponse:this.Be.bind(this),certificateRequest:this.Gc.bind(this),extractContentId:this.ne.bind(this)}})}Gc(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}ne(a,b){a=Ej(b);switch(this.o){case Rp:return a;case Sp:return(new _.Fj(a)).a;default:throw Error("Unknown content ID strategy");}}Ae(a,b){b.headers[ra]=
|
|
381
|
+
Xb;this.Gc(a,b);a={spc:_.Zi(b.body)};b.body=_.Gg(_.qh(a,!0))}Be(a,b){a=_.Ag(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=_.aj(a).buffer}};_.x(yc,Tp);Tp.prototype.onFairPlayLicenseResponse=Tp.prototype.Be;Tp.prototype.onFairPlayLicenseRequest=Tp.prototype.Ae;Tp.prototype.extractFairPlayContentId=Tp.prototype.ne;Tp.prototype.onLicenseRequest=Tp.prototype.Gc;Tp.prototype.constructor=Tp.prototype.constructor;Tp.NAME=Fa;
|
|
382
|
+
var Sp="hostname",Rp="full-skd";Tp.FairPlayContentIdStrategy={HOSTNAME:Sp,FULL_SKD:Rp};_.x("clpp.drm.HeaderDrmComponent",class extends _.Ep{constructor(){super();this.l=null}f(a){this.l=a}a(){this.l=null}g(){var a=this.l.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Fa){a=a.drm.customData;if(!a)throw new _.H(_.F,7,7100,_.Ic);a=new Tp(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Rp);_.jj(a)}}release(){}id(){return"headerdrm"}});_.vm(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.G(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.vm(function(){_.If("mathRound.install")});_.vm(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;Yc in document||(Object.defineProperty(document,Yc,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
|
|
383
|
+
{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",nn);document.addEventListener("webkitfullscreenerror",nn);document.addEventListener("mozfullscreenchange",nn);document.addEventListener("mozfullscreenerror",nn);document.addEventListener("MSFullscreenChange",nn);document.addEventListener("MSFullscreenError",nn)}});_.vm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.If("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=pn,document.exitPictureInPicture=qn,document.addEventListener("webkitpresentationmodechanged",on,!0))}});_.vm(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=rn)}});_.vm(function(){if(window.VTTCue)_.Hf("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Hf(qb),window.VTTCue=sn;else if(6===a)_.Hf("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=tn;else{try{var b=!!sn(1,2,"")}catch(c){b=!1}b&&(_.Hf(qb),window.VTTCue=sn)}}else _.Jf("VTTCue not available.")});var un;_.vm(function(){_.If("InputEvent.install");_.Th("Trident/")&&HTMLInputElement.prototype.addEventListener!==vn&&(_.Hf("Patching input event support on IE."),un=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=vn)});_.vm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.vm(function(){_.If("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 yn=class{constructor(){this.a=wn()}};var Up=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.Vp=class{constructor(a,b,c){this.f=a;this.h=b;this.g=c||this.f.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.h(a.contentRect.width,a.contentRect.height,this.f.isFullscreen())});this.a.observe(this.g)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Wp;_.Xp=class{constructor(){this.a=new Blob([Wp],{type:_.Ie})}canPlay(a){var b=document.createElement(_.v);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Sk;b=b.play();const d=(new _.Qh(()=>{d.stop();c.resolve(a)})).aa(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===Ua?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
|
|
384
|
+
Wp=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,
|
|
373
385
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
374
386
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
375
387
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
|
|
376
388
|
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,
|
|
377
389
|
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,
|
|
378
|
-
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]);_.
|
|
379
|
-
_.
|
|
380
|
-
a;this.g()}getEdgeType(){return this.
|
|
381
|
-
_.
|
|
382
|
-
_.
|
|
383
|
-
null}if(b)this.a=b;else throw new _.
|
|
384
|
-
_.
|
|
385
|
-
Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.h.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.m.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()}}
|
|
390
|
+
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]);_.Dn={};_.Fn={};var $n=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new yn}};var Jn=window.XMLHttpRequest;var Zn=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.h=new Up(a);this.length=a;this.w=b;this.f=this.a=this.g=0;this.j=null;this.m=-1;this.o=new yn}};var No=class extends _.Zl{constructor(a){super(new _.Sk,()=>Promise.resolve());this.A=a;this.g=null;this.o=this.R;this.f=-1;this.h=this.j=this.m=null;Tn(this)}then(a,b){this.R=this.R.then(a,b);return this}catch(a){this.R=this.R.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.m&&clearTimeout(this.m);this.j&&this.j();return a.abort()}).catch(()=>{})}};var Yn=window.fetch,Vn=window.AbortController,Un=window.Headers;_.co={};_.Zp=class{constructor(a){a=a.getConfiguration();a=_.jf(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.me?a.backgroundColor:null;this.T=typeof a.windowColor===_.me?a.windowColor:null;this.O=typeof a.fontColor===_.me?a.fontColor:null;this.S=typeof a.fontFamily===_.me?a.fontFamily:null;this.I=typeof a.fontSize===_.me?a.fontSize:null;this.B=typeof a.fontSizePercent===_.p?a.fontSizePercent:null;this.G=typeof a.edgeColor===_.me?a.edgeColor:"rgba(0, 0, 0, 1)";this.o=null;typeof a.edgeType===
|
|
391
|
+
_.me&&(this.o=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.T}setWindowColor(a){this.T=a;this.g()}getFontFamily(){return this.S}setFontFamily(a){this.S=a;this.g()}getFontColor(){return this.O}setFontColor(a){this.O=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.B?Yp:this.B}setFontSizePercent(a){this.B=a;this.g()}getEdgeColor(){return this.G}setEdgeColor(a){this.G=
|
|
392
|
+
a;this.g()}getEdgeType(){return this.o}setEdgeType(a){this.o=a;this.g()}};_.Zp.prototype.setEdgeType=_.Zp.prototype.setEdgeType;_.Zp.prototype.getEdgeType=_.Zp.prototype.getEdgeType;_.Zp.prototype.setEdgeColor=_.Zp.prototype.setEdgeColor;_.Zp.prototype.getEdgeColor=_.Zp.prototype.getEdgeColor;_.Zp.prototype.setFontSizePercent=_.Zp.prototype.setFontSizePercent;_.Zp.prototype.getFontSizePercent=_.Zp.prototype.getFontSizePercent;_.Zp.prototype.setFontSize=_.Zp.prototype.setFontSize;
|
|
393
|
+
_.Zp.prototype.getFontSize=_.Zp.prototype.getFontSize;_.Zp.prototype.setFontColor=_.Zp.prototype.setFontColor;_.Zp.prototype.getFontColor=_.Zp.prototype.getFontColor;_.Zp.prototype.setFontFamily=_.Zp.prototype.setFontFamily;_.Zp.prototype.getFontFamily=_.Zp.prototype.getFontFamily;_.Zp.prototype.setWindowColor=_.Zp.prototype.setWindowColor;_.Zp.prototype.getWindowColor=_.Zp.prototype.getWindowColor;_.Zp.prototype.setBackgroundColor=_.Zp.prototype.setBackgroundColor;
|
|
394
|
+
_.Zp.prototype.getBackgroundColor=_.Zp.prototype.getBackgroundColor;var Yp=1/15;var fo="raised",go="depressed",io="dropshadow",ho="uniform";_.x("clpp.text.EdgeType",{NONE:_.Ad,RAISED:fo,DEPRESSED:go,DROP_SHADOW:io,UNIFORM:ho});_.co[_.Sb]=class{constructor(a){this.g=a;this.a=null;this.f=new _.O("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.co[_.Tb]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.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=_.co[_.Ub]||null;c?(b=new c(this.g),b.parseInit(a)):this.f.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=
|
|
395
|
+
null}if(b)this.a=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 $p;
|
|
396
|
+
_.aq=class extends _.Zp{constructor(a){super(a);this.m=a.getSurface().getMedia();this.f=`clpp-video-${$p++}`;this.h=document.createElement(_.oe);this.j=this.w=!1;_.hm(this.m,this.f);document.head.appendChild(this.h);this.g()}append(){}remove(){return!0}isTextVisible(){return this.w}setTextVisibility(a){this.w=a}g(){if(!this.j){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.jo(this)},b=
|
|
397
|
+
Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.h.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.m.classList.remove(this.f);document.head.removeChild(this.h);this.j=!0;return Promise.resolve()}};$p=0;_.rl("native",new class{ba(){return!0}create(a){return new _.aq(a)}});_.bq=class{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;
|