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