@castlabs/prestoplay 6.3.0 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +70 -1
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +108 -107
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +426 -398
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +72 -69
  10. package/cjs/cl.externs.js +79 -155
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +47 -44
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -32
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +259 -254
  17. package/cjs/cl.muxdata.js +12 -12
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +69 -69
  22. package/cjs/cl.thumbnails.js +24 -23
  23. package/cjs/cl.tizen.js +70 -70
  24. package/cjs/cl.ttml.js +27 -26
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +18 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -19
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -87
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +365 -348
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -63
  38. package/cl.externs.js +74 -154
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +39 -37
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +16 -16
  44. package/cl.mse.js +233 -222
  45. package/cl.muxdata.js +8 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +10 -10
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -21
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +16 -15
  58. package/package.json +4 -2
package/cjs/cl.muxdata.js CHANGED
@@ -1,16 +1,16 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var Pt=function(a,b){this.l=a;this.m=this.g=null;this.A=("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6);this.a=new _.Wf;this.f=b;this.o=this.j=this.h=this.w=!1},Rt=function(a){var b={debug:!0,data:Qt(a)};a.g&&a.g.muxOptionsOverride&&_.J.Ec(a.g.muxOptionsOverride)&&(b=_.J.Ta(b,a.g.muxOptionsOverride,{getPlayheadTime:function(){return 1E3*a.l.getPosition()},getStateData:function(){a.f.debug("getStateData()");var c=a.l.getLoadedSource(),d=a.l.getTrackManager(),e=a.l.getSurface(),
3
- f=d.fa(),g={player_is_paused:a.l.isPaused(),player_is_fullscreen:e.isFullscreen(),video_source_duration:1E3*a.l.getDuration(),player_autoplay_on:!!a.l.getConfiguration().autoplay};if(c){var k=new _.Wj(c.url);g.video_source_url=_.Xj(k);g.video_source_mime_type=c.type;c.name&&(g.video_title=c.name)}if(c=e.getContainer())g.player_width=c.offsetWidth,g.player_height=c.offsetHeight;f&&f.height&&f.width&&(g.video_source_height=f.height,g.video_source_width=f.width);(d=d.ia())&&d.language&&(g.player_language_code=
4
- d.language);return g}}));a.f.debug("Mux SDK options",b);return b},Qt=function(a){var b={env_key:a.g.envKey,video_title:a.m&&a.m.name||"",player_software_name:_.oa,player_software_version:_.ea,player_mux_plugin_name:"CastlabsPlayer built-in Mux Plugin",player_mux_plugin_version:_.ea};(a=a.l.getConfiguration().viewerId)&&(b.viewer_user_id=a);return b},St=function(a,b,c){a.f.debug("Event: "+b);mux.emit(a.A,b,c)},Tt=function(a){a.a.on(a.l,_.we,function(){St(a,_.we,{player_playhead_time:1E3*a.l.getPosition()})});
5
- a.a.on(a.l,_.Pd,function(){return St(a,_.Pd)});a.a.on(a.l,_.ic,a.lh.bind(a));a.a.on(a.l,_.ie,a.nh.bind(a));a.a.on(a.l,_.Ee,function(){return St(a,_.ce)});a.a.on(a.l,_.De,function(){return St(a,_.be)});a.a.on(a.l,_.Zc,a.mh.bind(a));a.a.on(a.l,_.wb,function(){return St(a,"adbreakstart")});a.a.on(a.l,_.xb,function(){return St(a,"adbreakend")});a.a.on(a.l,_.Jb,function(){St(a,"adplay");St(a,"adplaying")});a.a.on(a.l,_.Fb,function(){return St(a,"adpause")});a.a.on(a.l,_.Hb,function(){St(a,"adplay");St(a,
6
- "adplaying")});a.a.on(a.l,_.Kb,function(){return St(a,"adended")});a.a.on(a.l,_.Bb,function(){return St(a,"adfirstquartile")});a.a.on(a.l,_.Eb,function(){return St(a,"admidpoint")});a.a.on(a.l,_.Lb,function(){return St(a,"adthirdquartile")})},Ut=function(){this.f=null;this.a=!1;this.g=new _.G("clpp.muxdata")},Vt=function(){};_.t=Pt.prototype;
7
- _.t.initialize=function(a,b){this.g=a;this.m=b;this.w=!1;if(!this.h){try{this.h=!0,mux.init(this.A,Rt(this))}catch(c){throw this.h=!1,_.ag(this.a),new _.K(1,9,9302,null,c);}St(this,"playerready")}this.j&&!this.o&&(St(this,"videochange",Qt(this)),this.j=!1);Tt(this)};_.t.release=function(){this.f.debug("release()");this.j?this.f.debug(_.ja):(_.ag(this.a),this.j=!0,this.m=this.g=null)};
8
- _.t.destroy=function(){this.f.debug(_.Mc);this.o?this.f.debug(_.ia):(this.o=!0,this.h&&this.w&&St(this,"viewend"),St(this,"destroy"))};_.t.lh=function(a){this.f.debug(_.Cd);var b=a.detail;a=this.l.getTrackManager();b&&b.bandwidth&&(b=b.bandwidth,(a=a.za())&&a.bandwidth&&(b+=a.bandwidth),St(this,"renditionchange",{video_source_bitrate:b}))};
9
- _.t.nh=function(a){this.f.debug(_.Gd);switch(a.detail.currentState){case _.im:this.l.getConfiguration().autoplay&&St(this,_.Pd);break;case _.km:St(this,_.Qd);break;case _.jm:St(this,_.Ld);break;case _.dm:this.w=!0,St(this,_.Yc)}};
10
- _.t.mh=function(a){this.f.debug(_.Dd);if(this.h&&(a=a.detail||null))if(10003===a.code)St(this,"aderror");else if(a.severity===_.M){var b=a.message||"Player error";if(1===a.category||6100===a.code||6007===a.code)b="Download error",6100===a.code?b="Certificate request error":6007===a.code&&(b="License request error"),b=b+" castlabs-error-data:"+JSON.stringify(a.data);St(this,_.Zc,{player_error_code:a.code,player_error_message:b})}};_.v(Ut,_.rp);_.t=Ut.prototype;_.t.onPlayerCreated=function(a){this.f=new Pt(a,this.g)};
11
- _.t.onContentWillLoad=function(a,b){var c=a.getConfiguration();if(this.a=!_.J.R(c.muxdata)&&typeof c.muxdata===_.Bd){c=c.muxdata;var d;if(d="undefined"===typeof window.mux)c=c.muxLib,d="undefined"!==typeof c&&typeof c.init===_.ad&&typeof c.emit===_.ad,window.mux=c,d=!d;d&&(this.g.warn("Mux SDK is not loaded. Will do nothing."),this.a=!1,c=new _.K(1,9,9301),this.S(a,c))}else this.g.warn("Mux plugin is loaded but not configured. Will do nothing.");if(this.a){c=a.getConfiguration();c=_.J.Ha(c.muxdata||
12
- {});try{d=[];typeof c===_.Bd&&(c.envKey||d.push("envKey"));if(0<d.length)throw new _.K(1,9,9300,{missingKeys:d});this.f.initialize(c,b)}catch(e){this.a=!1,this.S(a,e)}}};_.t.onContentLoaded=function(){};_.t.onPlayerWillDestroy=function(){this.a&&(this.f.destroy(),this.f=null)};_.t.onPlayerWillRelease=function(){this.a&&this.f.release()};_.t.id=function(){return"mux"};_.t.S=function(a,b){a.trigger(new _.I(_.Zc,{detail:b}))};_.B("clpp.muxdata.MuxDataPlugin",Ut);Ut.Id="mux";Vt.prototype.create=function(){return new Ut};
13
- _.Fn(new Vt);};
2
+ var f=function(window){var zu=function(a,b){this.l=a;this.m=this.g=null;this.A=("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6);this.a=new _.cg;this.f=b;this.o=this.j=this.h=this.w=!1},Bu=function(a){var b={debug:!0,data:Au(a)};a.g&&a.g.muxOptionsOverride&&_.J.Gc(a.g.muxOptionsOverride)&&(b=_.J.Va(b,a.g.muxOptionsOverride,{getPlayheadTime:function(){return 1E3*a.l.getPosition()},getStateData:function(){a.f.debug("getStateData()");var c=a.l.getLoadedSource(),d=a.l.getTrackManager(),e=a.l.getSurface(),
3
+ f=d.ea(),g={player_is_paused:a.l.isPaused(),player_is_fullscreen:e.isFullscreen(),video_source_duration:1E3*a.l.getDuration(),player_autoplay_on:!!a.l.getConfiguration().autoplay};if(c){var h=new _.mi(c.url);g.video_source_url=_.ni(h);g.video_source_mime_type=c.type;c.name&&(g.video_title=c.name)}if(c=e.getContainer())g.player_width=c.offsetWidth,g.player_height=c.offsetHeight;f&&f.height&&f.width&&(g.video_source_height=f.height,g.video_source_width=f.width);(d=d.ka())&&d.language&&(g.player_language_code=
4
+ d.language);return g}}));a.f.debug("Mux SDK options",b);return b},Au=function(a){var b={env_key:a.g.envKey,video_title:a.m&&a.m.name||"",player_name:_.ta,player_software_name:_.ta,player_software_version:_.ia,player_mux_plugin_name:"CastlabsPlayer built-in Mux Plugin",player_mux_plugin_version:_.ia};(a=a.l.getConfiguration().viewerId)&&(b.viewer_user_id=a);return b},Cu=function(a,b,c){a.f.debug("Event: "+b);mux.emit(a.A,b,c)},Du=function(a){a.a.on(a.l,_.De,function(){Cu(a,_.De,{player_playhead_time:1E3*
5
+ a.l.getPosition()})});a.a.on(a.l,_.Wd,function(){return Cu(a,_.Wd)});a.a.on(a.l,_.qc,a.wh.bind(a));a.a.on(a.l,_.pe,a.yh.bind(a));a.a.on(a.l,_.Le,function(){return Cu(a,_.je)});a.a.on(a.l,_.Ke,function(){return Cu(a,_.ie)});a.a.on(a.l,_.fd,a.xh.bind(a));a.a.on(a.l,_.Fb,function(){return Cu(a,"adbreakstart")});a.a.on(a.l,_.Gb,function(){return Cu(a,"adbreakend")});a.a.on(a.l,_.Sb,function(){Cu(a,"adplay");Cu(a,"adplaying")});a.a.on(a.l,_.Ob,function(){return Cu(a,"adpause")});a.a.on(a.l,_.Qb,function(){Cu(a,
6
+ "adplay");Cu(a,"adplaying")});a.a.on(a.l,_.Tb,function(){return Cu(a,"adended")});a.a.on(a.l,_.Kb,function(){return Cu(a,"adfirstquartile")});a.a.on(a.l,_.Nb,function(){return Cu(a,"admidpoint")});a.a.on(a.l,_.Ub,function(){return Cu(a,"adthirdquartile")})},Eu=function(){this.f=null;this.a=!1;this.g=new _.H("clpp.muxdata")},Fu=function(){};_.t=zu.prototype;
7
+ _.t.initialize=function(a,b){this.g=a;this.m=b;this.w=!1;if(!this.h){try{this.h=!0,mux.init(this.A,Bu(this))}catch(c){throw this.h=!1,_.fg(this.a),new _.L(1,9,9302,null,c);}Cu(this,"playerready")}this.j&&!this.o&&(Cu(this,"videochange",Au(this)),this.j=!1);Du(this)};_.t.release=function(){this.f.debug("release()");this.j?this.f.debug(_.la):(_.fg(this.a),this.j=!0,this.m=this.g=null)};
8
+ _.t.destroy=function(){this.f.debug(_.Tc);this.o?this.f.debug(_.ka):(this.o=!0,this.h&&this.w&&Cu(this,"viewend"),Cu(this,"destroy"))};_.t.wh=function(a){this.f.debug(_.Jd);var b=a.detail;a=this.l.getTrackManager();b&&b.bandwidth&&(b=b.bandwidth,(a=a.Fa())&&a.bandwidth&&(b+=a.bandwidth),Cu(this,"renditionchange",{video_source_bitrate:b}))};
9
+ _.t.yh=function(a){this.f.debug(_.Nd);switch(a.detail.currentState){case _.$m:this.l.getConfiguration().autoplay&&Cu(this,_.Wd);break;case _.bn:Cu(this,_.Xd);break;case _.an:Cu(this,_.Sd);break;case _.Vm:this.w=!0,Cu(this,_.ed)}};
10
+ _.t.xh=function(a){this.f.debug(_.Kd);if(this.h&&(a=a.detail||null))if(10003===a.code)Cu(this,"aderror");else if(a.severity===_.M){var b=a.message||"Player error";if(1===a.category||6100===a.code||6007===a.code)b="Download error",6100===a.code?b="Certificate request error":6007===a.code&&(b="License request error"),b=b+" castlabs-error-data:"+JSON.stringify(a.data);Cu(this,_.fd,{player_error_code:a.code,player_error_message:b})}};_.v(Eu,_.cq);_.t=Eu.prototype;_.t.onPlayerCreated=function(a){this.f=new zu(a,this.g)};
11
+ _.t.onContentWillLoad=function(a,b){var c=a.getConfiguration();if(this.a=!_.J.R(c.muxdata)&&typeof c.muxdata===_.Id){c=c.muxdata;var d;if(d="undefined"===typeof window.mux)c=c.muxLib,d="undefined"!==typeof c&&typeof c.init===_.hd&&typeof c.emit===_.hd,window.mux=c,d=!d;d&&(this.g.warn("Mux SDK is not loaded. Will do nothing."),this.a=!1,c=new _.L(1,9,9301),this.T(a,c))}else this.g.warn("Mux plugin is loaded but not configured. Will do nothing.");if(this.a){c=a.getConfiguration();c=_.J.Ma(c.muxdata||
12
+ {});try{d=[];typeof c===_.Id&&(c.envKey||d.push("envKey"));if(0<d.length)throw new _.L(1,9,9300,{missingKeys:d});this.f.initialize(c,b)}catch(e){this.a=!1,this.T(a,e)}}};_.t.onContentLoaded=function(){};_.t.onPlayerWillDestroy=function(){this.a&&(this.f.destroy(),this.f=null)};_.t.onPlayerWillRelease=function(){this.a&&this.f.release()};_.t.id=function(){return"mux"};_.t.T=function(a,b){a.trigger(new _.I(_.fd,{detail:b}))};_.B("clpp.muxdata.MuxDataPlugin",Eu);Eu.Id="mux";Fu.prototype.create=function(){return new Eu};
13
+ _.uo(new Fu);};
14
14
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
15
15
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
16
16
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.onboard.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var Nt=function(){this.l=null;this.a=new _.G("clpp.onboard")},Ot=function(a,b){function c(l){return l&&(_.$g(l,"https://")||_.$g(l,"http://")||_.$g(l,"//"))?l:d+l}var d=b.baseUrl;_.ah(d,"/")||(d+="/");var e=c(b.widevineUrl||"widevine"),f=c(b.playreadyUrl||"playready"),g=c(b.fairplayUrl||"fairplay"),k=new _.Aj(a);k.Ea(_.Ic,{licenseUrl:e,videoRobustness:[_.hb,void 0],audioRobustness:[_.gb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:_.tk,
3
- licenseResponse:_.yk}});k.Ea(_.Gc,{licenseUrl:g,certificateUrl:g,modifiers:{licenseRequest:_.vk,licenseResponse:_.wk,extractContentId:_.sk,certificateRequest:_.xk}});k.Ea(_.Hc,{licenseUrl:f,modifiers:{licenseRequest:_.tk}});_.vj(k)};_.v(Nt,_.Kn);_.t=Nt.prototype;_.t.Da=function(a){this.l=a};_.t.va=function(){this.l=null};
4
- _.t.Ub=function(){var a=this.l.getConfiguration().drm,b;if(b=!(!a||!a.env))b=a&&a.customData,b=!(!b||!b.baseUrl);b&&(b=a.env,a=a.customData,a={baseUrl:a.baseUrl,widevineUrl:a.widevineUrl,playreadyUrl:a.playreadyUrl,fairplayUrl:a.fairplayUrl},this.a.info("Registering the DRMtoday Onboard environment, name\x3d'"+b+"'"),Ot(b,a))};_.t.release=function(){};_.t.id=function(){return"onboard"};_.B("clpp.onboard.OnboardComponent",Nt);_.B("clpp.onboard.register",Ot);};
2
+ var f=function(window){var xu=function(){this.l=null;this.a=new _.H("clpp.onboard")},yu=function(a,b){function c(l){return l&&(_.vh(l,"https://")||_.vh(l,"http://")||_.vh(l,"//"))?l:d+l}var d=b.baseUrl;_.wh(d,"/")||(d+="/");var e=c(b.widevineUrl||"widevine"),f=c(b.playreadyUrl||"playready"),g=c(b.fairplayUrl||"fairplay"),h=new _.rk(a);h.Ka(_.Pc,{licenseUrl:e,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:_.fl,
3
+ licenseResponse:_.kl}});h.Ka(_.Nc,{licenseUrl:g,certificateUrl:g,modifiers:{licenseRequest:_.hl,licenseResponse:_.il,extractContentId:_.el,certificateRequest:_.jl}});h.Ka(_.Oc,{licenseUrl:f,modifiers:{licenseRequest:_.fl}});_.mk(h)};_.v(xu,_.zo);_.t=xu.prototype;_.t.Ja=function(a){this.l=a};_.t.Ca=function(){this.l=null};
4
+ _.t.Wb=function(){var a=this.l.getConfiguration().drm,b;if(b=!(!a||!a.env))b=a&&a.customData,b=!(!b||!b.baseUrl);b&&(b=a.env,a=a.customData,a={baseUrl:a.baseUrl,widevineUrl:a.widevineUrl,playreadyUrl:a.playreadyUrl,fairplayUrl:a.fairplayUrl},this.a.info("Registering the DRMtoday Onboard environment, name\x3d'"+b+"'"),yu(b,a))};_.t.release=function(){};_.t.id=function(){return"onboard"};_.B("clpp.onboard.OnboardComponent",xu);_.B("clpp.onboard.register",yu);};
5
5
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
6
6
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
7
7
  else{_=this.clpp._;(f.call(g,this));}
