@castlabs/prestoplay 6.25.2-beta.7 → 6.25.2

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 (65) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +105 -105
  6. package/cjs/cl.conviva.js +31 -31
  7. package/cjs/cl.core.js +329 -329
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +88 -88
  10. package/cjs/cl.externs.js +31 -31
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +77 -77
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +291 -289
  18. package/cjs/cl.muxdata.js +9 -9
  19. package/cjs/cl.persistent.js +10 -10
  20. package/cjs/cl.playlist.js +4 -4
  21. package/cjs/cl.sessions.js +8 -8
  22. package/cjs/cl.simid.js +4 -4
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +11 -11
  25. package/cjs/cl.tizen.js +69 -69
  26. package/cjs/cl.ttml.js +3 -3
  27. package/cjs/cl.verimatrix.js +2 -2
  28. package/cjs/cl.vimond.js +8 -8
  29. package/cjs/cl.vr.js +7 -7
  30. package/cjs/cl.vtt.js +2 -2
  31. package/cjs/cl.yospace.js +2 -2
  32. package/cjs/cl.youbora.js +17 -17
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +5 -5
  36. package/cl.cast.js +84 -84
  37. package/cl.conviva.js +26 -26
  38. package/cl.core.js +178 -178
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +82 -82
  41. package/cl.externs.js +31 -31
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +80 -80
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +17 -18
  47. package/cl.mediatailor.js +3 -3
  48. package/cl.mse.js +243 -243
  49. package/cl.muxdata.js +6 -6
  50. package/cl.persistent.js +2 -2
  51. package/cl.playlist.js +4 -4
  52. package/cl.sessions.js +2 -2
  53. package/cl.simid.js +1 -1
  54. package/cl.smooth.js +60 -60
  55. package/cl.thumbnails.js +9 -9
  56. package/cl.tizen.js +54 -54
  57. package/cl.ttml.js +2 -2
  58. package/cl.verimatrix.js +1 -1
  59. package/cl.vimond.js +3 -3
  60. package/cl.vr.js +2 -2
  61. package/cl.vtt.js +2 -2
  62. package/cl.yospace.js +2 -2
  63. package/cl.youbora.js +12 -12
  64. package/package.json +1 -1
  65. package/typings.d.ts +9 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  * Fix `EXT-X-DEFINE` support for media segment URIs in HLS.
6
6
  * Fix issues with HLS interstitials mainly related to seeking.
7
+ * Fix an issue in switching between muxed and separate audio tracks in HLS.
8
+ * Fix an issue of IMA Plugin causing player video events not to propagate after an ad break on Smart TV devices.
9
+ * Fix an issue of IMA Plugin causing player not resume playback after mid-roll on Smart TV devices.
10
+ * Handle situation of HLS interstitials of X-PLAYOUT-LIMIT updated when interstitial is already bound.
7
11
 
8
12
  # 6.25.1
