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