@@ -1,18 +1,18 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var ut="A persistent DRM session already exists for: ",vt="No DRM configuration.",wt="clpp.persistent",xt=function(a){a.A=[a.g];a.m=0;a.j=0},yt=function(a){var b=a.A.splice(0)[0];(b=a.g=a.g||b)?b.Ff?a.a=a.m||a.j:void 0!=b.H&&a.j<b.H?(a.a=b.H,a.g=null):a.a=a.j:a.a=0},zt=function(a,b){for(var c=[],d=_.u(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c},At=function(a){a=a.g.keys();a=zt(a,function(b){return b.sessionId});return Array.from(a)},Bt=function(a,b){var c,d,e;return _.A(function(f){if(1==
3
- f.a)return _.w(f,_.sl(a,b),2);c=f.f;if(!c)return a.a.debug("Ignoring attempt to remove missing session",b),f["return"]();d=[];(e=a.g.get(c))&&a.B&&(e.kb=new _.Qh,d.push(e.kb));a.a.debug("Attempting to remove session",b);d.push(c.remove());return f["return"](Promise.all(d))})},Dt=function(a,b){a.K=Ct;a.J=[];a.D=!0;return _.$k(a,b)},Ft=function(a,b,c,d,e,f){a.K=Et;var g=new Map,k=_.ul(b);g.set(k,{audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:_.Id,persistentState:_.Zd,sessionTypes:[_.Nd],
4
- label:k,drmInfos:[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}]});return _.gl(a,g)},Gt=function(){},Ht=function(a){a=JSON.parse(a);var b=JSON.parse(a.sessionIds),c=JSON.parse(a.audioCapabilities),d=JSON.parse(a.videoCapabilities),e=JSON.parse(a.serverCertificate),f=JSON.parse(a.drmConfig);return{sessionIds:b,keySystem:a.keySystem,licenseServerUri:decodeURIComponent(a.licenseServerUri),
5
- serverCertificate:e?new Uint8Array(e):null,audioCapabilities:c,videoCapabilities:d,drmConfig:f}},It=function(a,b){var c=_.xj(a),d=_.Zi({drm:a});d.drm=a;var e=new _.Wk({xb:b,onError:function(){},Be:function(){},onExpirationUpdated:function(){},onEvent:function(){},getConfiguration:function(){return d},Cc:function(){return null}});e.h=c;return e},Lt=function(a,b,c){var d,e,f,g,k,l,m,n,p;return _.A(function(q){switch(q.a){case 1:d=Jt;e=Kt;if(!a)return e.debug(vt),q["return"]();f=a.offlineId;return 0===
6
- f.length?q["return"]():_.w(q,d.get(f),2);case 2:if(g=q.f)return e.debug(ut,f),q["return"]();k=It(a,c);_.rf(q,3,4);return _.w(q,Dt(k,b),6);case 6:return _.w(q,_.ml(k),7);case 7:return _.w(q,_.nl(k),8);case 8:return l=k.getDrmInfo(),m=b.map(function(r){return{contentType:_.xh(r.video.mimeType,r.video.codecs),robustness:l.videoRobustness}}),n=At(k),g={sessionIds:n,keySystem:l.keySystem,licenseServerUri:l.licenseServerUri,serverCertificate:l.serverCertificate,audioCapabilities:[],videoCapabilities:m,
7
- drmConfig:a},_.w(q,d.store(f,g),4);case 4:return xt(q),_.w(q,k.destroy(),10);case 10:yt(q);break;case 3:throw p=_.tf(q),e.error("Error while persisting DRM session"),new _.K(1,6,6200,null,p);}})},Mt=function(){this.l=null;this.f=Jt;this.a=new _.G(wt)},Ct=1,Et=2;_.t=Gt.prototype;
8
- _.t.store=function(a,b){var c;return _.A(function(d){var e=JSON.stringify(b.sessionIds),f=b.serverCertificate?Array.from(b.serverCertificate):null;f=JSON.stringify(f);var g=JSON.stringify(b.audioCapabilities),k=JSON.stringify(b.videoCapabilities);c=JSON.stringify({sessionIds:e,keySystem:b.keySystem,licenseServerUri:encodeURIComponent(b.licenseServerUri),serverCertificate:f,audioCapabilities:g,videoCapabilities:k,drmConfig:JSON.stringify(b.drmConfig)});window.localStorage.setItem(encodeURIComponent(a),
9
- btoa(c));_.z(d)})};_.t.get=function(a){var b;return _.A(function(c){return(b=window.localStorage.getItem(encodeURIComponent(a)))?c["return"](Ht(atob(b))):c["return"](null)})};_.t["delete"]=function(a){return _.A(function(b){window.localStorage.removeItem(encodeURIComponent(a));_.z(b)})};_.t.clear=function(){return _.A(function(a){window.localStorage.clear();_.z(a)})};_.t.getName=function(){return"clpp.persistent.SimpleSessionStorage"};_.B("clpp.persistent.useStorage",function(a){var b=["store","get","delete","clear","getName"];var c=[];_.J.R(a)||(_.J.fb(a.store)||c.push("store"),_.J.fb(a.get)||c.push("get"),_.J.fb(a["delete"])||c.push("delete"),_.J.fb(a.clear)||c.push("clear"),_.J.fb(a.getName)||c.push("getName"),b=c);if(0<b.length)throw Kt.warn("Invalid session storage implementation"),new _.K(1,6,6202,{missingMethods:b});Jt=a});
10
- _.B("clpp.persistent.fetchLicense",function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];var f,g,k,l,m,n,p,q,r,x,y,C,H,F,E,L,O,S,ra;return _.A(function(W){switch(W.a){case 1:f=Jt;g=Kt;k=function(ca,fa){return new _.K(1,6,6200,ca,fa)};l=_.tm(a).shift();if(!l)throw k("No source specified.");if(!b)throw k(vt);m=b.offlineId;if(typeof m!==_.me||!m.length)throw k("Missing offline id.");return _.w(W,f.get(m),2);case 2:if(n=W.f)return g.debug(ut,m),W["return"]();p=_.Zi();q=new _.mi;
11
- r=[];x=_.u(d);for(y=x.next();!y.done;y=x.next())C=y.value,H=new C,_.ej(H.id())||(H.Da(null),_.gj(H),r.push(H));F=null;_.rf(W,3,4);return _.w(W,_.Ho(l.url,q,p.manifest.attemptParameters,l.type),6);case 6:return F=W.f,F.configure(p.manifest),_.w(W,F.start(l.url,{networkingEngine:q,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineCueAdded:function(){},onEvent:function(){},onError:function(){}}),7);case 7:E=W.f;if(!E.periods.length)throw k(null,new _.K(_.M,4,4014));L=_.Ao(E.periods);
12
- return _.w(W,Lt(b,L,q),4);case 4:for(xt(W);r.length;)O=r.shift(),O.va(),_.dj["delete"](O.id());S=[];F&&S.push(F.stop());S.push(q.destroy());return _.w(W,Promise.all(S),9);case 9:yt(W);break;case 3:ra=_.tf(W);if(ra instanceof _.K&&6200===ra.code)throw ra;throw k(null,ra);}})});
13
- _.B("clpp.persistent.removeLicense",function(a){var b,c,d,e,f,g,k;return _.A(function(l){switch(l.a){case 1:b=Jt;c=Kt;if(!_.J.Z(a)||0===a.length)return c.warn("Invalid offlineId"),l["return"]();e=d=null;_.rf(l,2,3);return _.w(l,b.get(a),5);case 5:f=l.f;if(!f)return c.debug("No persistent DRM session found"),l["return"]();f.drmConfig.delayLicenseRequestUntilPlayed=!0;e=new _.mi;d=It(f.drmConfig,e);return _.w(l,Ft(d,f.keySystem,f.licenseServerUri,f.serverCertificate,f.audioCapabilities,f.videoCapabilities),
14
- 6);case 6:return _.w(l,_.ml(d),7);case 7:return _.w(l,Promise.all(f.sessionIds.map(function(m){return _.A(function(n){if(1==n.a)return _.w(n,Bt(d,m),2);c.debug("successfully removed session with id",m);_.z(n)})})),8);case 8:return _.w(l,b["delete"](a),3);case 3:return xt(l),g=[],d&&g.push(d.destroy()),e&&g.push(e.destroy()),_.w(l,Promise.all(g),10);case 10:yt(l);break;case 2:throw k=_.tf(l),c.error("Failed to remove session"),new _.K(1,6,6201,null,k);}})});var Jt=new Gt,Kt=new _.G(wt);_.v(Mt,_.Kn);_.t=Mt.prototype;_.t.Da=function(a){this.l=a};_.t.va=function(){this.l=null};_.t.release=function(){};_.t.Ub=function(){this.f=Jt};_.t.id=function(){return _.Md};_.t.bj=function(a,b,c){var d=this,e;return _.A(function(f){if(1==f.a){if(!a)return d.a.debug("No DRM configuration found for loaded source."),f["return"]();_.rf(f,2);return _.w(f,Lt(a,b,c),4)}if(2!=f.a)return d.l.trigger(new _.I(_.Rc,{offlineId:a.offlineId})),_.sf(f,0);e=_.tf(f);d.l.onError(e);_.z(f)})};
15
- _.t.Wh=function(a){var b=this,c;return _.A(function(d){if(1==d.a)return _.rf(d,2),_.w(d,b.f.get(a),4);if(2!=d.a){if(c=d.f)return d["return"](c.sessionIds);b.a.debug("No offline session found for "+a);return d["return"]([])}_.tf(d);b.a.warn("Error while loading session info from storage");return d["return"]([])})};_.B("clpp.persistent.PersistentLicenseComponent",Mt);};
2
+ var f=function(window){var eu="A persistent DRM session already exists for: ",fu="No DRM configuration.",gu="clpp.persistent",hu=function(a){a.A=[a.g];a.m=0;a.j=0},iu=function(a){var b=a.A.splice(0)[0];(b=a.g=a.g||b)?b.Nf?a.a=a.m||a.j:void 0!=b.H&&a.j<b.H?(a.a=b.H,a.g=null):a.a=a.j:a.a=0},ju=function(a,b){for(var c=[],d=_.u(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c},ku=function(a){a=a.g.keys();a=ju(a,function(b){return b.sessionId});return Array.from(a)},lu=function(a,b){var c,d,e;return _.A(function(f){if(1==
3
+ f.a)return _.y(f,_.gm(a,b),2);c=f.f;if(!c)return a.a.debug("Ignoring attempt to remove missing session",b),f["return"]();d=[];(e=a.g.get(c))&&a.C&&(e.nb=new _.Mh,d.push(e.nb));a.a.debug("Attempting to remove session",b);d.push(c.remove());return f["return"](Promise.all(d))})},nu=function(a,b){a.K=mu;a.L=[];a.G=!0;return _.Ol(a,b)},pu=function(a,b,c,d,e,f){a.K=ou;var g=new Map,h=_.im(b);g.set(h,{audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:_.Pd,persistentState:_.fe,sessionTypes:[_.Ud],
4
+ label:h,drmInfos:[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}]});return _.Ul(a,g)},qu=function(){},ru=function(a){a=JSON.parse(a);var b=JSON.parse(a.sessionIds),c=JSON.parse(a.audioCapabilities),d=JSON.parse(a.videoCapabilities),e=JSON.parse(a.serverCertificate),f=JSON.parse(a.drmConfig);return{sessionIds:b,keySystem:a.keySystem,licenseServerUri:decodeURIComponent(a.licenseServerUri),
5
+ serverCertificate:e?new Uint8Array(e):null,audioCapabilities:c,videoCapabilities:d,drmConfig:f}},su=function(a,b){var c=_.ok(a),d=_.Rj({drm:a});d.drm=a;var e=new _.Kl({Ab:b,onError:function(){},Je:function(){},onExpirationUpdated:function(){},onEvent:function(){},getConfiguration:function(){return d},Ec:function(){return null}});e.h=c;return e},vu=function(a,b,c){var d,e,f,g,h,l,m,n,p;return _.A(function(q){switch(q.a){case 1:d=tu;e=uu;if(!a)return e.debug(fu),q["return"]();f=a.offlineId;return 0===
6
+ f.length?q["return"]():_.y(q,d.get(f),2);case 2:if(g=q.f)return e.debug(eu,f),q["return"]();h=su(a,c);_.xf(q,3,4);return _.y(q,nu(h,b),6);case 6:return _.y(q,_.$l(h),7);case 7:return _.y(q,_.am(h),8);case 8:return l=h.getDrmInfo(),m=b.map(function(r){return{contentType:_.Ii(r.video.mimeType,r.video.codecs),robustness:l.videoRobustness}}),n=ku(h),g={sessionIds:n,keySystem:l.keySystem,licenseServerUri:l.licenseServerUri,serverCertificate:l.serverCertificate,audioCapabilities:[],videoCapabilities:m,
7
+ drmConfig:a},_.y(q,d.store(f,g),4);case 4:return hu(q),_.y(q,h.destroy(),10);case 10:iu(q);break;case 3:throw p=_.zf(q),e.error("Error while persisting DRM session"),new _.L(1,6,6200,null,p);}})},wu=function(){this.l=null;this.f=tu;this.a=new _.H(gu)},mu=1,ou=2;_.t=qu.prototype;
8
+ _.t.store=function(a,b){var c;return _.A(function(d){var e=JSON.stringify(b.sessionIds),f=b.serverCertificate?Array.from(b.serverCertificate):null;f=JSON.stringify(f);var g=JSON.stringify(b.audioCapabilities),h=JSON.stringify(b.videoCapabilities);c=JSON.stringify({sessionIds:e,keySystem:b.keySystem,licenseServerUri:encodeURIComponent(b.licenseServerUri),serverCertificate:f,audioCapabilities:g,videoCapabilities:h,drmConfig:JSON.stringify(b.drmConfig)});window.localStorage.setItem(encodeURIComponent(a),
9
+ btoa(c));_.z(d)})};_.t.get=function(a){var b;return _.A(function(c){return(b=window.localStorage.getItem(encodeURIComponent(a)))?c["return"](ru(atob(b))):c["return"](null)})};_.t["delete"]=function(a){return _.A(function(b){window.localStorage.removeItem(encodeURIComponent(a));_.z(b)})};_.t.clear=function(){return _.A(function(a){window.localStorage.clear();_.z(a)})};_.t.getName=function(){return"clpp.persistent.SimpleSessionStorage"};_.B("clpp.persistent.useStorage",function(a){var b=["store","get","delete","clear","getName"];var c=[];_.J.R(a)||(_.J.jb(a.store)||c.push("store"),_.J.jb(a.get)||c.push("get"),_.J.jb(a["delete"])||c.push("delete"),_.J.jb(a.clear)||c.push("clear"),_.J.jb(a.getName)||c.push("getName"),b=c);if(0<b.length)throw uu.warn("Invalid session storage implementation"),new _.L(1,6,6202,{missingMethods:b});tu=a});
10
+ _.B("clpp.persistent.fetchLicense",function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];var f,g,h,l,m,n,p,q,r,w,x,C,D,E,G,K,O,T,Da;return _.A(function(ea){switch(ea.a){case 1:f=tu;g=uu;h=function(fa,xa){return new _.L(1,6,6200,fa,xa)};l=_.fn(a).shift();if(!l)throw h("No source specified.");if(!b)throw h(fu);m=b.offlineId;if(typeof m!==_.te||!m.length)throw h("Missing offline id.");return _.y(ea,f.get(m),2);case 2:if(n=ea.f)return g.debug(eu,m),ea["return"]();p=_.Rj();q=new _.Yh;
11
+ r=[];w=_.u(d);for(x=w.next();!x.done;x=w.next())C=x.value,D=new C,_.Vj(D.id())||(D.Ja(null),_.Xj(D),r.push(D));E=null;_.xf(ea,3,4);return _.y(ea,_.tp(l.url,q,p.manifest.attemptParameters,l.type||null),6);case 6:return E=ea.f,E.configure(p.manifest),_.y(ea,E.start(l.url,{networkingEngine:q,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineCueAdded:function(){},onEvent:function(){},onError:function(){}}),7);case 7:G=ea.f;if(!G.periods.length)throw h(null,new _.L(_.M,4,4014));K=_.mp(G.periods);
12
+ return _.y(ea,vu(b,K,q),4);case 4:for(hu(ea);r.length;)O=r.shift(),O.Ca(),_.Uj["delete"](O.id());T=[];E&&T.push(E.stop());T.push(q.destroy());return _.y(ea,Promise.all(T),9);case 9:iu(ea);break;case 3:Da=_.zf(ea);if(Da instanceof _.L&&6200===Da.code)throw Da;throw h(null,Da);}})});
13
+ _.B("clpp.persistent.removeLicense",function(a){var b,c,d,e,f,g,h;return _.A(function(l){switch(l.a){case 1:b=tu;c=uu;if(!_.J.Y(a)||0===a.length)return c.warn("Invalid offlineId"),l["return"]();e=d=null;_.xf(l,2,3);return _.y(l,b.get(a),5);case 5:f=l.f;if(!f)return c.debug("No persistent DRM session found"),l["return"]();f.drmConfig.delayLicenseRequestUntilPlayed=!0;e=new _.Yh;d=su(f.drmConfig,e);return _.y(l,pu(d,f.keySystem,f.licenseServerUri,f.serverCertificate,f.audioCapabilities,f.videoCapabilities),
14
+ 6);case 6:return _.y(l,_.$l(d),7);case 7:return _.y(l,Promise.all(f.sessionIds.map(function(m){return _.A(function(n){if(1==n.a)return _.y(n,lu(d,m),2);c.debug("successfully removed session with id",m);_.z(n)})})),8);case 8:return _.y(l,b["delete"](a),3);case 3:return hu(l),g=[],d&&g.push(d.destroy()),e&&g.push(e.destroy()),_.y(l,Promise.all(g),10);case 10:iu(l);break;case 2:throw h=_.zf(l),c.error("Failed to remove session"),new _.L(1,6,6201,null,h);}})});var tu=new qu,uu=new _.H(gu);_.v(wu,_.zo);_.t=wu.prototype;_.t.Ja=function(a){this.l=a};_.t.Ca=function(){this.l=null};_.t.release=function(){};_.t.Wb=function(){this.f=tu};_.t.id=function(){return _.Td};_.t.uj=function(a,b,c){var d=this,e;return _.A(function(f){if(1==f.a){if(!a)return d.a.debug("No DRM configuration found for loaded source."),f["return"]();_.xf(f,2);return _.y(f,vu(a,b,c),4)}if(2!=f.a)return d.l.trigger(new _.I(_.Yc,{offlineId:a.offlineId})),_.yf(f,0);e=_.zf(f);d.l.onError(e);_.z(f)})};
15
+ _.t.hi=function(a){var b=this,c;return _.A(function(d){if(1==d.a)return _.xf(d,2),_.y(d,b.f.get(a),4);if(2!=d.a){if(c=d.f)return d["return"](c.sessionIds);b.a.debug("No offline session found for "+a);return d["return"]([])}_.zf(d);b.a.warn("Error while loading session info from storage");return d["return"]([])})};_.B("clpp.persistent.PersistentLicenseComponent",wu);};
16
16
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
17
17
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
18
18
  else{_=this.clpp._;(f.call(g,this));}
