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