9
13
 
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var xY=function(){this.m=this.f=null;this.a="";this.g=new _.J("clpp.adobe.AdobePlugin")},AY=function(a){a.f=new _.gi;a.f.on(a.m,_.Cg,function(){return yY(a)});a.f.on(a.m,_.Bg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.De,function(){return zY(a)});a.f.on(a.m,_.bg,function(b){b=b.detail;switch(b.currentState){case _.Hq:a.a.length||zY(a);s.Media.play(a.a,a.m.getPosition());break;case _.Gq:case _.yq:yY(a);break;case _.Aq:case _.tq:case _.Eq:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),yY(a),s.Media.close(a.a),a.a=""}})},zY=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)},yY=function(a){s.Media.stop(a.a,a.m.getPosition())},BY=function(){};_.w(xY,_.bw);xY.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,AY(this)):this.g.warn("Adobe API not available.")};
4
- xY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};xY.prototype.id=function(){return"adobe"};_.I("clpp.adobe.AdobeAnalyticsPlugin",xY);xY.Id="adobe";BY.prototype.create=function(){return new xY};_.Yt(new BY);};
2
+ var f=function(window){var yY=function(){this.m=this.f=null;this.a="";this.g=new _.J("clpp.adobe.AdobePlugin")},BY=function(a){a.f=new _.gi;a.f.on(a.m,_.Cg,function(){return zY(a)});a.f.on(a.m,_.Bg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.De,function(){return AY(a)});a.f.on(a.m,_.bg,function(b){b=b.detail;switch(b.currentState){case _.Hq:a.a.length||AY(a);s.Media.play(a.a,a.m.getPosition());break;case _.Gq:case _.yq:zY(a);break;case _.Aq:case _.tq:case _.Eq:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),zY(a),s.Media.close(a.a),a.a=""}})},AY=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)},zY=function(a){s.Media.stop(a.a,a.m.getPosition())},CY=function(){};_.w(yY,_.bw);yY.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,BY(this)):this.g.warn("Adobe API not available.")};
4
+ yY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};yY.prototype.id=function(){return"adobe"};_.I("clpp.adobe.AdobeAnalyticsPlugin",yY);yY.Id="adobe";CY.prototype.create=function(){return new yY};_.Yt(new CY);};
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 vY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Vh(function(){a.m.play()["catch"](function(){})});this.h=new _.gi},wY=function(){};_.w(vY,_.bw);_.r=vY.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.Vm.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.An.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.Vm=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.An=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.Uf=function(){return this.f};_.r.qo=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.I("clpp.airplay.AirPlayPlugin",vY);vY.prototype.showCastMenu=vY.prototype.qo;vY.prototype.canCast=vY.prototype.Uf;vY.prototype.isCasting=vY.prototype.Sb;vY.Id="airplay";wY.prototype.create=function(){return new vY};_.Yt(new wY);};
2
+ var f=function(window){var wY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Vh(function(){a.m.play()["catch"](function(){})});this.h=new _.gi},xY=function(){};_.w(wY,_.bw);_.r=wY.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.$m.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Fn.bind(this)))};
3
+ _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.$m=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.Fn=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.Tb=function(){return this.j};
4
+ _.r.Xf=function(){return this.f};_.r.vo=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.I("clpp.airplay.AirPlayPlugin",wY);wY.prototype.showCastMenu=wY.prototype.vo;wY.prototype.canCast=wY.prototype.Xf;wY.prototype.isCasting=wY.prototype.Tb;wY.Id="airplay";xY.prototype.create=function(){return new wY};_.Yt(new xY);};
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 nY=function(a,b){this.m=a;this.f=b;this.a=new _.gi;this.h=!1},oY=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)},pY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.gi;this.j=!1},qY=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===_.eg&&a.h.setUUID(f))},rY=
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,_.ie,a.Uj.bind(a));a.l=oY(a.m);a.a.attachPlayer(a.l)},sY=function(a,b){_.ki(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},tY=function(){return!window.SmartLib||!window.GenericPlayerApi},uY=function(){};_.r=nY.prototype;
5
- _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.bg,this.Xj.bind(this));b.on(a,_.Yc,this.Vj.bind(this));b.on(a,"seek",this.Wj.bind(this))};_.r.Vj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Xj=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.Wj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.ki(this.a),this.a=null)};_.w(pY,_.bw);_.r=pY.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(tY())return a.onError(new _.N(1,9,11E3));this.j=!0;qY(this,d);rY(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}));sY(c,void 0)}else b.url=e.getURL(),c.f=new nY(c.m,c.l),c.f.init()})}};
7
- _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.Uj=function(a){a=a.detail;if(7003===a.code)sY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.O)switch(a.category){case 3:sY(this,SmartLib.BPDecodingError);break;case 1:sY(this,SmartLib.BPNetworkingError);break;case 6:sY(this,SmartLib.BPAccessRightError);break;default:sY(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){tY()||sY(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
- _.I("clpp.broadpeak.BroadpeakPlugin",pY);pY.isSdkMissing=tY;pY.Id="broadpeak";uY.prototype.create=function(){return new pY};_.Yt(new uY);};
2
+ var f=function(window){var oY=function(a,b){this.m=a;this.f=b;this.a=new _.gi;this.h=!1},pY=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)},qY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.gi;this.j=!1},rY=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===_.eg&&a.h.setUUID(f))},sY=
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,_.ie,a.Wj.bind(a));a.l=pY(a.m);a.a.attachPlayer(a.l)},tY=function(a,b){_.ki(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},uY=function(){return!window.SmartLib||!window.GenericPlayerApi},vY=function(){};_.r=oY.prototype;
5
+ _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.bg,this.Zj.bind(this));b.on(a,_.Yc,this.Xj.bind(this));b.on(a,"seek",this.Yj.bind(this))};_.r.Xj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Zj=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.Yj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.ki(this.a),this.a=null)};_.w(qY,_.bw);_.r=qY.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(uY())return a.onError(new _.N(1,9,11E3));this.j=!0;rY(this,d);sY(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}));tY(c,void 0)}else b.url=e.getURL(),c.f=new oY(c.m,c.l),c.f.init()})}};
7
+ _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.Wj=function(a){a=a.detail;if(7003===a.code)tY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.O)switch(a.category){case 3:tY(this,SmartLib.BPDecodingError);break;case 1:tY(this,SmartLib.BPNetworkingError);break;case 6:tY(this,SmartLib.BPAccessRightError);break;default:tY(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){uY()||tY(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
+ _.I("clpp.broadpeak.BroadpeakPlugin",qY);qY.isSdkMissing=uY;qY.Id="broadpeak";vY.prototype.create=function(){return new qY};_.Yt(new vY);};
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 zW="Cannot seek during ads playout.",AW="Cannot switch track",BW="Media session does not exist.",CW="No receivers available",DW="Reset ABR functionality not available on cast.",EW="SDK not yet ready",FW="Sender is destroyed.",GW="clpp.cast.CastProxy",HW="clpp.cast.Player",IW="clpp.cast.Receiver",JW="urn:x-cast:castlabs",KW="urn:x-cast:com.google.cast.media",LW=function(a){return _.H(function(b){return 1==b.a?_.x(b,a.Qc(_.We),2):_.x(b,a.Qc(_.Ve),0)})},MW=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},NW=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.me){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Re?"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}})},OW=function(a){if(typeof a!==_.eg)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}},PW=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)})},QW=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 _.Lg:return d.FMP4;case _.Kg: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}},SW=function(a){a=
6
- void 0===a?RW: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}},TW=function(a){MW.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.a=null;this.w=this.gc.bind(this)},UW=function(){this.g=new _.J("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},VW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},XW=function(a,b){var c=VW(a);return WW(a,b).find(function(d){return c.includes(d.id)})||null},WW=function(a,b){return a.h.filter(function(c){return c.type===b})},ZW=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.Ba();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;YW(a,b)},function(f){a.f[b]=null;a.g.debug(AW,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){YW(a,b)},function(f){a.g.debug(AW,f)}))},YW=function(a,b){b===_.T?a.a.trigger(new _.K(_.Wc)):b===_.S&&a.a.trigger(new _.K(_.mg))},cX=function(a,b,c,d){_.mm.call(this);this.g=new _.J(_.sd);this.ca=a;this.o=new _.Xh(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.Ea=1E6;this.f=new UW;this.f.initialize(this);this.j=new TW(this);this.H=new _.gi;this.K=null;this.I=new Set;this.P=this.Xm.bind(this);this.xa=this.un.bind(this);this.da=this.kn.bind(this);this.T=this.an.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(){$W(!0)},0)}});aX(this);bX.add(this)},
10
- dX=function(a){var b,c;return _.H(function(d){if(1==d.a)return bX["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)})},mX=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(hX);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=SW(hX[b]);return Object.assign(b,a)},rX=function(a){var b=void 0===b?RW:b;return Object.values(hX).includes(a)?a:b},sX=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},aX=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.Rg();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);tX&&a.o.ga(.02)}},uX=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},wX=function(a,b){vX(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.da);b.addMessageListener(JW,a.T)},vX=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.Yj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.jn.bind(a)),
14
- a.j&&a.j.init(),a.trigger(new _.K(_.De)))},xX=function(a){return _.H(function(b){return a.Sb()?b.F(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},yX=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=_.pw,_.x(B,xX(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=QW(l,d.VIDEO);g.hlsSegmentFormat=QW(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.ml.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:NW(b.rb)};case 3:q=a.Kb()||{};t=rX(q.metadataType);typeof b.Ag===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.Ag});b.source.name&&(z={metadataType:t,title:b.source.name});A=sX(q);if(E=mX(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
- zX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.H(function(f){(d=a.f.Ba())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.qa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.x(f,yX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Ag:a.getPresentationStartTime(),autoplay:b,rb:a.h}),0)})},$W=function(a){if(a){a=_.u(bX);for(var b=a.next();!b.done;b=a.next())aX(b.value)}},BX=function(a,b,c){_.mm.call(this);this.f=a;this.h=b;this.j=typeof c===_.me?c:this.co;
18
- this.a=AX(this);this.g=new _.J(GW);this.f&&this.forwardEventsTo(this.f)},AX=function(a){return new cX(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.jh&&(d.preferredAudioLanguage=c.jh);c.lj&&(d.preferredTextLanguage=c.lj);_.Jt(a.f,null);a.trigger(new _.K("castingended"));a.j(b,d)},function(){return CX(a)})},CX=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"]();_.Jt(a.f,a.a);_.y(c)})},DX=function(a){MW.call(this,a,"clpp.cast.StateManager");this.I=this.ck.bind(this);this.H=this.bk.bind(this);this.w=this.en.bind(this);this.o=this.Wm.bind(this);this.K=this.ek.bind(this);this.J=this.dk.bind(this);this.L=this.xn.bind(this);this.G=this.hn.bind(this);this.C=this.ak.bind(this);this.a=this.$j.bind(this)},EX=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},FX=function(a){this.a=a},HX=function(a){this.m=a;this.a=null;this.h=this.fk.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];GX().addEventListener(this.f,this.h)},KX=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);IX=!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,_.lg),l.getElementsByTagName("vmap:VMAP").length)_.Jh("VMAP detected."),a.vmapAdsRequest=JX(g);else if(l.getElementsByTagName("VAST").length){_.Jh("VAST detected.");
22
- var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=JX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Jh("Unsupported schema."),IX=!0;return _.uh(n,0)}m=_.D(n);_.Jh("Failed to fetch an ad",m);IX=!0;_.y(n)})},JX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},GX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},MX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
- -1!==a.getPosition()){var d=null;(c=LX(a,c))&&(d={ad:c});a.m.trigger(new _.K(b,d))}},NX=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},LX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.eg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.eg&&(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 EX(d,e,b.index,b.total,f)}return c},OX=function(a){this.Ya=a;this.a=this.f.bind(this)},PX=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]},QX=function(a){var b=a.dashTimedMetadata,c=_.Ag;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.zg)?
25
- _.Ci:_.xg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},RX=function(){this.g=new _.J("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Rn.bind(this);this.a=this.f=null},SX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},UX=function(a){a.a=SX().getTextTracksManager();var b=a.a.getTracks();a.j=TX(_.S,b)},VX=function(a,b,c,d){c=_.Gi(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))},TX=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},WX=function(){_.mm.call(this);this.g=new _.J(HW);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},XX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},$X=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=[_.Ed];_.Lq(a)[0].type!==_.Nc&&f.unshift(_.Gd);d.preferredDrmSystem===_.Ed&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
- h=e.Pa[g];h?(d=g===_.Gd?cast.framework.ContentProtection.WIDEVINE:g===_.Ed?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},YX(b,h,a,d),ZX(b,h,a,d)):c()}else c()}else c()},YX=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},ZX=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},aY=function(){this.a=!1;this.g=new _.J(IW);this.f=this.m=null;this.h=new Set;this.A=this.gn.bind(this);
31
- this.w=this.Zj.bind(this);this.j=null;this.o=new _.gi;this.l=null},cY=function(){return bY||(bY=new aY)},dY=function(){return cast.framework.CastReceiverContext.getInstance()},eY=function(){var a=dY().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},fY=function(a,b){var c=dY().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;dY().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
- hY=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=dY();c=(dY().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Lg:_.Kg;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=gY(h,_.ua),m=gY(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")},gY=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},iY=function(a){this.f=a;this.a=null;this.h=new _.gi;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]},kY=function(a,b){var c=null,d=jY(a);d&&(c={ad:d});a.f.trigger(new _.K(b,c))},jY=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 EX(d,c,e,f,g)}return b},lY=function(){},mY=function(){};_.r=MW.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 AW="Cannot seek during ads playout.",BW="Cannot switch track",CW="Media session does not exist.",DW="No receivers available",EW="Reset ABR functionality not available on cast.",FW="SDK not yet ready",GW="Sender is destroyed.",HW="clpp.cast.CastProxy",IW="clpp.cast.Player",JW="clpp.cast.Receiver",KW="urn:x-cast:castlabs",LW="urn:x-cast:com.google.cast.media",MW=function(a){return _.H(function(b){return 1==b.a?_.x(b,a.Rc(_.We),2):_.x(b,a.Rc(_.Ve),0)})},NW=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},OW=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.oe){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Re?"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}})},PW=function(a){if(typeof a!==_.eg)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}},QW=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.D(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)})},RW=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 _.Lg:return d.FMP4;case _.Kg: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}},TW=function(a){a=
6
+ void 0===a?SW: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}},UW=function(a){NW.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.hc.bind(this)},VW=function(){this.g=new _.J("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},WW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},YW=function(a,b){var c=WW(a);return XW(a,b).find(function(d){return c.includes(d.id)})||null},XW=function(a,b){return a.h.filter(function(c){return c.type===b})},$W=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.Ba();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;ZW(a,b)},function(f){a.f[b]=null;a.g.debug(BW,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){ZW(a,b)},function(f){a.g.debug(BW,f)}))},ZW=function(a,b){b===_.T?a.a.trigger(new _.K(_.Wc)):b===_.S&&a.a.trigger(new _.K(_.mg))},dX=function(a,b,c,d){_.mm.call(this);this.g=new _.J(_.sd);this.ca=a;this.o=new _.Xh(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.Ea=1E6;this.f=new VW;this.f.initialize(this);this.j=new UW(this);this.H=new _.gi;this.K=null;this.I=new Set;this.P=this.bn.bind(this);this.xa=this.zn.bind(this);this.da=this.qn.bind(this);this.T=this.fn.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(){aX(!0)},0)}});bX(this);cX.add(this)},
10
+ eX=function(a){var b,c;return _.H(function(d){if(1==d.a)return cX["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)})},jX=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(fX);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=TW(fX[b]);return Object.assign(b,a)},oX=function(a){var b=void 0===b?SW:b;return Object.values(fX).includes(a)?a:b},tX=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},bX=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.Sg();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);uX&&a.o.ga(.02)}},vX=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},xX=function(a,b){wX(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.da);b.addMessageListener(KW,a.T)},wX=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.$j.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.pn.bind(a)),
14
+ a.j&&a.j.init(),a.trigger(new _.K(_.De)))},yX=function(a){return _.H(function(b){return a.Tb()?b.D(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},zX=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,D,G;return _.H(function(B){switch(B.a){case 1:return c=chrome.cast.media.StreamType,d=_.pw,_.x(B,yX(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.lc;m=h.audioMimeType;g.hlsVideoSegmentFormat=RW(l,d.VIDEO);g.hlsSegmentFormat=RW(m,d.AUDIO);if(!b.rb){B.D(3);break}if(!a.N){B.D(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.D(6);break}return _.x(B,Promise.all(b.rb.remoteTextTracks.map(a.rl.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:OW(b.rb)};case 3:q=a.Lb()||{};t=oX(q.metadataType);typeof b.Dg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.Dg});b.source.name&&(z={metadataType:t,title:b.source.name});A=tX(q);if(D=jX(Object.assign({},v,z,A)))g.metadata=D;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
+ AX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.H(function(f){(d=a.f.Ba())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.qa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.x(f,zX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Dg:a.getPresentationStartTime(),autoplay:b,rb:a.h}),0)})},aX=function(a){if(a){a=_.u(cX);for(var b=a.next();!b.done;b=a.next())bX(b.value)}},CX=function(a,b,c){_.mm.call(this);this.f=a;this.h=b;this.j=typeof c===_.oe?c:this.io;
18
+ this.a=BX(this);this.g=new _.J(HW);this.f&&this.forwardEventsTo(this.f)},BX=function(a){return new dX(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.mh&&(d.preferredAudioLanguage=c.mh);c.oj&&(d.preferredTextLanguage=c.oj);_.Jt(a.f,null);a.trigger(new _.K("castingended"));a.j(b,d)},function(){return DX(a)})},DX=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"]();_.Jt(a.f,a.a);_.y(c)})},EX=function(a){NW.call(this,a,"clpp.cast.StateManager");this.I=this.ek.bind(this);this.H=this.dk.bind(this);this.w=this.kn.bind(this);this.o=this.an.bind(this);this.K=this.gk.bind(this);this.J=this.fk.bind(this);this.L=this.Cn.bind(this);this.G=this.nn.bind(this);this.C=this.ck.bind(this);this.a=this.bk.bind(this)},FX=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},GX=function(a){this.a=a},IX=function(a){this.m=a;this.a=null;this.h=this.hk.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];HX().addEventListener(this.f,this.h)},LX=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);JX=!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,_.lg),l.getElementsByTagName("vmap:VMAP").length)_.Jh("VMAP detected."),a.vmapAdsRequest=KX(g);else if(l.getElementsByTagName("VAST").length){_.Jh("VAST detected.");
22
+ var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=KX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Jh("Unsupported schema."),JX=!0;return _.uh(n,0)}m=_.E(n);_.Jh("Failed to fetch an ad",m);JX=!0;_.y(n)})},KX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},HX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},NX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
+ -1!==a.getPosition()){var d=null;(c=MX(a,c))&&(d={ad:c});a.m.trigger(new _.K(b,d))}},OX=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},MX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.eg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.eg&&(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 FX(d,e,b.index,b.total,f)}return c},PX=function(a){this.Ya=a;this.a=this.f.bind(this)},QX=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]},RX=function(a){var b=a.dashTimedMetadata,c=_.Ag;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.zg)?
25
+ _.Ci:_.xg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},SX=function(){this.g=new _.J("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Wn.bind(this);this.a=this.f=null},TX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},VX=function(a){a.a=TX().getTextTracksManager();var b=a.a.getTracks();a.j=UX(_.S,b)},WX=function(a,b,c,d){c=_.Gi(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.nf(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))},UX=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},XX=function(){_.mm.call(this);this.g=new _.J(IW);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},YX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},aY=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=[_.Ed];_.Lq(a)[0].type!==_.Nc&&f.unshift(_.Gd);d.preferredDrmSystem===_.Ed&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
+ h=e.Pa[g];h?(d=g===_.Gd?cast.framework.ContentProtection.WIDEVINE:g===_.Ed?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},ZX(b,h,a,d),$X(b,h,a,d)):c()}else c()}else c()},ZX=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},$X=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},bY=function(){this.a=!1;this.g=new _.J(JW);this.f=this.m=null;this.h=new Set;this.A=this.mn.bind(this);
31
+ this.w=this.ak.bind(this);this.j=null;this.o=new _.gi;this.l=null},dY=function(){return cY||(cY=new bY)},eY=function(){return cast.framework.CastReceiverContext.getInstance()},fY=function(){var a=eY().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},gY=function(a,b){var c=eY().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;eY().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
+ iY=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=eY();c=(eY().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Lg:_.Kg;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=hY(h,_.ua),m=hY(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")},hY=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},jY=function(a){this.f=a;this.a=null;this.h=new _.gi;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]},lY=function(a,b){var c=null,d=kY(a);d&&(c={ad:d});a.f.trigger(new _.K(b,c))},kY=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 FX(d,c,e,f,g)}return b},mY=function(){},nY=function(){};_.r=NW.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(_.bg,
37
- {detail:a}))}};_.I("clpp.cast.CastUtils",function(){});var RW=0,hX={GENERIC:RW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(TW,MW);TW.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)};TW.prototype.destroy=function(){var a=this;return _.H(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,MW.prototype.destroy.call(a),0)})};TW.prototype.za=function(a){var b=this.player.l;b&&b.isPlayingBreak||MW.prototype.za.call(this,a)};
38
- TW.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(UW,_.gl);_.r=UW.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
37
+ {detail:a}))}};_.I("clpp.cast.CastUtils",function(){});var SW=0,fX={GENERIC:SW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(UW,NW);UW.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)};UW.prototype.destroy=function(){var a=this;return _.H(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,NW.prototype.destroy.call(a),0)})};UW.prototype.za=function(a){var b=this.player.l;b&&b.isPlayingBreak||NW.prototype.za.call(this,a)};
38
+ UW.prototype.hc=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(VW,_.gl);_.r=VW.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(_.sg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return WW(this,_.Fk)};_.r.getAudioTracks=function(){return WW(this,_.T)};_.r.la=function(){return WW(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.Ba();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 XW(this,_.Fk)};_.r.qa=function(){return XW(this,_.T)};_.r.Ba=function(){return XW(this,_.S)};_.r.Hb=function(a){ZW(this,_.Fk,a)};_.r.Ia=function(a){ZW(this,_.T,a)};_.r.Xa=function(a){ZW(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
- UW.prototype.isAbrEnabled=UW.prototype.va;UW.prototype.addTextTrack=UW.prototype.addTextTrack;UW.prototype.setTextRendition=UW.prototype.Gb;UW.prototype.setAudioRendition=UW.prototype.Fb;UW.prototype.setVideoRendition=UW.prototype.sb;UW.prototype.setTextTrack=UW.prototype.Xa;UW.prototype.setAudioTrack=UW.prototype.Ia;UW.prototype.setVideoTrack=UW.prototype.Hb;UW.prototype.getTextTrack=UW.prototype.Ba;UW.prototype.getAudioTrack=UW.prototype.qa;UW.prototype.getVideoTrack=UW.prototype.La;
43
- UW.prototype.getLoadingTextRendition=UW.prototype.Mb;UW.prototype.getLoadingAudioRendition=UW.prototype.Lb;UW.prototype.getLoadingVideoRendition=UW.prototype.zb;UW.prototype.getTextRendition=UW.prototype.Wa;UW.prototype.getAudioRendition=UW.prototype.Sa;UW.prototype.getVideoRendition=UW.prototype.ma;UW.prototype.getTextTracks=UW.prototype.la;UW.prototype.getAudioTracks=UW.prototype.getAudioTracks;UW.prototype.getVideoTracks=UW.prototype.getVideoTracks;_.w(cX,_.mm);_.r=cX.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.fg=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,NW(b)),5);case 5:_.uh(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(EW),new _.N(1,8,8001,void 0);if(!tX)throw a.g.warn(CW),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,xX(a),4)}if(2!=d.a)return _.uh(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.eg=function(){this.Sb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
- _.r.addMessageListener=function(a){typeof a===_.me&&this.I.add(a)};_.r.removeMessageListener=function(a){typeof a===_.me&&this.I["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?zX(this,!0):new Promise(function(b,c){if(!a.a)return c(BW);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(BW);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()?zX(this,!1,a):new Promise(function(c,d){b.a||d(BW);b.l.isPlayingBreak&&d(zW);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.K(_.Cg));b.a.seek(e,function(){b.trigger(new _.K(_.Bg));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(KW,{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(_.sg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return XW(this,_.Fk)};_.r.getAudioTracks=function(){return XW(this,_.T)};_.r.la=function(){return XW(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.Ba();return a?a.renditions[0]:null};_.r.Ab=function(){return this.f[_.Fk]||null};
41
+ _.r.Mb=function(){return this.f[_.T]||null};_.r.Nb=function(){return this.f[_.S]||null};_.r.La=function(){return YW(this,_.Fk)};_.r.qa=function(){return YW(this,_.T)};_.r.Ba=function(){return YW(this,_.S)};_.r.Ib=function(a){$W(this,_.Fk,a)};_.r.Ia=function(a){$W(this,_.T,a)};_.r.Xa=function(a){$W(this,_.S,a)};_.r.sb=function(a){this.Ib(a&&a.track)};_.r.Gb=function(a){this.Ia(a&&a.track)};_.r.Hb=function(a){this.Xa(a&&a.track)};_.r.addTextTrack=function(){return _.H(function(a){_.y(a)})};_.r.va=function(){return!0};
42
+ VW.prototype.isAbrEnabled=VW.prototype.va;VW.prototype.addTextTrack=VW.prototype.addTextTrack;VW.prototype.setTextRendition=VW.prototype.Hb;VW.prototype.setAudioRendition=VW.prototype.Gb;VW.prototype.setVideoRendition=VW.prototype.sb;VW.prototype.setTextTrack=VW.prototype.Xa;VW.prototype.setAudioTrack=VW.prototype.Ia;VW.prototype.setVideoTrack=VW.prototype.Ib;VW.prototype.getTextTrack=VW.prototype.Ba;VW.prototype.getAudioTrack=VW.prototype.qa;VW.prototype.getVideoTrack=VW.prototype.La;
43
+ VW.prototype.getLoadingTextRendition=VW.prototype.Nb;VW.prototype.getLoadingAudioRendition=VW.prototype.Mb;VW.prototype.getLoadingVideoRendition=VW.prototype.Ab;VW.prototype.getTextRendition=VW.prototype.Wa;VW.prototype.getAudioRendition=VW.prototype.Sa;VW.prototype.getVideoRendition=VW.prototype.ma;VW.prototype.getTextTracks=VW.prototype.la;VW.prototype.getAudioTracks=VW.prototype.getAudioTracks;VW.prototype.getVideoTracks=VW.prototype.getVideoTracks;_.w(dX,_.mm);_.r=dX.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.Ce=function(a){this.N=a};_.r.Lc=function(){return this.w};_.r.Tb=function(){return this.A};_.r.ig=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.D(2);break}_.C(g,3);return _.x(g,e.sendMessage(a,OW(b)),5);case 5:_.uh(g,2);break;case 3:f=_.E(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.Lc())throw a.g.warn(FW),new _.N(1,8,8001,void 0);if(!uX)throw a.g.warn(DW),new _.N(1,8,8002,void 0);if(a.Tb())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.C(d,2);return _.x(d,yX(a),4)}if(2!=d.a)return _.uh(d,0);b=_.E(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.hg=function(){this.Tb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
+ _.r.addMessageListener=function(a){typeof a===_.oe&&this.I.add(a)};_.r.removeMessageListener=function(a){typeof a===_.oe&&this.I["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?AX(this,!0):new Promise(function(b,c){if(!a.a)return c(CW);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(CW);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()?AX(this,!1,a):new Promise(function(c,d){b.a||d(CW);b.l.isPlayingBreak&&d(AW);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.K(_.Cg));b.a.seek(e,function(){b.trigger(new _.K(_.Bg));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(LW,{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?OW(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(EW),e["return"]();if(!tX)return b.g.warn(CW),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,yX(b,d),0)})};
52
+ _.r.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?PW(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.Lc())return b.g.warn(FW),e["return"]();if(!uX)return b.g.warn(DW),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,lc:c.lc,audioMimeType:c.audioMimeType};return _.x(e,zX(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(DW)};_.r.onError=function(a){if(a&&(this.trigger(new _.K(_.ie,{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=mX(a)};_.r.Xf=function(){this.K=null};
55
- _.r.Lg=function(a){var b=this.Kb()||{};a={metadataType:rX(b.metadataType),title:a};this.jc(Object.assign({},b,a))};_.r.Jg=function(a){var b=this.Kb()||{},c=rX(b.metadataType);a=new chrome.cast.Image(a);this.jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.r.Ig=function(a){var b=this.Kb()||{};this.jc(Object.assign({},b,{metadataType:3,artist:a}))};_.r.Kg=function(a){var b=this.Kb()||{};a={metadataType:rX(b.metadataType),releaseDate:a};this.jc(Object.assign({},b,a))};
56
- _.r.Xm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;tX=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ja=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Rg()};
57
- _.r.un=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;wX(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Sb()||(this.A=!0,wX(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.Ba();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:uX(this),lj:d,jh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.da);a.session.removeMessageListener(JW,this.T);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.r.kn=function(a){this.g.debug("New media session",a.mediaSession);vX(this,a.mediaSession)};_.r.jn=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.r.an=function(a,b){if(a===JW&&0<this.I.size){var c=OW(b);this.I.forEach(function(d){return d(c)})}};
59
- _.r.Yj=function(){this.trigger(new _.K(_.rg))};_.r.ml=function(a){var b=this,c,d;return _.H(function(e){if(1==e.a)return c=null,_.x(e,PW(a,[_.kg,_.Mc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ea++,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 tX=!1,bX=new Set;
60
- window.__onGCastApiAvailable=$W;_.w(BX,_.mm);_.r=BX.prototype;_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.a?_.x(b,dX(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.y(b)})};_.r.co=function(a,b){this.f&&a!==_.Aq&&a!==_.tq&&(delete b.license,this.f.load(b))};_.r.Uf=function(){return!!this.a&&this.a.Kc()&&tX};_.r.Sb=function(){return!!this.a&&this.a.Sb()};_.r.fg=function(){return this.a?this.a.fg():""};_.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(EW)};_.r.onError=function(a){if(a&&(this.trigger(new _.K(_.ie,{detail:a})),this.j))this.j.onError(a)};_.r.namespace=function(){return _.sd};_.r.canPlay=function(){return this.Lc()?2:0};_.r.Lb=function(){return this.K};_.r.kc=function(a){this.K=jX(a)};_.r.$f=function(){this.K=null};
55
+ _.r.Mg=function(a){var b=this.Lb()||{};a={metadataType:oX(b.metadataType),title:a};this.kc(Object.assign({},b,a))};_.r.Kg=function(a){var b=this.Lb()||{},c=oX(b.metadataType);a=new chrome.cast.Image(a);this.kc(Object.assign({},b,{metadataType:c,images:[a]}))};_.r.Jg=function(a){var b=this.Lb()||{};this.kc(Object.assign({},b,{metadataType:3,artist:a}))};_.r.Lg=function(a){var b=this.Lb()||{};a={metadataType:oX(b.metadataType),releaseDate:a};this.kc(Object.assign({},b,a))};
56
+ _.r.bn=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;uX=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ja=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Sg()};
57
+ _.r.zn=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;xX(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Tb()||(this.A=!0,xX(this,a.session),this.ha());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Tb()&&this.a){var b=this.a.media,c=this.f.qa(),d=this.f.Ba();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:vX(this),oj:d,mh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.da);a.session.removeMessageListener(KW,this.T);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.r.qn=function(a){this.g.debug("New media session",a.mediaSession);wX(this,a.mediaSession)};_.r.pn=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.r.fn=function(a,b){if(a===KW&&0<this.I.size){var c=PW(b);this.I.forEach(function(d){return d(c)})}};
59
+ _.r.$j=function(){this.trigger(new _.K(_.rg))};_.r.rl=function(a){var b=this,c,d;return _.H(function(e){if(1==e.a)return c=null,_.x(e,QW(a,[_.kg,_.Mc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ea++,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 uX=!1,cX=new Set;
60
+ window.__onGCastApiAvailable=aX;_.w(CX,_.mm);_.r=CX.prototype;_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.a?_.x(b,eX(a.a),3):b.D(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.y(b)})};_.r.io=function(a,b){this.f&&a!==_.Aq&&a!==_.tq&&(delete b.license,this.f.load(b))};_.r.Xf=function(){return!!this.a&&this.a.Lc()&&uX};_.r.Tb=function(){return!!this.a&&this.a.Tb()};_.r.ig=function(){return this.a?this.a.ig():""};_.r.Ce=function(a){this.a&&this.a.Ce(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.Ba())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),Ag:b.f.getPresentationStartTime(),kc:m,audioMimeType:p,rb:g}}c=g;return _.x(f,CX(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,yX(b.a,c),7);case 7:_.uh(f,0);break;case 2:d=_.D(f),
63
- b.g.error("Error while trying to cast",d),e=new _.K(_.ie,{detail:d}),b.trigger(e),_.y(f)}})};_.r.eg=function(){this.a&&this.a.eg()};_.r.Sj=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,dX(b.a),2):c.F(2)}b.a=AX(b);_.y(c)})};_.r.sendMessage=function(a){var b=this;return _.H(function(c){return b.a?_.x(c,b.a.sendMessage(JW,a),0):(b.g.warn(FW),c["return"]())})};_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(FW)};
64
- _.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(FW)};_.r.Kb=function(){return this.a&&this.a.Kb()};_.r.jc=function(a){this.a&&this.a.jc(a)};_.r.Xf=function(){this.a&&this.a.Xf()};_.r.Lg=function(a){this.a&&this.a.Lg(a)};_.r.Jg=function(a){this.a&&this.a.Jg(a)};_.r.Ig=function(a){this.a&&this.a.Ig(a)};_.r.Kg=function(a){this.a&&this.a.Kg(a)};_.I(GW,BX);BX.prototype.setContentReleaseDate=BX.prototype.Kg;BX.prototype.setContentArtist=BX.prototype.Ig;
65
- BX.prototype.setContentImage=BX.prototype.Jg;BX.prototype.setContentTitle=BX.prototype.Lg;BX.prototype.clearContentMetadata=BX.prototype.Xf;BX.prototype.setContentMetadata=BX.prototype.jc;BX.prototype.getContentMetadata=BX.prototype.Kb;BX.prototype.removeMessageListener=BX.prototype.removeMessageListener;BX.prototype.addMessageListener=BX.prototype.addMessageListener;BX.prototype.sendMessage=BX.prototype.sendMessage;BX.prototype.changeReceiverId=BX.prototype.Sj;BX.prototype.forceDisconnect=BX.prototype.eg;
66
- BX.prototype.cast=BX.prototype.cast;BX.prototype.setPlayerConfigInterceptor=BX.prototype.Be;BX.prototype.getReceiverName=BX.prototype.fg;BX.prototype.isCasting=BX.prototype.Sb;BX.prototype.canCast=BX.prototype.Uf;BX.prototype.destroy=BX.prototype.destroy;_.w(DX,MW);_.r=DX.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),Dg:b.f.getPresentationStartTime(),lc:m,audioMimeType:p,rb:g}}c=g;return _.x(f,DX(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.D(7);break}return _.x(f,zX(b.a,c),7);case 7:_.uh(f,0);break;case 2:d=_.E(f),
63
+ b.g.error("Error while trying to cast",d),e=new _.K(_.ie,{detail:d}),b.trigger(e),_.y(f)}})};_.r.hg=function(){this.a&&this.a.hg()};_.r.Uj=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,eX(b.a),2):c.D(2)}b.a=BX(b);_.y(c)})};_.r.sendMessage=function(a){var b=this;return _.H(function(c){return b.a?_.x(c,b.a.sendMessage(KW,a),0):(b.g.warn(GW),c["return"]())})};_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(GW)};
64
+ _.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(GW)};_.r.Lb=function(){return this.a&&this.a.Lb()};_.r.kc=function(a){this.a&&this.a.kc(a)};_.r.$f=function(){this.a&&this.a.$f()};_.r.Mg=function(a){this.a&&this.a.Mg(a)};_.r.Kg=function(a){this.a&&this.a.Kg(a)};_.r.Jg=function(a){this.a&&this.a.Jg(a)};_.r.Lg=function(a){this.a&&this.a.Lg(a)};_.I(HW,CX);CX.prototype.setContentReleaseDate=CX.prototype.Lg;CX.prototype.setContentArtist=CX.prototype.Jg;
65
+ CX.prototype.setContentImage=CX.prototype.Kg;CX.prototype.setContentTitle=CX.prototype.Mg;CX.prototype.clearContentMetadata=CX.prototype.$f;CX.prototype.setContentMetadata=CX.prototype.kc;CX.prototype.getContentMetadata=CX.prototype.Lb;CX.prototype.removeMessageListener=CX.prototype.removeMessageListener;CX.prototype.addMessageListener=CX.prototype.addMessageListener;CX.prototype.sendMessage=CX.prototype.sendMessage;CX.prototype.changeReceiverId=CX.prototype.Uj;CX.prototype.forceDisconnect=CX.prototype.hg;
66
+ CX.prototype.cast=CX.prototype.cast;CX.prototype.setPlayerConfigInterceptor=CX.prototype.Ce;CX.prototype.getReceiverName=CX.prototype.ig;CX.prototype.isCasting=CX.prototype.Tb;CX.prototype.canCast=CX.prototype.Xf;CX.prototype.destroy=CX.prototype.destroy;_.w(EX,NW);_.r=EX.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,MW.prototype.destroy.call(a),0)})};_.r.ck=function(){this.player.trigger(new _.K(_.ff));this.za(_.Hq)};_.r.bk=function(){this.za(_.Gq)};_.r.en=function(){this.za(_.Aq)};_.r.Wm=function(a){a.isBuffering?this.za(_.yq):(a=this.player.isPaused()?_.Gq:_.Hq,this.za(a))};_.r.ek=function(){this.h=1;this.player.trigger(new _.K(_.Cg))};_.r.dk=function(){this.player.trigger(new _.K(_.Bg))};_.r.xn=function(){this.h=2};_.r.hn=function(){this.za(_.Fq)};
70
- _.r.$j=function(a){var b=this.player.getStats();this.player.trigger(new _.K(_.Yc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.ak=function(a){a=new _.N(_.O,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.K(_.ie,{detail:a}));this.za(_.Eq)};_.r=EX.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
- _.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.dc=function(){return null};EX.prototype.getVideoElement=EX.prototype.dc;EX.prototype.getWrapperCreativeIds=EX.prototype.getWrapperCreativeIds;EX.prototype.getWrapperAdSystems=EX.prototype.getWrapperAdSystems;EX.prototype.canSeek=EX.prototype.canSeek;EX.prototype.getWrapperAdIds=EX.prototype.getWrapperAdIds;
73
- EX.prototype.getSequenceLength=EX.prototype.pb;EX.prototype.getPositionInSequence=EX.prototype.Ab;EX.prototype.getPodTimeOffset=EX.prototype.Nb;EX.prototype.getPodIndex=EX.prototype.getPodIndex;EX.prototype.getPodType=EX.prototype.Va;EX.prototype.getMediaBitrate=EX.prototype.Ua;EX.prototype.getMediaHeight=EX.prototype.nb;EX.prototype.getMediaWidth=EX.prototype.ob;EX.prototype.getMediaUrl=EX.prototype.getMediaUrl;EX.prototype.getClickThroughUrl=EX.prototype.yb;EX.prototype.isBumper=EX.prototype.ec;
74
- EX.prototype.getSkipTimeOffset=EX.prototype.getSkipTimeOffset;EX.prototype.getPosition=EX.prototype.getPosition;EX.prototype.getDuration=EX.prototype.getDuration;EX.prototype.getTitle=EX.prototype.getTitle;EX.prototype.getAdvertiserName=EX.prototype.getAdvertiserName;EX.prototype.getAdSystem=EX.prototype.getAdSystem;EX.prototype.getApiFramework=EX.prototype.getApiFramework;EX.prototype.getSourceId=EX.prototype.ac;EX.prototype.getCreativeId=EX.prototype.getCreativeId;EX.prototype.getId=EX.prototype.getId;
75
- EX.prototype.getTechnology=EX.prototype.Bb;EX.prototype.getAdManagerVersion=EX.prototype.xb;EX.prototype.getAdManagerName=EX.prototype.wb;FX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};FX.prototype.Qb=function(){return!!this.a.find(function(a){return 0===a.position})};FX.prototype.Pb=function(){return!!this.a.find(function(a){return-1===a.position})};FX.prototype.hasPostroll=FX.prototype.Pb;FX.prototype.hasPreroll=FX.prototype.Qb;FX.prototype.getCuePoints=FX.prototype.getCuePoints;_.r=HX.prototype;_.r.load=function(){var a=this;return _.H(function(b){IX&&(IX=!1,NX(a,0));_.y(b)})};_.r.start=function(){return _.H(function(a){GX().play();_.y(a)})};_.r.jd=function(){};_.r.resume=function(){-1!==this.getPosition()&&GX().play()};_.r.pause=function(){-1!==this.getPosition()&&GX().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){GX().removeEventListener(a.f,a.h);_.y(b)})};
77
- _.r.fk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=GX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.K(_.Cc,{adsTimeline:new FX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:MX(this,_.rc,a);break;case cast.framework.events.EventType.BREAK_STARTED:MX(this,_.hc,a);break;case cast.framework.events.EventType.BREAK_ENDED:MX(this,_.ic,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:MX(this,
78
- _.yc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(MX(this,_.wc,a),MX(this,_.zc,a)):a.endedReason===b.STOPPED?MX(this,_.zc,a):a.endedReason===b.END_OF_STREAM?(MX(this,_.lc,a),MX(this,_.zc,a)):a.endedReason===b.ERROR&&NX(this,1);break;case cast.framework.events.EventType.PLAYING:MX(this,_.vc,a);break;case cast.framework.events.EventType.PAUSE:MX(this,_.tc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?MX(this,_.jc,a):MX(this,_.vc,a)}};
79
- HX.prototype.getPosition=HX.prototype.getPosition;HX.prototype.setVolume=HX.prototype.setVolume;HX.prototype.getVolume=HX.prototype.getVolume;HX.prototype.skip=HX.prototype.skip;HX.prototype.pause=HX.prototype.pause;HX.prototype.resume=HX.prototype.resume;var IX=!1;OX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(PX(),this.a)};OX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(PX(),this.a)};OX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return QX(a)})};
80
- OX.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=_.ng;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.pg}b&&this.Ya(new _.K(b,{detail:QX(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Ya(new _.K(_.ng,{detail:b.value}))};_.w(RX,_.gl);_.r=RX.prototype;_.r.initialize=function(a){this.m=a;SX().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;SX().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
- _.r.Sa=function(){var a=this.qa();return a&&a.renditions[0]};_.r.Wa=function(){var a=this.Ba();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
- _.r.Ba=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
- _.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,PW(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]),UX(b)}catch(g){throw b.g.warn("failed on track",
85
- a),g;}}_.y(f)})};_.r.va=function(){return!0};_.r.Rn=function(){this.f=SX().getAudioTracksManager();var a=this.f.getTracks();this.h=TX(_.T,a);UX(this);a=this.m.getConfiguration();VX(this,_.T,a.preferredAudioLanguage,a.preferredAudioRole);VX(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};RX.prototype.isAbrEnabled=RX.prototype.va;RX.prototype.addTextTrack=RX.prototype.addTextTrack;RX.prototype.setTextRendition=RX.prototype.Gb;RX.prototype.setAudioRendition=RX.prototype.Fb;
86
- RX.prototype.setVideoRendition=RX.prototype.sb;RX.prototype.setTextTrack=RX.prototype.Xa;RX.prototype.setAudioTrack=RX.prototype.Ia;RX.prototype.setVideoTrack=RX.prototype.Hb;RX.prototype.getTextTrack=RX.prototype.Ba;RX.prototype.getAudioTrack=RX.prototype.qa;RX.prototype.getVideoTrack=RX.prototype.La;RX.prototype.getLoadingTextRendition=RX.prototype.Mb;RX.prototype.getLoadingAudioRendition=RX.prototype.Lb;RX.prototype.getLoadingVideoRendition=RX.prototype.zb;RX.prototype.getTextRendition=RX.prototype.Wa;
87
- RX.prototype.getAudioRendition=RX.prototype.Sa;RX.prototype.getVideoRendition=RX.prototype.ma;RX.prototype.getTextTracks=RX.prototype.la;RX.prototype.getAudioTracks=RX.prototype.getAudioTracks;RX.prototype.getVideoTracks=RX.prototype.getVideoTracks;_.w(WX,_.mm);_.r=WX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=XX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.ln.bind(this));d.setMediaPlaybackInfoHandler(this.Hj.bind(this));this.a=new DX(this);this.a.init();this.j=new RX;this.j.initialize(this);this.o=new OX(function(e){return c.trigger(e)});this.o.init()};
88
- _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=XX();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=XX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.r.pause=function(){var a=XX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.r.isPaused=function(){return XX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
90
- _.r.isEnded=function(){return XX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=XX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(zW);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 XX().getCurrentTimeSec()};
91
- _.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=XX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return XX().getPlaybackRate()};_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;XX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};
69
+ a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,NW.prototype.destroy.call(a),0)})};_.r.ek=function(){this.player.trigger(new _.K(_.ff));this.za(_.Hq)};_.r.dk=function(){this.za(_.Gq)};_.r.kn=function(){this.za(_.Aq)};_.r.an=function(a){a.isBuffering?this.za(_.yq):(a=this.player.isPaused()?_.Gq:_.Hq,this.za(a))};_.r.gk=function(){this.h=1;this.player.trigger(new _.K(_.Cg))};_.r.fk=function(){this.player.trigger(new _.K(_.Bg))};_.r.Cn=function(){this.h=2};_.r.nn=function(){this.za(_.Fq)};
70
+ _.r.bk=function(a){var b=this.player.getStats();this.player.trigger(new _.K(_.Yc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.ck=function(a){a=new _.N(_.O,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.K(_.ie,{detail:a}));this.za(_.Eq)};_.r=FX.prototype;_.r.xb=function(){return"Google Cast Framework"};_.r.yb=function(){return cast.framework.VERSION};_.r.Cb=function(){return 0};_.r.getId=function(){return""};_.r.getCreativeId=function(){return""};_.r.bc=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
+ _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.fc=function(){return!1};_.r.zb=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.Ob()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.j};_.r.Ob=function(){return this.f.position};_.r.Bb=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.ec=function(){return null};FX.prototype.getVideoElement=FX.prototype.ec;FX.prototype.getWrapperCreativeIds=FX.prototype.getWrapperCreativeIds;FX.prototype.getWrapperAdSystems=FX.prototype.getWrapperAdSystems;FX.prototype.canSeek=FX.prototype.canSeek;FX.prototype.getWrapperAdIds=FX.prototype.getWrapperAdIds;
73
+ FX.prototype.getSequenceLength=FX.prototype.pb;FX.prototype.getPositionInSequence=FX.prototype.Bb;FX.prototype.getPodTimeOffset=FX.prototype.Ob;FX.prototype.getPodIndex=FX.prototype.getPodIndex;FX.prototype.getPodType=FX.prototype.Va;FX.prototype.getMediaBitrate=FX.prototype.Ua;FX.prototype.getMediaHeight=FX.prototype.nb;FX.prototype.getMediaWidth=FX.prototype.ob;FX.prototype.getMediaUrl=FX.prototype.getMediaUrl;FX.prototype.getClickThroughUrl=FX.prototype.zb;FX.prototype.isBumper=FX.prototype.fc;
74
+ FX.prototype.getSkipTimeOffset=FX.prototype.getSkipTimeOffset;FX.prototype.getPosition=FX.prototype.getPosition;FX.prototype.getDuration=FX.prototype.getDuration;FX.prototype.getTitle=FX.prototype.getTitle;FX.prototype.getAdvertiserName=FX.prototype.getAdvertiserName;FX.prototype.getAdSystem=FX.prototype.getAdSystem;FX.prototype.getApiFramework=FX.prototype.getApiFramework;FX.prototype.getSourceId=FX.prototype.bc;FX.prototype.getCreativeId=FX.prototype.getCreativeId;FX.prototype.getId=FX.prototype.getId;
75
+ FX.prototype.getTechnology=FX.prototype.Cb;FX.prototype.getAdManagerVersion=FX.prototype.yb;FX.prototype.getAdManagerName=FX.prototype.xb;GX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};GX.prototype.Rb=function(){return!!this.a.find(function(a){return 0===a.position})};GX.prototype.Qb=function(){return!!this.a.find(function(a){return-1===a.position})};GX.prototype.hasPostroll=GX.prototype.Qb;GX.prototype.hasPreroll=GX.prototype.Rb;GX.prototype.getCuePoints=GX.prototype.getCuePoints;_.r=IX.prototype;_.r.load=function(){var a=this;return _.H(function(b){JX&&(JX=!1,OX(a,0));_.y(b)})};_.r.start=function(){return _.H(function(a){HX().play();_.y(a)})};_.r.kd=function(){};_.r.resume=function(){-1!==this.getPosition()&&HX().play()};_.r.pause=function(){-1!==this.getPosition()&&HX().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.gd=function(){return!0};_.r.Dc=function(){var a=this;return _.H(function(b){HX().removeEventListener(a.f,a.h);_.y(b)})};
77
+ _.r.hk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=HX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.K(_.Cc,{adsTimeline:new GX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:NX(this,_.rc,a);break;case cast.framework.events.EventType.BREAK_STARTED:NX(this,_.hc,a);break;case cast.framework.events.EventType.BREAK_ENDED:NX(this,_.ic,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:NX(this,
78
+ _.xc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(NX(this,_.wc,a),NX(this,_.zc,a)):a.endedReason===b.STOPPED?NX(this,_.zc,a):a.endedReason===b.END_OF_STREAM?(NX(this,_.lc,a),NX(this,_.zc,a)):a.endedReason===b.ERROR&&OX(this,1);break;case cast.framework.events.EventType.PLAYING:NX(this,_.vc,a);break;case cast.framework.events.EventType.PAUSE:NX(this,_.tc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?NX(this,_.jc,a):NX(this,_.vc,a)}};
79
+ IX.prototype.getPosition=IX.prototype.getPosition;IX.prototype.setVolume=IX.prototype.setVolume;IX.prototype.getVolume=IX.prototype.getVolume;IX.prototype.skip=IX.prototype.skip;IX.prototype.pause=IX.prototype.pause;IX.prototype.resume=IX.prototype.resume;var JX=!1;PX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(QX(),this.a)};PX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(QX(),this.a)};PX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return RX(a)})};
80
+ PX.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=_.ng;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.pg}b&&this.Ya(new _.K(b,{detail:RX(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Ya(new _.K(_.ng,{detail:b.value}))};_.w(SX,_.gl);_.r=SX.prototype;_.r.initialize=function(a){this.m=a;TX().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;TX().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
+ _.r.Sa=function(){var a=this.qa();return a&&a.renditions[0]};_.r.Wa=function(){var a=this.Ba();return a&&a.renditions[0]};_.r.Ab=function(){return null};_.r.Mb=function(){return null};_.r.Nb=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
+ _.r.Ba=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.Ib=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.Gb=function(a){this.Ia(a&&a.track)};
83
+ _.r.Hb=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,QW(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]),VX(b)}catch(g){throw b.g.warn("failed on track",
85
+ a),g;}}_.y(f)})};_.r.va=function(){return!0};_.r.Wn=function(){this.f=TX().getAudioTracksManager();var a=this.f.getTracks();this.h=UX(_.T,a);VX(this);a=this.m.getConfiguration();WX(this,_.T,a.preferredAudioLanguage,a.preferredAudioRole);WX(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};SX.prototype.isAbrEnabled=SX.prototype.va;SX.prototype.addTextTrack=SX.prototype.addTextTrack;SX.prototype.setTextRendition=SX.prototype.Hb;SX.prototype.setAudioRendition=SX.prototype.Gb;
86
+ SX.prototype.setVideoRendition=SX.prototype.sb;SX.prototype.setTextTrack=SX.prototype.Xa;SX.prototype.setAudioTrack=SX.prototype.Ia;SX.prototype.setVideoTrack=SX.prototype.Ib;SX.prototype.getTextTrack=SX.prototype.Ba;SX.prototype.getAudioTrack=SX.prototype.qa;SX.prototype.getVideoTrack=SX.prototype.La;SX.prototype.getLoadingTextRendition=SX.prototype.Nb;SX.prototype.getLoadingAudioRendition=SX.prototype.Mb;SX.prototype.getLoadingVideoRendition=SX.prototype.Ab;SX.prototype.getTextRendition=SX.prototype.Wa;
87
+ SX.prototype.getAudioRendition=SX.prototype.Sa;SX.prototype.getVideoRendition=SX.prototype.ma;SX.prototype.getTextTracks=SX.prototype.la;SX.prototype.getAudioTracks=SX.prototype.getAudioTracks;SX.prototype.getVideoTracks=SX.prototype.getVideoTracks;_.w(XX,_.mm);_.r=XX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=YX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.rn.bind(this));d.setMediaPlaybackInfoHandler(this.Jj.bind(this));this.a=new EX(this);this.a.init();this.j=new SX;this.j.initialize(this);this.o=new PX(function(e){return c.trigger(e)});this.o.init()};
88
+ _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=YX();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.D(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.y(b)})};
89
+ _.r.play=function(){var a=YX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.r.pause=function(){var a=YX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.r.isPaused=function(){return YX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
90
+ _.r.isEnded=function(){return YX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=YX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(AW);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 YX().getCurrentTimeSec()};
91
+ _.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=YX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return YX().getPlaybackRate()};_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;YX().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=XX().getMediaInformation();if(a){var b=XX().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,ip:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return XX().getStartAbsoluteTime()};
94
- _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=XX().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=XX().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:NW(b.h),local:!0};return _.x(e,XX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.wa);return new _.lm};
93
+ _.r.getLoadedSource=function(){var a=YX().getMediaInformation();if(a){var b=YX().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,mp:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return YX().getStartAbsoluteTime()};
94
+ _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=YX().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=YX().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:OW(b.h),local:!0};return _.x(e,YX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.wa);return new _.lm};
97
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 HW};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(DW)};_.r.onError=function(a){this.trigger(new _.K(_.ie,{detail:a}))};_.r.canPlay=function(){return _.wl()?2:0};
99
- _.r.ln=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=NW(this.getStats());var b=XX(),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=XX().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.Hj=function(a,b){var c=null,d=b;a.media.customData&&(c=OW(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;$X(c,d);e=null;a.media.customData&&(e=OW(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=aY.prototype;_.r.init=function(a){var b=this;a&&(this.f=new WX,_.Jt(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,LW(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=dY(),b=dY().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[JW]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Cm.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.Bm.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(JW,this.w)}};
105
- _.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=dY();dY().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(JW,this.w);a.stop();this.m=this.f=null}};_.r.Be=function(a){this.j=a};_.r.mo=function(a){this.l=a};_.r.on=function(a,b){dY().addEventListener(a,b)};_.r.off=function(a,b){dY().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.me&&this.h.add(a)};
106
- _.r.removeMessageListener=function(a){typeof a===_.me&&this.h["delete"](a)};_.r.sendMessage=function(a,b){dY().sendCustomMessage(JW,b,NW(a))};_.r.Kc=function(){return this.a};_.r.Kb=function(){return eY()};_.r.jc=function(a){fY(this,a)};_.r.Fo=function(a){var b=eY(),c=null;a?c=Object.assign({},b,a):c=b;fY(this,c)};
107
- _.r.Cm=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return hY(this,a);try{var b=(new DOMParser).parseFromString(a,_.lg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=dY();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===_.Jg||g===_.Pc){g=e[f].getAttribute(_.Ke);for(var h=e[f].getElementsByTagName(_.Cb),l=
108
- h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Ke)||g,n=h[l].getAttribute(_.zd),p=h[l].getAttribute(_.Yg)||void 0,q=h[l].getAttribute(_.pe)||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=dY();c=a.getElementsByTagName("StreamIndex");
98
+ _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return IW};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(EW)};_.r.onError=function(a){this.trigger(new _.K(_.ie,{detail:a}))};_.r.canPlay=function(){return _.wl()?2:0};
99
+ _.r.rn=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=OW(this.getStats());var b=YX(),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=YX().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.Jj=function(a,b){var c=null,d=b;a.media.customData&&(c=PW(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;aY(c,d);e=null;a.media.customData&&(e=PW(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=bY.prototype;_.r.init=function(a){var b=this;a&&(this.f=new XX,_.Jt(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,MW(b.m),0):c.D(0)})}))};
103
+ _.r.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=eY(),b=eY().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[KW]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Hm.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.Gm.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(KW,this.w)}};
105
+ _.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=eY();eY().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(KW,this.w);a.stop();this.m=this.f=null}};_.r.Ce=function(a){this.j=a};_.r.qo=function(a){this.l=a};_.r.on=function(a,b){eY().addEventListener(a,b)};_.r.off=function(a,b){eY().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.oe&&this.h.add(a)};
106
+ _.r.removeMessageListener=function(a){typeof a===_.oe&&this.h["delete"](a)};_.r.sendMessage=function(a,b){eY().sendCustomMessage(KW,b,OW(a))};_.r.Lc=function(){return this.a};_.r.Lb=function(){return fY()};_.r.kc=function(a){gY(this,a)};_.r.Jo=function(a){var b=fY(),c=null;a?c=Object.assign({},b,a):c=b;gY(this,c)};
107
+ _.r.Hm=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return iY(this,a);try{var b=(new DOMParser).parseFromString(a,_.lg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=eY();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===_.Jg||g===_.Pc){g=e[f].getAttribute(_.Ke);for(var h=e[f].getElementsByTagName(_.Cb),l=
108
+ h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Ke)||g,n=h[l].getAttribute(_.zd),p=h[l].getAttribute(_.Yg)||void 0,q=h[l].getAttribute(_.pe)||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=eY();c=a.getElementsByTagName("StreamIndex");
109
109
  for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Jg){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(_.Lg,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.Bm=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=OW(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,KX(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,_.Tt(b.m,d),8);case 8:return _.x(l,_.Ut(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.kc&&(c.media.hlsVideoSegmentFormat=QW(f.kc,_.Fk)),f.audioMimeType&&(c.media.hlsSegmentFormat=QW(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.gn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.L.om;var b=dY().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))}_.Ot(this.m)}};
113
- _.r.Zj=function(a){if(0<this.h.size){var b=OW(a.data);this.h.forEach(function(c){return c(b)})}};_.I(IW,aY);aY.prototype.updateContentMetadata=aY.prototype.Fo;aY.prototype.setContentMetadata=aY.prototype.jc;aY.prototype.getContentMetadata=aY.prototype.Kb;aY.prototype.isApiReady=aY.prototype.Kc;aY.prototype.sendMessage=aY.prototype.sendMessage;aY.prototype.removeMessageListener=aY.prototype.removeMessageListener;aY.prototype.addMessageListener=aY.prototype.addMessageListener;aY.prototype.off=aY.prototype.off;
114
- aY.prototype.on=aY.prototype.on;aY.prototype.setLoadRequestDataInterceptor=aY.prototype.mo;aY.prototype.setPlayerConfigInterceptor=aY.prototype.Be;aY.prototype.stop=aY.prototype.stop;aY.prototype.start=aY.prototype.start;aY.prototype.init=aY.prototype.init;aY.getInstance=cY;var bY=null;_.r=iY.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.zn.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(KW,{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.zn=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.K(_.Cc,{adsTimeline:new FX(a.breaks)})));break;case "isPlayingBreak":a.value?kY(this,_.hc):(kY(this,_.lc),kY(this,_.zc),kY(this,_.ic));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(kY(this,_.lc),kY(this,_.zc)),kY(this,_.yc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?kY(this,_.tc):kY(this,_.vc))}};iY.prototype.getPosition=iY.prototype.getPosition;
117
- iY.prototype.setVolume=iY.prototype.setVolume;iY.prototype.getVolume=iY.prototype.getVolume;iY.prototype.skip=iY.prototype.skip;iY.prototype.pause=iY.prototype.pause;iY.prototype.resume=iY.prototype.resume;lY.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};lY.prototype.a=function(a,b){return a.namespace()!==_.sd?!1:!(!b||!b.ima)};lY.prototype.create=function(a){return new iY(a.a)};_.$q(new lY);mY.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};mY.prototype.a=function(a,b){return cY().Kc()?!(!b||!b.ima):!1};mY.prototype.create=function(a){return new HX(a)};_.$q(new mY);};
110
+ _.r.Gm=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=PW(c.media.customData.playerConfiguration));if(!b.m||!d){l.D(2);break}if(!b.j){l.D(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.D(5);break}return _.x(l,LX(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.D(7);
111
+ break}b.f.C=!0;return _.x(l,_.Tt(b.m,d),8);case 8:return _.x(l,_.Ut(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.lc&&(c.media.hlsVideoSegmentFormat=RW(f.lc,_.Fk)),f.audioMimeType&&(c.media.hlsSegmentFormat=RW(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.D(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.mn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.L.tm;var b=eY().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))}_.Ot(this.m)}};
113
+ _.r.ak=function(a){if(0<this.h.size){var b=PW(a.data);this.h.forEach(function(c){return c(b)})}};_.I(JW,bY);bY.prototype.updateContentMetadata=bY.prototype.Jo;bY.prototype.setContentMetadata=bY.prototype.kc;bY.prototype.getContentMetadata=bY.prototype.Lb;bY.prototype.isApiReady=bY.prototype.Lc;bY.prototype.sendMessage=bY.prototype.sendMessage;bY.prototype.removeMessageListener=bY.prototype.removeMessageListener;bY.prototype.addMessageListener=bY.prototype.addMessageListener;bY.prototype.off=bY.prototype.off;
114
+ bY.prototype.on=bY.prototype.on;bY.prototype.setLoadRequestDataInterceptor=bY.prototype.qo;bY.prototype.setPlayerConfigInterceptor=bY.prototype.Ce;bY.prototype.stop=bY.prototype.stop;bY.prototype.start=bY.prototype.start;bY.prototype.init=bY.prototype.init;bY.getInstance=dY;var cY=null;_.r=jY.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.En.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.kd=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(LW,{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.gd=function(){return!0};_.r.Dc=function(){var a=this;return _.H(function(b){a.h.release();_.y(b)})};
116
+ _.r.En=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.K(_.Cc,{adsTimeline:new GX(a.breaks)})));break;case "isPlayingBreak":a.value?lY(this,_.hc):(lY(this,_.lc),lY(this,_.zc),lY(this,_.ic));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(lY(this,_.lc),lY(this,_.zc)),lY(this,_.xc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?lY(this,_.tc):lY(this,_.vc))}};jY.prototype.getPosition=jY.prototype.getPosition;
117
+ jY.prototype.setVolume=jY.prototype.setVolume;jY.prototype.getVolume=jY.prototype.getVolume;jY.prototype.skip=jY.prototype.skip;jY.prototype.pause=jY.prototype.pause;jY.prototype.resume=jY.prototype.resume;mY.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};mY.prototype.a=function(a,b){return a.namespace()!==_.sd?!1:!(!b||!b.ima)};mY.prototype.create=function(a){return new jY(a.a)};_.$q(new mY);nY.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};nY.prototype.a=function(a,b){return dY().Lc()?!(!b||!b.ima):!1};nY.prototype.create=function(a){return new IX(a)};_.$q(new nY);};
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));}