@@ -1,10 +1,10 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var rt=function(a,b){b=void 0===b?function(){return Promise.resolve()}:b;_.Ph.call(this);this.l=a;this.j=b;this.f=0;this.a=[];this.g=!1;this.h=this.Pf.bind(this)},st=function(a){a.trigger(new _.I(_.Sd))},tt=function(a,b){return 0<=b&&b<a.a.length};_.v(rt,_.Ph);_.t=rt.prototype;_.t.on=function(a,b,c){return _.Ph.prototype.on.call(this,a,b,c)};_.t.one=function(a,b,c){return _.Ph.prototype.one.call(this,a,b,c)};_.t.off=function(a,b){return _.Ph.prototype.off.call(this,a,b)};_.t.getPosition=function(){return this.f};
3
- _.t.Yh=function(){return this.a};_.t.fe=function(){return 0<this.a.length&&tt(this,this.f)?this.a[this.f]:null};_.t.Zh=function(){var a=this.f+1;return 0<this.a.length&&tt(this,a)?this.a[a]:null};_.t.ci=function(){return this.g};_.t.start=function(){this.g||(this.g=!0,this.l.on(_.Yc,this.h),this.xd(this.f,!0))};_.t.stop=function(){this.g=!1;this.l.off(_.Yc,this.h)};_.t.Pf=function(){this.next()};
4
- _.t.next=function(){var a=this,b;return _.A(function(c){b=Math.min(a.a.length-1,a.f+1);return _.w(c,a.xd(b),0)})};_.t.ej=function(){var a=this,b;return _.A(function(c){b=Math.max(0,a.f-1);return _.w(c,a.xd(b),0)})};_.t.xd=function(a,b){b=void 0===b?!1:b;var c=this,d;return _.A(function(e){if(1==e.a){if(!(0<c.a.length&&tt(c,a))||!b&&c.f===a)return e["return"]();c.f=a;return(d=c.fe())?_.w(e,c.j(d),3):e.H(0)}if(4!=e.a)return _.w(e,c.l.load(d.configuration),4);c.trigger(new _.I(_.Rd,{item:d}));_.z(e)})};
5
- _.t.append=function(a){this.a.push(a);st(this)};_.t.ai=function(a,b){if(0<=b&&b<=this.a.length){var c=this.fe();this.a.splice(b,0,a);c&&(this.f=this.a.indexOf(c));st(this)}};_.t.remove=function(a){if(0<this.a.length&&tt(this,a)){if(this.f===a)throw Error("Can't remove the current item");this.a.splice(a,1);st(this)}};_.t.clear=function(){this.stop();this.f=0;this.a=[];this.g=!1;st(this)};_.B("clpp.Playlist",rt);rt.prototype.clear=rt.prototype.clear;rt.prototype.remove=rt.prototype.remove;
6
- rt.prototype.insert=rt.prototype.ai;rt.prototype.append=rt.prototype.append;rt.prototype.goTo=rt.prototype.xd;rt.prototype.previous=rt.prototype.ej;rt.prototype.next=rt.prototype.next;rt.prototype.onEnded=rt.prototype.Pf;rt.prototype.stop=rt.prototype.stop;rt.prototype.start=rt.prototype.start;rt.prototype.isStarted=rt.prototype.ci;rt.prototype.getUpcoming=rt.prototype.Zh;rt.prototype.getCurrent=rt.prototype.fe;rt.prototype.getQueue=rt.prototype.Yh;rt.prototype.getPosition=rt.prototype.getPosition;
7
- rt.prototype.off=rt.prototype.off;rt.prototype.one=rt.prototype.one;rt.prototype.on=rt.prototype.on;};
2
+ var f=function(window){var bu=function(a,b){b=void 0===b?function(){return Promise.resolve()}:b;_.Jj.call(this);this.l=a;this.j=b;this.f=0;this.a=[];this.g=!1;this.h=this.Zf.bind(this)},cu=function(a){a.trigger(new _.I(_.Zd))},du=function(a,b){return 0<=b&&b<a.a.length};_.v(bu,_.Jj);_.t=bu.prototype;_.t.on=function(a,b,c){return _.Jj.prototype.on.call(this,a,b,c)};_.t.one=function(a,b,c){return _.Jj.prototype.one.call(this,a,b,c)};_.t.off=function(a,b){return _.Jj.prototype.off.call(this,a,b)};_.t.getPosition=function(){return this.f};
3
+ _.t.ji=function(){return this.a};_.t.qe=function(){return 0<this.a.length&&du(this,this.f)?this.a[this.f]:null};_.t.ki=function(){var a=this.f+1;return 0<this.a.length&&du(this,a)?this.a[a]:null};_.t.vi=function(){return this.g};_.t.start=function(){this.g||(this.g=!0,this.l.on(_.ed,this.h),this.Fd(this.f,!0))};_.t.stop=function(){this.g=!1;this.l.off(_.ed,this.h)};_.t.Zf=function(){this.next()};
4
+ _.t.next=function(){var a=this,b;return _.A(function(c){b=Math.min(a.a.length-1,a.f+1);return _.y(c,a.Fd(b),0)})};_.t.xj=function(){var a=this,b;return _.A(function(c){b=Math.max(0,a.f-1);return _.y(c,a.Fd(b),0)})};_.t.Fd=function(a,b){b=void 0===b?!1:b;var c=this,d;return _.A(function(e){if(1==e.a){if(!(0<c.a.length&&du(c,a))||!b&&c.f===a)return e["return"]();c.f=a;return(d=c.qe())?_.y(e,c.j(d),3):e.H(0)}if(4!=e.a)return _.y(e,c.l.load(d.configuration),4);c.trigger(new _.I(_.Yd,{item:d}));_.z(e)})};
5
+ _.t.append=function(a){this.a.push(a);cu(this)};_.t.oi=function(a,b){if(0<=b&&b<=this.a.length){var c=this.qe();this.a.splice(b,0,a);c&&(this.f=this.a.indexOf(c));cu(this)}};_.t.remove=function(a){if(0<this.a.length&&du(this,a)){if(this.f===a)throw Error("Can't remove the current item");this.a.splice(a,1);cu(this)}};_.t.clear=function(){this.stop();this.f=0;this.a=[];this.g=!1;cu(this)};_.B("clpp.Playlist",bu);bu.prototype.clear=bu.prototype.clear;bu.prototype.remove=bu.prototype.remove;
6
+ bu.prototype.insert=bu.prototype.oi;bu.prototype.append=bu.prototype.append;bu.prototype.goTo=bu.prototype.Fd;bu.prototype.previous=bu.prototype.xj;bu.prototype.next=bu.prototype.next;bu.prototype.onEnded=bu.prototype.Zf;bu.prototype.stop=bu.prototype.stop;bu.prototype.start=bu.prototype.start;bu.prototype.isStarted=bu.prototype.vi;bu.prototype.getUpcoming=bu.prototype.ki;bu.prototype.getCurrent=bu.prototype.qe;bu.prototype.getQueue=bu.prototype.ji;bu.prototype.getPosition=bu.prototype.getPosition;
7
+ bu.prototype.off=bu.prototype.off;bu.prototype.one=bu.prototype.one;bu.prototype.on=bu.prototype.on;};
8
8
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
9
9
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
10
10
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.smooth.js CHANGED
@@ -1,74 +1,74 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var eF="Full MP4 box must have flags defined",fF="clpp.smooth.SmoothMP4Processor",gF="codecPrivateData",hF=function(a,b){var c=Math.floor(b/Math.pow(2,32)),d=b-c*Math.pow(2,32);_.T(a,c);_.T(a,d)},iF=function(a,b){try{a.f.setUint8(a.a,b),a.a+=1}catch(c){_.Dj()}},jF=function(a,b){iF(a,b>>16&255);iF(a,b>>8&255);iF(a,b&255)},kF=function(a,b){try{a.f.setUint16(a.a,b,a.g),a.a+=2}catch(c){_.Dj()}},lF=function(a,b){try{a.f.setInt32(a.a,b,a.g),a.a+=4}catch(c){_.Dj()}},mF=function(a,b){try{a.f.setInt16(a.a,
3
- b,a.g),a.a+=2}catch(c){_.Dj()}},nF=function(a,b){if(void 0!=b){for(var c=new Uint8Array(b),d=Math.min(a.length,b),e=0;e<d;++e)c[e]=a.charCodeAt(e);for(;e<b;e++)c[e]=0;return c}c=new Uint8Array(a.length);for(d=0;d<a.length;++d)c[d]=a.charCodeAt(d);return c},X=function(a){this.type=a;this.size=this.start=0;this.parent=null;this.w=!1;this.entries=[];this.f=[]},Y=function(a,b,c){X.call(this,a);this.version=b;this.flags=c},oF=function(a,b,c){X.call(this,a);this.g=b;this.offset=c},pF=function(a,b,c,d,e){Y.call(this,
4
- a,b,c);this.g=d;this.offset=e},qF=function(a,b,c){X.call(this,"ftyp");this.h=a;this.Jf=b;this.g=c},rF=function(){X.call(this,_.vd)},sF=function(){X.call(this,_.xe)},tF=function(a,b,c){Y.call(this,"mvhd",1,0);this.timescale=a;this.duration=b;this.volume=256;this.h=c+1;this.g=[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]},uF=function(){X.call(this,"mvex")},vF=function(a){Y.call(this,"trex",0,0);this.g=a},wF=function(a,b,c,d,e){Y.call(this,"tkhd",1,7);this.h=a;this.duration=
5
- b;this.timescale=c;this.width=d;this.height=e;this.volume=1;this.g=[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]},xF=function(a,b){Y.call(this,"mdhd",1,0);this.timescale=a;this.duration=b;this.language=21956},yF=function(a){Y.call(this,"hdlr",0,0);this.g=a},zF=function(){Y.call(this,"vmhd",0,1);this.g=new Uint8Array([0,0,0,0,0,0])},AF=function(a){X.call(this,a);this.w=!0},BF=function(a){AF.call(this,a);this.height=this.width=0;this.depth=24},CF=function(a,b,c,d){AF.call(this,
6
- a);this.channelCount=b;this.sampleSize=c;this.sampleRate=d},DF=function(a,b){BF.call(this,"avc1");this.width=a;this.height=b},EF=function(a,b){DF.call(this,a,b);this.type="encv"},FF=function(a,b,c){CF.call(this,"mp4a",a,b,c)},GF=function(a,b,c){FF.call(this,a,b,c);this.type="enca"},HF=function(a,b){X.call(this,"avcC");this.Fa=a;this.Lb=b;this.version=1;this.g=this.Fa[0][1];this.h=this.Fa[0][2];this.level=this.Fa[0][3]},IF=function(a){Y.call(this,"esds",0,0);this.Fb=a},JF=function(a){a=void 0===a?
7
- "":a;Y.call(this,"url ",0,1);this.location=a},KF=function(){Y.call(this,"dref",0,0)},LF=function(){X.call(this,_.le)},MF=function(){Y.call(this,_.ne,0,0)},NF=function(){Y.call(this,"stts",0,0)},OF=function(){Y.call(this,"stsc",0,0)},PF=function(){Y.call(this,"stco",0,0)},QF=function(){Y.call(this,"stsz",0,0)},RF=function(){Y.call(this,"smhd",0,0)},SF=function(){X.call(this,"dinf")},TF=function(){X.call(this,_.td)},UF=function(){X.call(this,_.pd)},VF=function(a,b){Y.call(this,"tfdt",a,0);this.g=b},
8
- WF=function(){Y.call(this,"mfhd",0,0);this.g=0},XF=function(a,b){Y.call(this,"trun",a,b);this.m=this.j=this.g=0;this.o=[];this.sampleSize=[];this.A=[];this.h=[]},YF=function(a,b){Y.call(this,"tfhd",a,b);this.g=255;this.m=this.o=this.j=this.A=this.h=0},ZF=function(){X.call(this,"traf")},$F=function(){X.call(this,"moof")},aG=function(){X.call(this,_.od);this.g=new Uint8Array(0)},bG=function(){Y.call(this,"tenc",0,0);this.g=1;this.h=8;this.m="";this.j=[]},cG=function(a,b){Y.call(this,"schm",0,0);this.g=
9
- a;this.h=b;this.zb=""},dG=function(a){X.call(this,"frma");this.g=a},eG=function(){Y.call(this,"saio",0,0);this.offset=[0]},fG=function(a,b,c){Y.call(this,"saiz",0,0);this.g=a;this.j=b;this.h=c},gG=function(a,b){Y.call(this,"senc",a,b);this.h=0;this.j=8;this.g=[]},hG=function(a){var b=a.split("/");return b[b.length-1].toLowerCase().match("manifest(\\(.+\\))?")?a:a+"/Manifest"},iG=function(a,b,c,d){c=b.zf[c];b=b.wj;a=a.replace("Manifest","");b=b.replace("{bitrate}",String(d.bitrate)).replace("{Bitrate}",
10
- String(d.bitrate)).replace("{start time}",String(c.t)).replace("{start_time}",String(c.t));return _.Nu([a],[b])[0]},jG=function(a,b){if(a.type!==b.type)return!1;var c=[];a.type===_.Ie?c=["maxWidth","maxHeight","bitrate",gF,"fourCC"]:a.type===_.ac&&(c=["bitrate",gF,"channels","bitsPerSample","samplingRate","fourCC"]);return _.J.Ja(a,b,c,["id","segmentIndex"])},kG=function(a,b,c){var d=c.od.split("00000001");a={id:1,type:c.type,duration:a/b,timescale:b,Fa:null,Lb:null,width:NaN,height:NaN,Fb:null,bd:NaN,
11
- sampleSize:NaN,channelCount:NaN};switch(c.type){case _.Ie:a.Fa=[_.mj(d[1])];a.Lb=[_.mj(d[2])];a.width=c.maxWidth;a.height=c.maxHeight;break;case _.ac:a.Fb=_.mj(c.od),a.sampleSize=c.vg||16,a.bd=c.bd,a.channelCount=c.ef}return a},lG=function(a,b){return a.filter(function(c){return c.type===b})},mG=function(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)},tG=function(a,b,c){var d=null;if(nG.test(a)){a=nG.exec(a);d=
12
- Number(a[1]);var e=Number(a[2]),f=Number(a[3]),g=Number(a[4]);g+=(Number(a[5])||0)/c.f;f+=g/c.frameRate;d=f+60*e+3600*d}else oG.test(a)?d=mG(oG,a):pG.test(a)?d=mG(pG,a):qG.test(a)?(a=qG.exec(a),d=Number(a[1])/c.frameRate):rG.test(a)?(a=rG.exec(a),d=Number(a[1])/c.a):sG.test(a)&&(d=mG(sG,a));d+=b;b=Math.floor(d/3600);c=Math.floor((d-3600*b)/60);a=Math.floor(d-3600*b-60*c);d-=a;10>b&&(b="0"+b);10>c&&(c="0"+c);10>a&&(a="0"+a);0===d?d="000":d=Math.round(1E3*d);return b+":"+c+":"+a+"."+d},uG=function(a,
13
- b,c,d){this.frameRate=Number(a)||30;this.f=Number(b)||1;this.a=Number(d);0==this.a&&(this.a=a?this.frameRate*this.f:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=parseInt(a[1],10)/parseInt(a[2],10))},wG=function(a){this.a=a;this.f=vG(this)},vG=function(a){for(var b=0,c=0;c<a.a.length;c++)b+=a.a[c].a();return new _.Cj(b)},xG=function(a){var b=_.ji();a="ie"===b.browser||"edge"===b.browser?a.ge(_.Hc):a.ge(_.Ic);null===a&&(_.D(fF,"Could not get PSSH box!"),a={initData:new Uint8Array(0),initDataType:_.rc,
14
- keyId:"",periodId:null});return a},yG=function(a,b,c){var d=xG(c);c=new X("xxxx");a.type===_.Ie?c=new EF(a.width,a.height):c=new GF(a.channelCount,a.sampleSize,a.bd);a=new bG;a.g=1;a.h=8;a.m=d.keyId||"00000000000000000000000000000000";a=(new X("schi")).append([a]);b=(new X(_.ee)).append([new dG(b),new cG(_.rc,65536),a]);c.append([b]);return c},zG=function(a,b){var c=b.Bd(),d=new tF(a.timescale,a.duration,a.id),e=(new uF).append([new vF(a.id)]),f=new wF(a.id,a.duration,a.timescale,a.width,a.height),
15
- g=new xF(a.timescale,a.duration),k=new yF(a.type),l=null,m=new KF;m.entries=[new JF];var n=new MF;switch(a.type){case _.Ie:var p=new HF(a.Fa,a.Lb);c?(l=yG(a,"avc1",b),l.append([p]),n.entries=[l]):(l=(new DF(a.width,a.height)).append([p]),n.entries=[l]);l=new zF;break;case _.ac:p=new IF(a.Fb),c?(l=yG(a,"mp4a",b),l.append([p]),n.entries=[l]):(l=(new FF(a.channelCount,a.sampleSize,a.bd)).append([p]),n.entries=[l]),l=new RF}n=(new LF).append([n,new NF,new OF,new QF,new PF]);m=(new SF).append([m]);m=(new TF).append([l,
16
- m,n]);g=(new UF).append([g,k,m]);f=(new sF).append([f,g]);d=(new rF).append([d,f,e]);e=new qF("dash",0,["iso6","mp41","avc1"]);c&&(c=xG(b).initData,d.append([new oF("pssh",c,8)]));c=new wG([e,d]);return _.R(c.write())},BG=function(a,b){var c,d,e,f,g,k;(new _.Pj).M("moof",_.Qj).V("mfhd",function(m){var n=new WF;n.g=_.Kj(m.F);c=n}).M("traf",_.Qj).V("tfhd",function(m){var n=m.F.Aa();if(null===m.flags)throw new _.K(_.M,3,3019,eF);var p=new YF(m.version||0,m.flags||0);p.g=_.Kj(m.F);0<n-m.F.getPosition()&&
17
- m.flags&1&&(p.h=_.Mj(m.F));0<n-m.F.getPosition()&&m.flags&2&&(p.A=_.Kj(m.F));0<n-m.F.getPosition()&&m.flags&8&&(p.j=_.Kj(m.F));0<n-m.F.getPosition()&&m.flags&16&&(p.o=_.Kj(m.F));0<n-m.F.getPosition()&&m.flags&32&&(p.m=_.Kj(m.F));d=p}).V("trun",function(m){var n=m.F.Aa();if(null===m.flags)throw new _.K(_.M,3,3019,eF);var p=new XF(m.version||0,m.flags||0);p.g=_.Kj(m.F);0<n-m.F.getPosition()&&m.flags&1&&(p.j=_.Lj(m.F));0<n-m.F.getPosition()&&m.flags&4&&(p.m=_.Kj(m.F));if(0<n-m.F.getPosition())for(n=
18
- 0;n<p.g;n++)m.flags&256&&p.o.push(_.Kj(m.F)),m.flags&512&&p.sampleSize.push(_.Kj(m.F)),m.flags&1024&&p.A.push(_.Kj(m.F)),m.flags&2048&&(0===m.version?p.h.push(_.Kj(m.F)):p.h.push(_.Lj(m.F)));e=p}).V("sdtp",function(m){var n=_.Nj(m.F,m.F.Aa());f=new pF("sdtp",m.version||0,m.flags||0,n,0)}).M("uuid",function(m){var n=_.Nj(m.F,16);if(_.oj(n,AG)){n=_.Kj(m.F);m.version=n>>>24;m.flags=n&16777215;n=new gG(m.version,m.flags);n.h=_.Kj(m.F);m.flags&1&&(n.j=_.Ij(m.F));for(var p=0;p<n.h;p++){var q={Df:_.Nj(m.F,
19
- 8),Jc:0,Qe:[]};if(m.flags&2){q.Jc=_.Jj(m.F);for(var r=0;r<q.Jc;r++){var x={cf:0,df:0};x.cf=_.Jj(m.F);x.df=_.Kj(m.F);q.Qe.push(x)}}n.g.push(q)}g=n}}).M(_.od,function(m){var n=new aG;0<m.F.Aa()?n.g=_.Nj(m.F,m.F.Aa()):(_.D(fF,"mdat box is empty!"),n.g=new Uint8Array(0));k=n}).parse(a,!1);if(!k)return null;var l=(new ZF).append([d,e]);f&&l.append([f]);b.Bd()&&g&&l.append([g]);l=(new $F).append([c,l]);return new wG([l,k])},CG=function(a,b,c){var d=c.Bd(),e=a.request.startTime,f=parseInt(e*b,10);b=a.data||
20
- new ArrayBuffer(0);var g=BG(b,c);if(null===g)return a.request.contentType===_.te?a.data:g;c=g.get(_.od);if(a.request.contentType===_.te){d=c.g.buffer;if(e){d=_.Wg(d);if((d=(new DOMParser).parseFromString(d,_.ve))&&"tt"===d.documentElement.tagName.toLowerCase())var k=d.documentElement;if(k&&(c=new uG(k.getAttribute("ttp:frameRate"),k.getAttribute("ttp:subFrameRate"),k.getAttribute("ttp:frameRateMultiplier"),k.getAttribute("ttp:tickRate")),k=k.getElementsByTagName("body")[0]))for(k=k.getElementsByTagName("p"),
21
- a=0,b=k.length;a<b;a++){f=k[a];g=["begin",_.Xc];for(var l=0,m=g.length;l<m;l++){b:{var n=f;var p=g[l],q=new RegExp("\\w+:"+p),r=0;if(n.hasAttribute(p))n=n.getAttribute(p);else{p=n.attributes;for(var x=p.length;r<x;r++){var y=p[r].name;if(y=y.match(q)){n=n.getAttribute(y[0]);break b}}n=null}}f.setAttribute(g[l],tG(n||"",e,c))}}d=(new XMLSerializer).serializeToString(d);e=_.Xg(d).buffer}else e=d;return e}k=new $F;a=g.get("mfhd");b=new ZF;l=g.get("tfhd");m=new VF(1,f);f=g.get("trun");n=g.get("sdtp");
22
- e=g.get("senc");l.g=1;l.flags&=16777214;l.flags|=131072;b.append([l,m,f]);n&&b.append([n]);if(d){g=0;l=[];if(e.flags&2)for(l=[],m=0;m<e.h;m++)l.push(10+6*e.g[m].Jc);else g=8;b.append([e,new eG,new fG(g,l,e.h)])}k.append([a,b]);f.flags|=1;f.j=k.a()+8;c=new wG([k,c]);k=c.write();d&&(d=c.get("saio"),c=c.f,d.offset[0]=e.start+16,c.seek(d.start),d.write(c),k=c.buffer);return k},DG=function(a,b,c){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
23
- videoRobustness:"",serverCertificate:null,initData:[b],keyIds:c,periodId:null}},EG=function(a,b,c){a=_.Rk(a);c&&a.version!==c&&(a=_.yu(a,c));return{initData:_.wu(a),initDataType:_.rc,keyId:b,periodId:null}},GG=function(){this.B=this.j=this.h=this.g=null;this.L=1;this.T=0;this.o="";this.w=this.a=null;this.f=new _.G("clpp.smooth.SmoothParser");this.J=!1;this.m=this.C=null;this.N=FG;this.G=0;this.D=this.I=Infinity;this.A=[];this.K=this.kj.bind(this)},HG=function(a,b){var c,d,e;return _.A(function(f){if(1==
24
- f.a)return c=_.ih(b),c.timeout=a.h.attemptParameters.timeout,c.maxAttempts=Math.max(a.h.attemptParameters.maxAttempts,b.length),c.baseDelay=a.h.attemptParameters.baseDelay,c.backoffFactor=a.h.attemptParameters.backoffFactor,c.fuzzFactor=a.h.attemptParameters.fuzzFactor,c.type=1,d=a.g.networkingEngine.fetch(c),_.w(f,d.O,2);e=f.f;a.o=e.uri;return f["return"](e)})},OG=function(a,b){var c=null;try{var d=new DOMParser;try{var e=_.Wg(b);var f=d.parseFromString(e.trim(),_.ve)}catch(tB){throw tB;}if(f&&f.documentElement.tagName==
25
- _.lb)var g=f.documentElement;c=g&&0<g.getElementsByTagName("parsererror").length?null:g}catch(tB){}if(!c)throw a.f.error("Unable to parse manifest"),new _.K(_.M,4,4033,a.o);var k=+IG(a,c,"MajorVersion"),l=+IG(a,c,"MinorVersion"),m=+c.getAttribute("TimeScale")||1E7,n=+IG(a,c,"Duration"),p="TRUE"===c.getAttribute("IsLive"),q=+c.getAttribute("LookAheadCount"),r=+c.getAttribute("DVRWindowLength")||Infinity,x=_.Fk(c,"Protection")[0];if(!1===/^[2].[0-2]$/.test(""+k+"."+l))throw a.f.error("Smooth Streaming version must be 2.0, 2.1 or 2.2"),
26
- new _.K(_.M,4,4036,a.o);p?(JG(a,KG),a.C=typeof a.h.liveRefreshPeriod===_.h?1E3*a.h.liveRefreshPeriod:Math.min(1E3*a.G,1E4),n=Infinity):JG(a,FG);a.a={startTime:0,delay:0,duration:n/m,be:r/m,Xc:0};if(x){var y=a.h.playreadyVersion,C=[],H=_.Fk(x,"ProtectionHeader")[0],F=_.lj(_.Hk(H)||""),E=_.Rk(F).a;C.push(DG(_.Ic,{initData:_.wu(_.Mk(E)),initDataType:_.rc,keyId:E,periodId:null},[E]));C.push(DG(_.Hc,EG(F,E,y),[E]));a.A=C}var L=[],O=_.Fk(c,"StreamIndex");if(!O.length)throw a.f.error("No streams found!"),
27
- new _.K(_.M,4,4034,a.o);for(var S=0;S<O.length;S++){for(var ra,W=a,ca=O[S],fa=IG(W,ca,"Type"),qa=+ca.getAttribute("Chunks"),Ra=ca.getAttribute("Subtype"),Oa=_.uh(ca.getAttribute("Language")||_.ze),Ja=ca.getAttribute("Name")||"",bb=+ca.getAttribute(_.Pa),nb=+ca.getAttribute(_.Na),Uf=IG(W,ca,"Url"),Ji=+ca.getAttribute("TimeScale")||null,Ki=[],tc=_.Fk(ca,_.cb),Vf=0;Vf<tc.length;Vf++){var bf=W,Vc=tc[Vf],Jr=fa,wK=+Vc.getAttribute("Index"),xK=+IG(bf,Vc,"Bitrate"),wB=NaN,xB=NaN,nm=NaN,Kr=NaN,yB=NaN,zB=NaN,
28
- AB=NaN,BB=Vc.getAttribute("FourCC");switch(Jr){case _.Ie:wB=+IG(bf,Vc,_.Na);xB=+IG(bf,Vc,_.Pa);break;case _.ac:Kr=+Vc.getAttribute("Channels")||2,nm=+IG(bf,Vc,"SamplingRate"),zB=+IG(bf,Vc,"AudioTag"),yB=+IG(bf,Vc,"BitsPerSample"),AB=+IG(bf,Vc,"PacketSize")}var Lr=String(Vc.getAttribute("CodecPrivateData"));if(Jr===_.ac&&!Lr){var CB=Kr,DB={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12},om=DB[nm];if("AACH"===BB){var hc=new Uint8Array(4);var EB=DB[2*
29
- nm];hc[0]=40|om>>1;hc[1]=om<<7|CB<<3|EB>>1;hc[2]=EB<<7|8;hc[3]=0;var Yf=new Uint16Array(2);Yf[0]=(hc[0]<<8)+hc[1];Yf[1]=(hc[2]<<8)+hc[3];var FB=Yf[0].toString(16)+Yf[1].toString(16)}else hc=new Uint8Array(2),hc[0]=16|om>>1,hc[1]=om<<7|CB<<3,Yf=new Uint16Array(1),Yf[0]=(hc[0]<<8)+hc[1],FB=Yf[0].toString(16);Lr=FB.toUpperCase()}var yK={id:bf.T++,type:Jr,index:wK,bitrate:xK,od:Lr,maxHeight:wB,maxWidth:xB,bd:nm,ef:Kr,Nj:zB,vg:yB,Yj:AB,Qh:BB,hb:null};Ki.push(yK)}ra=Ki;for(var ke=[],GB=_.Fk(ca,"c"),aj=
30
- 0;aj<GB.length;aj++){var Mr=GB[aj],ud=parseInt(Mr.getAttribute("t"),10),mh=parseInt(Mr.getAttribute("d"),10),Nr=parseInt(Mr.getAttribute("r"),10),bj=0;if(isNaN(ud)&&isNaN(mh))throw W.f.error("Either one or both FragmentDuration and FragmentTime field MUST be present in StreamFragmentElement"),new _.K(_.M,4,4037,W.o);0===aj&&isNaN(ud)&&(bj=ud=0);if(0<aj){var Zf=ke[ke.length-1];bj=Zf.n+1;Zf.d||(Zf.d=ud-Zf.t);ud||(ud=Zf.t+Zf.d);mh||(mh=ud-Zf.t)}ke.push({n:bj,d:mh,t:ud});if(Nr){Nr--;for(var HB=0;HB<Nr;HB++){var pm=
31
- ke[ke.length-1];bj=pm.n+1;ud=pm.t+pm.d;mh=pm.d;ke.push({n:bj,d:mh,t:ud})}}}W.Sc()||ke.length===qa||W.f.warn("Number of fragments ("+qa+") differs from number of chunks ("+ke.length+").");L.push({type:fa,Pj:qa,rj:Ra,language:Oa,name:Ja,maxWidth:bb,maxHeight:nb,wj:Uf,tracks:ra,zf:ke,timescale:Ji})}var cf={Wj:k,Jf:l,timescale:m,duration:n,isLive:p,Vj:q,be:r,me:!1,streams:L};if(a.j&&a.B)return LG(a,cf),Promise.resolve();var Or=cf.timescale,Pr=cf.duration,AK=lG(cf.streams,_.ac),BK=lG(cf.streams,_.Ie),
32
- CK=lG(cf.streams,_.te),IB=[],qm=MG(a,Pr,Or,AK),rm=MG(a,Pr,Or,BK),DK=MG(a,Pr,Or,CK);qm.length||(qm=[null]);rm.length||(rm=[null]);for(var Rr=0;Rr<rm.length;Rr++)for(var Sr=0;Sr<qm.length;Sr++)IB.push(NG(a,rm[Rr],qm[Sr]));var JB={startTime:0,variants:IB,textStreams:DK,thumbStreams:[]};var FK=cf.streams,Tr=a.a.startTime,KB=a.a.delay,Ur=a.I,LB=Math.min(a.a.duration||Infinity,Ur),Vr=a.Sc(),GK=a.a.be,HK=a.a.Xc,MB=a.G,NB=isFinite(a.D)?a.D:0;if(Vr)LB=Infinity,Tr=Date.now()/1E3-HK,a.a.startTime=Tr,KB=3*MB;
33
- else for(var IK=isFinite(Ur)?Ur:a.a.duration,OB=_.u(FK),Wr=OB.next();!Wr.done;Wr=OB.next())for(var PB=_.u(Wr.value.tracks),Xr=PB.next();!Xr.done;Xr=PB.next()){var QB=Xr.value;QB.hb.offset(-NB);_.nv(QB.hb,IK)}a.w=new _.bv(Tr,KB,!0);a.w.f=!Vr;a.w.Pb(LB);_.ev(a.w,MB);a.w.gc=GK;Vr||a.w.offset(-NB);a.g.filterAllPeriods([JB]);a.j={presentationTimeline:a.w,periods:[JB],offlineSessionIds:[],minBufferTime:0};Promise.resolve();a.J||(a.g.networkingEngine.Ud(a.K),a.J=!0);a.B=cf;return Promise.resolve()},LG=function(a,
34
- b){for(var c=0;c<a.B.streams.length;c++)for(var d=b.streams[c],e={},f=_.u(a.B.streams[c].tracks),g=f.next();!g.done;e={Eb:e.Eb},g=f.next())if(e.Eb=g.value,g=d.tracks.find(function(l){return function(m){return m.type===l.Eb.type&&m.bitrate===l.Eb.bitrate}}(e))){jG(e.Eb,g)||a.f.warn("The current stream is updated with a stream that seems to have different base properties!");var k=PG(a,a.B.timescale,d,g);g=e.Eb.hb;g.Ta(k);(k=a.a.be)&&_.mv(g,(g.a.length?g.a[g.a.length-1].endTime:0)-k)}else a.f.warn("Cannot find satisfying update for "+
35
- e.Eb.type+" track with bitrate "+(e.Eb.bitrate+". Skipping update."))},MG=function(a,b,c,d){for(var e=[],f={qc:0};f.qc<d.length;f={qc:f.qc},f.qc++){var g=d[f.qc].tracks.map(function(k){return function(l){var m=d[k.qc],n=PG(a,c,m,l),p=new _.lv(n),q=null;m.type!==_.te&&(q=QG(a,b,c,m,l));l.hb=p;n=a.L++;var r=Promise.resolve.bind(Promise),x=p.Rc.bind(p),y=p.get.bind(p),C=p.Lc.bind(p);p=p.getDuration.bind(p);var H=RG[m.type],F="";switch(m.type){case _.Ie:F=l.od;var E=/00000001[0-9]7/.exec(F);F="avc1."+
36
- (E&&E[0]?F.substr(F.indexOf(E[0])+10,6):"42c00c");a.f.debug("VIDEO CODECS: ",F);break;case _.ac:F=l.od,E=2,"AACH"===l.Qh?E=5:F&&(E=(parseInt(F.substr(0,2),16)&248)>>3),F="mp4a.40."+E,a.f.debug("AUDIO CODECS: ",F)}E=m.type===_.te?SG[m.rj]:void 0;return{id:n,originalId:null,$j:null,createSegmentIndex:r,findSegmentPosition:x,getSegmentReference:y,adjustSegmentDurations:C,getDuration:p,initSegmentReference:q,mimeType:H,codecs:F,frameRate:void 0,bandwidth:l.bitrate,width:l.maxWidth||void 0,height:l.maxHeight||
37
- void 0,kind:E,encrypted:a.oe(),keyId:null,language:m.language,label:m.name,type:m.type,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:l.ef||null,closedCaptions:null}}}(f));e=e.concat(g)}return e},PG=function(a,b,c,d){var e=0,f=[],g=c.timescale||b;c.zf.forEach(function(k,l){var m=k.d/g;if(0===l){var n=k.t/g;a.D=Math.min(a.D,n)}else n=f[l-1].endTime;var p=n+m,q=iG(a.o,c,l,d);a.G=Math.max(a.G,m);f.push(new _.av(l,n,p,function(){return[q]},0,null,0,null,!0,g));e+=m});if(c.type===
38
- _.Ie||c.type===_.ac)b=f[f.length-1],a.I=Math.min(a.I,e),0===a.a.Xc?a.a.Xc=b.endTime:a.a.Xc=Math.min(a.a.Xc,b.endTime);return f},QG=function(a,b,c,d,e){b=kG(b,d.timescale||c,e);c={isLive:a.Sc.bind(a),Bd:a.oe.bind(a),Vh:function(){return 1},ge:a.Bf.bind(a)};d=new Uint8Array(0);try{d=zG(b,c)}catch(g){throw a.f.error("Failed to generate initialization segment."),new _.K(_.M,3,4035,g);}var f="data:text/plain;base64,"+_.kj(d);return new _.$u(function(){return[f]},0,null,null,!0)},NG=function(a,b,c){var d=
39
- (c?c.bandwidth:0)+(b?b.bandwidth:0),e=c?c.language:_.ze;return c||b?{id:a.L++,language:e,primary:!1,audio:c,video:b,bandwidth:d,drmInfos:a.A,allowedByApplication:!0,allowedByKeySystem:!0}:null},IG=function(a,b,c){if(b=b.getAttribute(c))return b;a.f.error("required attribute not provided: "+c);throw new _.K(_.M,4,4038,a.o,c);},TG=function(a,b){null!=a.C&&null!=b&&(a.m=window.setTimeout(a.ph.bind(a),b))},JG=function(a,b){var c=b===FG;a.j&&a.j.presentationTimeline&&(a.j.presentationTimeline.f=c);c&&
40
- null!=a.m&&(window.clearTimeout(a.m),a.m=null,a.C=null);a.N=b},UG=function(){};X.prototype.append=function(a){a=void 0===a?[]:a;for(var b=0;b<a.length;b++)this.f.push(a[b]),a[b].parent=this;return this};X.prototype.get=function(a){if(this.type===a)return this;for(var b=0;b<this.f.length;b++){if(this.f[b].type===a)return this.f[b];var c=this.f[b].get(a);if(c)return c}return null};
2
+ var f=function(window){var qG="Full MP4 box must have flags defined",rG="clpp.smooth.SmoothMP4Processor",sG="codecPrivateData",tG=function(a,b){var c=Math.floor(b/Math.pow(2,32)),d=b-c*Math.pow(2,32);_.S(a,c);_.S(a,d)},uG=function(a,b){try{a.f.setUint8(a.a,b),a.a+=1}catch(c){_.uk()}},vG=function(a,b){uG(a,b>>16&255);uG(a,b>>8&255);uG(a,b&255)},wG=function(a,b){try{a.f.setUint16(a.a,b,a.g),a.a+=2}catch(c){_.uk()}},xG=function(a,b){try{a.f.setInt32(a.a,b,a.g),a.a+=4}catch(c){_.uk()}},yG=function(a,b){try{a.f.setInt16(a.a,
3
+ b,a.g),a.a+=2}catch(c){_.uk()}},zG=function(a,b){if(void 0!=b){for(var c=new Uint8Array(b),d=Math.min(a.length,b),e=0;e<d;++e)c[e]=a.charCodeAt(e);for(;e<b;e++)c[e]=0;return c}c=new Uint8Array(a.length);for(d=0;d<a.length;++d)c[d]=a.charCodeAt(d);return c},X=function(a){this.type=a;this.size=this.start=0;this.parent=null;this.w=!1;this.entries=[];this.f=[]},Y=function(a,b,c){X.call(this,a);this.version=b;this.flags=c},AG=function(a,b,c){X.call(this,a);this.g=b;this.offset=c},BG=function(a,b,c,d,e){Y.call(this,
4
+ a,b,c);this.g=d;this.offset=e},CG=function(a,b,c){X.call(this,"ftyp");this.h=a;this.Sf=b;this.g=c},DG=function(){X.call(this,_.Cd)},EG=function(){X.call(this,_.Ee)},FG=function(a,b,c){Y.call(this,"mvhd",1,0);this.timescale=a;this.duration=b;this.volume=256;this.h=c+1;this.g=[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]},GG=function(){X.call(this,"mvex")},HG=function(a){Y.call(this,"trex",0,0);this.g=a},IG=function(a,b,c,d,e){Y.call(this,"tkhd",1,7);this.h=a;this.duration=
5
+ b;this.timescale=c;this.width=d;this.height=e;this.volume=1;this.g=[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]},JG=function(a,b){Y.call(this,"mdhd",1,0);this.timescale=a;this.duration=b;this.language=21956},KG=function(a){Y.call(this,"hdlr",0,0);this.g=a},LG=function(){Y.call(this,"vmhd",0,1);this.g=new Uint8Array([0,0,0,0,0,0])},MG=function(a){X.call(this,a);this.w=!0},NG=function(a){MG.call(this,a);this.height=this.width=0;this.depth=24},OG=function(a,b,c,d){MG.call(this,
6
+ a);this.channelCount=b;this.sampleSize=c;this.sampleRate=d},PG=function(a,b){NG.call(this,"avc1");this.width=a;this.height=b},QG=function(a,b){PG.call(this,a,b);this.type="encv"},RG=function(a,b,c){OG.call(this,"mp4a",a,b,c)},SG=function(a,b,c){RG.call(this,a,b,c);this.type="enca"},TG=function(a,b){X.call(this,"avcC");this.La=a;this.Ob=b;this.version=1;this.g=this.La[0][1];this.h=this.La[0][2];this.level=this.La[0][3]},UG=function(a){Y.call(this,"esds",0,0);this.Gb=a},VG=function(a){a=void 0===a?
7
+ "":a;Y.call(this,"url ",0,1);this.location=a},WG=function(){Y.call(this,"dref",0,0)},XG=function(){X.call(this,_.se)},YG=function(){Y.call(this,_.ue,0,0)},ZG=function(){Y.call(this,"stts",0,0)},$G=function(){Y.call(this,"stsc",0,0)},aH=function(){Y.call(this,"stco",0,0)},bH=function(){Y.call(this,"stsz",0,0)},cH=function(){Y.call(this,"smhd",0,0)},dH=function(){X.call(this,"dinf")},eH=function(){X.call(this,_.Bd)},fH=function(){X.call(this,_.xd)},gH=function(a,b){Y.call(this,"tfdt",a,0);this.g=b},
8
+ hH=function(){Y.call(this,"mfhd",0,0);this.g=0},iH=function(a,b){Y.call(this,"trun",a,b);this.m=this.j=this.g=0;this.o=[];this.sampleSize=[];this.A=[];this.h=[]},jH=function(a,b){Y.call(this,"tfhd",a,b);this.g=255;this.m=this.o=this.j=this.A=this.h=0},kH=function(){X.call(this,"traf")},lH=function(){X.call(this,"moof")},mH=function(){X.call(this,_.wd);this.g=new Uint8Array(0)},nH=function(){Y.call(this,"tenc",0,0);this.g=1;this.h=8;this.m="";this.j=[]},oH=function(a,b){Y.call(this,"schm",0,0);this.g=
9
+ a;this.h=b;this.Bb=""},pH=function(a){X.call(this,"frma");this.g=a},qH=function(){Y.call(this,"saio",0,0);this.offset=[0]},rH=function(a,b,c){Y.call(this,"saiz",0,0);this.g=a;this.j=b;this.h=c},sH=function(a,b){Y.call(this,"senc",a,b);this.h=0;this.j=8;this.g=[]},tH=function(a){var b=a.split("/");return b[b.length-1].toLowerCase().match("manifest(\\(.+\\))?")?a:a+"/Manifest"},uH=function(a,b,c,d){c=b.Hf[c];b=b.Rj;a=a.replace("Manifest","");b=b.replace("{bitrate}",String(d.bitrate)).replace("{Bitrate}",
10
+ String(d.bitrate)).replace("{start time}",String(c.t)).replace("{start_time}",String(c.t));return _.xv([a],[b])[0]},vH=function(a,b){if(a.type!==b.type)return!1;var c=[];a.type===_.Pe?c=["maxWidth","maxHeight","bitrate",sG,"fourCC"]:a.type===_.ic&&(c=["bitrate",sG,"channels","bitsPerSample","samplingRate","fourCC"]);return _.J.va(a,b,c,["id","segmentIndex"])},wH=function(a,b,c){var d=c.vd.split("00000001");a={id:1,type:c.type,duration:a/b,timescale:b,La:null,Ob:null,width:NaN,height:NaN,Gb:null,jd:NaN,
11
+ sampleSize:NaN,channelCount:NaN};switch(c.type){case _.Pe:a.La=[_.dk(d[1])];a.Ob=[_.dk(d[2])];a.width=c.maxWidth;a.height=c.maxHeight;break;case _.ic:a.Gb=_.dk(c.vd),a.sampleSize=c.Fg||16,a.jd=c.jd,a.channelCount=c.pf}return a},xH=function(a,b){return a.filter(function(c){return c.type===b})},yH=function(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)},FH=function(a,b,c){var d=null;if(zH.test(a)){a=zH.exec(a);d=
12
+ Number(a[1]);var e=Number(a[2]),f=Number(a[3]),g=Number(a[4]);g+=(Number(a[5])||0)/c.f;f+=g/c.frameRate;d=f+60*e+3600*d}else AH.test(a)?d=yH(AH,a):BH.test(a)?d=yH(BH,a):CH.test(a)?(a=CH.exec(a),d=Number(a[1])/c.frameRate):DH.test(a)?(a=DH.exec(a),d=Number(a[1])/c.a):EH.test(a)&&(d=yH(EH,a));d+=b;b=Math.floor(d/3600);c=Math.floor((d-3600*b)/60);a=Math.floor(d-3600*b-60*c);d-=a;10>b&&(b="0"+b);10>c&&(c="0"+c);10>a&&(a="0"+a);0===d?d="000":d=Math.round(1E3*d);return b+":"+c+":"+a+"."+d},GH=function(a,
13
+ b,c,d){this.frameRate=Number(a)||30;this.f=Number(b)||1;this.a=Number(d);0==this.a&&(this.a=a?this.frameRate*this.f:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=parseInt(a[1],10)/parseInt(a[2],10))},IH=function(a){this.a=a;this.f=HH(this)},HH=function(a){for(var b=0,c=0;c<a.a.length;c++)b+=a.a[c].a();return new _.tk(b)},JH=function(a,b,c){a:{var d=_.u([_.Pc,_.Oc]);for(var e=d.next();!e.done;e=d.next())if((e=c.Cd(e.value))&&e.keyId){d=e.keyId;break a}_.F(rG,"Could not get default Key ID for DRM init data!");
14
+ d=null}c=new X("xxxx");a.type===_.Pe?c=new QG(a.width,a.height):c=new SG(a.channelCount,a.sampleSize,a.jd);a=new nH;a.g=1;a.h=8;a.m=d||"00000000000000000000000000000000";a=(new X("schi")).append([a]);b=(new X(_.le)).append([new pH(b),new oH(_.zc,65536),a]);c.append([b]);return c},KH=function(a,b){var c=b.Kd(),d=new FG(a.timescale,a.duration,a.id),e=(new GG).append([new HG(a.id)]),f=new IG(a.id,a.duration,a.timescale,a.width,a.height),g=new JG(a.timescale,a.duration),h=new KG(a.type),l=null,m=new WG;
15
+ m.entries=[new VG];var n=new YG;switch(a.type){case _.Pe:var p=new TG(a.La,a.Ob);c?(l=JH(a,"avc1",b),l.append([p]),n.entries=[l]):(l=(new PG(a.width,a.height)).append([p]),n.entries=[l]);l=new LG;break;case _.ic:p=new UG(a.Gb),c?(l=JH(a,"mp4a",b),l.append([p]),n.entries=[l]):(l=(new RG(a.channelCount,a.sampleSize,a.jd)).append([p]),n.entries=[l]),l=new cH}n=(new XG).append([n,new ZG,new $G,new bH,new aH]);m=(new dH).append([m]);m=(new eH).append([l,m,n]);g=(new fH).append([g,h,m]);f=(new EG).append([f,
16
+ g]);d=(new DG).append([d,f,e]);e=new CG("dash",0,["iso6","mp41","avc1"]);c&&(c=b.Cd(_.Oc),f=b.Cd(_.Pc),c&&d.append([new AG("pssh",c.initData,8)]),f&&d.append([new AG("pssh",f.initData,8)]),c||f||_.F(rG,"Could not get PSSH init data!"));c=new IH([e,d]);return _.N(c.write())},MH=function(a,b){var c,d,e,f,g,h;(new _.Fk).M("moof",_.Gk).V("mfhd",function(m){var n=new hH;n.g=_.U(m.F);c=n}).M("traf",_.Gk).V("tfhd",function(m){var n=m.F.ya();if(null===m.flags)throw new _.L(_.M,3,3019,qG);var p=new jH(m.version||
17
+ 0,m.flags||0);p.g=_.U(m.F);0<n-m.F.getPosition()&&m.flags&1&&(p.h=_.Dk(m.F));0<n-m.F.getPosition()&&m.flags&2&&(p.A=_.U(m.F));0<n-m.F.getPosition()&&m.flags&8&&(p.j=_.U(m.F));0<n-m.F.getPosition()&&m.flags&16&&(p.o=_.U(m.F));0<n-m.F.getPosition()&&m.flags&32&&(p.m=_.U(m.F));d=p}).V("trun",function(m){var n=m.F.ya();if(null===m.flags)throw new _.L(_.M,3,3019,qG);var p=new iH(m.version||0,m.flags||0);p.g=_.U(m.F);0<n-m.F.getPosition()&&m.flags&1&&(p.j=_.Bk(m.F));0<n-m.F.getPosition()&&m.flags&4&&(p.m=
18
+ _.U(m.F));if(0<n-m.F.getPosition())for(n=0;n<p.g;n++)m.flags&256&&p.o.push(_.U(m.F)),m.flags&512&&p.sampleSize.push(_.U(m.F)),m.flags&1024&&p.A.push(_.U(m.F)),m.flags&2048&&(0===m.version?p.h.push(_.U(m.F)):p.h.push(_.Bk(m.F)));e=p}).V("sdtp",function(m){var n=_.Ek(m.F,m.F.ya());f=new BG("sdtp",m.version||0,m.flags||0,n,0)}).M("uuid",function(m){var n=_.Ek(m.F,16);if(_.fk(n,LH)){n=_.U(m.F);m.version=n>>>24;m.flags=n&16777215;n=new sH(m.version,m.flags);n.h=_.U(m.F);m.flags&1&&(n.j=_.zk(m.F));for(var p=
19
+ 0;p<n.h;p++){var q={Lf:_.Ek(m.F,8),Lc:0,Ze:[]};if(m.flags&2){q.Lc=_.Ak(m.F);for(var r=0;r<q.Lc;r++){var w={mf:0,nf:0};w.mf=_.Ak(m.F);w.nf=_.U(m.F);q.Ze.push(w)}}n.g.push(q)}g=n}}).M(_.wd,function(m){var n=new mH;0<m.F.ya()?n.g=_.Ek(m.F,m.F.ya()):(_.F(rG,"mdat box is empty!"),n.g=new Uint8Array(0));h=n}).parse(a,!1);if(!h)return null;var l=(new kH).append([d,e]);f&&l.append([f]);b.Kd()&&g&&l.append([g]);l=(new lH).append([c,l]);return new IH([l,h])},NH=function(a,b,c){var d=c.Kd(),e=a.request.startTime,
20
+ f=parseInt(e*b,10);b=a.data||new ArrayBuffer(0);var g=MH(b,c);if(null===g)return a.request.contentType===_.Ae?a.data:g;c=g.get(_.wd);if(a.request.contentType===_.Ae){d=c.g.buffer;if(e){d=_.rh(d);if((d=(new DOMParser).parseFromString(d,_.Ce))&&"tt"===d.documentElement.tagName.toLowerCase())var h=d.documentElement;if(h&&(c=new GH(h.getAttribute("ttp:frameRate"),h.getAttribute("ttp:subFrameRate"),h.getAttribute("ttp:frameRateMultiplier"),h.getAttribute("ttp:tickRate")),h=h.getElementsByTagName("body")[0]))for(h=
21
+ h.getElementsByTagName("p"),a=0,b=h.length;a<b;a++){f=h[a];g=["begin",_.dd];for(var l=0,m=g.length;l<m;l++){b:{var n=f;var p=g[l],q=new RegExp("\\w+:"+p),r=0;if(n.hasAttribute(p))n=n.getAttribute(p);else{p=n.attributes;for(var w=p.length;r<w;r++){var x=p[r].name;if(x=x.match(q)){n=n.getAttribute(x[0]);break b}}n=null}}f.setAttribute(g[l],FH(n||"",e,c))}}d=(new XMLSerializer).serializeToString(d);e=_.sh(d).buffer}else e=d;return e}h=new lH;a=g.get("mfhd");b=new kH;l=g.get("tfhd");m=new gH(1,f);f=g.get("trun");
22
+ n=g.get("sdtp");e=g.get("senc");l.g=1;l.flags&=16777214;l.flags|=131072;b.append([l,m,f]);n&&b.append([n]);if(d){g=0;l=[];if(e.flags&2)for(l=[],m=0;m<e.h;m++)l.push(10+6*e.g[m].Lc);else g=8;b.append([e,new qH,new rH(g,l,e.h)])}h.append([a,b]);f.flags|=1;f.j=h.a()+8;c=new IH([h,c]);h=c.write();d&&(d=c.get("saio"),c=c.f,d.offset[0]=e.start+16,c.seek(d.start),d.write(c),h=c.buffer);return h},OH=function(a,b,c){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
23
+ audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[b],keyIds:c,periodId:null}},PH=function(a,b,c){a=_.Fl(a);c&&a.version!==c&&(a=_.pv(a,c));return{initData:_.nv(a),initDataType:_.zc,keyId:b,periodId:null}},RH=function(){this.A=this.j=this.h=this.g=null;this.L=1;this.S=0;this.o="";this.B=this.a=null;this.f=new _.H("clpp.smooth.SmoothParser");this.J=!1;this.m=this.C=null;this.O=QH;this.G=0;this.D=this.I=Infinity;this.w=[];this.K=this.Dj.bind(this)},SH=function(a,b){var c,d,e;return _.A(function(f){if(1==
24
+ f.a)return c=_.Hh(b),c.timeout=a.h.attemptParameters.timeout,c.maxAttempts=Math.max(a.h.attemptParameters.maxAttempts,b.length),c.baseDelay=a.h.attemptParameters.baseDelay,c.backoffFactor=a.h.attemptParameters.backoffFactor,c.fuzzFactor=a.h.attemptParameters.fuzzFactor,c.type=1,d=a.g.networkingEngine.fetch(c),_.y(f,d.P,2);e=f.f;a.o=e.uri;return f["return"](e)})},ZH=function(a,b){var c=null;try{var d=new DOMParser;try{var e=_.rh(b);var f=d.parseFromString(e.trim(),_.Ce)}catch(YB){throw YB;}if(f&&f.documentElement.tagName==
25
+ _.tb)var g=f.documentElement;c=g&&0<g.getElementsByTagName("parsererror").length?null:g}catch(YB){}if(!c)throw a.f.error("Unable to parse manifest"),new _.L(_.M,4,4033,a.o);var h=+TH(a,c,"MajorVersion"),l=+TH(a,c,"MinorVersion"),m=+c.getAttribute("TimeScale")||1E7,n=+TH(a,c,"Duration"),p="TRUE"===c.getAttribute("IsLive"),q=+c.getAttribute("LookAheadCount"),r=+c.getAttribute("DVRWindowLength")||Infinity,w=_.rl(c,"Protection")[0];if(!1===/^[2].[0-2]$/.test(""+h+"."+l))throw a.f.error("Smooth Streaming version must be 2.0, 2.1 or 2.2"),
26
+ new _.L(_.M,4,4036,a.o);p?(UH(a,VH),a.C=typeof a.h.liveRefreshPeriod===_.k?1E3*a.h.liveRefreshPeriod:Math.min(1E3*a.G,1E4),n=Infinity):UH(a,QH);a.a={startTime:0,delay:0,duration:n/m,me:r/m,dd:0};if(w){var x=a.h.playreadyVersion,C=[],D=_.rl(w,"ProtectionHeader")[0],E=_.ck(_.tl(D)||""),G=_.Fl(E).a;C.push(OH(_.Pc,{initData:_.nv(_.yl(G)),initDataType:_.zc,keyId:G,periodId:null},[G]));C.push(OH(_.Oc,PH(E,G,x),[G]));a.w=C}var K=[],O=_.rl(c,"StreamIndex");if(!O.length)throw a.f.error("No streams found!"),
27
+ new _.L(_.M,4,4034,a.o);for(var T=0;T<O.length;T++){for(var Da,ea=a,fa=O[T],xa=TH(ea,fa,"Type"),ha=+fa.getAttribute("Chunks"),qa=fa.getAttribute("Subtype"),Ba=_.Fi(fa.getAttribute("Language")||_.Ge),$a=fa.getAttribute("Name")||"",La=+fa.getAttribute(_.Ua),ab=+fa.getAttribute(_.Ta),Eb=TH(ea,fa,"Url"),me=+fa.getAttribute("TimeScale")||null,fh=[],Mi=_.rl(fa,_.hb),gh=0;gh<Mi.length;gh++){var Zc=ea,qb=Mi[gh],Vf=xa,GL=+qb.getAttribute("Index"),HL=+TH(Zc,qb,"Bitrate"),aC=NaN,bC=NaN,ym=NaN,Yr=NaN,cC=NaN,
28
+ dC=NaN,eC=NaN,fC=qb.getAttribute("FourCC");switch(Vf){case _.Pe:aC=+TH(Zc,qb,_.Ta);bC=+TH(Zc,qb,_.Ua);break;case _.ic:Yr=+qb.getAttribute("Channels")||2,ym=+TH(Zc,qb,"SamplingRate"),dC=+TH(Zc,qb,"AudioTag"),cC=+TH(Zc,qb,"BitsPerSample"),eC=+TH(Zc,qb,"PacketSize")}var Zr=String(qb.getAttribute("CodecPrivateData"));if(Vf===_.ic&&!Zr){var gC=Yr,hC={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12},zm=hC[ym];if("AACH"===fC){var mc=new Uint8Array(4);var iC=
29
+ hC[2*ym];mc[0]=40|zm>>1;mc[1]=zm<<7|gC<<3|iC>>1;mc[2]=iC<<7|8;mc[3]=0;var Yf=new Uint16Array(2);Yf[0]=(mc[0]<<8)+mc[1];Yf[1]=(mc[2]<<8)+mc[3];var jC=Yf[0].toString(16)+Yf[1].toString(16)}else mc=new Uint8Array(2),mc[0]=16|zm>>1,mc[1]=zm<<7|gC<<3,Yf=new Uint16Array(1),Yf[0]=(mc[0]<<8)+mc[1],jC=Yf[0].toString(16);Zr=jC.toUpperCase()}var IL={id:Zc.S++,type:Vf,index:GL,bitrate:HL,vd:Zr,maxHeight:aC,maxWidth:bC,jd:ym,pf:Yr,gk:dC,Fg:cC,rk:eC,bi:fC,segmentIndex:null};fh.push(IL)}Da=fh;for(var qe=[],kC=_.rl(fa,
30
+ "c"),dj=0;dj<kC.length;dj++){var $r=kC[dj],Fd=parseInt($r.getAttribute("t"),10),jh=parseInt($r.getAttribute("d"),10),as=parseInt($r.getAttribute("r"),10),ej=0;if(isNaN(Fd)&&isNaN(jh))throw ea.f.error("Either one or both FragmentDuration and FragmentTime field MUST be present in StreamFragmentElement"),new _.L(_.M,4,4037,ea.o);0===dj&&isNaN(Fd)&&(ej=Fd=0);if(0<dj){var Zf=qe[qe.length-1];ej=Zf.n+1;Zf.d||(Zf.d=Fd-Zf.t);Fd||(Fd=Zf.t+Zf.d);jh||(jh=Fd-Zf.t)}qe.push({n:ej,d:jh,t:Fd});if(as){as--;for(var lC=
31
+ 0;lC<as;lC++){var Am=qe[qe.length-1];ej=Am.n+1;Fd=Am.t+Am.d;jh=Am.d;qe.push({n:ej,d:jh,t:Fd})}}}ea.Vc()||qe.length===ha||ea.f.warn("Number of fragments ("+ha+") differs from number of chunks ("+qe.length+").");K.push({type:xa,ik:ha,Lj:qa,language:Ba,name:$a,maxWidth:La,maxHeight:ab,Rj:Eb,tracks:Da,Hf:qe,timescale:me})}var jf={pk:h,Sf:l,timescale:m,duration:n,isLive:p,nk:q,me:r,ue:!1,streams:K};if(a.j&&a.A)return WH(a,jf),Promise.resolve();var bs=jf.timescale,cs=jf.duration,KL=xH(jf.streams,_.ic),
32
+ LL=xH(jf.streams,_.Pe),ML=xH(jf.streams,_.Ae),mC=[],Bm=XH(a,cs,bs,KL),Cm=XH(a,cs,bs,LL),NL=XH(a,cs,bs,ML);Bm.length||(Bm=[null]);Cm.length||(Cm=[null]);for(var es=0;es<Cm.length;es++)for(var fs=0;fs<Bm.length;fs++)mC.push(YH(a,Cm[es],Bm[fs]));var nC={startTime:0,variants:mC,textStreams:NL,thumbStreams:[]};var PL=jf.streams,gs=a.a.startTime,oC=a.a.delay,hs=a.I,pC=Math.min(a.a.duration||Infinity,hs),is=a.Vc(),QL=a.a.me,RL=a.a.dd,qC=a.G,rC=isFinite(a.D)?a.D:0;if(is)pC=Infinity,gs=Date.now()/1E3-RL,a.a.startTime=
33
+ gs,oC=3*qC;else for(var SL=isFinite(hs)?hs:a.a.duration,sC=_.u(PL),js=sC.next();!js.done;js=sC.next())for(var tC=_.u(js.value.tracks),ks=tC.next();!ks.done;ks=tC.next()){var uC=ks.value;uC.segmentIndex.offset(-rC);_.lw(uC.segmentIndex,SL)}a.B=new _.Vv(gs,oC,!is,!0);a.B.Rb(pC);_.Zv(a.B,qC);a.B.hc=QL;is||a.B.offset(-rC);a.g.filterAllPeriods([nC]);a.j={presentationTimeline:a.B,periods:[nC],offlineSessionIds:[],minBufferTime:0};Promise.resolve();a.J||(a.g.networkingEngine.be(a.K),a.J=!0);a.A=jf;return Promise.resolve()},
34
+ WH=function(a,b){for(var c=0;c<a.A.streams.length;c++)for(var d=b.streams[c],e={},f=_.u(a.A.streams[c].tracks),g=f.next();!g.done;e={Fb:e.Fb},g=f.next())if(e.Fb=g.value,g=d.tracks.find(function(l){return function(m){return m.type===l.Fb.type&&m.bitrate===l.Fb.bitrate}}(e))){vH(e.Fb,g)||a.f.warn("The current stream is updated with a stream that seems to have different base properties!");var h=$H(a,a.A.timescale,d,g);g=e.Fb.segmentIndex;g.Va(h);(h=a.a.me)&&_.jw(g,_.iw(g)-h)}else a.f.warn("Cannot find satisfying update for "+
35
+ e.Fb.type+" track with bitrate "+(e.Fb.bitrate+". Skipping update."))},XH=function(a,b,c,d){for(var e=[],f={rc:0};f.rc<d.length;f={rc:f.rc},f.rc++){var g=d[f.rc].tracks.map(function(h){return function(l){var m=d[h.rc],n=$H(a,c,m,l),p=new _.hw(n),q=null;m.type!==_.Ae&&(q=aI(a,b,c,m,l));l.segmentIndex=p;n=a.L++;var r=Promise.resolve.bind(Promise),w=p.zc.bind(p),x=p.get.bind(p),C=p.Oc.bind(p);p=p.getDuration.bind(p);var D=bI[m.type],E="";switch(m.type){case _.Pe:E=l.vd;var G=/00000001[0-9]7/.exec(E);
36
+ E="avc1."+(G&&G[0]?E.substr(E.indexOf(G[0])+10,6):"42c00c");a.f.debug("VIDEO CODECS: ",E);break;case _.ic:E=l.vd,G=2,"AACH"===l.bi?G=5:E&&(G=(parseInt(E.substr(0,2),16)&248)>>3),E="mp4a.40."+G,a.f.debug("AUDIO CODECS: ",E)}G=m.type===_.Ae?cI[m.Lj]:void 0;return{id:n,originalId:null,tk:null,createSegmentIndex:r,findSegmentPosition:w,getSegmentReference:x,adjustSegmentDurations:C,getDuration:p,segmentIndex:null,segmentLookupStrategy:_.av,initSegmentReference:q,mimeType:D,codecs:E,frameRate:void 0,bandwidth:l.bitrate,
37
+ width:l.maxWidth||void 0,height:l.maxHeight||void 0,kind:G,encrypted:a.we(),keyId:null,language:m.language,label:m.name,type:m.type,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:l.pf||null,closedCaptions:null}}}(f));e=e.concat(g)}return e},$H=function(a,b,c,d){var e=0,f=[],g=c.timescale||b;c.Hf.forEach(function(h,l){var m=h.d/g;if(0===l){var n=h.t/g;a.D=Math.min(a.D,n)}else n=f[l-1].endTime;var p=n+m,q=uH(a.o,c,l,d);a.G=Math.max(a.G,m);f.push(new _.Uv(l,n,p,function(){return[q]},
38
+ 0,null,0,null,!0,g));e+=m});if(c.type===_.Pe||c.type===_.ic)b=f[f.length-1],a.I=Math.min(a.I,e),0===a.a.dd?a.a.dd=b.endTime:a.a.dd=Math.min(a.a.dd,b.endTime);return f},aI=function(a,b,c,d,e){b=wH(b,d.timescale||c,e);c={isLive:a.Vc.bind(a),Kd:a.we.bind(a),gi:function(){return 1},Cd:a.Jf.bind(a)};d=new Uint8Array(0);try{d=KH(b,c)}catch(g){throw a.f.error("Failed to generate initialization segment."),new _.L(_.M,3,4035,g);}var f="data:text/plain;base64,"+_.bk(d);return new _.Tv(function(){return[f]},
39
+ 0,null,null,!0)},YH=function(a,b,c){var d=(c?c.bandwidth:0)+(b?b.bandwidth:0),e=c?c.language:_.Ge;return c||b?{id:a.L++,language:e,primary:!1,audio:c,video:b,bandwidth:d,drmInfos:a.w,allowedByApplication:!0,allowedByKeySystem:!0}:null},TH=function(a,b,c){if(b=b.getAttribute(c))return b;a.f.error("required attribute not provided: "+c);throw new _.L(_.M,4,4038,a.o,c);},dI=function(a,b){null!=a.C&&null!=b&&(a.m=window.setTimeout(a.Ah.bind(a),b))},UH=function(a,b){var c=b===QH;if(a.j&&a.j.presentationTimeline){var d=
40
+ a.j.presentationTimeline;d.j=c;d.m=c}c&&null!=a.m&&(window.clearTimeout(a.m),a.m=null,a.C=null);a.O=b},eI=function(){};X.prototype.append=function(a){a=void 0===a?[]:a;for(var b=0;b<a.length;b++)this.f.push(a[b]),a[b].parent=this;return this};X.prototype.get=function(a){if(this.type===a)return this;for(var b=0;b<this.f.length;b++){if(this.f[b].type===a)return this.f[b];var c=this.f[b].get(a);if(c)return c}return null};
41
41
  X.prototype.a=function(){var a=Math.pow(2,32)-1;var b=4+this.type.length;"uuid"===this.type&&(b+=16);if(0<this.f.length)for(var c=0;c<this.f.length;c++)b+=this.f[c].a();this.size>a&&(b+=8);return b};
