@castlabs/prestoplay 6.25.2-beta.3 → 6.25.2-beta.4

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 (63) hide show
  1. package/cjs/cl.adobe.js +3 -3
  2. package/cjs/cl.airplay.js +3 -3
  3. package/cjs/cl.broadpeak.js +7 -7
  4. package/cjs/cl.cast.js +103 -103
  5. package/cjs/cl.conviva.js +31 -31
  6. package/cjs/cl.core.js +390 -385
  7. package/cjs/cl.crypto.js +8 -8
  8. package/cjs/cl.dash.js +86 -86
  9. package/cjs/cl.freewheel.js +22 -22
  10. package/cjs/cl.hls.js +76 -76
  11. package/cjs/cl.hlssmpte.js +6 -6
  12. package/cjs/cl.htmlcue.js +30 -30
  13. package/cjs/cl.ima.js +21 -21
  14. package/cjs/cl.mediatailor.js +3 -3
  15. package/cjs/cl.mse.js +321 -321
  16. package/cjs/cl.muxdata.js +14 -14
  17. package/cjs/cl.onboard.js +3 -3
  18. package/cjs/cl.persistent.js +14 -14
  19. package/cjs/cl.playlist.js +6 -6
  20. package/cjs/cl.sessions.js +16 -16
  21. package/cjs/cl.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -72
  23. package/cjs/cl.thumbnails.js +25 -25
  24. package/cjs/cl.tizen.js +67 -67
  25. package/cjs/cl.ttml.js +29 -29
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +10 -10
  28. package/cjs/cl.vr.js +19 -19
  29. package/cjs/cl.vtt.js +13 -13
  30. package/cjs/cl.yospace.js +3 -3
  31. package/cjs/cl.youbora.js +29 -29
  32. package/cl.adobe.js +3 -3
  33. package/cl.airplay.js +3 -3
  34. package/cl.broadpeak.js +5 -5
  35. package/cl.cast.js +86 -86
  36. package/cl.conviva.js +26 -26
  37. package/cl.core.js +325 -322
  38. package/cl.crypto.js +8 -8
  39. package/cl.dash.js +82 -82
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +80 -80
  42. package/cl.hlssmpte.js +5 -5
  43. package/cl.htmlcue.js +26 -26
  44. package/cl.ima.js +18 -18
  45. package/cl.mediatailor.js +3 -3
  46. package/cl.mse.js +292 -292
  47. package/cl.muxdata.js +12 -12
  48. package/cl.onboard.js +4 -4
  49. package/cl.persistent.js +10 -10
  50. package/cl.playlist.js +5 -5
  51. package/cl.sessions.js +10 -10
  52. package/cl.simid.js +13 -13
  53. package/cl.smooth.js +60 -60
  54. package/cl.thumbnails.js +19 -19
  55. package/cl.tizen.js +55 -55
  56. package/cl.ttml.js +22 -22
  57. package/cl.verimatrix.js +4 -4
  58. package/cl.vimond.js +8 -8
  59. package/cl.vr.js +15 -15
  60. package/cl.vtt.js +12 -12
  61. package/cl.yospace.js +3 -3
  62. package/cl.youbora.js +27 -27
  63. package/package.json +1 -1
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var oY=function(){this.m=this.f=null;this.a="";this.g=new _.J("clpp.adobe.AdobePlugin")},rY=function(a){a.f=new _.ii;a.f.on(a.m,_.Dg,function(){return pY(a)});a.f.on(a.m,_.Cg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ee,function(){return qY(a)});a.f.on(a.m,_.cg,function(b){b=b.detail;switch(b.currentState){case _.Hq:a.a.length||qY(a);s.Media.play(a.a,a.m.getPosition());break;case _.Gq:case _.yq:pY(a);break;case _.Aq:case _.tq:case _.Eq:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),pY(a),s.Media.close(a.a),a.a=""}})},qY=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.xa)},pY=function(a){s.Media.stop(a.a,a.m.getPosition())},sY=function(){};_.w(oY,_.Sv);oY.prototype.onPlayerCreated=function(a){var b=a.getConfiguration().adobe;b&&!1===b.enabled?this.g.debug("Adobe plugin is disabled."):window.s&&s.Media?(this.m=a,rY(this)):this.g.warn("Adobe API not available.")};
4
- oY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};oY.prototype.id=function(){return"adobe"};_.I("clpp.adobe.AdobeAnalyticsPlugin",oY);oY.Id="adobe";sY.prototype.create=function(){return new oY};_.Ot(new sY);};
2
+ var f=function(window){var wY=function(){this.m=this.f=null;this.a="";this.g=new _.J("clpp.adobe.AdobePlugin")},zY=function(a){a.f=new _.ii;a.f.on(a.m,_.Dg,function(){return xY(a)});a.f.on(a.m,_.Cg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ee,function(){return yY(a)});a.f.on(a.m,_.cg,function(b){b=b.detail;switch(b.currentState){case _.Hq:a.a.length||yY(a);s.Media.play(a.a,a.m.getPosition());break;case _.Gq:case _.yq:xY(a);break;case _.Aq:case _.tq:case _.Eq:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),xY(a),s.Media.close(a.a),a.a=""}})},yY=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.xa)},xY=function(a){s.Media.stop(a.a,a.m.getPosition())},AY=function(){};_.w(wY,_.aw);wY.prototype.onPlayerCreated=function(a){var b=a.getConfiguration().adobe;b&&!1===b.enabled?this.g.debug("Adobe plugin is disabled."):window.s&&s.Media?(this.m=a,zY(this)):this.g.warn("Adobe API not available.")};
4
+ wY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};wY.prototype.id=function(){return"adobe"};_.I("clpp.adobe.AdobeAnalyticsPlugin",wY);wY.Id="adobe";AY.prototype.create=function(){return new wY};_.Xt(new AY);};
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));}
package/cjs/cl.airplay.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var mY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Wh(function(){a.m.play()["catch"](function(){})});this.h=new _.ii},nY=function(){};_.w(mY,_.Sv);_.r=mY.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.r.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Tm.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.xn.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.Tm=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.K(_.Fc,{canCast:this.f}))};_.r.xn=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Ec:_.Dc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Hq)this.l?this.m.play()["catch"](function(){}):this.o.fa(.01);this.m.trigger(new _.K(a))};_.r.Rb=function(){return this.j};
4
- _.r.Tf=function(){return this.f};_.r.oo=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.I("clpp.airplay.AirPlayPlugin",mY);mY.prototype.showCastMenu=mY.prototype.oo;mY.prototype.canCast=mY.prototype.Tf;mY.prototype.isCasting=mY.prototype.Rb;mY.Id="airplay";nY.prototype.create=function(){return new mY};_.Ot(new nY);};
2
+ var f=function(window){var uY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Wh(function(){a.m.play()["catch"](function(){})});this.h=new _.ii},vY=function(){};_.w(uY,_.aw);_.r=uY.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.r.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Um.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.zn.bind(this)))};
3
+ _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.Um=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.K(_.Fc,{canCast:this.f}))};_.r.zn=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Ec:_.Dc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Hq)this.l?this.m.play()["catch"](function(){}):this.o.ga(.01);this.m.trigger(new _.K(a))};_.r.Sb=function(){return this.j};
4
+ _.r.Tf=function(){return this.f};_.r.po=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.I("clpp.airplay.AirPlayPlugin",uY);uY.prototype.showCastMenu=uY.prototype.po;uY.prototype.canCast=uY.prototype.Tf;uY.prototype.isCasting=uY.prototype.Sb;uY.Id="airplay";vY.prototype.create=function(){return new uY};_.Xt(new vY);};
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,11 +1,11 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var eY=function(a,b){this.m=a;this.f=b;this.a=new _.ii;this.h=!1},fY=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.sk();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.xa};b.prototype.getVersion=function(){return _.ia};b.prototype.getOSName=function(){return this.a.os};b.prototype.getDeviceVersion=function(){return this.a.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?
3
- 0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},gY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.ii;this.j=!1},hY=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===_.fg&&a.h.setUUID(f))},iY=
4
- function(a,b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var d in c)a.a.setCustomParameter(d,c[d]);a.o.on(a.m,_.je,a.Sj.bind(a));a.l=fY(a.m);a.a.attachPlayer(a.l)},jY=function(a,b){_.li(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},kY=function(){return!window.SmartLib||!window.GenericPlayerApi},lY=function(){};_.r=eY.prototype;
5
- _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.cg,this.Vj.bind(this));b.on(a,_.Yc,this.Tj.bind(this));b.on(a,"seek",this.Uj.bind(this))};_.r.Tj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Vj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.yq&&c.notifyStallEnd(!b.isPaused());switch(d){case _.yq:c.notifyStallStart();break;case _.Hq:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Gq:c.notifyPause()}};
6
- _.r.Uj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.li(this.a),this.a=null)};_.w(gY,_.Sv);_.r=gY.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(kY())return a.onError(new _.N(1,9,11E3));this.j=!0;hY(this,d);iY(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.N(1,9,11001,{bpkErrorCode:f,message:e}));jY(c,void 0)}else b.url=e.getURL(),c.f=new eY(c.m,c.l),c.f.init()})}};
7
- _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.Sj=function(a){a=a.detail;if(7003===a.code)jY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.O)switch(a.category){case 3:jY(this,SmartLib.BPDecodingError);break;case 1:jY(this,SmartLib.BPNetworkingError);break;case 6:jY(this,SmartLib.BPAccessRightError);break;default:jY(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){kY()||jY(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
- _.I("clpp.broadpeak.BroadpeakPlugin",gY);gY.isSdkMissing=kY;gY.Id="broadpeak";lY.prototype.create=function(){return new gY};_.Ot(new lY);};
2
+ var f=function(window){var mY=function(a,b){this.m=a;this.f=b;this.a=new _.ii;this.h=!1},nY=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.sk();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.xa};b.prototype.getVersion=function(){return _.ia};b.prototype.getOSName=function(){return this.a.os};b.prototype.getDeviceVersion=function(){return this.a.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?
3
+ 0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},oY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.ii;this.j=!1},pY=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===_.fg&&a.h.setUUID(f))},qY=
4
+ function(a,b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var d in c)a.a.setCustomParameter(d,c[d]);a.o.on(a.m,_.je,a.Tj.bind(a));a.l=nY(a.m);a.a.attachPlayer(a.l)},rY=function(a,b){_.li(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},sY=function(){return!window.SmartLib||!window.GenericPlayerApi},tY=function(){};_.r=mY.prototype;
5
+ _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.cg,this.Wj.bind(this));b.on(a,_.Yc,this.Uj.bind(this));b.on(a,"seek",this.Vj.bind(this))};_.r.Uj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Wj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.yq&&c.notifyStallEnd(!b.isPaused());switch(d){case _.yq:c.notifyStallStart();break;case _.Hq:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Gq:c.notifyPause()}};
6
+ _.r.Vj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.li(this.a),this.a=null)};_.w(oY,_.aw);_.r=oY.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(sY())return a.onError(new _.N(1,9,11E3));this.j=!0;pY(this,d);qY(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.N(1,9,11001,{bpkErrorCode:f,message:e}));rY(c,void 0)}else b.url=e.getURL(),c.f=new mY(c.m,c.l),c.f.init()})}};
7
+ _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.Tj=function(a){a=a.detail;if(7003===a.code)rY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.O)switch(a.category){case 3:rY(this,SmartLib.BPDecodingError);break;case 1:rY(this,SmartLib.BPNetworkingError);break;case 6:rY(this,SmartLib.BPAccessRightError);break;default:rY(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){sY()||rY(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
+ _.I("clpp.broadpeak.BroadpeakPlugin",oY);oY.isSdkMissing=sY;oY.Id="broadpeak";tY.prototype.create=function(){return new oY};_.Xt(new tY);};
9
9
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
10
10
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
11
11
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.cast.js CHANGED
@@ -1,120 +1,120 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var qW="Cannot seek during ads playout.",rW="Cannot switch track",sW="Media session does not exist.",tW="No receivers available",uW="Reset ABR functionality not available on cast.",vW="SDK not yet ready",wW="Sender is destroyed.",xW="clpp.cast.CastProxy",yW="clpp.cast.Player",zW="clpp.cast.Receiver",AW="urn:x-cast:castlabs",BW="urn:x-cast:com.google.cast.media",CW=function(a){return _.H(function(b){return 1==b.a?_.x(b,a.Qc(_.Xe),2):_.x(b,a.Qc(_.We),0)})},DW=function(a,b){this.log=new _.J(b);this.player=
3
- a;this.j=null;this.f=_.tq;this.l=_.uq;this.h=2;this.B=Date.now();this.A=-1},EW=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.pe){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Se?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.k?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},FW=function(a){if(typeof a!==_.fg)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
- "Infinity"===c?Infinity:c})}catch(b){return a}},GW=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.H(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.el(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.ck(a.url);return _.x(q,c.fetch(l).S,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Oj(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},HW=function(a,b){if(window.chrome&&
5
- chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Mg:return d.FMP4;case _.Lg:return b===_.Fk?d.MPEG2_TS:c.TS;case _.Qc:return c.AAC;case _.Rc:return c.AC3;case _.Sc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.Tc:return c.FMP4}},JW=function(a){a=
6
- void 0===a?IW:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.N(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},KW=function(a){DW.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.a=null;this.w=this.gc.bind(this)},LW=function(){this.g=new _.J("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},MW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},OW=function(a,b){var c=MW(a);return NW(a,b).find(function(d){return c.includes(d.id)})||null},NW=function(a,b){return a.h.filter(function(c){return c.type===b})},QW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.S){var e=a.Aa();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;PW(a,b)},function(f){a.f[b]=null;a.g.debug(rW,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){PW(a,b)},function(f){a.g.debug(rW,f)}))},PW=function(a,b){b===_.T?a.a.trigger(new _.K(_.Wc)):b===_.S&&a.a.trigger(new _.K(_.ng))},UW=function(a,b,c,d){_.mm.call(this);this.g=new _.J(_.sd);this.ba=a;this.o=new _.Yh(b);this.Y=c;this.ga=d;this.h=this.J=
9
- _.tm();this.C=[];this.B=0;this.L=new _.vk;this.G=this.l=this.a=null;this.A=this.w=!1;this.ja="";this.Da=1E6;this.f=new LW;this.f.initialize(this);this.j=new KW(this);this.H=new _.ii;this.K=null;this.I=new Set;this.P=this.Vm.bind(this);this.xa=this.rn.bind(this);this.ca=this.hn.bind(this);this.T=this.Zm.bind(this);this.N=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){RW(!0)},0)}});SW(this);TW.add(this)},
10
- VW=function(a){var b,c;return _.H(function(d){if(1==d.a)return TW["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.xa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Y=null;a.ga=null;_.y(d)})},dX=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(ZW);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=JW(ZW[b]);return Object.assign(b,a)},iX=function(a){var b=void 0===b?IW:b;return Object.values(ZW).includes(a)?a:b},jX=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},SW=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
- a.ba.length){a.w=!0;a.o.Qg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ba;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.xa);kX&&a.o.fa(.02)}},lX=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
13
- null;a=null===a?null:a+b;return null===a?b:a},nX=function(a,b){mX(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ca);b.addMessageListener(AW,a.T)},mX=function(a,b){a.a=b;a.a&&(a.H.release(),a.G=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.l),a.H.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Wj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.gn.bind(a)),
14
- a.j&&a.j.init(),a.trigger(new _.K(_.Ee)))},oX=function(a){return _.H(function(b){return a.Rb()?b.F(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},pX=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,E,G;return _.H(function(B){switch(B.a){case 1:return c=chrome.cast.media.StreamType,d=_.fw,_.x(B,oX(a),2);case 2:if(!b)return B["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=
15
- b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.kc;m=h.audioMimeType;g.hlsVideoSegmentFormat=HW(l,d.VIDEO);g.hlsSegmentFormat=HW(m,d.AUDIO);if(!b.rb){B.F(3);break}if(!a.N){B.F(4);break}return _.x(B,Promise.resolve(a.N(b.rb)),5);case 5:if(n=B.f)b.rb=n;case 4:a.h=b.rb;a.C=_.Lq(a.h);a.B=a.C.findIndex(function(F){return F.url===b.source.url});if(!b.rb.remoteTextTracks){B.F(6);break}return _.x(B,Promise.all(b.rb.remoteTextTracks.map(a.kl.bind(a))),7);case 7:p=B.f,g.tracks=p.filter(function(F){return F}),b.rb.remoteTextTracks=
16
- void 0;case 6:delete b.rb.autoplay,b.rb.startTime=null,g.customData={playerConfiguration:EW(b.rb)};case 3:q=a.Kb()||{};t=iX(q.metadataType);typeof b.zg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.zg});b.source.name&&(z={metadataType:t,title:b.source.name});A=jX(q);if(E=dX(Object.assign({},v,z,A)))g.metadata=E;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.Zc&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.x(B,f.loadMedia(G),0)}})},
17
- qX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.H(function(f){(d=a.f.Aa())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.qa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.x(f,pX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),zg:a.getPresentationStartTime(),autoplay:b,rb:a.h}),0)})},RW=function(a){if(a){a=_.u(TW);for(var b=a.next();!b.done;b=a.next())SW(b.value)}},sX=function(a,b,c){_.mm.call(this);this.f=a;this.h=b;this.j=typeof c===_.pe?c:this.$n;
18
- this.a=rX(this);this.g=new _.J(xW);this.f&&this.forwardEventsTo(this.f)},rX=function(a){return new UW(a.h,function(){a.trigger(new _.K(_.fd))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.ih&&(d.preferredAudioLanguage=c.ih);c.ij&&(d.preferredTextLanguage=c.ij);_.zt(a.f,null);a.trigger(new _.K("castingended"));a.j(b,d)},function(){return tX(a)})},tX=function(a){var b;
19
- return _.H(function(c){if(1==c.a)return a.trigger(new _.K(_.ed)),b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.zt(a.f,a.a);_.y(c)})},uX=function(a){DW.call(this,a,"clpp.cast.StateManager");this.I=this.ak.bind(this);this.H=this.$j.bind(this);this.w=this.cn.bind(this);this.o=this.Um.bind(this);this.K=this.ck.bind(this);this.J=this.bk.bind(this);this.L=this.un.bind(this);this.G=this.fn.bind(this);this.C=this.Zj.bind(this);this.a=this.Yj.bind(this)},vX=function(a,b,c,d,e){this.a=a;
20
- this.f=b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},wX=function(a){this.a=a},yX=function(a){this.m=a;this.a=null;this.h=this.dk.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,
21
- cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];xX().addEventListener(this.f,this.h)},BX=function(a,b,c){var d,e,f,g,h,l,m;return _.H(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.C(n,2);zX=!1;e=_.ck(d);return _.x(n,c.fetch(e).S,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.Q.da(f.data),h=new DOMParser,l=h.parseFromString(g,_.mg),l.getElementsByTagName("vmap:VMAP").length)_.Kh("VMAP detected."),a.vmapAdsRequest=AX(g);else if(l.getElementsByTagName("VAST").length){_.Kh("VAST detected.");
22
- var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=AX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Kh("Unsupported schema."),zX=!0;return _.vh(n,0)}m=_.D(n);_.Kh("Failed to fetch an ad",m);zX=!0;_.y(n)})},AX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},xX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},DX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
- -1!==a.getPosition()){var d=null;(c=CX(a,c))&&(d={ad:c});a.m.trigger(new _.K(b,d))}},EX=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},CX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.fg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.fg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=
24
- g.position}).sort(function(g,h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new vX(d,e,b.index,b.total,f)}return c},FX=function(a){this.Ya=a;this.a=this.f.bind(this)},GX=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},HX=function(a){var b=a.dashTimedMetadata,c=_.Bg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Ag)?
25
- _.Di:_.yg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},IX=function(){this.g=new _.J("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.On.bind(this);this.a=this.f=null},JX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},LX=function(a){a.a=JX().getTextTracksManager();var b=a.a.getTracks();a.j=KX(_.S,b)},MX=function(a,b,c,d){c=_.Hi(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.T?f=a.getAudioTracks():b===_.S&&(f=a.la());if(c=c.find(function(h){var l=_.Cj(h);return f.some(function(m){m=_.Cj(m.language||"");return _.Dj(l,m)})})){var g=_.Cj(c);c=f.filter(function(h){h=_.Cj(h.language||"");return _.Dj(g,h)});f=c.length?c:f;e=e||!!c.length}_.Q.lf(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.T?a.Ia(e):b===_.S&&a.Xa(e))},KX=function(a,b){for(var c=[],d=_.u(b),
27
- e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Dk(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.Lk(f.id,f));c.push(f)}return c},NX=function(){_.mm.call(this);this.g=new _.J(yW);this.h=this.w=_.tm();this.A=null;
28
- this.l=-1;this.G=new _.vk;this.f=this.o=this.j=this.a=this.B=null;this.C=!1},OX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},RX=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.Ym(d);if(e){var f=[_.Fd];_.Lq(a)[0].type!==_.Nc&&f.unshift(_.Hd);d.preferredDrmSystem===_.Fd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
- h=e.Pa[g];h?(d=g===_.Hd?cast.framework.ContentProtection.WIDEVINE:g===_.Fd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},PX(b,h,a,d),QX(b,h,a,d)):c()}else c()}else c()},PX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.ck({method:_.tb,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);
30
- e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},QX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.H(function(h){return 1==h.a?(g=_.gk(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Oj(g.data))})}:a.licenseHandler=void 0},SX=function(){this.a=!1;this.g=new _.J(zW);this.f=this.m=null;this.h=new Set;this.A=this.en.bind(this);
31
- this.w=this.Xj.bind(this);this.j=null;this.o=new _.ii;this.l=null},UX=function(){return TX||(TX=new SX)},VX=function(){return cast.framework.CastReceiverContext.getInstance()},WX=function(){var a=VX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},XX=function(a,b){var c=VX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;VX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
- ZX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=VX();c=(VX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Mg:_.Lg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=YX(h,_.ua),m=YX(h,_.Cb),n=_.u([]),p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);
33
- if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},YX=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},$X=function(a){this.f=a;this.a=null;this.h=new _.ii;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
34
- cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},bY=function(a,b){var c=null,d=aY(a);d&&(c={ad:d});a.f.trigger(new _.K(b,c))},aY=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===
35
- c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new vX(d,c,e,f,g)}return b},cY=function(){},dY=function(){};_.r=DW.prototype;_.r.release=function(){this.za(_.tq)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.O&&this.za(_.Eq)};
2
+ var f=function(window){var yW="Cannot seek during ads playout.",zW="Cannot switch track",AW="Media session does not exist.",BW="No receivers available",CW="Reset ABR functionality not available on cast.",DW="SDK not yet ready",EW="Sender is destroyed.",FW="clpp.cast.CastProxy",GW="clpp.cast.Player",HW="clpp.cast.Receiver",IW="urn:x-cast:castlabs",JW="urn:x-cast:com.google.cast.media",KW=function(a){return _.H(function(b){return 1==b.a?_.x(b,a.Qc(_.Xe),2):_.x(b,a.Qc(_.We),0)})},LW=function(a,b){this.log=new _.J(b);this.player=
3
+ a;this.j=null;this.f=_.tq;this.l=_.uq;this.h=2;this.B=Date.now();this.A=-1},MW=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.pe){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Se?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.k?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},NW=function(a){if(typeof a!==_.fg)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
+ "Infinity"===c?Infinity:c})}catch(b){return a}},OW=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.H(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.el(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.ck(a.url);return _.x(q,c.fetch(l).S,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Oj(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},PW=function(a,b){if(window.chrome&&
5
+ chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Mg:return d.FMP4;case _.Lg:return b===_.Fk?d.MPEG2_TS:c.TS;case _.Qc:return c.AAC;case _.Rc:return c.AC3;case _.Sc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.Tc:return c.FMP4}},RW=function(a){a=
6
+ void 0===a?QW:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.N(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},SW=function(a){LW.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.gc.bind(this)},TW=function(){this.g=new _.J("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},UW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},WW=function(a,b){var c=UW(a);return VW(a,b).find(function(d){return c.includes(d.id)})||null},VW=function(a,b){return a.h.filter(function(c){return c.type===b})},YW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.S){var e=a.Aa();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;XW(a,b)},function(f){a.f[b]=null;a.g.debug(zW,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){XW(a,b)},function(f){a.g.debug(zW,f)}))},XW=function(a,b){b===_.T?a.a.trigger(new _.K(_.Wc)):b===_.S&&a.a.trigger(new _.K(_.ng))},bX=function(a,b,c,d){_.mm.call(this);this.g=new _.J(_.sd);this.ca=a;this.o=new _.Yh(b);this.Y=c;this.ha=d;this.h=this.J=
9
+ _.tm();this.C=[];this.B=0;this.L=new _.vk;this.G=this.l=this.a=null;this.A=this.w=!1;this.ja="";this.Da=1E6;this.f=new TW;this.f.initialize(this);this.j=new SW(this);this.H=new _.ii;this.K=null;this.I=new Set;this.P=this.Wm.bind(this);this.xa=this.tn.bind(this);this.da=this.jn.bind(this);this.T=this.$m.bind(this);this.N=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){ZW(!0)},0)}});$W(this);aX.add(this)},
10
+ cX=function(a){var b,c;return _.H(function(d){if(1==d.a)return aX["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.xa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Y=null;a.ha=null;_.y(d)})},lX=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(gX);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=RW(gX[b]);return Object.assign(b,a)},qX=function(a){var b=void 0===b?QW:b;return Object.values(gX).includes(a)?a:b},rX=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},$W=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
+ a.ca.length){a.w=!0;a.o.Qg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ca;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.xa);sX&&a.o.ga(.02)}},tX=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
13
+ null;a=null===a?null:a+b;return null===a?b:a},vX=function(a,b){uX(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.da);b.addMessageListener(IW,a.T)},uX=function(a,b){a.a=b;a.a&&(a.H.release(),a.G=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.l),a.H.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Xj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.hn.bind(a)),
14
+ a.j&&a.j.init(),a.trigger(new _.K(_.Ee)))},wX=function(a){return _.H(function(b){return a.Sb()?b.F(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},xX=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,E,G;return _.H(function(B){switch(B.a){case 1:return c=chrome.cast.media.StreamType,d=_.ow,_.x(B,wX(a),2);case 2:if(!b)return B["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=
15
+ b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.kc;m=h.audioMimeType;g.hlsVideoSegmentFormat=PW(l,d.VIDEO);g.hlsSegmentFormat=PW(m,d.AUDIO);if(!b.rb){B.F(3);break}if(!a.N){B.F(4);break}return _.x(B,Promise.resolve(a.N(b.rb)),5);case 5:if(n=B.f)b.rb=n;case 4:a.h=b.rb;a.C=_.Lq(a.h);a.B=a.C.findIndex(function(F){return F.url===b.source.url});if(!b.rb.remoteTextTracks){B.F(6);break}return _.x(B,Promise.all(b.rb.remoteTextTracks.map(a.ll.bind(a))),7);case 7:p=B.f,g.tracks=p.filter(function(F){return F}),b.rb.remoteTextTracks=
16
+ void 0;case 6:delete b.rb.autoplay,b.rb.startTime=null,g.customData={playerConfiguration:MW(b.rb)};case 3:q=a.Kb()||{};t=qX(q.metadataType);typeof b.zg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.zg});b.source.name&&(z={metadataType:t,title:b.source.name});A=rX(q);if(E=lX(Object.assign({},v,z,A)))g.metadata=E;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.Zc&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.x(B,f.loadMedia(G),0)}})},
17
+ yX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.H(function(f){(d=a.f.Aa())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.qa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.x(f,xX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),zg:a.getPresentationStartTime(),autoplay:b,rb:a.h}),0)})},ZW=function(a){if(a){a=_.u(aX);for(var b=a.next();!b.done;b=a.next())$W(b.value)}},AX=function(a,b,c){_.mm.call(this);this.f=a;this.h=b;this.j=typeof c===_.pe?c:this.bo;
18
+ this.a=zX(this);this.g=new _.J(FW);this.f&&this.forwardEventsTo(this.f)},zX=function(a){return new bX(a.h,function(){a.trigger(new _.K(_.fd))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.ih&&(d.preferredAudioLanguage=c.ih);c.kj&&(d.preferredTextLanguage=c.kj);_.It(a.f,null);a.trigger(new _.K("castingended"));a.j(b,d)},function(){return BX(a)})},BX=function(a){var b;
19
+ return _.H(function(c){if(1==c.a)return a.trigger(new _.K(_.ed)),b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.It(a.f,a.a);_.y(c)})},CX=function(a){LW.call(this,a,"clpp.cast.StateManager");this.I=this.bk.bind(this);this.H=this.ak.bind(this);this.w=this.dn.bind(this);this.o=this.Vm.bind(this);this.K=this.dk.bind(this);this.J=this.ck.bind(this);this.L=this.wn.bind(this);this.G=this.gn.bind(this);this.C=this.$j.bind(this);this.a=this.Zj.bind(this)},DX=function(a,b,c,d,e){this.a=a;
20
+ this.f=b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},EX=function(a){this.a=a},GX=function(a){this.m=a;this.a=null;this.h=this.ek.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,
21
+ cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];FX().addEventListener(this.f,this.h)},JX=function(a,b,c){var d,e,f,g,h,l,m;return _.H(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.C(n,2);HX=!1;e=_.ck(d);return _.x(n,c.fetch(e).S,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.Q.ea(f.data),h=new DOMParser,l=h.parseFromString(g,_.mg),l.getElementsByTagName("vmap:VMAP").length)_.Kh("VMAP detected."),a.vmapAdsRequest=IX(g);else if(l.getElementsByTagName("VAST").length){_.Kh("VAST detected.");
22
+ var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=IX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Kh("Unsupported schema."),HX=!0;return _.vh(n,0)}m=_.D(n);_.Kh("Failed to fetch an ad",m);HX=!0;_.y(n)})},IX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},FX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},LX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
+ -1!==a.getPosition()){var d=null;(c=KX(a,c))&&(d={ad:c});a.m.trigger(new _.K(b,d))}},MX=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},KX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.fg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.fg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=
24
+ g.position}).sort(function(g,h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new DX(d,e,b.index,b.total,f)}return c},NX=function(a){this.Ya=a;this.a=this.f.bind(this)},OX=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},PX=function(a){var b=a.dashTimedMetadata,c=_.Bg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Ag)?
25
+ _.Di:_.yg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},QX=function(){this.g=new _.J("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Qn.bind(this);this.a=this.f=null},RX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},TX=function(a){a.a=RX().getTextTracksManager();var b=a.a.getTracks();a.j=SX(_.S,b)},UX=function(a,b,c,d){c=_.Hi(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.T?f=a.getAudioTracks():b===_.S&&(f=a.la());if(c=c.find(function(h){var l=_.Cj(h);return f.some(function(m){m=_.Cj(m.language||"");return _.Dj(l,m)})})){var g=_.Cj(c);c=f.filter(function(h){h=_.Cj(h.language||"");return _.Dj(g,h)});f=c.length?c:f;e=e||!!c.length}_.Q.lf(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.T?a.Ia(e):b===_.S&&a.Xa(e))},SX=function(a,b){for(var c=[],d=_.u(b),
27
+ e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Dk(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.Lk(f.id,f));c.push(f)}return c},VX=function(){_.mm.call(this);this.g=new _.J(GW);this.h=this.w=_.tm();this.A=null;
28
+ this.l=-1;this.G=new _.vk;this.f=this.o=this.j=this.a=this.B=null;this.C=!1},WX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},ZX=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.Ym(d);if(e){var f=[_.Fd];_.Lq(a)[0].type!==_.Nc&&f.unshift(_.Hd);d.preferredDrmSystem===_.Fd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
+ h=e.Pa[g];h?(d=g===_.Hd?cast.framework.ContentProtection.WIDEVINE:g===_.Fd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},XX(b,h,a,d),YX(b,h,a,d)):c()}else c()}else c()},XX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.ck({method:_.sb,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);
30
+ e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},YX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.H(function(h){return 1==h.a?(g=_.gk(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Oj(g.data))})}:a.licenseHandler=void 0},$X=function(){this.a=!1;this.g=new _.J(HW);this.f=this.m=null;this.h=new Set;this.A=this.fn.bind(this);
31
+ this.w=this.Yj.bind(this);this.j=null;this.o=new _.ii;this.l=null},bY=function(){return aY||(aY=new $X)},cY=function(){return cast.framework.CastReceiverContext.getInstance()},dY=function(){var a=cY().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},eY=function(a,b){var c=cY().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;cY().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
+ gY=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=cY();c=(cY().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Mg:_.Lg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=fY(h,_.ua),m=fY(h,_.Bb),n=_.u([]),p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);
33
+ if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},fY=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},hY=function(a){this.f=a;this.a=null;this.h=new _.ii;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
34
+ cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},jY=function(a,b){var c=null,d=iY(a);d&&(c={ad:d});a.f.trigger(new _.K(b,c))},iY=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===
35
+ c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new DX(d,c,e,f,g)}return b},kY=function(){},lY=function(){};_.r=LW.prototype;_.r.release=function(){this.za(_.tq)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.O&&this.za(_.Eq)};
36
36
  _.r.za=function(a){if(a!==this.f)if(this.f===_.Eq&&a!==_.tq)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;this.f===_.yq?(this.A=b,this.player.trigger(new _.K(_.ad,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.yq&&this.player.trigger(new _.K(_.$c,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.mq(this.j,this.f);this.player.trigger(new _.K(_.cg,
37
- {detail:a}))}};_.I("clpp.cast.CastUtils",function(){});var IW=0,ZW={GENERIC:IW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(KW,DW);KW.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.l)};KW.prototype.destroy=function(){var a=this;return _.H(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,DW.prototype.destroy.call(a),0)})};KW.prototype.za=function(a){var b=this.player.l;b&&b.isPlayingBreak||DW.prototype.za.call(this,a)};
38
- KW.prototype.gc=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.za(_.Aq);break;case chrome.cast.media.IdleReason.ERROR:this.za(_.Eq);break;default:this.za(_.tq)}break;case chrome.cast.media.PlayerState.PLAYING:this.za(_.Hq);break;case chrome.cast.media.PlayerState.PAUSED:this.za(_.Gq);break;case chrome.cast.media.PlayerState.BUFFERING:this.za(_.yq)}};_.w(LW,_.gl);_.r=LW.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
37
+ {detail:a}))}};_.I("clpp.cast.CastUtils",function(){});var QW=0,gX={GENERIC:QW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(SW,LW);SW.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.l)};SW.prototype.destroy=function(){var a=this;return _.H(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,LW.prototype.destroy.call(a),0)})};SW.prototype.za=function(a){var b=this.player.l;b&&b.isPlayingBreak||LW.prototype.za.call(this,a)};
38
+ SW.prototype.gc=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.za(_.Aq);break;case chrome.cast.media.IdleReason.ERROR:this.za(_.Eq);break;default:this.za(_.tq)}break;case chrome.cast.media.PlayerState.PLAYING:this.za(_.Hq);break;case chrome.cast.media.PlayerState.PAUSED:this.za(_.Gq);break;case chrome.cast.media.PlayerState.BUFFERING:this.za(_.yq)}};_.w(TW,_.gl);_.r=TW.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
39
39
  _.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.Fk;break;case chrome.cast.media.TrackType.AUDIO:c=_.T;break;case chrome.cast.media.TrackType.TEXT:c=_.S}c=new _.Dk(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
40
- c.renditions.push(new _.Lk(c.id,c));return c}):[],this.a.trigger(new _.K(_.tg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return NW(this,_.Fk)};_.r.getAudioTracks=function(){return NW(this,_.T)};_.r.la=function(){return NW(this,_.S)};_.r.ma=function(){var a=this.La();return a?a.renditions[0]:null};_.r.Sa=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.Wa=function(){var a=this.Aa();return a?a.renditions[0]:null};_.r.zb=function(){return this.f[_.Fk]||null};
41
- _.r.Lb=function(){return this.f[_.T]||null};_.r.Mb=function(){return this.f[_.S]||null};_.r.La=function(){return OW(this,_.Fk)};_.r.qa=function(){return OW(this,_.T)};_.r.Aa=function(){return OW(this,_.S)};_.r.Hb=function(a){QW(this,_.Fk,a)};_.r.Ia=function(a){QW(this,_.T,a)};_.r.Xa=function(a){QW(this,_.S,a)};_.r.sb=function(a){this.Hb(a&&a.track)};_.r.Fb=function(a){this.Ia(a&&a.track)};_.r.Gb=function(a){this.Xa(a&&a.track)};_.r.addTextTrack=function(){return _.H(function(a){_.y(a)})};_.r.va=function(){return!0};
42
- LW.prototype.isAbrEnabled=LW.prototype.va;LW.prototype.addTextTrack=LW.prototype.addTextTrack;LW.prototype.setTextRendition=LW.prototype.Gb;LW.prototype.setAudioRendition=LW.prototype.Fb;LW.prototype.setVideoRendition=LW.prototype.sb;LW.prototype.setTextTrack=LW.prototype.Xa;LW.prototype.setAudioTrack=LW.prototype.Ia;LW.prototype.setVideoTrack=LW.prototype.Hb;LW.prototype.getTextTrack=LW.prototype.Aa;LW.prototype.getAudioTrack=LW.prototype.qa;LW.prototype.getVideoTrack=LW.prototype.La;
43
- LW.prototype.getLoadingTextRendition=LW.prototype.Mb;LW.prototype.getLoadingAudioRendition=LW.prototype.Lb;LW.prototype.getLoadingVideoRendition=LW.prototype.zb;LW.prototype.getTextRendition=LW.prototype.Wa;LW.prototype.getAudioRendition=LW.prototype.Sa;LW.prototype.getVideoRendition=LW.prototype.ma;LW.prototype.getTextTracks=LW.prototype.la;LW.prototype.getAudioTracks=LW.prototype.getAudioTracks;LW.prototype.getVideoTracks=LW.prototype.getVideoTracks;_.w(UW,_.mm);_.r=UW.prototype;_.r.init=function(a,b){this.h=this.J=b};_.r.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.r.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.pb)};_.r.appendLoad=function(){return Promise.reject(_.pb)};_.r.seekWith=function(){return Promise.reject(_.pb)};
44
- _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.H(function(a){_.y(a)})};_.r.Be=function(a){this.N=a};_.r.Kc=function(){return this.w};_.r.Rb=function(){return this.A};_.r.eg=function(){return this.ja};
45
- _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.H(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.N(1,8,8004,void 0);g.F(2);break}_.C(g,3);return _.x(g,e.sendMessage(a,EW(b)),5);case 5:_.vh(g,2);break;case 3:f=_.D(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.y(g)}})};
46
- _.r.cast=function(){var a=this,b,c;return _.H(function(d){if(1==d.a){if(!a.Kc())throw a.g.warn(vW),new _.N(1,8,8001,void 0);if(!kX)throw a.g.warn(tW),new _.N(1,8,8002,void 0);if(a.Rb())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.C(d,2);return _.x(d,oX(a),4)}if(2!=d.a)return _.vh(d,0);b=_.D(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.N(1,8,8E3,c);})};_.r.dg=function(){this.Rb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
- _.r.addMessageListener=function(a){typeof a===_.pe&&this.I.add(a)};_.r.removeMessageListener=function(a){typeof a===_.pe&&this.I["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?qX(this,!0):new Promise(function(b,c){if(!a.a)return c(sW);a.a.play(null,b,c)})};_.r.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(sW);a.a.pause(null,b,c)})};_.r.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
- _.r.isEnded=function(){return this.getState()===_.Aq};_.r.seek=function(a){var b=this;return this.isEnded()?qX(this,!1,a):new Promise(function(c,d){b.a||d(sW);b.l.isPlayingBreak&&d(qW);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.K(_.Dg));b.a.seek(e,function(){b.trigger(new _.K(_.Cg));c()},d)})};_.r.getPosition=function(){return this.getMediaPosition()};_.r.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.r.getDuration=function(){return this.getMediaDuration()};
49
- _.r.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.r.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(BW,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
40
+ c.renditions.push(new _.Lk(c.id,c));return c}):[],this.a.trigger(new _.K(_.tg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return VW(this,_.Fk)};_.r.getAudioTracks=function(){return VW(this,_.T)};_.r.la=function(){return VW(this,_.S)};_.r.ma=function(){var a=this.La();return a?a.renditions[0]:null};_.r.Sa=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.Wa=function(){var a=this.Aa();return a?a.renditions[0]:null};_.r.zb=function(){return this.f[_.Fk]||null};
41
+ _.r.Lb=function(){return this.f[_.T]||null};_.r.Mb=function(){return this.f[_.S]||null};_.r.La=function(){return WW(this,_.Fk)};_.r.qa=function(){return WW(this,_.T)};_.r.Aa=function(){return WW(this,_.S)};_.r.Hb=function(a){YW(this,_.Fk,a)};_.r.Ia=function(a){YW(this,_.T,a)};_.r.Xa=function(a){YW(this,_.S,a)};_.r.sb=function(a){this.Hb(a&&a.track)};_.r.Fb=function(a){this.Ia(a&&a.track)};_.r.Gb=function(a){this.Xa(a&&a.track)};_.r.addTextTrack=function(){return _.H(function(a){_.y(a)})};_.r.va=function(){return!0};
42
+ TW.prototype.isAbrEnabled=TW.prototype.va;TW.prototype.addTextTrack=TW.prototype.addTextTrack;TW.prototype.setTextRendition=TW.prototype.Gb;TW.prototype.setAudioRendition=TW.prototype.Fb;TW.prototype.setVideoRendition=TW.prototype.sb;TW.prototype.setTextTrack=TW.prototype.Xa;TW.prototype.setAudioTrack=TW.prototype.Ia;TW.prototype.setVideoTrack=TW.prototype.Hb;TW.prototype.getTextTrack=TW.prototype.Aa;TW.prototype.getAudioTrack=TW.prototype.qa;TW.prototype.getVideoTrack=TW.prototype.La;
43
+ TW.prototype.getLoadingTextRendition=TW.prototype.Mb;TW.prototype.getLoadingAudioRendition=TW.prototype.Lb;TW.prototype.getLoadingVideoRendition=TW.prototype.zb;TW.prototype.getTextRendition=TW.prototype.Wa;TW.prototype.getAudioRendition=TW.prototype.Sa;TW.prototype.getVideoRendition=TW.prototype.ma;TW.prototype.getTextTracks=TW.prototype.la;TW.prototype.getAudioTracks=TW.prototype.getAudioTracks;TW.prototype.getVideoTracks=TW.prototype.getVideoTracks;_.w(bX,_.mm);_.r=bX.prototype;_.r.init=function(a,b){this.h=this.J=b};_.r.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.r.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.ob)};_.r.appendLoad=function(){return Promise.reject(_.ob)};_.r.seekWith=function(){return Promise.reject(_.ob)};
44
+ _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.H(function(a){_.y(a)})};_.r.Be=function(a){this.N=a};_.r.Kc=function(){return this.w};_.r.Sb=function(){return this.A};_.r.eg=function(){return this.ja};
45
+ _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.H(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.N(1,8,8004,void 0);g.F(2);break}_.C(g,3);return _.x(g,e.sendMessage(a,MW(b)),5);case 5:_.vh(g,2);break;case 3:f=_.D(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.y(g)}})};
46
+ _.r.cast=function(){var a=this,b,c;return _.H(function(d){if(1==d.a){if(!a.Kc())throw a.g.warn(DW),new _.N(1,8,8001,void 0);if(!sX)throw a.g.warn(BW),new _.N(1,8,8002,void 0);if(a.Sb())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.C(d,2);return _.x(d,wX(a),4)}if(2!=d.a)return _.vh(d,0);b=_.D(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.N(1,8,8E3,c);})};_.r.dg=function(){this.Sb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
+ _.r.addMessageListener=function(a){typeof a===_.pe&&this.I.add(a)};_.r.removeMessageListener=function(a){typeof a===_.pe&&this.I["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?yX(this,!0):new Promise(function(b,c){if(!a.a)return c(AW);a.a.play(null,b,c)})};_.r.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(AW);a.a.pause(null,b,c)})};_.r.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
+ _.r.isEnded=function(){return this.getState()===_.Aq};_.r.seek=function(a){var b=this;return this.isEnded()?yX(this,!1,a):new Promise(function(c,d){b.a||d(AW);b.l.isPlayingBreak&&d(yW);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.K(_.Dg));b.a.seek(e,function(){b.trigger(new _.K(_.Cg));c()},d)})};_.r.getPosition=function(){return this.getMediaPosition()};_.r.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.r.getDuration=function(){return this.getMediaDuration()};
49
+ _.r.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.r.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(JW,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
50
50
  _.r.getVolume=function(){return this.a&&this.a.volume.level};_.r.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.r.isMuted=function(){return this.a&&this.a.volume.muted};_.r.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
51
51
  _.r.getPresentationStartTime=function(){if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};_.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.j?this.j.getState():_.uq};
52
- _.r.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?FW(this.a.customData.stats):_.sq()};_.r.isLive=function(){return Infinity===this.getDuration()};_.r.load=function(a){var b=this,c,d;return _.H(function(e){if(!b.Kc())return b.g.warn(vW),e["return"]();if(!kX)return b.g.warn(tW),e["return"]();b.C=_.Lq(a);b.h=_.vm(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,rb:b.h,kc:c.kc,audioMimeType:c.audioMimeType};return _.x(e,pX(b,d),0)})};
52
+ _.r.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?NW(this.a.customData.stats):_.sq()};_.r.isLive=function(){return Infinity===this.getDuration()};_.r.load=function(a){var b=this,c,d;return _.H(function(e){if(!b.Kc())return b.g.warn(DW),e["return"]();if(!sX)return b.g.warn(BW),e["return"]();b.C=_.Lq(a);b.h=_.vm(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,rb:b.h,kc:c.kc,audioMimeType:c.audioMimeType};return _.x(e,xX(b,d),0)})};
53
53
  _.r.getBufferInfo=function(){return new _.lm};_.r.getTrackManager=function(){return this.f};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.L=a};_.r.getNetworkEngine=function(){return this.L};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.setCmsdManager=function(){};_.r.getLoadedSource=function(){return this.C[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};
54
- _.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(uW)};_.r.onError=function(a){if(a&&(this.trigger(new _.K(_.je,{detail:a})),this.j))this.j.onError(a)};_.r.namespace=function(){return _.sd};_.r.canPlay=function(){return this.Kc()?2:0};_.r.Kb=function(){return this.K};_.r.jc=function(a){this.K=dX(a)};_.r.Wf=function(){this.K=null};
55
- _.r.Kg=function(a){var b=this.Kb()||{};a={metadataType:iX(b.metadataType),title:a};this.jc(Object.assign({},b,a))};_.r.Ig=function(a){var b=this.Kb()||{},c=iX(b.metadataType);a=new chrome.cast.Image(a);this.jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.r.Hg=function(a){var b=this.Kb()||{};this.jc(Object.assign({},b,{metadataType:3,artist:a}))};_.r.Jg=function(a){var b=this.Kb()||{};a={metadataType:iX(b.metadataType),releaseDate:a};this.jc(Object.assign({},b,a))};
56
- _.r.Vm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;kX=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ja=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Qg()};
57
- _.r.rn=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;nX(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Rb()||(this.A=!0,nX(this,a.session),this.ga());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Rb()&&this.a){var b=this.a.media,c=this.f.qa(),d=this.f.Aa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Y(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
- isLive:this.isLive()},currentTime:lX(this),ij:d,ih:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(AW,this.T);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.r.hn=function(a){this.g.debug("New media session",a.mediaSession);mX(this,a.mediaSession)};_.r.gn=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.r.Zm=function(a,b){if(a===AW&&0<this.I.size){var c=FW(b);this.I.forEach(function(d){return d(c)})}};
59
- _.r.Wj=function(){this.trigger(new _.K(_.sg))};_.r.kl=function(a){var b=this,c,d;return _.H(function(e){if(1==e.a)return c=null,_.x(e,GW(a,[_.lg,_.Mc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Da++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.r.getTextDisplayer=function(){return null};var kX=!1,TW=new Set;
60
- window.__onGCastApiAvailable=RW;_.w(sX,_.mm);_.r=sX.prototype;_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.a?_.x(b,VW(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.y(b)})};_.r.$n=function(a,b){this.f&&a!==_.Aq&&a!==_.tq&&(delete b.license,this.f.load(b))};_.r.Tf=function(){return!!this.a&&this.a.Kc()&&kX};_.r.Rb=function(){return!!this.a&&this.a.Rb()};_.r.eg=function(){return this.a?this.a.eg():""};_.r.Be=function(a){this.a&&this.a.Be(a)};
54
+ _.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(CW)};_.r.onError=function(a){if(a&&(this.trigger(new _.K(_.je,{detail:a})),this.j))this.j.onError(a)};_.r.namespace=function(){return _.sd};_.r.canPlay=function(){return this.Kc()?2:0};_.r.Kb=function(){return this.K};_.r.jc=function(a){this.K=lX(a)};_.r.Wf=function(){this.K=null};
55
+ _.r.Kg=function(a){var b=this.Kb()||{};a={metadataType:qX(b.metadataType),title:a};this.jc(Object.assign({},b,a))};_.r.Ig=function(a){var b=this.Kb()||{},c=qX(b.metadataType);a=new chrome.cast.Image(a);this.jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.r.Hg=function(a){var b=this.Kb()||{};this.jc(Object.assign({},b,{metadataType:3,artist:a}))};_.r.Jg=function(a){var b=this.Kb()||{};a={metadataType:qX(b.metadataType),releaseDate:a};this.jc(Object.assign({},b,a))};
56
+ _.r.Wm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;sX=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ja=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Qg()};
57
+ _.r.tn=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;vX(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Sb()||(this.A=!0,vX(this,a.session),this.ha());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Sb()&&this.a){var b=this.a.media,c=this.f.qa(),d=this.f.Aa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Y(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
+ isLive:this.isLive()},currentTime:tX(this),kj:d,ih:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.da);a.session.removeMessageListener(IW,this.T);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.r.jn=function(a){this.g.debug("New media session",a.mediaSession);uX(this,a.mediaSession)};_.r.hn=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.r.$m=function(a,b){if(a===IW&&0<this.I.size){var c=NW(b);this.I.forEach(function(d){return d(c)})}};
59
+ _.r.Xj=function(){this.trigger(new _.K(_.sg))};_.r.ll=function(a){var b=this,c,d;return _.H(function(e){if(1==e.a)return c=null,_.x(e,OW(a,[_.lg,_.Mc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Da++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.r.getTextDisplayer=function(){return null};var sX=!1,aX=new Set;
60
+ window.__onGCastApiAvailable=ZW;_.w(AX,_.mm);_.r=AX.prototype;_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.a?_.x(b,cX(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.y(b)})};_.r.bo=function(a,b){this.f&&a!==_.Aq&&a!==_.tq&&(delete b.license,this.f.load(b))};_.r.Tf=function(){return!!this.a&&this.a.Kc()&&sX};_.r.Sb=function(){return!!this.a&&this.a.Sb()};_.r.eg=function(){return this.a?this.a.eg():""};_.r.Be=function(a){this.a&&this.a.Be(a)};
61
61
  _.r.cast=function(a){var b=this,c,d,e;return _.H(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.C(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.qa();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.Aa())l.language&&
62
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.Zc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),zg:b.f.getPresentationStartTime(),kc:m,audioMimeType:p,rb:g}}c=g;return _.x(f,tX(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.x(f,pX(b.a,c),7);case 7:_.vh(f,0);break;case 2:d=_.D(f),
63
- b.g.error("Error while trying to cast",d),e=new _.K(_.je,{detail:d}),b.trigger(e),_.y(f)}})};_.r.dg=function(){this.a&&this.a.dg()};_.r.Qj=function(a){var b=this;return _.H(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,VW(b.a),2):c.F(2)}b.a=rX(b);_.y(c)})};_.r.sendMessage=function(a){var b=this;return _.H(function(c){return b.a?_.x(c,b.a.sendMessage(AW,a),0):(b.g.warn(wW),c["return"]())})};_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(wW)};
64
- _.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(wW)};_.r.Kb=function(){return this.a&&this.a.Kb()};_.r.jc=function(a){this.a&&this.a.jc(a)};_.r.Wf=function(){this.a&&this.a.Wf()};_.r.Kg=function(a){this.a&&this.a.Kg(a)};_.r.Ig=function(a){this.a&&this.a.Ig(a)};_.r.Hg=function(a){this.a&&this.a.Hg(a)};_.r.Jg=function(a){this.a&&this.a.Jg(a)};_.I(xW,sX);sX.prototype.setContentReleaseDate=sX.prototype.Jg;sX.prototype.setContentArtist=sX.prototype.Hg;
65
- sX.prototype.setContentImage=sX.prototype.Ig;sX.prototype.setContentTitle=sX.prototype.Kg;sX.prototype.clearContentMetadata=sX.prototype.Wf;sX.prototype.setContentMetadata=sX.prototype.jc;sX.prototype.getContentMetadata=sX.prototype.Kb;sX.prototype.removeMessageListener=sX.prototype.removeMessageListener;sX.prototype.addMessageListener=sX.prototype.addMessageListener;sX.prototype.sendMessage=sX.prototype.sendMessage;sX.prototype.changeReceiverId=sX.prototype.Qj;sX.prototype.forceDisconnect=sX.prototype.dg;
66
- sX.prototype.cast=sX.prototype.cast;sX.prototype.setPlayerConfigInterceptor=sX.prototype.Be;sX.prototype.getReceiverName=sX.prototype.eg;sX.prototype.isCasting=sX.prototype.Rb;sX.prototype.canCast=sX.prototype.Tf;sX.prototype.destroy=sX.prototype.destroy;_.w(uX,DW);_.r=uX.prototype;
62
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.Zc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),zg:b.f.getPresentationStartTime(),kc:m,audioMimeType:p,rb:g}}c=g;return _.x(f,BX(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.x(f,xX(b.a,c),7);case 7:_.vh(f,0);break;case 2:d=_.D(f),
63
+ b.g.error("Error while trying to cast",d),e=new _.K(_.je,{detail:d}),b.trigger(e),_.y(f)}})};_.r.dg=function(){this.a&&this.a.dg()};_.r.Rj=function(a){var b=this;return _.H(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,cX(b.a),2):c.F(2)}b.a=zX(b);_.y(c)})};_.r.sendMessage=function(a){var b=this;return _.H(function(c){return b.a?_.x(c,b.a.sendMessage(IW,a),0):(b.g.warn(EW),c["return"]())})};_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(EW)};
64
+ _.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(EW)};_.r.Kb=function(){return this.a&&this.a.Kb()};_.r.jc=function(a){this.a&&this.a.jc(a)};_.r.Wf=function(){this.a&&this.a.Wf()};_.r.Kg=function(a){this.a&&this.a.Kg(a)};_.r.Ig=function(a){this.a&&this.a.Ig(a)};_.r.Hg=function(a){this.a&&this.a.Hg(a)};_.r.Jg=function(a){this.a&&this.a.Jg(a)};_.I(FW,AX);AX.prototype.setContentReleaseDate=AX.prototype.Jg;AX.prototype.setContentArtist=AX.prototype.Hg;
65
+ AX.prototype.setContentImage=AX.prototype.Ig;AX.prototype.setContentTitle=AX.prototype.Kg;AX.prototype.clearContentMetadata=AX.prototype.Wf;AX.prototype.setContentMetadata=AX.prototype.jc;AX.prototype.getContentMetadata=AX.prototype.Kb;AX.prototype.removeMessageListener=AX.prototype.removeMessageListener;AX.prototype.addMessageListener=AX.prototype.addMessageListener;AX.prototype.sendMessage=AX.prototype.sendMessage;AX.prototype.changeReceiverId=AX.prototype.Rj;AX.prototype.forceDisconnect=AX.prototype.dg;
66
+ AX.prototype.cast=AX.prototype.cast;AX.prototype.setPlayerConfigInterceptor=AX.prototype.Be;AX.prototype.getReceiverName=AX.prototype.eg;AX.prototype.isCasting=AX.prototype.Sb;AX.prototype.canCast=AX.prototype.Tf;AX.prototype.destroy=AX.prototype.destroy;_.w(CX,LW);_.r=CX.prototype;
67
67
  _.r.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.K);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.L);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.C);b.addEventListener(a.BITRATE_CHANGED,this.a)};