42
- X.prototype.write=function(a){var b=Math.pow(2,32)-1;this.start=a.getPosition();this.size=this.a();this.size>b?_.T(a,1):_.T(a,this.size);_.Ej(a,nF(this.type));this.size>b&&hF(a,this.size);"uuid"===this.type&&_.Ej(a,null);if(0<this.f.length&&!this.w)for(b=0;b<this.f.length;b++)this.f[b].write(a),this.f[b].a(),a.getPosition()};_.v(Y,X);Y.prototype.a=function(){return 4+X.prototype.a.call(this)};Y.prototype.write=function(a){X.prototype.write.call(this,a);iF(a,this.version);jF(a,this.flags)};
43
- _.v(oF,X);oF.prototype.a=function(){return this.g.byteLength+X.prototype.a.call(this)-this.offset};oF.prototype.write=function(a){X.prototype.write.call(this,a);_.Ej(a,this.g,this.offset);a.getPosition()};_.v(pF,Y);pF.prototype.a=function(){return this.g.byteLength+Y.prototype.a.call(this)-this.offset};pF.prototype.write=function(a){Y.prototype.write.call(this,a);_.Ej(a,this.g,this.offset);a.getPosition()};_.v(qF,X);
44
- qF.prototype.a=function(){var a=this.h.length;a=a+4+this.g.join("").length;return a+X.prototype.a.call(this)};qF.prototype.write=function(a){X.prototype.write.call(this,a);_.Ej(a,nF(this.h));_.T(a,this.Jf);_.Ej(a,nF(this.g.join("")));a.getPosition()};_.v(rF,X);_.v(sF,X);_.v(tF,Y);tF.prototype.a=function(){var a=0;a=1===this.version?a+28:a+16;a=a+44+this.g.length;return a+=Y.prototype.a.call(this)};
45
- tF.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?(hF(a,0),hF(a,0),_.T(a,this.timescale),hF(a,this.duration*this.timescale)):(_.T(a,0),_.T(a,0),_.T(a,this.timescale),_.T(a,this.duration*this.timescale));_.T(a,65536);kF(a,this.volume);kF(a,0);_.T(a,0);_.T(a,0);for(var b=0;b<this.g.length;b++)iF(a,this.g[b]);_.T(a,0);_.T(a,0);_.T(a,0);_.T(a,0);_.T(a,0);_.T(a,0);_.T(a,this.h);a.getPosition()};_.v(uF,X);_.v(vF,Y);vF.prototype.a=function(){return 20+Y.prototype.a.call(this)};
46
- vF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.g);_.T(a,1);_.T(a,0);_.T(a,0);_.T(a,0);a.getPosition()};_.v(wF,Y);wF.prototype.a=function(){var a=0;a=1===this.version?a+32:a+20;a=a+24+this.g.length;return a+Y.prototype.a.call(this)};
47
- wF.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?(hF(a,0),hF(a,0),_.T(a,this.h),_.T(a,0),hF(a,this.duration*this.timescale)):(_.T(a,0),_.T(a,0),_.T(a,this.h),_.T(a,0),_.T(a,this.duration*this.timescale));_.T(a,0);_.T(a,0);kF(a,0);kF(a,0);kF(a,this.volume);kF(a,0);for(var b=0;b<this.g.length;b++)iF(a,this.g[b]);kF(a,this.width);kF(a,0);kF(a,this.height);kF(a,0);a.getPosition()};_.v(xF,Y);xF.prototype.a=function(){var a=0;a=1===this.version?a+28:a+16;return a+4+Y.prototype.a.call(this)};
48
- xF.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?(hF(a,0),hF(a,0),_.T(a,this.timescale),hF(a,this.duration*this.timescale)):(_.T(a,0),_.T(a,0),_.T(a,this.timescale),_.T(a,this.duration*this.timescale));kF(a,this.language);kF(a,0);a.getPosition()};_.v(yF,Y);yF.prototype.a=function(){return 33+Y.prototype.a.call(this)};
49
- yF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,0);this.g===_.Ie?_.Ej(a,nF("vide")):_.Ej(a,nF("soun"));_.T(a,0);_.T(a,0);_.T(a,0);this.g===_.Ie?_.Ej(a,nF("VideoHandler\x00")):_.Ej(a,nF("SoundHandler\x00"));a.getPosition()};_.v(zF,Y);zF.prototype.a=function(){return 2+this.g.byteLength+Y.prototype.a.call(this)};zF.prototype.write=function(a){Y.prototype.write.call(this,a);kF(a,0);_.Ej(a,this.g);a.getPosition()};_.v(AF,X);AF.prototype.a=function(){return 8+X.prototype.a.call(this)};
50
- AF.prototype.write=function(a){X.prototype.write.call(this,a);_.T(a,0);kF(a,0);kF(a,1)};_.v(BF,AF);BF.prototype.a=function(){return 70+AF.prototype.a.call(this)};BF.prototype.write=function(a){AF.prototype.write.call(this,a);kF(a,0);kF(a,0);_.T(a,0);_.T(a,0);_.T(a,0);kF(a,this.width);kF(a,this.height);_.T(a,4718592);_.T(a,4718592);_.T(a,0);kF(a,1);iF(a,10);_.Ej(a,nF("AVC Coding",31));kF(a,this.depth);mF(a,-1)};_.v(CF,AF);CF.prototype.a=function(){return 20+AF.prototype.a.call(this)};
51
- CF.prototype.write=function(a){AF.prototype.write.call(this,a);_.T(a,0);_.T(a,0);kF(a,this.channelCount);kF(a,this.sampleSize);mF(a,0);kF(a,0);kF(a,this.sampleRate);kF(a,0)};_.v(DF,BF);DF.prototype.write=function(a){BF.prototype.write.call(this,a);for(var b=0;b<this.f.length;b++)this.f[b].write(a);a.getPosition()};_.v(EF,DF);_.v(FF,CF);FF.prototype.write=function(a){CF.prototype.write.call(this,a);for(var b=0;b<this.f.length;b++)this.f[b].write(a);a.getPosition()};_.v(GF,FF);_.v(HF,X);
52
- HF.prototype.a=function(){for(var a=7,b=0;b<this.Fa.length;b++)a+=2,a+=this.Fa[b].byteLength;for(b=0;b<this.Fa.length;b++)a+=2,a+=this.Lb[b].byteLength;return a+X.prototype.a.call(this)};
53
- HF.prototype.write=function(a){X.prototype.write.call(this,a);iF(a,this.version);iF(a,this.g);iF(a,this.h);iF(a,this.level);iF(a,255);iF(a,224|this.Fa.length);for(var b=0;b<this.Fa.length;b++)kF(a,this.Fa[b].length),_.Ej(a,this.Fa[b]);iF(a,this.Lb.length);for(b=0;b<this.Lb.length;b++)kF(a,this.Lb[b].length),_.Ej(a,this.Lb[b]);a.getPosition()};_.v(IF,Y);IF.prototype.a=function(){return 22+(this.Fb.byteLength+3)+Y.prototype.a.call(this)};
54
- IF.prototype.write=function(a){Y.prototype.write.call(this,a);iF(a,3);iF(a,23+this.Fb.byteLength);kF(a,1);iF(a,0);iF(a,4);iF(a,15+this.Fb.byteLength);iF(a,64);iF(a,21);jF(a,0);_.T(a,0);_.T(a,0);iF(a,5);iF(a,this.Fb.byteLength);_.Ej(a,this.Fb);_.Ej(a,new Uint8Array([6,1,2]));a.getPosition()};_.v(JF,Y);JF.prototype.a=function(){return this.location.length+Y.prototype.a.call(this)};JF.prototype.write=function(a){Y.prototype.write.call(this,a);0<this.location.length&&_.Ej(a,nF(this.location));a.getPosition()};
55
- _.v(KF,Y);KF.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};KF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(LF,X);_.v(MF,Y);MF.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};
56
- MF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(NF,Y);NF.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};NF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(OF,Y);
57
- OF.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};OF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(PF,Y);PF.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};
58
- PF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(QF,Y);QF.prototype.a=function(){return 8+Y.prototype.a.call(this)};QF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,0);_.T(a,0);a.getPosition()};_.v(RF,Y);RF.prototype.a=function(){return 4+Y.prototype.a.call(this)};RF.prototype.write=function(a){Y.prototype.write.call(this,a);mF(a,0);kF(a,0);a.getPosition()};
59
- _.v(SF,X);_.v(TF,X);_.v(UF,X);_.v(VF,Y);VF.prototype.a=function(){var a=0;a=1===this.version?a+8:a+4;return a+Y.prototype.a.call(this)};VF.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?hF(a,this.g):_.T(a,this.g);a.getPosition()};_.v(WF,Y);WF.prototype.a=function(){return 4+Y.prototype.a.call(this)};WF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.g);a.getPosition()};_.v(XF,Y);
60
- XF.prototype.a=function(){var a=4;this.flags&VG&&(a+=4);this.flags&WG&&(a+=4);for(var b=0;b<this.g;b++)this.flags&XG&&(a+=4),this.flags&YG&&(a+=4),this.flags&ZG&&(a+=4),this.flags&$G&&(a+=4);return a+Y.prototype.a.call(this)};
61
- XF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.g);this.flags&VG&&(a.getPosition(),lF(a,this.j));this.flags&WG&&_.T(a,this.m);for(var b=0;b<this.g;b++)this.flags&XG&&_.T(a,this.o[b]),this.flags&YG&&_.T(a,this.sampleSize[b]),this.flags&ZG&&_.T(a,this.A[b]),this.flags&$G&&(0===this.version?_.T(a,this.h[b]):lF(a,this.h[b]));a.getPosition()};var VG=1,WG=4,XG=256,YG=512,ZG=1024,$G=2048;_.v(YF,Y);
62
- YF.prototype.a=function(){var a=4;this.flags&aH&&(a+=8);this.flags&bH&&(a+=4);this.flags&cH&&(a+=4);this.flags&dH&&(a+=4);this.flags&eH&&(a+=4);return a+Y.prototype.a.call(this)};YF.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.g);this.flags&aH&&hF(a,this.h);this.flags&bH&&_.T(a,this.A);this.flags&cH&&_.T(a,this.j);this.flags&dH&&_.T(a,this.o);this.flags&eH&&_.T(a,this.m);a.getPosition()};var aH=1,bH=2,cH=8,dH=16,eH=32;_.v(ZF,X);_.v($F,X);_.v(aG,X);
63
- aG.prototype.a=function(){return this.g.byteLength+X.prototype.a.call(this)};aG.prototype.write=function(a){X.prototype.write.call(this,a);0<this.g.byteLength&&_.Ej(a,this.g)};_.v(bG,Y);bG.prototype.a=function(){var a=20;1===this.g&&0===this.h&&(a=a+1+this.j.length);return a+Y.prototype.a.call(this)};
64
- bG.prototype.write=function(a){Y.prototype.write.call(this,a);iF(a,0);0===this.version?iF(a,0):iF(a,0);iF(a,this.g);iF(a,this.h);_.Ej(a,_.mj(this.m));if(1===this.g&&0===this.h){iF(a,0);for(var b=0;b<this.j.length;b++)iF(a,this.j[b])}a.getPosition()};_.v(cG,Y);cG.prototype.a=function(){var a=8;this.flags&1&&(a+=nF(this.zb).byteLength);return a+Y.prototype.a.call(this)};cG.prototype.write=function(a){Y.prototype.write.call(this,a);_.Ej(a,nF(this.g));_.T(a,this.h);this.flags&1&&_.Ej(a,nF(this.zb));a.getPosition()};
65
- _.v(dG,X);dG.prototype.a=function(){return nF(this.g).byteLength+X.prototype.a.call(this)};dG.prototype.write=function(a){X.prototype.write.call(this,a);_.Ej(a,nF(this.g));a.getPosition()};_.v(eG,Y);eG.prototype.a=function(){var a=0;this.flags&1&&(a+=8);a+=4;for(var b=0;1>b;b++)a=0===this.version?a+4:a+8;return a+Y.prototype.a.call(this)};
66
- eG.prototype.write=function(a){Y.prototype.write.call(this,a);this.flags&1&&(_.T(a,0),_.T(a,0));_.T(a,1);for(var b=0;1>b;b++)0===this.version?_.T(a,this.offset[b]):hF(a,this.offset[b]);a.getPosition()};_.v(fG,Y);fG.prototype.a=function(){var a=0;this.flags&1&&(a+=8);a+=5;0===this.g&&(a+=this.j.length);return a+Y.prototype.a.call(this)};
67
- fG.prototype.write=function(a){Y.prototype.write.call(this,a);this.flags&1&&(_.T(a,0),_.T(a,0));iF(a,this.g);_.T(a,this.h);if(0===this.g)for(var b=0;b<this.h;b++)iF(a,this.j[b]);a.getPosition()};_.v(gG,Y);gG.prototype.a=function(){var a=4;this.flags&1&&(a+=1);for(var b=0;b<this.h;b++)if(a+=this.g[b].Df.byteLength,this.flags&2){a+=2;for(var c=0;c<this.g[b].Jc;c++)a+=2,a+=4}return a+Y.prototype.a.call(this)};
68
- gG.prototype.write=function(a){Y.prototype.write.call(this,a);_.T(a,this.h);this.flags&1&&iF(a,this.j);for(var b=0;b<this.h;b++)if(_.Ej(a,this.g[b].Df),this.flags&2){kF(a,this.g[b].Jc);for(var c=0;c<this.g[b].Jc;c++)kF(a,this.g[b].Qe[c].cf),_.T(a,this.g[b].Qe[c].df)}a.getPosition()};var nG=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,oG=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,pG=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,qG=/^(\d*\.?\d*)f$/,rG=/^(\d*\.?\d*)t$/,sG=/^(?:(\d*\.?\d*)h)?(?:(\d*\.?\d*)m)?(?:(\d*\.?\d*)s)?(?:(\d*\.?\d*)ms)?$/;wG.prototype.get=function(a){for(var b=0;b<this.a.length;b++){var c=this.a[b].get(a);if(c)return c}return null};wG.prototype.write=function(){this.f=vG(this);for(var a=0;a<this.a.length;a++)this.a[a].write(this.f);return this.f.buffer};var AG=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);_.t=GG.prototype;_.t.configure=function(a){this.h=a};_.t.start=function(a,b){var c=this;this.g=b;var d=_.df(new Set([a,hG(a)])).concat();return HG(this,d).then(function(e){return OG(c,e.data).then(function(){TG(c,c.C);return c.j})})};_.t.stop=function(){this.g&&this.g.networkingEngine.Ke(this.K);this.C=this.B=this.j=this.h=this.g=null;this.m&&(clearTimeout(this.m),this.m=null);this.J=!1;this.I=this.D=Infinity;return Promise.resolve()};
69
- _.t.update=function(){var a=this;if(this.Sc())return HG(this,[this.o]).then(function(b){return OG(a,b.data).then(function(){return a.j})})["catch"](function(b){if(a.g)a.g.onError(b)})};_.t.onExpirationUpdated=function(){};_.t.ph=function(){var a=this;this.f.debug(_.hu);this.g&&(this.m=null,this.update().then(function(){TG(a,a.C)})["catch"](function(b){a.g&&(a.g.onError(b),1===b.severity&&TG(a,100))}))};_.t.Sc=function(){return this.N===KG};_.t.oe=function(){return 0<this.A.length};
70
- _.t.Bf=function(a){var b=null;if(this.A.length)for(var c=0;c<this.A.length;c++)if(this.A[c].keySystem===a){b=this.A[c].initData[0];break}return b};
71
- _.t.kj=function(a){if(2!==a.request.type||a.uri.startsWith("data:"))return Promise.resolve(a);var b=a.request.timescale||this.B.timescale,c={isLive:this.Sc.bind(this),Bd:this.oe.bind(this),Vh:function(){return 1},ge:this.Bf.bind(this)},d=!1,e=new _.K(_.M,3,4035,null),f=null;try{f=CG(a,b,c)}catch(g){d=!0,e.data=g,3E3===g.code&&(e.code=4039)}if(d||!f)return Promise.reject(e);a.data=f;return Promise.resolve(a)};var RG={video:_.Ke,audio:_.ec,text:_.Xb},FG="VOD",KG="LIVE",SG={zj:"caption",Gj:_.pe};_.v(UG,_.Kn);UG.prototype.Da=function(){_.Ko.ism=GG;_.Io[_.Yb]=GG};UG.prototype.va=function(){_.sv("ism");_.uv(_.Yb)};UG.prototype.id=function(){return"smooth"};_.B("clpp.smooth.SmoothComponent",UG);};
42
+ X.prototype.write=function(a){var b=Math.pow(2,32)-1;this.start=a.getPosition();this.size=this.a();this.size>b?_.S(a,1):_.S(a,this.size);_.vk(a,zG(this.type));this.size>b&&tG(a,this.size);"uuid"===this.type&&_.vk(a,null);if(0<this.f.length&&!this.w)for(b=0;b<this.f.length;b++)this.f[b].write(a),this.f[b].a(),a.getPosition()};_.v(Y,X);Y.prototype.a=function(){return 4+X.prototype.a.call(this)};Y.prototype.write=function(a){X.prototype.write.call(this,a);uG(a,this.version);vG(a,this.flags)};
43
+ _.v(AG,X);AG.prototype.a=function(){return this.g.byteLength+X.prototype.a.call(this)-this.offset};AG.prototype.write=function(a){X.prototype.write.call(this,a);_.vk(a,this.g,this.offset);a.getPosition()};_.v(BG,Y);BG.prototype.a=function(){return this.g.byteLength+Y.prototype.a.call(this)-this.offset};BG.prototype.write=function(a){Y.prototype.write.call(this,a);_.vk(a,this.g,this.offset);a.getPosition()};_.v(CG,X);
44
+ CG.prototype.a=function(){var a=this.h.length;a=a+4+this.g.join("").length;return a+X.prototype.a.call(this)};CG.prototype.write=function(a){X.prototype.write.call(this,a);_.vk(a,zG(this.h));_.S(a,this.Sf);_.vk(a,zG(this.g.join("")));a.getPosition()};_.v(DG,X);_.v(EG,X);_.v(FG,Y);FG.prototype.a=function(){var a=0;a=1===this.version?a+28:a+16;a=a+44+this.g.length;return a+=Y.prototype.a.call(this)};
45
+ FG.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?(tG(a,0),tG(a,0),_.S(a,this.timescale),tG(a,this.duration*this.timescale)):(_.S(a,0),_.S(a,0),_.S(a,this.timescale),_.S(a,this.duration*this.timescale));_.S(a,65536);wG(a,this.volume);wG(a,0);_.S(a,0);_.S(a,0);for(var b=0;b<this.g.length;b++)uG(a,this.g[b]);_.S(a,0);_.S(a,0);_.S(a,0);_.S(a,0);_.S(a,0);_.S(a,0);_.S(a,this.h);a.getPosition()};_.v(GG,X);_.v(HG,Y);HG.prototype.a=function(){return 20+Y.prototype.a.call(this)};
46
+ HG.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.g);_.S(a,1);_.S(a,0);_.S(a,0);_.S(a,0);a.getPosition()};_.v(IG,Y);IG.prototype.a=function(){var a=0;a=1===this.version?a+32:a+20;a=a+24+this.g.length;return a+Y.prototype.a.call(this)};
47
+ IG.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?(tG(a,0),tG(a,0),_.S(a,this.h),_.S(a,0),tG(a,this.duration*this.timescale)):(_.S(a,0),_.S(a,0),_.S(a,this.h),_.S(a,0),_.S(a,this.duration*this.timescale));_.S(a,0);_.S(a,0);wG(a,0);wG(a,0);wG(a,this.volume);wG(a,0);for(var b=0;b<this.g.length;b++)uG(a,this.g[b]);wG(a,this.width);wG(a,0);wG(a,this.height);wG(a,0);a.getPosition()};_.v(JG,Y);JG.prototype.a=function(){var a=0;a=1===this.version?a+28:a+16;return a+4+Y.prototype.a.call(this)};
48
+ JG.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?(tG(a,0),tG(a,0),_.S(a,this.timescale),tG(a,this.duration*this.timescale)):(_.S(a,0),_.S(a,0),_.S(a,this.timescale),_.S(a,this.duration*this.timescale));wG(a,this.language);wG(a,0);a.getPosition()};_.v(KG,Y);KG.prototype.a=function(){return 33+Y.prototype.a.call(this)};
49
+ KG.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,0);this.g===_.Pe?_.vk(a,zG("vide")):_.vk(a,zG("soun"));_.S(a,0);_.S(a,0);_.S(a,0);this.g===_.Pe?_.vk(a,zG("VideoHandler\x00")):_.vk(a,zG("SoundHandler\x00"));a.getPosition()};_.v(LG,Y);LG.prototype.a=function(){return 2+this.g.byteLength+Y.prototype.a.call(this)};LG.prototype.write=function(a){Y.prototype.write.call(this,a);wG(a,0);_.vk(a,this.g);a.getPosition()};_.v(MG,X);MG.prototype.a=function(){return 8+X.prototype.a.call(this)};
50
+ MG.prototype.write=function(a){X.prototype.write.call(this,a);_.S(a,0);wG(a,0);wG(a,1)};_.v(NG,MG);NG.prototype.a=function(){return 70+MG.prototype.a.call(this)};NG.prototype.write=function(a){MG.prototype.write.call(this,a);wG(a,0);wG(a,0);_.S(a,0);_.S(a,0);_.S(a,0);wG(a,this.width);wG(a,this.height);_.S(a,4718592);_.S(a,4718592);_.S(a,0);wG(a,1);uG(a,10);_.vk(a,zG("AVC Coding",31));wG(a,this.depth);yG(a,-1)};_.v(OG,MG);OG.prototype.a=function(){return 20+MG.prototype.a.call(this)};
51
+ OG.prototype.write=function(a){MG.prototype.write.call(this,a);_.S(a,0);_.S(a,0);wG(a,this.channelCount);wG(a,this.sampleSize);yG(a,0);wG(a,0);wG(a,this.sampleRate);wG(a,0)};_.v(PG,NG);PG.prototype.write=function(a){NG.prototype.write.call(this,a);for(var b=0;b<this.f.length;b++)this.f[b].write(a);a.getPosition()};_.v(QG,PG);_.v(RG,OG);RG.prototype.write=function(a){OG.prototype.write.call(this,a);for(var b=0;b<this.f.length;b++)this.f[b].write(a);a.getPosition()};_.v(SG,RG);_.v(TG,X);
52
+ TG.prototype.a=function(){for(var a=7,b=0;b<this.La.length;b++)a+=2,a+=this.La[b].byteLength;for(b=0;b<this.La.length;b++)a+=2,a+=this.Ob[b].byteLength;return a+X.prototype.a.call(this)};
53
+ TG.prototype.write=function(a){X.prototype.write.call(this,a);uG(a,this.version);uG(a,this.g);uG(a,this.h);uG(a,this.level);uG(a,255);uG(a,224|this.La.length);for(var b=0;b<this.La.length;b++)wG(a,this.La[b].length),_.vk(a,this.La[b]);uG(a,this.Ob.length);for(b=0;b<this.Ob.length;b++)wG(a,this.Ob[b].length),_.vk(a,this.Ob[b]);a.getPosition()};_.v(UG,Y);UG.prototype.a=function(){return 22+(this.Gb.byteLength+3)+Y.prototype.a.call(this)};
54
+ UG.prototype.write=function(a){Y.prototype.write.call(this,a);uG(a,3);uG(a,23+this.Gb.byteLength);wG(a,1);uG(a,0);uG(a,4);uG(a,15+this.Gb.byteLength);uG(a,64);uG(a,21);vG(a,0);_.S(a,0);_.S(a,0);uG(a,5);uG(a,this.Gb.byteLength);_.vk(a,this.Gb);_.vk(a,new Uint8Array([6,1,2]));a.getPosition()};_.v(VG,Y);VG.prototype.a=function(){return this.location.length+Y.prototype.a.call(this)};VG.prototype.write=function(a){Y.prototype.write.call(this,a);0<this.location.length&&_.vk(a,zG(this.location));a.getPosition()};
55
+ _.v(WG,Y);WG.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};WG.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(XG,X);_.v(YG,Y);YG.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};
56
+ YG.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(ZG,Y);ZG.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};ZG.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v($G,Y);
57
+ $G.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};$G.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(aH,Y);aH.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Y.prototype.a.call(this)};
58
+ aH.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.v(bH,Y);bH.prototype.a=function(){return 8+Y.prototype.a.call(this)};bH.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,0);_.S(a,0);a.getPosition()};_.v(cH,Y);cH.prototype.a=function(){return 4+Y.prototype.a.call(this)};cH.prototype.write=function(a){Y.prototype.write.call(this,a);yG(a,0);wG(a,0);a.getPosition()};
59
+ _.v(dH,X);_.v(eH,X);_.v(fH,X);_.v(gH,Y);gH.prototype.a=function(){var a=0;a=1===this.version?a+8:a+4;return a+Y.prototype.a.call(this)};gH.prototype.write=function(a){Y.prototype.write.call(this,a);1===this.version?tG(a,this.g):_.S(a,this.g);a.getPosition()};_.v(hH,Y);hH.prototype.a=function(){return 4+Y.prototype.a.call(this)};hH.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.g);a.getPosition()};_.v(iH,Y);
60
+ iH.prototype.a=function(){var a=4;this.flags&fI&&(a+=4);this.flags&gI&&(a+=4);for(var b=0;b<this.g;b++)this.flags&hI&&(a+=4),this.flags&iI&&(a+=4),this.flags&jI&&(a+=4),this.flags&kI&&(a+=4);return a+Y.prototype.a.call(this)};
61
+ iH.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.g);this.flags&fI&&(a.getPosition(),xG(a,this.j));this.flags&gI&&_.S(a,this.m);for(var b=0;b<this.g;b++)this.flags&hI&&_.S(a,this.o[b]),this.flags&iI&&_.S(a,this.sampleSize[b]),this.flags&jI&&_.S(a,this.A[b]),this.flags&kI&&(0===this.version?_.S(a,this.h[b]):xG(a,this.h[b]));a.getPosition()};var fI=1,gI=4,hI=256,iI=512,jI=1024,kI=2048;_.v(jH,Y);
62
+ jH.prototype.a=function(){var a=4;this.flags&lI&&(a+=8);this.flags&mI&&(a+=4);this.flags&nI&&(a+=4);this.flags&oI&&(a+=4);this.flags&pI&&(a+=4);return a+Y.prototype.a.call(this)};jH.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.g);this.flags&lI&&tG(a,this.h);this.flags&mI&&_.S(a,this.A);this.flags&nI&&_.S(a,this.j);this.flags&oI&&_.S(a,this.o);this.flags&pI&&_.S(a,this.m);a.getPosition()};var lI=1,mI=2,nI=8,oI=16,pI=32;_.v(kH,X);_.v(lH,X);_.v(mH,X);
63
+ mH.prototype.a=function(){return this.g.byteLength+X.prototype.a.call(this)};mH.prototype.write=function(a){X.prototype.write.call(this,a);0<this.g.byteLength&&_.vk(a,this.g)};_.v(nH,Y);nH.prototype.a=function(){var a=20;1===this.g&&0===this.h&&(a=a+1+this.j.length);return a+Y.prototype.a.call(this)};
64
+ nH.prototype.write=function(a){Y.prototype.write.call(this,a);uG(a,0);0===this.version?uG(a,0):uG(a,0);uG(a,this.g);uG(a,this.h);_.vk(a,_.dk(this.m));if(1===this.g&&0===this.h){uG(a,0);for(var b=0;b<this.j.length;b++)uG(a,this.j[b])}a.getPosition()};_.v(oH,Y);oH.prototype.a=function(){var a=8;this.flags&1&&(a+=zG(this.Bb).byteLength);return a+Y.prototype.a.call(this)};oH.prototype.write=function(a){Y.prototype.write.call(this,a);_.vk(a,zG(this.g));_.S(a,this.h);this.flags&1&&_.vk(a,zG(this.Bb));a.getPosition()};
65
+ _.v(pH,X);pH.prototype.a=function(){return zG(this.g).byteLength+X.prototype.a.call(this)};pH.prototype.write=function(a){X.prototype.write.call(this,a);_.vk(a,zG(this.g));a.getPosition()};_.v(qH,Y);qH.prototype.a=function(){var a=0;this.flags&1&&(a+=8);a+=4;for(var b=0;1>b;b++)a=0===this.version?a+4:a+8;return a+Y.prototype.a.call(this)};
66
+ qH.prototype.write=function(a){Y.prototype.write.call(this,a);this.flags&1&&(_.S(a,0),_.S(a,0));_.S(a,1);for(var b=0;1>b;b++)0===this.version?_.S(a,this.offset[b]):tG(a,this.offset[b]);a.getPosition()};_.v(rH,Y);rH.prototype.a=function(){var a=0;this.flags&1&&(a+=8);a+=5;0===this.g&&(a+=this.j.length);return a+Y.prototype.a.call(this)};
67
+ rH.prototype.write=function(a){Y.prototype.write.call(this,a);this.flags&1&&(_.S(a,0),_.S(a,0));uG(a,this.g);_.S(a,this.h);if(0===this.g)for(var b=0;b<this.h;b++)uG(a,this.j[b]);a.getPosition()};_.v(sH,Y);sH.prototype.a=function(){var a=4;this.flags&1&&(a+=1);for(var b=0;b<this.h;b++)if(a+=this.g[b].Lf.byteLength,this.flags&2){a+=2;for(var c=0;c<this.g[b].Lc;c++)a+=2,a+=4}return a+Y.prototype.a.call(this)};
68
+ sH.prototype.write=function(a){Y.prototype.write.call(this,a);_.S(a,this.h);this.flags&1&&uG(a,this.j);for(var b=0;b<this.h;b++)if(_.vk(a,this.g[b].Lf),this.flags&2){wG(a,this.g[b].Lc);for(var c=0;c<this.g[b].Lc;c++)wG(a,this.g[b].Ze[c].mf),_.S(a,this.g[b].Ze[c].nf)}a.getPosition()};var zH=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,AH=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,BH=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,CH=/^(\d*\.?\d*)f$/,DH=/^(\d*\.?\d*)t$/,EH=/^(?:(\d*\.?\d*)h)?(?:(\d*\.?\d*)m)?(?:(\d*\.?\d*)s)?(?:(\d*\.?\d*)ms)?$/;IH.prototype.get=function(a){for(var b=0;b<this.a.length;b++){var c=this.a[b].get(a);if(c)return c}return null};IH.prototype.write=function(){this.f=HH(this);for(var a=0;a<this.a.length;a++)this.a[a].write(this.f);return this.f.buffer};var LH=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);_.t=RH.prototype;_.t.configure=function(a){this.h=a};_.t.start=function(a,b){var c=this;this.g=b;var d=_.kf(new Set([a,tH(a)])).concat();return SH(this,d).then(function(e){return ZH(c,e.data).then(function(){dI(c,c.C);return c.j})})};_.t.stop=function(){this.g&&this.g.networkingEngine.Se(this.K);this.C=this.A=this.j=this.h=this.g=null;this.m&&(clearTimeout(this.m),this.m=null);this.J=!1;this.I=this.D=Infinity;return Promise.resolve()};
69
+ _.t.update=function(){var a=this;if(this.Vc())return SH(this,[this.o]).then(function(b){return ZH(a,b.data).then(function(){return a.j})})["catch"](function(b){if(a.g)a.g.onError(b)})};_.t.onExpirationUpdated=function(){};_.t.setCurrentVariant=function(){};_.t.Ah=function(){var a=this;this.f.debug(_.Uu);this.g&&(this.m=null,this.update().then(function(){dI(a,a.C)})["catch"](function(b){a.g&&(a.g.onError(b),1===b.severity&&dI(a,100))}))};_.t.Vc=function(){return this.O===VH};
70
+ _.t.we=function(){return 0<this.w.length};_.t.Jf=function(a){var b=null;if(this.w.length)for(var c=0;c<this.w.length;c++)if(this.w[c].keySystem===a){b=this.w[c].initData[0];break}return b};
71
+ _.t.Dj=function(a){if(2!==a.request.type||a.uri.startsWith("data:"))return Promise.resolve(a);var b=a.request.timescale||this.A.timescale,c={isLive:this.Vc.bind(this),Kd:this.we.bind(this),gi:function(){return 1},Cd:this.Jf.bind(this)},d=!1,e=new _.L(_.M,3,4035,null),f=null;try{f=NH(a,b,c)}catch(g){d=!0,e.data=g,3E3===g.code&&(e.code=4039)}if(d||!f)return Promise.reject(e);a.data=f;return Promise.resolve(a)};var bI={video:_.Re,audio:_.nc,text:_.fc},QH="VOD",VH="LIVE",cI={Tj:"caption",$j:_.we};_.v(eI,_.zo);eI.prototype.Ja=function(){_.wp.ism=RH;_.up[_.gc]=RH};eI.prototype.Ca=function(){_.qw("ism");_.rw(_.gc)};eI.prototype.id=function(){return"smooth"};_.B("clpp.smooth.SmoothComponent",eI);};
72
72
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
73
73
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
74
74
  else{_=this.clpp._;(f.call(g,this));}