68
68
  _.r.destroy=function(){var a=this,b,c;return _.H(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.K);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.L);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
69
- a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,DW.prototype.destroy.call(a),0)})};_.r.ak=function(){this.player.trigger(new _.K(_.gf));this.za(_.Hq)};_.r.$j=function(){this.za(_.Gq)};_.r.cn=function(){this.za(_.Aq)};_.r.Um=function(a){a.isBuffering?this.za(_.yq):(a=this.player.isPaused()?_.Gq:_.Hq,this.za(a))};_.r.ck=function(){this.h=1;this.player.trigger(new _.K(_.Dg))};_.r.bk=function(){this.player.trigger(new _.K(_.Cg))};_.r.un=function(){this.h=2};_.r.fn=function(){this.za(_.Fq)};
70
- _.r.Yj=function(a){var b=this.player.getStats();this.player.trigger(new _.K(_.Yc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Zj=function(a){a=new _.N(_.O,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.K(_.je,{detail:a}));this.za(_.Eq)};_.r=vX.prototype;_.r.wb=function(){return"Google Cast Framework"};_.r.xb=function(){return cast.framework.VERSION};_.r.Bb=function(){return 0};_.r.getId=function(){return""};_.r.getCreativeId=function(){return""};_.r.$b=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};_.r.getPosition=function(){return 0};
69
+ a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,LW.prototype.destroy.call(a),0)})};_.r.bk=function(){this.player.trigger(new _.K(_.gf));this.za(_.Hq)};_.r.ak=function(){this.za(_.Gq)};_.r.dn=function(){this.za(_.Aq)};_.r.Vm=function(a){a.isBuffering?this.za(_.yq):(a=this.player.isPaused()?_.Gq:_.Hq,this.za(a))};_.r.dk=function(){this.h=1;this.player.trigger(new _.K(_.Dg))};_.r.ck=function(){this.player.trigger(new _.K(_.Cg))};_.r.wn=function(){this.h=2};_.r.gn=function(){this.za(_.Fq)};
70
+ _.r.Zj=function(a){var b=this.player.getStats();this.player.trigger(new _.K(_.Yc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.$j=function(a){a=new _.N(_.O,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.K(_.je,{detail:a}));this.za(_.Eq)};_.r=DX.prototype;_.r.wb=function(){return"Google Cast Framework"};_.r.xb=function(){return cast.framework.VERSION};_.r.Bb=function(){return 0};_.r.getId=function(){return""};_.r.getCreativeId=function(){return""};_.r.ac=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};_.r.getPosition=function(){return 0};
71
71
  _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.ec=function(){return!1};_.r.yb=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.ob=function(){return 0};_.r.nb=function(){return 0};_.r.Ua=function(){return 0};_.r.Va=function(){switch(this.Nb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.j};_.r.Nb=function(){return this.f.position};_.r.Ab=function(){return this.l};
72
- _.r.pb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.cc=function(){return null};vX.prototype.getVideoElement=vX.prototype.cc;vX.prototype.getWrapperCreativeIds=vX.prototype.getWrapperCreativeIds;vX.prototype.getWrapperAdSystems=vX.prototype.getWrapperAdSystems;vX.prototype.canSeek=vX.prototype.canSeek;vX.prototype.getWrapperAdIds=vX.prototype.getWrapperAdIds;
73
- vX.prototype.getSequenceLength=vX.prototype.pb;vX.prototype.getPositionInSequence=vX.prototype.Ab;vX.prototype.getPodTimeOffset=vX.prototype.Nb;vX.prototype.getPodIndex=vX.prototype.getPodIndex;vX.prototype.getPodType=vX.prototype.Va;vX.prototype.getMediaBitrate=vX.prototype.Ua;vX.prototype.getMediaHeight=vX.prototype.nb;vX.prototype.getMediaWidth=vX.prototype.ob;vX.prototype.getMediaUrl=vX.prototype.getMediaUrl;vX.prototype.getClickThroughUrl=vX.prototype.yb;vX.prototype.isBumper=vX.prototype.ec;
74
- vX.prototype.getSkipTimeOffset=vX.prototype.getSkipTimeOffset;vX.prototype.getPosition=vX.prototype.getPosition;vX.prototype.getDuration=vX.prototype.getDuration;vX.prototype.getTitle=vX.prototype.getTitle;vX.prototype.getAdvertiserName=vX.prototype.getAdvertiserName;vX.prototype.getAdSystem=vX.prototype.getAdSystem;vX.prototype.getApiFramework=vX.prototype.getApiFramework;vX.prototype.getSourceId=vX.prototype.$b;vX.prototype.getCreativeId=vX.prototype.getCreativeId;vX.prototype.getId=vX.prototype.getId;
75
- vX.prototype.getTechnology=vX.prototype.Bb;vX.prototype.getAdManagerVersion=vX.prototype.xb;vX.prototype.getAdManagerName=vX.prototype.wb;wX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};wX.prototype.Qb=function(){return!!this.a.find(function(a){return 0===a.position})};wX.prototype.Pb=function(){return!!this.a.find(function(a){return-1===a.position})};wX.prototype.hasPostroll=wX.prototype.Pb;wX.prototype.hasPreroll=wX.prototype.Qb;wX.prototype.getCuePoints=wX.prototype.getCuePoints;_.r=yX.prototype;_.r.load=function(){var a=this;return _.H(function(b){zX&&(zX=!1,EX(a,0));_.y(b)})};_.r.start=function(){return _.H(function(a){xX().play();_.y(a)})};_.r.jd=function(){};_.r.resume=function(){-1!==this.getPosition()&&xX().play()};_.r.pause=function(){-1!==this.getPosition()&&xX().pause()};_.r.skip=function(){};_.r.getVolume=function(){return this.m.getVolume()||0};_.r.setVolume=function(a){this.m.setVolume(a)};
76
- _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.r.fd=function(){return!0};_.r.Cc=function(){var a=this;return _.H(function(b){xX().removeEventListener(a.f,a.h);_.y(b)})};
77
- _.r.dk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=xX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.K(_.Cc,{adsTimeline:new wX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:DX(this,_.rc,a);break;case cast.framework.events.EventType.BREAK_STARTED:DX(this,_.hc,a);break;case cast.framework.events.EventType.BREAK_ENDED:DX(this,_.ic,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:DX(this,
78
- _.yc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(DX(this,_.xc,a),DX(this,_.zc,a)):a.endedReason===b.STOPPED?DX(this,_.zc,a):a.endedReason===b.END_OF_STREAM?(DX(this,_.lc,a),DX(this,_.zc,a)):a.endedReason===b.ERROR&&EX(this,1);break;case cast.framework.events.EventType.PLAYING:DX(this,_.vc,a);break;case cast.framework.events.EventType.PAUSE:DX(this,_.tc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?DX(this,_.jc,a):DX(this,_.vc,a)}};
79
- yX.prototype.getPosition=yX.prototype.getPosition;yX.prototype.setVolume=yX.prototype.setVolume;yX.prototype.getVolume=yX.prototype.getVolume;yX.prototype.skip=yX.prototype.skip;yX.prototype.pause=yX.prototype.pause;yX.prototype.resume=yX.prototype.resume;var zX=!1;FX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(GX(),this.a)};FX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(GX(),this.a)};FX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return HX(a)})};
80
- FX.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.pg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.qg}b&&this.Ya(new _.K(b,{detail:HX(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Ya(new _.K(_.og,{detail:b.value}))};_.w(IX,_.gl);_.r=IX.prototype;_.r.initialize=function(a){this.m=a;JX().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;JX().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.la=function(){return this.j};_.r.ma=function(){return null};
72
+ _.r.pb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.dc=function(){return null};DX.prototype.getVideoElement=DX.prototype.dc;DX.prototype.getWrapperCreativeIds=DX.prototype.getWrapperCreativeIds;DX.prototype.getWrapperAdSystems=DX.prototype.getWrapperAdSystems;DX.prototype.canSeek=DX.prototype.canSeek;DX.prototype.getWrapperAdIds=DX.prototype.getWrapperAdIds;
73
+ DX.prototype.getSequenceLength=DX.prototype.pb;DX.prototype.getPositionInSequence=DX.prototype.Ab;DX.prototype.getPodTimeOffset=DX.prototype.Nb;DX.prototype.getPodIndex=DX.prototype.getPodIndex;DX.prototype.getPodType=DX.prototype.Va;DX.prototype.getMediaBitrate=DX.prototype.Ua;DX.prototype.getMediaHeight=DX.prototype.nb;DX.prototype.getMediaWidth=DX.prototype.ob;DX.prototype.getMediaUrl=DX.prototype.getMediaUrl;DX.prototype.getClickThroughUrl=DX.prototype.yb;DX.prototype.isBumper=DX.prototype.ec;
74
+ DX.prototype.getSkipTimeOffset=DX.prototype.getSkipTimeOffset;DX.prototype.getPosition=DX.prototype.getPosition;DX.prototype.getDuration=DX.prototype.getDuration;DX.prototype.getTitle=DX.prototype.getTitle;DX.prototype.getAdvertiserName=DX.prototype.getAdvertiserName;DX.prototype.getAdSystem=DX.prototype.getAdSystem;DX.prototype.getApiFramework=DX.prototype.getApiFramework;DX.prototype.getSourceId=DX.prototype.ac;DX.prototype.getCreativeId=DX.prototype.getCreativeId;DX.prototype.getId=DX.prototype.getId;
75
+ DX.prototype.getTechnology=DX.prototype.Bb;DX.prototype.getAdManagerVersion=DX.prototype.xb;DX.prototype.getAdManagerName=DX.prototype.wb;EX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};EX.prototype.Qb=function(){return!!this.a.find(function(a){return 0===a.position})};EX.prototype.Pb=function(){return!!this.a.find(function(a){return-1===a.position})};EX.prototype.hasPostroll=EX.prototype.Pb;EX.prototype.hasPreroll=EX.prototype.Qb;EX.prototype.getCuePoints=EX.prototype.getCuePoints;_.r=GX.prototype;_.r.load=function(){var a=this;return _.H(function(b){HX&&(HX=!1,MX(a,0));_.y(b)})};_.r.start=function(){return _.H(function(a){FX().play();_.y(a)})};_.r.jd=function(){};_.r.resume=function(){-1!==this.getPosition()&&FX().play()};_.r.pause=function(){-1!==this.getPosition()&&FX().pause()};_.r.skip=function(){};_.r.getVolume=function(){return this.m.getVolume()||0};_.r.setVolume=function(a){this.m.setVolume(a)};
76
+ _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.r.fd=function(){return!0};_.r.Cc=function(){var a=this;return _.H(function(b){FX().removeEventListener(a.f,a.h);_.y(b)})};
77
+ _.r.ek=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=FX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.K(_.Cc,{adsTimeline:new EX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:LX(this,_.rc,a);break;case cast.framework.events.EventType.BREAK_STARTED:LX(this,_.hc,a);break;case cast.framework.events.EventType.BREAK_ENDED:LX(this,_.ic,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:LX(this,
78
+ _.yc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(LX(this,_.wc,a),LX(this,_.zc,a)):a.endedReason===b.STOPPED?LX(this,_.zc,a):a.endedReason===b.END_OF_STREAM?(LX(this,_.lc,a),LX(this,_.zc,a)):a.endedReason===b.ERROR&&MX(this,1);break;case cast.framework.events.EventType.PLAYING:LX(this,_.vc,a);break;case cast.framework.events.EventType.PAUSE:LX(this,_.tc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?LX(this,_.jc,a):LX(this,_.vc,a)}};
79
+ GX.prototype.getPosition=GX.prototype.getPosition;GX.prototype.setVolume=GX.prototype.setVolume;GX.prototype.getVolume=GX.prototype.getVolume;GX.prototype.skip=GX.prototype.skip;GX.prototype.pause=GX.prototype.pause;GX.prototype.resume=GX.prototype.resume;var HX=!1;NX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(OX(),this.a)};NX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(OX(),this.a)};NX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return PX(a)})};
80
+ NX.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.pg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.qg}b&&this.Ya(new _.K(b,{detail:PX(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Ya(new _.K(_.og,{detail:b.value}))};_.w(QX,_.gl);_.r=QX.prototype;_.r.initialize=function(a){this.m=a;RX().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;RX().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.la=function(){return this.j};_.r.ma=function(){return null};
81
81
  _.r.Sa=function(){var a=this.qa();return a&&a.renditions[0]};_.r.Wa=function(){var a=this.Aa();return a&&a.renditions[0]};_.r.zb=function(){return null};_.r.Lb=function(){return null};_.r.Mb=function(){return null};_.r.La=function(){return null};_.r.qa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
82
82
  _.r.Aa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.la().find(function(c){return c.id===b})||null)}return a};_.r.Hb=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.Ia=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.Xa=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.sb=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Fb=function(a){this.Ia(a&&a.track)};
83
83
  _.r.Gb=function(a){this.Xa(a&&a.track)};
84
- _.r.addTextTrack=function(a){var b=this,c,d,e;return _.H(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,GW(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),LX(b)}catch(g){throw b.g.warn("failed on track",
85
- a),g;}}_.y(f)})};_.r.va=function(){return!0};_.r.On=function(){this.f=JX().getAudioTracksManager();var a=this.f.getTracks();this.h=KX(_.T,a);LX(this);a=this.m.getConfiguration();MX(this,_.T,a.preferredAudioLanguage,a.preferredAudioRole);MX(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};IX.prototype.isAbrEnabled=IX.prototype.va;IX.prototype.addTextTrack=IX.prototype.addTextTrack;IX.prototype.setTextRendition=IX.prototype.Gb;IX.prototype.setAudioRendition=IX.prototype.Fb;
86
- IX.prototype.setVideoRendition=IX.prototype.sb;IX.prototype.setTextTrack=IX.prototype.Xa;IX.prototype.setAudioTrack=IX.prototype.Ia;IX.prototype.setVideoTrack=IX.prototype.Hb;IX.prototype.getTextTrack=IX.prototype.Aa;IX.prototype.getAudioTrack=IX.prototype.qa;IX.prototype.getVideoTrack=IX.prototype.La;IX.prototype.getLoadingTextRendition=IX.prototype.Mb;IX.prototype.getLoadingAudioRendition=IX.prototype.Lb;IX.prototype.getLoadingVideoRendition=IX.prototype.zb;IX.prototype.getTextRendition=IX.prototype.Wa;
87
- IX.prototype.getAudioRendition=IX.prototype.Sa;IX.prototype.getVideoRendition=IX.prototype.ma;IX.prototype.getTextTracks=IX.prototype.la;IX.prototype.getAudioTracks=IX.prototype.getAudioTracks;IX.prototype.getVideoTracks=IX.prototype.getVideoTracks;_.w(NX,_.mm);_.r=NX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=OX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.jn.bind(this));d.setMediaPlaybackInfoHandler(this.Ej.bind(this));this.a=new uX(this);this.a.init();this.j=new IX;this.j.initialize(this);this.o=new FX(function(e){return c.trigger(e)});this.o.init()};
88
- _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=OX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.B=null,a.w=_.tm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.y(b)})};
89
- _.r.play=function(){var a=OX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.r.pause=function(){var a=OX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.r.isPaused=function(){return OX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
90
- _.r.isEnded=function(){return OX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=OX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(qW);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return OX().getCurrentTimeSec()};
91
- _.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=OX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return OX().getPlaybackRate()};_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;OX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};
84
+ _.r.addTextTrack=function(a){var b=this,c,d,e;return _.H(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,OW(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),TX(b)}catch(g){throw b.g.warn("failed on track",
85
+ a),g;}}_.y(f)})};_.r.va=function(){return!0};_.r.Qn=function(){this.f=RX().getAudioTracksManager();var a=this.f.getTracks();this.h=SX(_.T,a);TX(this);a=this.m.getConfiguration();UX(this,_.T,a.preferredAudioLanguage,a.preferredAudioRole);UX(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};QX.prototype.isAbrEnabled=QX.prototype.va;QX.prototype.addTextTrack=QX.prototype.addTextTrack;QX.prototype.setTextRendition=QX.prototype.Gb;QX.prototype.setAudioRendition=QX.prototype.Fb;
86
+ QX.prototype.setVideoRendition=QX.prototype.sb;QX.prototype.setTextTrack=QX.prototype.Xa;QX.prototype.setAudioTrack=QX.prototype.Ia;QX.prototype.setVideoTrack=QX.prototype.Hb;QX.prototype.getTextTrack=QX.prototype.Aa;QX.prototype.getAudioTrack=QX.prototype.qa;QX.prototype.getVideoTrack=QX.prototype.La;QX.prototype.getLoadingTextRendition=QX.prototype.Mb;QX.prototype.getLoadingAudioRendition=QX.prototype.Lb;QX.prototype.getLoadingVideoRendition=QX.prototype.zb;QX.prototype.getTextRendition=QX.prototype.Wa;
87
+ QX.prototype.getAudioRendition=QX.prototype.Sa;QX.prototype.getVideoRendition=QX.prototype.ma;QX.prototype.getTextTracks=QX.prototype.la;QX.prototype.getAudioTracks=QX.prototype.getAudioTracks;QX.prototype.getVideoTracks=QX.prototype.getVideoTracks;_.w(VX,_.mm);_.r=VX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=WX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.kn.bind(this));d.setMediaPlaybackInfoHandler(this.Gj.bind(this));this.a=new CX(this);this.a.init();this.j=new QX;this.j.initialize(this);this.o=new NX(function(e){return c.trigger(e)});this.o.init()};
88
+ _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=WX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.B=null,a.w=_.tm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.y(b)})};
89
+ _.r.play=function(){var a=WX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.r.pause=function(){var a=WX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.r.isPaused=function(){return WX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
90
+ _.r.isEnded=function(){return WX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=WX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(yW);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return WX().getCurrentTimeSec()};
91
+ _.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=WX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return WX().getPlaybackRate()};_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;WX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};
92
92
  _.r.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.r.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.r.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
93
- _.r.getLoadedSource=function(){var a=OX().getMediaInformation();if(a){var b=OX().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,gp:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return OX().getStartAbsoluteTime()};
94
- _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=OX().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():_.uq};
95
- _.r.getStats=function(){var a=_.sq();if(this.f){a=OX().getStats();this.f.h=a.estimatedBandwidth||NaN;this.f.w=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.A=a.width||NaN;b.j=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.o=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.l=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
96
- _.r.load=function(a){var b=this,c,d;return _.H(function(e){b.f=new _.rq;b.a.j=b.f.a;b.A=_.Lq(a);b.h=_.vm(b.w,a);if(b.C)return b.C=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:EW(b.h),local:!0};return _.x(e,OX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.wa);return new _.lm};
97
- _.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return this.B};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.pb)};_.r.appendLoad=function(){return Promise.reject(_.pb)};_.r.seekWith=function(){return Promise.reject(_.pb)};_.r.setNetworkEngine=function(a){this.G=a};_.r.setCmsdManager=function(){};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};
98
- _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return yW};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(uW)};_.r.onError=function(a){this.trigger(new _.K(_.je,{detail:a}))};_.r.canPlay=function(){return _.wl()?2:0};
99
- _.r.jn=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=EW(this.getStats());var b=OX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
100
- (!e||e&&f)){d=OX().getStartAbsoluteTime();if(typeof d===_.k){b.startAbsoluteTime=d;var h;f?h=new cast.framework.messages.GenericMediaMetadata:h=b.metadata;h.sectionStartAbsoluteTime=d;b.metadata=h}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};
101
- _.r.Ej=function(a,b){var c=null,d=b;a.media.customData&&(c=FW(a.media.customData.playerConfiguration));var e=c?c.abr||null:null,f=d;e&&typeof e.defaultBandwidthEstimate===_.k?f.initialBandwidth=e.defaultBandwidthEstimate:f.initialBandwidth=void 0;RX(c,d);e=null;a.media.customData&&(e=FW(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]));e=(e=e&&e.LiveConfiguration)?0===e.liveEdgeLatencyMs:!1;if(null!=c&&c.lowLatencyMode||e)c=Object.assign({},d.shakaConfig,{streaming:{lowLatencyMode:!0}}),
102
- d=Object.assign({},d,{shakaConfig:c});return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=SX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new NX,_.zt(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.H(function(c){return b.m&&b.m.getState()!==_.tq?_.x(c,CW(b.m),0):c.F(0)})}))};
103
- _.r.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=VX(),b=VX().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[AW]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Am.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
104
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.zm.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(AW,this.w)}};
105
- _.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=VX();VX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(AW,this.w);a.stop();this.m=this.f=null}};_.r.Be=function(a){this.j=a};_.r.ko=function(a){this.l=a};_.r.on=function(a,b){VX().addEventListener(a,b)};_.r.off=function(a,b){VX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.pe&&this.h.add(a)};
106
- _.r.removeMessageListener=function(a){typeof a===_.pe&&this.h["delete"](a)};_.r.sendMessage=function(a,b){VX().sendCustomMessage(AW,b,EW(a))};_.r.Kc=function(){return this.a};_.r.Kb=function(){return WX()};_.r.jc=function(a){XX(this,a)};_.r.Do=function(a){var b=WX(),c=null;a?c=Object.assign({},b,a):c=b;XX(this,c)};
107
- _.r.Am=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return ZX(this,a);try{var b=(new DOMParser).parseFromString(a,_.mg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=VX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.la),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Kg||g===_.Pc){g=e[f].getAttribute(_.Le);for(var h=e[f].getElementsByTagName(_.Db),l=
108
- h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Le)||g,n=h[l].getAttribute(_.zd),p=h[l].getAttribute(_.Zg)||void 0,q=h[l].getAttribute(_.qe)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.Db).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.la).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Lb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=VX();c=a.getElementsByTagName("StreamIndex");
109
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Kg){e=c[d].getElementsByTagName(_.Bb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.gb)||void 0,h=e[f].getAttribute(_.fb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Mg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Bb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
110
- _.r.zm=function(a){var b=this,c,d,e,f,g,h;return _.H(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=FW(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.x(l,BX(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.F(7);
111
- break}b.f.C=!0;return _.x(l,_.Jt(b.m,d),8);case 8:return _.x(l,_.Kt(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.kc&&(c.media.hlsVideoSegmentFormat=HW(f.kc,_.Fk)),f.audioMimeType&&(c.media.hlsSegmentFormat=HW(f.audioMimeType,_.T));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.l){l.F(10);
112
- break}return _.x(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.r.en=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.L.mm;var b=VX().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.m.seek(b))}_.Et(this.m)}};
113
- _.r.Xj=function(a){if(0<this.h.size){var b=FW(a.data);this.h.forEach(function(c){return c(b)})}};_.I(zW,SX);SX.prototype.updateContentMetadata=SX.prototype.Do;SX.prototype.setContentMetadata=SX.prototype.jc;SX.prototype.getContentMetadata=SX.prototype.Kb;SX.prototype.isApiReady=SX.prototype.Kc;SX.prototype.sendMessage=SX.prototype.sendMessage;SX.prototype.removeMessageListener=SX.prototype.removeMessageListener;SX.prototype.addMessageListener=SX.prototype.addMessageListener;SX.prototype.off=SX.prototype.off;
114
- SX.prototype.on=SX.prototype.on;SX.prototype.setLoadRequestDataInterceptor=SX.prototype.ko;SX.prototype.setPlayerConfigInterceptor=SX.prototype.Be;SX.prototype.stop=SX.prototype.stop;SX.prototype.start=SX.prototype.start;SX.prototype.init=SX.prototype.init;SX.getInstance=UX;var TX=null;_.r=$X.prototype;_.r.load=function(){var a=this,b,c,d,e,f;return _.H(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.wn.bind(a),d=_.u(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.y(g)})};_.r.start=function(){return _.H(function(a){_.y(a)})};_.r.jd=function(){};_.r.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.r.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
115
- _.r.skip=function(){var a=this.f.a;a&&this.f.sendMessage(BW,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.r.getVolume=function(){return this.f.getVolume()||0};_.r.setVolume=function(a){this.f.setVolume(a)};_.r.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.r.fd=function(){return!0};_.r.Cc=function(){var a=this;return _.H(function(b){a.h.release();_.y(b)})};
116
- _.r.wn=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.K(_.Cc,{adsTimeline:new wX(a.breaks)})));break;case "isPlayingBreak":a.value?bY(this,_.hc):(bY(this,_.lc),bY(this,_.zc),bY(this,_.ic));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(bY(this,_.lc),bY(this,_.zc)),bY(this,_.yc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?bY(this,_.tc):bY(this,_.vc))}};$X.prototype.getPosition=$X.prototype.getPosition;
117
- $X.prototype.setVolume=$X.prototype.setVolume;$X.prototype.getVolume=$X.prototype.getVolume;$X.prototype.skip=$X.prototype.skip;$X.prototype.pause=$X.prototype.pause;$X.prototype.resume=$X.prototype.resume;cY.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};cY.prototype.a=function(a,b){return a.namespace()!==_.sd?!1:!(!b||!b.ima)};cY.prototype.create=function(a){return new $X(a.a)};_.$q(new cY);dY.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};dY.prototype.a=function(a,b){return UX().Kc()?!(!b||!b.ima):!1};dY.prototype.create=function(a){return new yX(a)};_.$q(new dY);};
93
+ _.r.getLoadedSource=function(){var a=WX().getMediaInformation();if(a){var b=WX().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,hp:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return WX().getStartAbsoluteTime()};
94
+ _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=WX().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():_.uq};
95
+ _.r.getStats=function(){var a=_.sq();if(this.f){a=WX().getStats();this.f.h=a.estimatedBandwidth||NaN;this.f.w=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.A=a.width||NaN;b.j=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.o=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.l=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
96
+ _.r.load=function(a){var b=this,c,d;return _.H(function(e){b.f=new _.rq;b.a.j=b.f.a;b.A=_.Lq(a);b.h=_.vm(b.w,a);if(b.C)return b.C=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:MW(b.h),local:!0};return _.x(e,WX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.wa);return new _.lm};
97
+ _.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return this.B};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.ob)};_.r.appendLoad=function(){return Promise.reject(_.ob)};_.r.seekWith=function(){return Promise.reject(_.ob)};_.r.setNetworkEngine=function(a){this.G=a};_.r.setCmsdManager=function(){};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};
98
+ _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return GW};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(CW)};_.r.onError=function(a){this.trigger(new _.K(_.je,{detail:a}))};_.r.canPlay=function(){return _.wl()?2:0};
99
+ _.r.kn=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=MW(this.getStats());var b=WX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
100
+ (!e||e&&f)){d=WX().getStartAbsoluteTime();if(typeof d===_.k){b.startAbsoluteTime=d;var h;f?h=new cast.framework.messages.GenericMediaMetadata:h=b.metadata;h.sectionStartAbsoluteTime=d;b.metadata=h}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};
101
+ _.r.Gj=function(a,b){var c=null,d=b;a.media.customData&&(c=NW(a.media.customData.playerConfiguration));var e=c?c.abr||null:null,f=d;e&&typeof e.defaultBandwidthEstimate===_.k?f.initialBandwidth=e.defaultBandwidthEstimate:f.initialBandwidth=void 0;ZX(c,d);e=null;a.media.customData&&(e=NW(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]));e=(e=e&&e.LiveConfiguration)?0===e.liveEdgeLatencyMs:!1;if(null!=c&&c.lowLatencyMode||e)c=Object.assign({},d.shakaConfig,{streaming:{lowLatencyMode:!0}}),
102
+ d=Object.assign({},d,{shakaConfig:c});return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=$X.prototype;_.r.init=function(a){var b=this;a&&(this.f=new VX,_.It(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.H(function(c){return b.m&&b.m.getState()!==_.tq?_.x(c,KW(b.m),0):c.F(0)})}))};
103
+ _.r.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=cY(),b=cY().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[IW]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Bm.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
104
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Am.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(IW,this.w)}};
105
+ _.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=cY();cY().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(IW,this.w);a.stop();this.m=this.f=null}};_.r.Be=function(a){this.j=a};_.r.lo=function(a){this.l=a};_.r.on=function(a,b){cY().addEventListener(a,b)};_.r.off=function(a,b){cY().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.pe&&this.h.add(a)};
106
+ _.r.removeMessageListener=function(a){typeof a===_.pe&&this.h["delete"](a)};_.r.sendMessage=function(a,b){cY().sendCustomMessage(IW,b,MW(a))};_.r.Kc=function(){return this.a};_.r.Kb=function(){return dY()};_.r.jc=function(a){eY(this,a)};_.r.Eo=function(a){var b=dY(),c=null;a?c=Object.assign({},b,a):c=b;eY(this,c)};
107
+ _.r.Bm=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return gY(this,a);try{var b=(new DOMParser).parseFromString(a,_.mg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=cY();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.la),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Kg||g===_.Pc){g=e[f].getAttribute(_.Le);for(var h=e[f].getElementsByTagName(_.Cb),l=
108
+ h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Le)||g,n=h[l].getAttribute(_.zd),p=h[l].getAttribute(_.Zg)||void 0,q=h[l].getAttribute(_.qe)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.Cb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.la).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Lb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=cY();c=a.getElementsByTagName("StreamIndex");
109
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Kg){e=c[d].getElementsByTagName(_.Ab);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.fb)||void 0,h=e[f].getAttribute(_.eb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Mg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Ab).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
110
+ _.r.Am=function(a){var b=this,c,d,e,f,g,h;return _.H(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=NW(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.x(l,JX(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.F(7);
111
+ break}b.f.C=!0;return _.x(l,_.St(b.m,d),8);case 8:return _.x(l,_.Tt(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.kc&&(c.media.hlsVideoSegmentFormat=PW(f.kc,_.Fk)),f.audioMimeType&&(c.media.hlsSegmentFormat=PW(f.audioMimeType,_.T));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.l){l.F(10);
112
+ break}return _.x(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.r.fn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.L.nm;var b=cY().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.m.seek(b))}_.Nt(this.m)}};
113
+ _.r.Yj=function(a){if(0<this.h.size){var b=NW(a.data);this.h.forEach(function(c){return c(b)})}};_.I(HW,$X);$X.prototype.updateContentMetadata=$X.prototype.Eo;$X.prototype.setContentMetadata=$X.prototype.jc;$X.prototype.getContentMetadata=$X.prototype.Kb;$X.prototype.isApiReady=$X.prototype.Kc;$X.prototype.sendMessage=$X.prototype.sendMessage;$X.prototype.removeMessageListener=$X.prototype.removeMessageListener;$X.prototype.addMessageListener=$X.prototype.addMessageListener;$X.prototype.off=$X.prototype.off;
114
+ $X.prototype.on=$X.prototype.on;$X.prototype.setLoadRequestDataInterceptor=$X.prototype.lo;$X.prototype.setPlayerConfigInterceptor=$X.prototype.Be;$X.prototype.stop=$X.prototype.stop;$X.prototype.start=$X.prototype.start;$X.prototype.init=$X.prototype.init;$X.getInstance=bY;var aY=null;_.r=hY.prototype;_.r.load=function(){var a=this,b,c,d,e,f;return _.H(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.yn.bind(a),d=_.u(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.y(g)})};_.r.start=function(){return _.H(function(a){_.y(a)})};_.r.jd=function(){};_.r.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.r.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
115
+ _.r.skip=function(){var a=this.f.a;a&&this.f.sendMessage(JW,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.r.getVolume=function(){return this.f.getVolume()||0};_.r.setVolume=function(a){this.f.setVolume(a)};_.r.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.r.fd=function(){return!0};_.r.Cc=function(){var a=this;return _.H(function(b){a.h.release();_.y(b)})};
116
+ _.r.yn=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.K(_.Cc,{adsTimeline:new EX(a.breaks)})));break;case "isPlayingBreak":a.value?jY(this,_.hc):(jY(this,_.lc),jY(this,_.zc),jY(this,_.ic));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(jY(this,_.lc),jY(this,_.zc)),jY(this,_.yc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?jY(this,_.tc):jY(this,_.vc))}};hY.prototype.getPosition=hY.prototype.getPosition;
117
+ hY.prototype.setVolume=hY.prototype.setVolume;hY.prototype.getVolume=hY.prototype.getVolume;hY.prototype.skip=hY.prototype.skip;hY.prototype.pause=hY.prototype.pause;hY.prototype.resume=hY.prototype.resume;kY.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};kY.prototype.a=function(a,b){return a.namespace()!==_.sd?!1:!(!b||!b.ima)};kY.prototype.create=function(a){return new hY(a.a)};_.$q(new kY);lY.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};lY.prototype.a=function(a,b){return bY().Kc()?!(!b||!b.ima):!1};lY.prototype.create=function(a){return new GX(a)};_.$q(new lY);};
118
118
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
119
119
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
120
120
  else{_=this.clpp._;(f.call(g,this));}