@castlabs/prestoplay 6.22.0 → 6.23.0

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 +9 -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 +112 -112
  6. package/cjs/cl.conviva.js +32 -33
  7. package/cjs/cl.core.js +591 -586
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +81 -80
  10. package/cjs/cl.externs.js +43 -36
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -29
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +330 -325
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +16 -16
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +72 -72
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +12 -13
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +4 -4
  32. package/cjs/cl.youbora.js +37 -37
  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 +88 -88
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +477 -474
  39. package/cl.crypto.js +9 -9
  40. package/cl.dash.js +76 -75
  41. package/cl.externs.js +43 -36
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +74 -74
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +17 -17
  47. package/cl.mse.js +295 -291
  48. package/cl.muxdata.js +13 -13
  49. package/cl.onboard.js +4 -4
  50. package/cl.persistent.js +10 -10
  51. package/cl.playlist.js +5 -5
  52. package/cl.sessions.js +10 -10
  53. package/cl.simid.js +13 -13
  54. package/cl.smooth.js +59 -59
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +15 -15
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +28 -27
  64. package/package.json +1 -1
  65. package/typings.d.ts +53 -6
package/cjs/cl.cast.js CHANGED
@@ -1,120 +1,120 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var UV="Cannot seek during ads playout.",VV="Cannot switch track",WV="Media session does not exist.",XV="No receivers available",YV="Reset ABR functionality not available on cast.",ZV="SDK not yet ready",$V="Sender is destroyed.",aW="clpp.cast.CastProxy",bW="clpp.cast.Player",cW="clpp.cast.Receiver",dW="urn:x-cast:castlabs",eW="urn:x-cast:com.google.cast.media",fW=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.Ec(_.$e),2):_.y(b,a.Ec(_.Ze),0)})},gW=function(a,b){this.log=new _.K(b);this.player=
3
- a;this.j=null;this.f=_.Mp;this.l=_.Np;this.h=2;this.B=Date.now();this.A=-1},hW=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.te){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.We?"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}})},iW=function(a){if(typeof a!==_.hg)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}},jW=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(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=_.fl(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.ck(a.url);return _.y(q,c.fetch(l).U,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Dj(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)})},kW=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 _.Hg:return d.FMP4;case _.Gg:return b===_.Gk?d.MPEG2_TS:c.TS;case _.ad:return c.AAC;case _.bd:return c.AC3;case _.cd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.dd:return c.FMP4}},mW=function(a){a=
6
- void 0===a?lW: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}},nW=function(a){gW.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.a=null;this.w=this.Zb.bind(this)},oW=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},pW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},rW=function(a,b){var c=pW(a);return qW(a,b).find(function(d){return c.includes(d.id)})||null},qW=function(a,b){return a.h.filter(function(c){return c.type===b})},tW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.T){var e=a.za();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;sW(a,b)},function(f){a.f[b]=null;a.g.debug(VV,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){sW(a,b)},function(f){a.g.debug(VV,f)}))},sW=function(a,b){b===_.Fk?a.a.trigger(new _.L(_.lm)):b===_.T&&a.a.trigger(new _.L(_.mm))},xW=function(a,b,c,d){_.sm.call(this);this.g=new _.K(_.Ad);this.ca=a;this.o=new _.ul(b);this.Z=c;this.ga=d;this.h=this.J=
9
- _.ym();this.C=[];this.B=0;this.L=new _.xk;this.G=this.l=this.a=null;this.A=this.w=!1;this.ha="";this.Ba=1E6;this.f=new oW;this.f.initialize(this);this.j=new nW(this);this.H=new _.Uh;this.K=null;this.I=new Set;this.P=this.wm.bind(this);this.wa=this.Rm.bind(this);this.da=this.Jm.bind(this);this.V=this.Am.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(){uW(!0)},0)}});vW(this);wW.add(this)},
10
- yW=function(a){var b,c;return _.I(function(d){if(1==d.a)return wW["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.wa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Z=null;a.ga=null;_.C(d)})},AW=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(zW);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=mW(zW[b]);return Object.assign(b,a)},BW=function(a){var b=void 0===b?lW:b;return Object.values(zW).includes(a)?a:b},HW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},vW=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.Hg();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.wa);MW&&a.o.ba(.02)}},RW=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},TW=function(a,b){SW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.da);b.addMessageListener(dW,a.V)},SW=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.Kj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.Im.bind(a)),
14
- a.j&&a.j.init(),a.trigger(new _.L(_.Ie)))},UW=function(a){return _.I(function(b){return a.Ib()?b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},VW=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,F,G;return _.I(function(B){switch(B.a){case 1:return c=chrome.cast.media.StreamType,d=_.Qv,_.y(B,UW(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.cc;m=h.audioMimeType;g.hlsVideoSegmentFormat=kW(l,d.VIDEO);g.hlsSegmentFormat=kW(m,d.AUDIO);if(!b.ib){B.F(3);break}if(!a.N){B.F(4);break}return _.y(B,Promise.resolve(a.N(b.ib)),5);case 5:if(n=B.f)b.ib=n;case 4:a.h=b.ib;a.C=_.dq(a.h);a.B=a.C.findIndex(function(H){return H.url===b.source.url});if(!b.ib.remoteTextTracks){B.F(6);break}return _.y(B,Promise.all(b.ib.remoteTextTracks.map(a.Wk.bind(a))),7);case 7:p=B.f,g.tracks=p.filter(function(H){return H}),b.ib.remoteTextTracks=
16
- void 0;case 6:delete b.ib.autoplay,b.ib.startTime=null,g.customData={playerConfiguration:hW(b.ib)};case 3:q=a.Ab()||{};t=BW(q.metadataType);typeof b.qg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.qg});b.source.name&&(z={metadataType:t,title:b.source.name});A=HW(q);if(F=AW(Object.assign({},v,z,A)))g.metadata=F;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.id&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.y(B,f.loadMedia(G),0)}})},
17
- WW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.za())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.pa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,VW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),qg:a.getPresentationStartTime(),autoplay:b,ib:a.h}),0)})},uW=function(a){if(a){a=_.w(wW);for(var b=a.next();!b.done;b=a.next())vW(b.value)}},YW=function(a,b,c){_.sm.call(this);this.f=a;this.h=b;this.j=typeof c===_.te?c:this.Cn;
18
- this.a=XW(this);this.g=new _.K(aW);this.f&&this.forwardEventsTo(this.f)},XW=function(a){return new xW(a.h,function(){a.trigger(new _.L(_.pd))},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.Xg&&(d.preferredAudioLanguage=c.Xg);c.cj&&(d.preferredTextLanguage=c.cj);_.Js(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return ZW(a)})},ZW=function(a){var b;
19
- return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.od)),b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Js(a.f,a.a);_.C(c)})},$W=function(a){gW.call(this,a,"clpp.cast.StateManager");this.I=this.Oj.bind(this);this.H=this.Nj.bind(this);this.w=this.Em.bind(this);this.o=this.vm.bind(this);this.K=this.Qj.bind(this);this.J=this.Pj.bind(this);this.L=this.Um.bind(this);this.G=this.Hm.bind(this);this.C=this.S.bind(this);this.a=this.Mj.bind(this)},aX=function(a,b,c,d,e){this.a=a;this.f=
20
- b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},bX=function(a){this.a=a},dX=function(a){this.m=a;this.a=null;this.h=this.Rj.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];cX().addEventListener(this.f,this.h)},gX=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);eX=!1;e=_.ck(d);return _.y(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.S.aa(f.data),h=new DOMParser,l=h.parseFromString(g,_.og),l.getElementsByTagName("vmap:VMAP").length)_.Fh("VMAP detected."),a.vmapAdsRequest=fX(g);else if(l.getElementsByTagName("VAST").length){_.Fh("VAST detected.");
22
- var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=fX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Fh("Unsupported schema."),eX=!0;return _.qh(n,0)}m=_.E(n);_.Fh("Failed to fetch an ad",m);eX=!0;_.C(n)})},fX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},cX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},iX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
- -1!==a.getPosition()){var d=null;(c=hX(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},jX=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},hX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.hg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.hg&&(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 aX(d,e,b.index,b.total,f)}return c},kX=function(a){this.Wa=a;this.a=this.f.bind(this)},lX=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]},mX=function(a){var b=a.dashTimedMetadata,c=_.xg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.wg)?
25
- _.ti:_.ug,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},nX=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.qn.bind(this);this.a=this.f=null},oX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},qX=function(a){a.a=oX().getTextTracksManager();var b=a.a.getTracks();a.j=pX(_.T,b)},rX=function(a,b,c,d){c=_.xi(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.Fk?f=a.getAudioTracks():b===_.T&&(f=a.ka());if(c=c.find(function(h){var l=_.uj(h);return f.some(function(m){m=_.uj(m.language||"");return _.vj(l,m)})})){var g=_.uj(c);c=f.filter(function(h){h=_.uj(h.language||"");return _.vj(g,h)});f=c.length?c:f;e=e||!!c.length}_.S.Xe(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===_.Fk?a.Ha(e):b===_.T&&a.Va(e))},pX=function(a,b){for(var c=[],d=_.w(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 _.Mk(f.id,f));c.push(f)}return c},sX=function(){_.sm.call(this);this.g=new _.K(bW);this.h=this.w=_.ym();this.A=null;
28
- this.l=-1;this.G=new _.xk;this.f=this.o=this.j=this.a=this.B=null;this.C=!1},tX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},wX=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=_.Wm(d);if(e){var f=[_.Nd];_.dq(a)[0].type!==_.Yc&&f.unshift(_.Pd);d.preferredDrmSystem===_.Nd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
- h=e.Na[g];h?(d=g===_.Pd?cast.framework.ContentProtection.WIDEVINE:g===_.Nd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},uX(b,h,a,d),vX(b,h,a,d)):c()}else c()}else c()},uX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.ck({method:_.Gb,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},vX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.gk(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Dj(g.data))})}:a.licenseHandler=void 0},xX=function(){this.a=!1;this.g=new _.K(cW);this.f=this.m=null;this.h=new Set;this.A=this.Gm.bind(this);
31
- this.w=this.Lj.bind(this);this.j=null;this.o=new _.Uh;this.l=null},zX=function(){return yX||(yX=new xX)},AX=function(){return cast.framework.CastReceiverContext.getInstance()},BX=function(){var a=AX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},CX=function(a,b){var c=AX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;AX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
- EX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=AX();c=(AX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Hg:_.Gg;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=DX(h,_.ra),m=DX(h,_.Pb),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(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")},DX=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},FX=function(a){this.f=a;this.a=null;this.h=new _.Uh;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]},HX=function(a,b){var c=null,d=GX(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},GX=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 aX(d,c,e,f,g)}return b},IX=function(){},JX=function(){};_.u=gW.prototype;_.u.release=function(){this.ya(_.Mp)};_.u.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.u.getState=function(){return this.f};_.u.onError=function(a){a.severity===_.P&&this.ya(_.Xp)};
36
- _.u.ya=function(a){if(a!==this.f)if(this.f===_.Xp&&a!==_.Mp)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===_.Rp?(this.A=b,this.player.trigger(new _.L(_.kd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.Rp&&this.player.trigger(new _.L(_.jd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Cp(this.j,this.f);this.player.trigger(new _.L(_.eg,
37
- {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var lW=0,zW={GENERIC:lW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(nW,gW);nW.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)};nW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,gW.prototype.destroy.call(a),0)})};nW.prototype.ya=function(a){var b=this.player.l;b&&b.isPlayingBreak||gW.prototype.ya.call(this,a)};
38
- nW.prototype.Zb=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.ya(_.Tp);break;case chrome.cast.media.IdleReason.ERROR:this.ya(_.Xp);break;default:this.ya(_.Mp)}break;case chrome.cast.media.PlayerState.PLAYING:this.ya(_.$p);break;case chrome.cast.media.PlayerState.PAUSED:this.ya(_.Zp);break;case chrome.cast.media.PlayerState.BUFFERING:this.ya(_.Rp)}};_.x(oW,_.hl);_.u=oW.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
39
- _.u.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=_.Gk;break;case chrome.cast.media.TrackType.AUDIO:c=_.Fk;break;case chrome.cast.media.TrackType.TEXT:c=_.T}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 _.Mk(c.id,c));return c}):[],this.a.trigger(new _.L(_.Sv)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return qW(this,_.Gk)};_.u.getAudioTracks=function(){return qW(this,_.Fk)};_.u.ka=function(){return qW(this,_.T)};_.u.la=function(){var a=this.Ja();return a?a.renditions[0]:null};_.u.Xa=function(){var a=this.pa();return a?a.renditions[0]:null};_.u.Ta=function(){var a=this.za();return a?a.renditions[0]:null};_.u.rb=function(){return this.f[_.Gk]||null};
41
- _.u.Bb=function(){return this.f[_.Fk]||null};_.u.Cb=function(){return this.f[_.T]||null};_.u.Ja=function(){return rW(this,_.Gk)};_.u.pa=function(){return rW(this,_.Fk)};_.u.za=function(){return rW(this,_.T)};_.u.yb=function(a){tW(this,_.Gk,a)};_.u.Ha=function(a){tW(this,_.Fk,a)};_.u.Va=function(a){tW(this,_.T,a)};_.u.jb=function(a){this.yb(a&&a.track)};_.u.wb=function(a){this.Ha(a&&a.track)};_.u.xb=function(a){this.Va(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.C(a)})};
42
- _.u.ua=function(){return!0};oW.prototype.isAbrEnabled=oW.prototype.ua;oW.prototype.addTextTrack=oW.prototype.addTextTrack;oW.prototype.setTextRendition=oW.prototype.xb;oW.prototype.setAudioRendition=oW.prototype.wb;oW.prototype.setVideoRendition=oW.prototype.jb;oW.prototype.setTextTrack=oW.prototype.Va;oW.prototype.setAudioTrack=oW.prototype.Ha;oW.prototype.setVideoTrack=oW.prototype.yb;oW.prototype.getTextTrack=oW.prototype.za;oW.prototype.getAudioTrack=oW.prototype.pa;
43
- oW.prototype.getVideoTrack=oW.prototype.Ja;oW.prototype.getLoadingTextRendition=oW.prototype.Cb;oW.prototype.getLoadingAudioRendition=oW.prototype.Bb;oW.prototype.getLoadingVideoRendition=oW.prototype.rb;oW.prototype.getTextRendition=oW.prototype.Ta;oW.prototype.getAudioRendition=oW.prototype.Xa;oW.prototype.getVideoRendition=oW.prototype.la;oW.prototype.getTextTracks=oW.prototype.ka;oW.prototype.getAudioTracks=oW.prototype.getAudioTracks;oW.prototype.getVideoTracks=oW.prototype.getVideoTracks;_.x(xW,_.sm);_.u=xW.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.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)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Cb)};_.u.appendLoad=function(){return Promise.reject(_.Cb)};_.u.seekWith=function(){return Promise.reject(_.Cb)};
44
- _.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.destroy=function(){return _.I(function(a){_.C(a)})};_.u.pe=function(a){this.N=a};_.u.Cc=function(){return this.w};_.u.Ib=function(){return this.A};_.u.Uf=function(){return this.ha};
45
- _.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(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}_.D(g,3);return _.y(g,e.sendMessage(a,hW(b)),5);case 5:_.qh(g,2);break;case 3:f=_.E(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.C(g)}})};
46
- _.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Cc())throw a.g.warn(ZV),new _.N(1,8,8001,void 0);if(!MW)throw a.g.warn(XV),new _.N(1,8,8002,void 0);if(a.Ib())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.D(d,2);return _.y(d,UW(a),4)}if(2!=d.a)return _.qh(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);})};_.u.Rf=function(){this.Ib()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
- _.u.addMessageListener=function(a){typeof a===_.te&&this.I.add(a)};_.u.removeMessageListener=function(a){typeof a===_.te&&this.I["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?WW(this,!0):new Promise(function(b,c){if(!a.a)return c(WV);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(WV);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
- _.u.isEnded=function(){return this.getState()===_.Tp};_.u.seek=function(a){var b=this;return this.isEnded()?WW(this,!1,a):new Promise(function(c,d){b.a||d(WV);b.l.isPlayingBreak&&d(UV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.zg));b.a.seek(e,function(){b.trigger(new _.L(_.yg));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
49
- _.u.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};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(eW,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
2
+ var f=function(window){var kW="Cannot seek during ads playout.",lW="Cannot switch track",mW="Media session does not exist.",nW="No receivers available",oW="Reset ABR functionality not available on cast.",pW="SDK not yet ready",qW="Sender is destroyed.",rW="clpp.cast.CastProxy",sW="clpp.cast.Player",tW="clpp.cast.Receiver",uW="urn:x-cast:castlabs",vW="urn:x-cast:com.google.cast.media",wW=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.Cc(_.bf),2):_.y(b,a.Cc(_.af),0)})},xW=function(a,b){this.log=new _.K(b);this.player=
3
+ a;this.j=null;this.f=_.Vp;this.l=_.Wp;this.h=2;this.B=Date.now();this.A=-1},yW=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ue){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Xe?"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}})},zW=function(a){if(typeof a!==_.ig)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}},AW=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(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=_.il(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.ek(a.url);return _.y(q,c.fetch(l).T,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Fj(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)})},BW=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 _.Jg:return d.FMP4;case _.Ig:return b===_.Jk?d.MPEG2_TS:c.TS;case _.$c:return c.AAC;case _.ad:return c.AC3;case _.bd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.cd:return c.FMP4}},DW=function(a){a=
6
+ void 0===a?CW:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.O(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}},EW=function(a){xW.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.Yb.bind(this)},FW=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},GW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},IW=function(a,b){var c=GW(a);return HW(a,b).find(function(d){return c.includes(d.id)})||null},HW=function(a,b){return a.h.filter(function(c){return c.type===b})},KW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.U){var e=a.ya();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;JW(a,b)},function(f){a.f[b]=null;a.g.debug(lW,f)})}else b===_.U&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){JW(a,b)},function(f){a.g.debug(lW,f)}))},JW=function(a,b){b===_.Ik?a.a.trigger(new _.L(_.pm)):b===_.U&&a.a.trigger(new _.L(_.qm))},OW=function(a,b,c,d){_.wm.call(this);this.g=new _.K(_.zd);this.aa=a;this.o=new _.xl(b);this.Y=c;this.fa=d;this.h=this.J=
9
+ _.Cm();this.C=[];this.B=0;this.L=new _.Ak;this.G=this.l=this.a=null;this.A=this.w=!1;this.ga="";this.Ha=1E6;this.f=new FW;this.f.initialize(this);this.j=new EW(this);this.H=new _.Wh;this.K=null;this.I=new Set;this.P=this.Em.bind(this);this.va=this.Zm.bind(this);this.ba=this.Rm.bind(this);this.U=this.Im.bind(this);this.M=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){LW(!0)},0)}});MW(this);NW.add(this)},
10
+ PW=function(a){var b,c;return _.I(function(d){if(1==d.a)return NW["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.va)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Y=null;a.fa=null;_.B(d)})},RW=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(QW);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=DW(QW[b]);return Object.assign(b,a)},SW=function(a){var b=void 0===b?CW:b;return Object.values(QW).includes(a)?a:b},WW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},MW=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
+ a.aa.length){a.w=!0;a.o.Hg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.aa;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.va);aX&&a.o.ca(.02)}},fX=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},hX=function(a,b){gX(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ba);b.addMessageListener(uW,a.U)},gX=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.Mj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.Qm.bind(a)),
14
+ a.j&&a.j.init(),a.trigger(new _.L(_.Ke)))},iX=function(a){return _.I(function(b){return a.Kb()?b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},jX=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,G,E;return _.I(function(C){switch(C.a){case 1:return c=chrome.cast.media.StreamType,d=_.Yv,_.y(C,iX(a),2);case 2:if(!b)return C["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.bc;m=h.audioMimeType;g.hlsVideoSegmentFormat=BW(l,d.VIDEO);g.hlsSegmentFormat=BW(m,d.AUDIO);if(!b.ib){C.F(3);break}if(!a.M){C.F(4);break}return _.y(C,Promise.resolve(a.M(b.ib)),5);case 5:if(n=C.f)b.ib=n;case 4:a.h=b.ib;a.C=_.mq(a.h);a.B=a.C.findIndex(function(H){return H.url===b.source.url});if(!b.ib.remoteTextTracks){C.F(6);break}return _.y(C,Promise.all(b.ib.remoteTextTracks.map(a.dl.bind(a))),7);case 7:p=C.f,g.tracks=p.filter(function(H){return H}),b.ib.remoteTextTracks=
16
+ void 0;case 6:delete b.ib.autoplay,b.ib.startTime=null,g.customData={playerConfiguration:yW(b.ib)};case 3:q=a.Cb()||{};t=SW(q.metadataType);typeof b.qg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.qg});b.source.name&&(z={metadataType:t,title:b.source.name});A=WW(q);if(G=RW(Object.assign({},v,z,A)))g.metadata=G;E=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.hd&&(E.autoplay=b.autoplay);typeof b.currentTime===_.k&&(E.currentTime=b.currentTime);return _.y(C,f.loadMedia(E),0)}})},
17
+ kX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.ya())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.oa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,jX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),qg:a.getPresentationStartTime(),autoplay:b,ib:a.h}),0)})},LW=function(a){if(a){a=_.w(NW);for(var b=a.next();!b.done;b=a.next())MW(b.value)}},mX=function(a,b,c){_.wm.call(this);this.f=a;this.h=b;this.j=typeof c===_.ue?c:this.Kn;
18
+ this.a=lX(this);this.g=new _.K(rW);this.f&&this.forwardEventsTo(this.f)},lX=function(a){return new OW(a.h,function(){a.trigger(new _.L(_.od))},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.Xg&&(d.preferredAudioLanguage=c.Xg);c.dj&&(d.preferredTextLanguage=c.dj);_.Ss(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return nX(a)})},nX=function(a){var b;
19
+ return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.nd)),b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Ss(a.f,a.a);_.B(c)})},oX=function(a){xW.call(this,a,"clpp.cast.StateManager");this.I=this.Rj.bind(this);this.H=this.Qj.bind(this);this.w=this.Mm.bind(this);this.o=this.Dm.bind(this);this.K=this.Tj.bind(this);this.J=this.Sj.bind(this);this.L=this.bn.bind(this);this.G=this.Pm.bind(this);this.C=this.Pj.bind(this);this.a=this.Oj.bind(this)},pX=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},qX=function(a){this.a=a},sX=function(a){this.m=a;this.a=null;this.h=this.Uj.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];rX().addEventListener(this.f,this.h)},vX=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);tX=!1;e=_.ek(d);return _.y(n,c.fetch(e).T,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.T.$(f.data),h=new DOMParser,l=h.parseFromString(g,_.pg),l.getElementsByTagName("vmap:VMAP").length)_.Hh("VMAP detected."),a.vmapAdsRequest=uX(g);else if(l.getElementsByTagName("VAST").length){_.Hh("VAST detected.");
22
+ var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=uX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Hh("Unsupported schema."),tX=!0;return _.sh(n,0)}m=_.F(n);_.Hh("Failed to fetch an ad",m);tX=!0;_.B(n)})},uX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},rX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},xX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
+ -1!==a.getPosition()){var d=null;(c=wX(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},yX=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},wX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.ig&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.ig&&(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 pX(d,e,b.index,b.total,f)}return c},zX=function(a){this.Ua=a;this.a=this.f.bind(this)},AX=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]},BX=function(a){var b=a.dashTimedMetadata,c=_.yg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.xg)?
25
+ _.vi:_.vg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},CX=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.yn.bind(this);this.a=this.f=null},DX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},FX=function(a){a.a=DX().getTextTracksManager();var b=a.a.getTracks();a.j=EX(_.U,b)},GX=function(a,b,c,d){c=_.zi(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.Ik?f=a.getAudioTracks():b===_.U&&(f=a.ja());if(c=c.find(function(h){var l=_.wj(h);return f.some(function(m){m=_.wj(m.language||"");return _.xj(l,m)})})){var g=_.wj(c);c=f.filter(function(h){h=_.wj(h.language||"");return _.xj(g,h)});f=c.length?c:f;e=e||!!c.length}_.T.Xe(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===_.Ik?a.Fa(e):b===_.U&&a.Ta(e))},EX=function(a,b){for(var c=[],d=_.w(b),
27
+ e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Gk(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 _.Pk(f.id,f));c.push(f)}return c},HX=function(){_.wm.call(this);this.g=new _.K(sW);this.h=this.w=_.Cm();this.A=null;
28
+ this.l=-1;this.G=new _.Ak;this.f=this.o=this.j=this.a=this.B=null;this.C=!1},IX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},LX=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=_.Zm(d);if(e){var f=[_.Md];_.mq(a)[0].type!==_.Xc&&f.unshift(_.Od);d.preferredDrmSystem===_.Md&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
+ h=e.Ma[g];h?(d=g===_.Od?cast.framework.ContentProtection.WIDEVINE:g===_.Md?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},JX(b,h,a,d),KX(b,h,a,d)):c()}else c()}else c()},JX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.ek({method:_.Fb,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},KX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.ik(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Fj(g.data))})}:a.licenseHandler=void 0},MX=function(){this.a=!1;this.g=new _.K(tW);this.f=this.m=null;this.h=new Set;this.A=this.Om.bind(this);
31
+ this.w=this.Nj.bind(this);this.j=null;this.o=new _.Wh;this.l=null},OX=function(){return NX||(NX=new MX)},PX=function(){return cast.framework.CastReceiverContext.getInstance()},QX=function(){var a=PX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},RX=function(a,b){var c=PX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;PX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
+ TX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=PX();c=(PX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Jg:_.Ig;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=SX(h,_.qa),m=SX(h,_.Ob),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(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")},SX=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},UX=function(a){this.f=a;this.a=null;this.h=new _.Wh;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]},WX=function(a,b){var c=null,d=VX(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},VX=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 pX(d,c,e,f,g)}return b},XX=function(){},YX=function(){};_.u=xW.prototype;_.u.release=function(){this.xa(_.Vp)};_.u.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.u.getState=function(){return this.f};_.u.onError=function(a){a.severity===_.P&&this.xa(_.fq)};
36
+ _.u.xa=function(a){if(a!==this.f)if(this.f===_.fq&&a!==_.Vp)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===_.$p?(this.A=b,this.player.trigger(new _.L(_.jd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.$p&&this.player.trigger(new _.L(_.id,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Lp(this.j,this.f);this.player.trigger(new _.L(_.fg,
37
+ {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var CW=0,QW={GENERIC:CW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(EW,xW);EW.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)};EW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,xW.prototype.destroy.call(a),0)})};EW.prototype.xa=function(a){var b=this.player.l;b&&b.isPlayingBreak||xW.prototype.xa.call(this,a)};
38
+ EW.prototype.Yb=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.xa(_.bq);break;case chrome.cast.media.IdleReason.ERROR:this.xa(_.fq);break;default:this.xa(_.Vp)}break;case chrome.cast.media.PlayerState.PLAYING:this.xa(_.iq);break;case chrome.cast.media.PlayerState.PAUSED:this.xa(_.hq);break;case chrome.cast.media.PlayerState.BUFFERING:this.xa(_.$p)}};_.x(FW,_.kl);_.u=FW.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
39
+ _.u.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=_.Jk;break;case chrome.cast.media.TrackType.AUDIO:c=_.Ik;break;case chrome.cast.media.TrackType.TEXT:c=_.U}c=new _.Gk(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 _.Pk(c.id,c));return c}):[],this.a.trigger(new _.L(_.$v)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return HW(this,_.Jk)};_.u.getAudioTracks=function(){return HW(this,_.Ik)};_.u.ja=function(){return HW(this,_.U)};_.u.ka=function(){var a=this.Ia();return a?a.renditions[0]:null};_.u.Va=function(){var a=this.oa();return a?a.renditions[0]:null};_.u.Sa=function(){var a=this.ya();return a?a.renditions[0]:null};_.u.rb=function(){return this.f[_.Jk]||null};
41
+ _.u.Db=function(){return this.f[_.Ik]||null};_.u.Eb=function(){return this.f[_.U]||null};_.u.Ia=function(){return IW(this,_.Jk)};_.u.oa=function(){return IW(this,_.Ik)};_.u.ya=function(){return IW(this,_.U)};_.u.zb=function(a){KW(this,_.Jk,a)};_.u.Fa=function(a){KW(this,_.Ik,a)};_.u.Ta=function(a){KW(this,_.U,a)};_.u.jb=function(a){this.zb(a&&a.track)};_.u.xb=function(a){this.Fa(a&&a.track)};_.u.yb=function(a){this.Ta(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.B(a)})};
42
+ _.u.ta=function(){return!0};FW.prototype.isAbrEnabled=FW.prototype.ta;FW.prototype.addTextTrack=FW.prototype.addTextTrack;FW.prototype.setTextRendition=FW.prototype.yb;FW.prototype.setAudioRendition=FW.prototype.xb;FW.prototype.setVideoRendition=FW.prototype.jb;FW.prototype.setTextTrack=FW.prototype.Ta;FW.prototype.setAudioTrack=FW.prototype.Fa;FW.prototype.setVideoTrack=FW.prototype.zb;FW.prototype.getTextTrack=FW.prototype.ya;FW.prototype.getAudioTrack=FW.prototype.oa;
43
+ FW.prototype.getVideoTrack=FW.prototype.Ia;FW.prototype.getLoadingTextRendition=FW.prototype.Eb;FW.prototype.getLoadingAudioRendition=FW.prototype.Db;FW.prototype.getLoadingVideoRendition=FW.prototype.rb;FW.prototype.getTextRendition=FW.prototype.Sa;FW.prototype.getAudioRendition=FW.prototype.Va;FW.prototype.getVideoRendition=FW.prototype.ka;FW.prototype.getTextTracks=FW.prototype.ja;FW.prototype.getAudioTracks=FW.prototype.getAudioTracks;FW.prototype.getVideoTracks=FW.prototype.getVideoTracks;_.x(OW,_.wm);_.u=OW.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.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)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Bb)};_.u.appendLoad=function(){return Promise.reject(_.Bb)};_.u.seekWith=function(){return Promise.reject(_.Bb)};
44
+ _.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.destroy=function(){return _.I(function(a){_.B(a)})};_.u.pe=function(a){this.M=a};_.u.Ac=function(){return this.w};_.u.Kb=function(){return this.A};_.u.Uf=function(){return this.ga};
45
+ _.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.O(1,8,8004,void 0);g.F(2);break}_.D(g,3);return _.y(g,e.sendMessage(a,yW(b)),5);case 5:_.sh(g,2);break;case 3:f=_.F(g),d=new _.O(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.B(g)}})};
46
+ _.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Ac())throw a.g.warn(pW),new _.O(1,8,8001,void 0);if(!aX)throw a.g.warn(nW),new _.O(1,8,8002,void 0);if(a.Kb())throw a.g.warn("Already casting"),new _.O(1,8,8003,void 0);_.D(d,2);return _.y(d,iX(a),4)}if(2!=d.a)return _.sh(d,0);b=_.F(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.O(1,8,8E3,c);})};_.u.Rf=function(){this.Kb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
+ _.u.addMessageListener=function(a){typeof a===_.ue&&this.I.add(a)};_.u.removeMessageListener=function(a){typeof a===_.ue&&this.I["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?kX(this,!0):new Promise(function(b,c){if(!a.a)return c(mW);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(mW);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
+ _.u.isEnded=function(){return this.getState()===_.bq};_.u.seek=function(a){var b=this;return this.isEnded()?kX(this,!1,a):new Promise(function(c,d){b.a||d(mW);b.l.isPlayingBreak&&d(kW);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Ag));b.a.seek(e,function(){b.trigger(new _.L(_.zg));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
49
+ _.u.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};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(vW,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
50
50
  _.u.getVolume=function(){return this.a&&this.a.volume.level};_.u.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.u.isMuted=function(){return this.a&&this.a.volume.muted};_.u.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
51
- _.u.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};_.u.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};_.u.getState=function(){return this.j?this.j.getState():_.Np};
52
- _.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?iW(this.a.customData.stats):_.Ip()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Cc())return b.g.warn(ZV),e["return"]();if(!MW)return b.g.warn(XV),e["return"]();b.C=_.dq(a);b.h=_.Am(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,ib:b.h,cc:c.cc,audioMimeType:c.audioMimeType};return _.y(e,VW(b,d),0)})};
53
- _.u.getBufferInfo=function(){return new _.rm};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.L=a};_.u.getNetworkEngine=function(){return this.L};_.u.getSourceIndex=function(){return this.B};_.u.setSourceIndex=function(a){this.B=a};_.u.setCmsdManager=function(){};_.u.getLoadedSource=function(){return this.C[this.B]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
54
- _.u.getTimelineCues=function(){return[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(YV)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.pe,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Ad};_.u.canPlay=function(){return this.Cc()?2:0};_.u.Ab=function(){return this.K};_.u.bc=function(a){this.K=AW(a)};_.u.Gf=function(){this.K=null};
55
- _.u.Ag=function(a){var b=this.Ab()||{};a={metadataType:BW(b.metadataType),title:a};this.bc(Object.assign({},b,a))};_.u.yg=function(a){var b=this.Ab()||{},c=BW(b.metadataType);a=new chrome.cast.Image(a);this.bc(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.xg=function(a){var b=this.Ab()||{};this.bc(Object.assign({},b,{metadataType:3,artist:a}))};_.u.zg=function(a){var b=this.Ab()||{};a={metadataType:BW(b.metadataType),releaseDate:a};this.bc(Object.assign({},b,a))};
56
- _.u.wm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;MW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ha=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Hg()};
57
- _.u.Rm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;TW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Ib()||(this.A=!0,TW(this,a.session),this.ga());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Ib()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.za();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Z(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
- isLive:this.isLive()},currentTime:RW(this),cj:d,Xg:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.da);a.session.removeMessageListener(dW,this.V);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.u.Jm=function(a){this.g.debug("New media session",a.mediaSession);SW(this,a.mediaSession)};_.u.Im=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.u.Am=function(a,b){if(a===dW&&0<this.I.size){var c=iW(b);this.I.forEach(function(d){return d(c)})}};
59
- _.u.Kj=function(){this.trigger(new _.L(_.pg))};_.u.Wk=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,jW(a,[_.ng,_.Xc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ba++,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)})};_.u.getTextDisplayer=function(){return null};var MW=!1,wW=new Set;
60
- window.__onGCastApiAvailable=uW;_.x(YW,_.sm);_.u=YW.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,yW(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.C(b)})};_.u.Cn=function(a,b){this.f&&a!==_.Tp&&a!==_.Mp&&(delete b.license,this.f.load(b))};_.u.Df=function(){return!!this.a&&this.a.Cc()&&MW};_.u.Ib=function(){return!!this.a&&this.a.Ib()};_.u.Uf=function(){return this.a?this.a.Uf():""};_.u.pe=function(a){this.a&&this.a.pe(a)};
61
- _.u.cast=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.D(f,2);return _.y(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.pa();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.za())l.language&&
62
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.id?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),qg:b.f.getPresentationStartTime(),cc:m,audioMimeType:p,ib:g}}c=g;return _.y(f,ZW(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.y(f,VW(b.a,c),7);case 7:_.qh(f,0);break;case 2:d=_.E(f),
63
- b.g.error("Error while trying to cast",d),e=new _.L(_.pe,{detail:d}),b.trigger(e),_.C(f)}})};_.u.Rf=function(){this.a&&this.a.Rf()};_.u.Gj=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,yW(b.a),2):c.F(2)}b.a=XW(b);_.C(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(dW,a),0):(b.g.warn($V),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn($V)};
64
- _.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn($V)};_.u.Ab=function(){return this.a&&this.a.Ab()};_.u.bc=function(a){this.a&&this.a.bc(a)};_.u.Gf=function(){this.a&&this.a.Gf()};_.u.Ag=function(a){this.a&&this.a.Ag(a)};_.u.yg=function(a){this.a&&this.a.yg(a)};_.u.xg=function(a){this.a&&this.a.xg(a)};_.u.zg=function(a){this.a&&this.a.zg(a)};_.J(aW,YW);YW.prototype.setContentReleaseDate=YW.prototype.zg;YW.prototype.setContentArtist=YW.prototype.xg;
65
- YW.prototype.setContentImage=YW.prototype.yg;YW.prototype.setContentTitle=YW.prototype.Ag;YW.prototype.clearContentMetadata=YW.prototype.Gf;YW.prototype.setContentMetadata=YW.prototype.bc;YW.prototype.getContentMetadata=YW.prototype.Ab;YW.prototype.removeMessageListener=YW.prototype.removeMessageListener;YW.prototype.addMessageListener=YW.prototype.addMessageListener;YW.prototype.sendMessage=YW.prototype.sendMessage;YW.prototype.changeReceiverId=YW.prototype.Gj;YW.prototype.forceDisconnect=YW.prototype.Rf;
66
- YW.prototype.cast=YW.prototype.cast;YW.prototype.setPlayerConfigInterceptor=YW.prototype.pe;YW.prototype.getReceiverName=YW.prototype.Uf;YW.prototype.isCasting=YW.prototype.Ib;YW.prototype.canCast=YW.prototype.Df;YW.prototype.destroy=YW.prototype.destroy;_.x($W,gW);_.u=$W.prototype;
51
+ _.u.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};_.u.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};_.u.getState=function(){return this.j?this.j.getState():_.Wp};
52
+ _.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?zW(this.a.customData.stats):_.Rp()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Ac())return b.g.warn(pW),e["return"]();if(!aX)return b.g.warn(nW),e["return"]();b.C=_.mq(a);b.h=_.Em(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,ib:b.h,bc:c.bc,audioMimeType:c.audioMimeType};return _.y(e,jX(b,d),0)})};
53
+ _.u.getBufferInfo=function(){return new _.vm};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.L=a};_.u.getNetworkEngine=function(){return this.L};_.u.getSourceIndex=function(){return this.B};_.u.setSourceIndex=function(a){this.B=a};_.u.setCmsdManager=function(){};_.u.getLoadedSource=function(){return this.C[this.B]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
54
+ _.u.getTimelineCues=function(){return[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(oW)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.qe,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.zd};_.u.canPlay=function(){return this.Ac()?2:0};_.u.Cb=function(){return this.K};_.u.ac=function(a){this.K=RW(a)};_.u.Gf=function(){this.K=null};
55
+ _.u.Ag=function(a){var b=this.Cb()||{};a={metadataType:SW(b.metadataType),title:a};this.ac(Object.assign({},b,a))};_.u.yg=function(a){var b=this.Cb()||{},c=SW(b.metadataType);a=new chrome.cast.Image(a);this.ac(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.xg=function(a){var b=this.Cb()||{};this.ac(Object.assign({},b,{metadataType:3,artist:a}))};_.u.zg=function(a){var b=this.Cb()||{};a={metadataType:SW(b.metadataType),releaseDate:a};this.ac(Object.assign({},b,a))};
56
+ _.u.Em=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;aX=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ga=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Hg()};
57
+ _.u.Zm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;hX(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Kb()||(this.A=!0,hX(this,a.session),this.fa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Kb()&&this.a){var b=this.a.media,c=this.f.oa(),d=this.f.ya();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:fX(this),dj:d,Xg:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ba);a.session.removeMessageListener(uW,this.U);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.u.Rm=function(a){this.g.debug("New media session",a.mediaSession);gX(this,a.mediaSession)};_.u.Qm=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.u.Im=function(a,b){if(a===uW&&0<this.I.size){var c=zW(b);this.I.forEach(function(d){return d(c)})}};
59
+ _.u.Mj=function(){this.trigger(new _.L(_.qg))};_.u.dl=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,AW(a,[_.og,_.Wc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ha++,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)})};_.u.getTextDisplayer=function(){return null};var aX=!1,NW=new Set;
60
+ window.__onGCastApiAvailable=LW;_.x(mX,_.wm);_.u=mX.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,PW(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.B(b)})};_.u.Kn=function(a,b){this.f&&a!==_.bq&&a!==_.Vp&&(delete b.license,this.f.load(b))};_.u.Df=function(){return!!this.a&&this.a.Ac()&&aX};_.u.Kb=function(){return!!this.a&&this.a.Kb()};_.u.Uf=function(){return this.a?this.a.Uf():""};_.u.pe=function(a){this.a&&this.a.pe(a)};
61
+ _.u.cast=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.D(f,2);return _.y(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.oa();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.ya())l.language&&
62
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.hd?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),qg:b.f.getPresentationStartTime(),bc:m,audioMimeType:p,ib:g}}c=g;return _.y(f,nX(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.y(f,jX(b.a,c),7);case 7:_.sh(f,0);break;case 2:d=_.F(f),
63
+ b.g.error("Error while trying to cast",d),e=new _.L(_.qe,{detail:d}),b.trigger(e),_.B(f)}})};_.u.Rf=function(){this.a&&this.a.Rf()};_.u.Hj=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,PW(b.a),2):c.F(2)}b.a=lX(b);_.B(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(uW,a),0):(b.g.warn(qW),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(qW)};
64
+ _.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(qW)};_.u.Cb=function(){return this.a&&this.a.Cb()};_.u.ac=function(a){this.a&&this.a.ac(a)};_.u.Gf=function(){this.a&&this.a.Gf()};_.u.Ag=function(a){this.a&&this.a.Ag(a)};_.u.yg=function(a){this.a&&this.a.yg(a)};_.u.xg=function(a){this.a&&this.a.xg(a)};_.u.zg=function(a){this.a&&this.a.zg(a)};_.J(rW,mX);mX.prototype.setContentReleaseDate=mX.prototype.zg;mX.prototype.setContentArtist=mX.prototype.xg;
65
+ mX.prototype.setContentImage=mX.prototype.yg;mX.prototype.setContentTitle=mX.prototype.Ag;mX.prototype.clearContentMetadata=mX.prototype.Gf;mX.prototype.setContentMetadata=mX.prototype.ac;mX.prototype.getContentMetadata=mX.prototype.Cb;mX.prototype.removeMessageListener=mX.prototype.removeMessageListener;mX.prototype.addMessageListener=mX.prototype.addMessageListener;mX.prototype.sendMessage=mX.prototype.sendMessage;mX.prototype.changeReceiverId=mX.prototype.Hj;mX.prototype.forceDisconnect=mX.prototype.Rf;
66
+ mX.prototype.cast=mX.prototype.cast;mX.prototype.setPlayerConfigInterceptor=mX.prototype.pe;mX.prototype.getReceiverName=mX.prototype.Uf;mX.prototype.isCasting=mX.prototype.Kb;mX.prototype.canCast=mX.prototype.Df;mX.prototype.destroy=mX.prototype.destroy;_.x(oX,xW);_.u=oX.prototype;
67
67
  _.u.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
  _.u.destroy=function(){var a=this,b,c;return _.I(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 _.y(d,gW.prototype.destroy.call(a),0)})};_.u.Oj=function(){this.player.trigger(new _.L(_.kf));this.ya(_.$p)};_.u.Nj=function(){this.ya(_.Zp)};_.u.Em=function(){this.ya(_.Tp)};_.u.vm=function(a){a.isBuffering?this.ya(_.Rp):(a=this.player.isPaused()?_.Zp:_.$p,this.ya(a))};_.u.Qj=function(){this.h=1;this.player.trigger(new _.L(_.zg))};_.u.Pj=function(){this.player.trigger(new _.L(_.yg))};_.u.Um=function(){this.h=2};_.u.Hm=function(){this.ya(_.Yp)};
70
- _.u.Mj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.hd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.S=function(a){a=new _.N(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.pe,{detail:a}));this.ya(_.Xp)};_.u=aX.prototype;_.u.ob=function(){return"Google Cast Framework"};_.u.pb=function(){return cast.framework.VERSION};_.u.sb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.Tb=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};_.u.getPosition=function(){return 0};
71
- _.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Xb=function(){return!1};_.u.qb=function(){return this.a.clickThroughUrl||null};_.u.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.u.gb=function(){return 0};_.u.fb=function(){return 0};_.u.Ra=function(){return 0};_.u.Sa=function(){switch(this.Db()){case 0:return 0;case -1:return 2;default:return 1}};_.u.getPodIndex=function(){return this.j};_.u.Db=function(){return this.f.position};_.u.Eb=function(){return this.l};
72
- _.u.hb=function(){return this.h};_.u.getWrapperAdIds=function(){return[]};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};_.u.Wb=function(){return null};aX.prototype.getVideoElement=aX.prototype.Wb;aX.prototype.getWrapperCreativeIds=aX.prototype.getWrapperCreativeIds;aX.prototype.getWrapperAdSystems=aX.prototype.getWrapperAdSystems;aX.prototype.getWrapperAdIds=aX.prototype.getWrapperAdIds;aX.prototype.getSequenceLength=aX.prototype.hb;
73
- aX.prototype.getPositionInSequence=aX.prototype.Eb;aX.prototype.getPodTimeOffset=aX.prototype.Db;aX.prototype.getPodIndex=aX.prototype.getPodIndex;aX.prototype.getPodType=aX.prototype.Sa;aX.prototype.getMediaBitrate=aX.prototype.Ra;aX.prototype.getMediaHeight=aX.prototype.fb;aX.prototype.getMediaWidth=aX.prototype.gb;aX.prototype.getMediaUrl=aX.prototype.getMediaUrl;aX.prototype.getClickThroughUrl=aX.prototype.qb;aX.prototype.isBumper=aX.prototype.Xb;aX.prototype.getSkipTimeOffset=aX.prototype.getSkipTimeOffset;
74
- aX.prototype.getPosition=aX.prototype.getPosition;aX.prototype.getDuration=aX.prototype.getDuration;aX.prototype.getTitle=aX.prototype.getTitle;aX.prototype.getAdvertiserName=aX.prototype.getAdvertiserName;aX.prototype.getAdSystem=aX.prototype.getAdSystem;aX.prototype.getApiFramework=aX.prototype.getApiFramework;aX.prototype.getSourceId=aX.prototype.Tb;aX.prototype.getCreativeId=aX.prototype.getCreativeId;aX.prototype.getId=aX.prototype.getId;aX.prototype.getTechnology=aX.prototype.sb;
75
- aX.prototype.getAdManagerVersion=aX.prototype.pb;aX.prototype.getAdManagerName=aX.prototype.ob;bX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};bX.prototype.Gb=function(){return!!this.a.find(function(a){return 0===a.position})};bX.prototype.Fb=function(){return!!this.a.find(function(a){return-1===a.position})};bX.prototype.hasPostroll=bX.prototype.Fb;bX.prototype.hasPreroll=bX.prototype.Gb;bX.prototype.getCuePoints=bX.prototype.getCuePoints;_.u=dX.prototype;_.u.load=function(){var a=this;return _.I(function(b){eX&&(eX=!1,jX(a,0));_.C(b)})};_.u.start=function(){return _.I(function(a){cX().play();_.C(a)})};_.u.Yc=function(){};_.u.resume=function(){-1!==this.getPosition()&&cX().play()};_.u.pause=function(){-1!==this.getPosition()&&cX().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
76
- _.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.Tc=function(){return!0};_.u.uc=function(){var a=this;return _.I(function(b){cX().removeEventListener(a.f,a.h);_.C(b)})};
77
- _.u.Rj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=cX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Nc,{adsTimeline:new bX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:iX(this,_.Dc,a);break;case cast.framework.events.EventType.BREAK_STARTED:iX(this,_.tc,a);break;case cast.framework.events.EventType.BREAK_ENDED:iX(this,_.uc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:iX(this,
78
- _.Jc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(iX(this,_.Ic,a),iX(this,_.Kc,a)):a.endedReason===b.STOPPED?iX(this,_.Kc,a):a.endedReason===b.END_OF_STREAM?(iX(this,_.xc,a),iX(this,_.Kc,a)):a.endedReason===b.ERROR&&jX(this,1);break;case cast.framework.events.EventType.PLAYING:iX(this,_.Hc,a);break;case cast.framework.events.EventType.PAUSE:iX(this,_.Fc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?iX(this,_.vc,a):iX(this,_.Hc,a)}};
79
- dX.prototype.getPosition=dX.prototype.getPosition;dX.prototype.setVolume=dX.prototype.setVolume;dX.prototype.getVolume=dX.prototype.getVolume;dX.prototype.skip=dX.prototype.skip;dX.prototype.pause=dX.prototype.pause;dX.prototype.resume=dX.prototype.resume;var eX=!1;kX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(lX(),this.a)};kX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(lX(),this.a)};kX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return mX(a)})};
80
- kX.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=_.mi;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.hi;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ii}b&&this.Wa(new _.L(b,{detail:mX(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Wa(new _.L(_.mi,{detail:b.value}))};_.x(nX,_.hl);_.u=nX.prototype;_.u.initialize=function(a){this.m=a;oX().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;oX().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ka=function(){return this.j};_.u.la=function(){return null};
81
- _.u.Xa=function(){var a=this.pa();return a&&a.renditions[0]};_.u.Ta=function(){var a=this.za();return a&&a.renditions[0]};_.u.rb=function(){return null};_.u.Bb=function(){return null};_.u.Cb=function(){return null};_.u.Ja=function(){return null};_.u.pa=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
- _.u.za=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ka().find(function(c){return c.id===b})||null)}return a};_.u.yb=function(){this.g.warn("Video tracks unavailable on Cast")};_.u.Ha=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.u.Va=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.u.jb=function(){this.g.warn("Video renditions unavailable on Cast")};_.u.wb=function(a){this.Ha(a&&a.track)};
83
- _.u.xb=function(a){this.Va(a&&a.track)};
84
- _.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,jW(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]),qX(b)}catch(g){throw b.g.warn("failed on track",
85
- a),g;}}_.C(f)})};_.u.ua=function(){return!0};_.u.qn=function(){this.f=oX().getAudioTracksManager();var a=this.f.getTracks();this.h=pX(_.Fk,a);qX(this);a=this.m.getConfiguration();rX(this,_.Fk,a.preferredAudioLanguage,a.preferredAudioRole);rX(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};nX.prototype.isAbrEnabled=nX.prototype.ua;nX.prototype.addTextTrack=nX.prototype.addTextTrack;nX.prototype.setTextRendition=nX.prototype.xb;nX.prototype.setAudioRendition=nX.prototype.wb;
86
- nX.prototype.setVideoRendition=nX.prototype.jb;nX.prototype.setTextTrack=nX.prototype.Va;nX.prototype.setAudioTrack=nX.prototype.Ha;nX.prototype.setVideoTrack=nX.prototype.yb;nX.prototype.getTextTrack=nX.prototype.za;nX.prototype.getAudioTrack=nX.prototype.pa;nX.prototype.getVideoTrack=nX.prototype.Ja;nX.prototype.getLoadingTextRendition=nX.prototype.Cb;nX.prototype.getLoadingAudioRendition=nX.prototype.Bb;nX.prototype.getLoadingVideoRendition=nX.prototype.rb;nX.prototype.getTextRendition=nX.prototype.Ta;
87
- nX.prototype.getAudioRendition=nX.prototype.Xa;nX.prototype.getVideoRendition=nX.prototype.la;nX.prototype.getTextTracks=nX.prototype.ka;nX.prototype.getAudioTracks=nX.prototype.getAudioTracks;nX.prototype.getVideoTracks=nX.prototype.getVideoTracks;_.x(sX,_.sm);_.u=sX.prototype;_.u.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=tX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Km.bind(this));d.setMediaPlaybackInfoHandler(this.vj.bind(this));this.a=new $W(this);this.a.init();this.j=new nX;this.j.initialize(this);this.o=new kX(function(e){return c.trigger(e)});this.o.init()};
88
- _.u.unload=function(){var a=cast.framework.messages.PlayerState,b=tX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.ym(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.C(b)})};
89
- _.u.play=function(){var a=tX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=tX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return tX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
90
- _.u.isEnded=function(){return tX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=tX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(UV);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.getMediaPosition=function(){return tX().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
91
- _.u.getMediaDuration=function(){var a=tX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return tX().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;tX().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
69
+ a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,xW.prototype.destroy.call(a),0)})};_.u.Rj=function(){this.player.trigger(new _.L(_.mf));this.xa(_.iq)};_.u.Qj=function(){this.xa(_.hq)};_.u.Mm=function(){this.xa(_.bq)};_.u.Dm=function(a){a.isBuffering?this.xa(_.$p):(a=this.player.isPaused()?_.hq:_.iq,this.xa(a))};_.u.Tj=function(){this.h=1;this.player.trigger(new _.L(_.Ag))};_.u.Sj=function(){this.player.trigger(new _.L(_.zg))};_.u.bn=function(){this.h=2};_.u.Pm=function(){this.xa(_.gq)};
70
+ _.u.Oj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.gd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.Pj=function(a){a=new _.O(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.qe,{detail:a}));this.xa(_.fq)};_.u=pX.prototype;_.u.ob=function(){return"Google Cast Framework"};_.u.pb=function(){return cast.framework.VERSION};_.u.sb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.Sb=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};_.u.getPosition=function(){return 0};
71
+ _.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Wb=function(){return!1};_.u.qb=function(){return this.a.clickThroughUrl||null};_.u.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.u.fb=function(){return 0};_.u.eb=function(){return 0};_.u.Qa=function(){return 0};_.u.Ra=function(){switch(this.Fb()){case 0:return 0;case -1:return 2;default:return 1}};_.u.getPodIndex=function(){return this.j};_.u.Fb=function(){return this.f.position};_.u.Gb=function(){return this.l};
72
+ _.u.gb=function(){return this.h};_.u.getWrapperAdIds=function(){return[]};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};_.u.Vb=function(){return null};pX.prototype.getVideoElement=pX.prototype.Vb;pX.prototype.getWrapperCreativeIds=pX.prototype.getWrapperCreativeIds;pX.prototype.getWrapperAdSystems=pX.prototype.getWrapperAdSystems;pX.prototype.getWrapperAdIds=pX.prototype.getWrapperAdIds;pX.prototype.getSequenceLength=pX.prototype.gb;
73
+ pX.prototype.getPositionInSequence=pX.prototype.Gb;pX.prototype.getPodTimeOffset=pX.prototype.Fb;pX.prototype.getPodIndex=pX.prototype.getPodIndex;pX.prototype.getPodType=pX.prototype.Ra;pX.prototype.getMediaBitrate=pX.prototype.Qa;pX.prototype.getMediaHeight=pX.prototype.eb;pX.prototype.getMediaWidth=pX.prototype.fb;pX.prototype.getMediaUrl=pX.prototype.getMediaUrl;pX.prototype.getClickThroughUrl=pX.prototype.qb;pX.prototype.isBumper=pX.prototype.Wb;pX.prototype.getSkipTimeOffset=pX.prototype.getSkipTimeOffset;
74
+ pX.prototype.getPosition=pX.prototype.getPosition;pX.prototype.getDuration=pX.prototype.getDuration;pX.prototype.getTitle=pX.prototype.getTitle;pX.prototype.getAdvertiserName=pX.prototype.getAdvertiserName;pX.prototype.getAdSystem=pX.prototype.getAdSystem;pX.prototype.getApiFramework=pX.prototype.getApiFramework;pX.prototype.getSourceId=pX.prototype.Sb;pX.prototype.getCreativeId=pX.prototype.getCreativeId;pX.prototype.getId=pX.prototype.getId;pX.prototype.getTechnology=pX.prototype.sb;
75
+ pX.prototype.getAdManagerVersion=pX.prototype.pb;pX.prototype.getAdManagerName=pX.prototype.ob;qX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};qX.prototype.Ib=function(){return!!this.a.find(function(a){return 0===a.position})};qX.prototype.Hb=function(){return!!this.a.find(function(a){return-1===a.position})};qX.prototype.hasPostroll=qX.prototype.Hb;qX.prototype.hasPreroll=qX.prototype.Ib;qX.prototype.getCuePoints=qX.prototype.getCuePoints;_.u=sX.prototype;_.u.load=function(){var a=this;return _.I(function(b){tX&&(tX=!1,yX(a,0));_.B(b)})};_.u.start=function(){return _.I(function(a){rX().play();_.B(a)})};_.u.Vc=function(){};_.u.resume=function(){-1!==this.getPosition()&&rX().play()};_.u.pause=function(){-1!==this.getPosition()&&rX().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
76
+ _.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.Sc=function(){return!0};_.u.sc=function(){var a=this;return _.I(function(b){rX().removeEventListener(a.f,a.h);_.B(b)})};
77
+ _.u.Uj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=rX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Lc,{adsTimeline:new qX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:xX(this,_.Bc,a);break;case cast.framework.events.EventType.BREAK_STARTED:xX(this,_.rc,a);break;case cast.framework.events.EventType.BREAK_ENDED:xX(this,_.sc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:xX(this,
78
+ _.Hc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(xX(this,_.Gc,a),xX(this,_.Ic,a)):a.endedReason===b.STOPPED?xX(this,_.Ic,a):a.endedReason===b.END_OF_STREAM?(xX(this,_.vc,a),xX(this,_.Ic,a)):a.endedReason===b.ERROR&&yX(this,1);break;case cast.framework.events.EventType.PLAYING:xX(this,_.Fc,a);break;case cast.framework.events.EventType.PAUSE:xX(this,_.Dc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?xX(this,_.tc,a):xX(this,_.Fc,a)}};
79
+ sX.prototype.getPosition=sX.prototype.getPosition;sX.prototype.setVolume=sX.prototype.setVolume;sX.prototype.getVolume=sX.prototype.getVolume;sX.prototype.skip=sX.prototype.skip;sX.prototype.pause=sX.prototype.pause;sX.prototype.resume=sX.prototype.resume;var tX=!1;zX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(AX(),this.a)};zX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(AX(),this.a)};zX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return BX(a)})};
80
+ zX.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=_.oi;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.ji;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ki}b&&this.Ua(new _.L(b,{detail:BX(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Ua(new _.L(_.oi,{detail:b.value}))};_.x(CX,_.kl);_.u=CX.prototype;_.u.initialize=function(a){this.m=a;DX().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;DX().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ja=function(){return this.j};_.u.ka=function(){return null};
81
+ _.u.Va=function(){var a=this.oa();return a&&a.renditions[0]};_.u.Sa=function(){var a=this.ya();return a&&a.renditions[0]};_.u.rb=function(){return null};_.u.Db=function(){return null};_.u.Eb=function(){return null};_.u.Ia=function(){return null};_.u.oa=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
+ _.u.ya=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ja().find(function(c){return c.id===b})||null)}return a};_.u.zb=function(){this.g.warn("Video tracks unavailable on Cast")};_.u.Fa=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.u.Ta=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.u.jb=function(){this.g.warn("Video renditions unavailable on Cast")};_.u.xb=function(a){this.Fa(a&&a.track)};
83
+ _.u.yb=function(a){this.Ta(a&&a.track)};
84
+ _.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,AW(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]),FX(b)}catch(g){throw b.g.warn("failed on track",
85
+ a),g;}}_.B(f)})};_.u.ta=function(){return!0};_.u.yn=function(){this.f=DX().getAudioTracksManager();var a=this.f.getTracks();this.h=EX(_.Ik,a);FX(this);a=this.m.getConfiguration();GX(this,_.Ik,a.preferredAudioLanguage,a.preferredAudioRole);GX(this,_.U,a.preferredTextLanguage,a.preferredTextRole)};CX.prototype.isAbrEnabled=CX.prototype.ta;CX.prototype.addTextTrack=CX.prototype.addTextTrack;CX.prototype.setTextRendition=CX.prototype.yb;CX.prototype.setAudioRendition=CX.prototype.xb;
86
+ CX.prototype.setVideoRendition=CX.prototype.jb;CX.prototype.setTextTrack=CX.prototype.Ta;CX.prototype.setAudioTrack=CX.prototype.Fa;CX.prototype.setVideoTrack=CX.prototype.zb;CX.prototype.getTextTrack=CX.prototype.ya;CX.prototype.getAudioTrack=CX.prototype.oa;CX.prototype.getVideoTrack=CX.prototype.Ia;CX.prototype.getLoadingTextRendition=CX.prototype.Eb;CX.prototype.getLoadingAudioRendition=CX.prototype.Db;CX.prototype.getLoadingVideoRendition=CX.prototype.rb;CX.prototype.getTextRendition=CX.prototype.Sa;
87
+ CX.prototype.getAudioRendition=CX.prototype.Va;CX.prototype.getVideoRendition=CX.prototype.ka;CX.prototype.getTextTracks=CX.prototype.ja;CX.prototype.getAudioTracks=CX.prototype.getAudioTracks;CX.prototype.getVideoTracks=CX.prototype.getVideoTracks;_.x(HX,_.wm);_.u=HX.prototype;_.u.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=IX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Sm.bind(this));d.setMediaPlaybackInfoHandler(this.wj.bind(this));this.a=new oX(this);this.a.init();this.j=new CX;this.j.initialize(this);this.o=new zX(function(e){return c.trigger(e)});this.o.init()};
88
+ _.u.unload=function(){var a=cast.framework.messages.PlayerState,b=IX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.Cm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.B(b)})};
89
+ _.u.play=function(){var a=IX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=IX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return IX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
90
+ _.u.isEnded=function(){return IX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=IX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(kW);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.getMediaPosition=function(){return IX().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
91
+ _.u.getMediaDuration=function(){var a=IX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return IX().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;IX().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
92
92
  _.u.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.u.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
93
- _.u.getLoadedSource=function(){var a=tX().getMediaInformation();if(a){var b=tX().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,Eo:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return tX().getStartAbsoluteTime()};
94
- _.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=tX().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.Np};
95
- _.u.getStats=function(){var a=_.Ip();if(this.f){a=tX().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.u.isLive=function(){return Infinity===this.getDuration()};
96
- _.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.Hp;b.a.j=b.f.a;b.A=_.dq(a);b.h=_.Am(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:hW(b.h),local:!0};return _.y(e,tX().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.ta);return new _.rm};
97
- _.u.getTrackManager=function(){return this.j};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return this.B};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Cb)};_.u.appendLoad=function(){return Promise.reject(_.Cb)};_.u.seekWith=function(){return Promise.reject(_.Cb)};_.u.setNetworkEngine=function(a){this.G=a};_.u.setCmsdManager=function(){};_.u.getNetworkEngine=function(){return this.G};_.u.getSourceIndex=function(){return this.l};
98
- _.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return bW};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(YV)};_.u.onError=function(a){this.trigger(new _.L(_.pe,{detail:a}))};_.u.canPlay=function(){return _.Al()?2:0};
99
- _.u.Km=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=hW(this.getStats());var b=tX(),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=tX().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
- _.u.vj=function(a,b){var c=null,d=b;a.media.customData&&(c=iW(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;wX(c,d);e=null;a.media.customData&&(e=iW(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};_.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u=xX.prototype;_.u.init=function(a){var b=this;a&&(this.f=new sX,_.Js(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.Mp?_.y(c,fW(b.m),0):c.F(0)})}))};
103
- _.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=AX(),b=AX().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[dW]=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(dW,this.w)}};
105
- _.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=AX();AX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(dW,this.w);a.stop();this.m=this.f=null}};_.u.pe=function(a){this.j=a};_.u.Kn=function(a){this.l=a};_.u.on=function(a,b){AX().addEventListener(a,b)};_.u.off=function(a,b){AX().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.te&&this.h.add(a)};
106
- _.u.removeMessageListener=function(a){typeof a===_.te&&this.h["delete"](a)};_.u.sendMessage=function(a,b){AX().sendCustomMessage(dW,b,hW(a))};_.u.Cc=function(){return this.a};_.u.Ab=function(){return BX()};_.u.bc=function(a){CX(this,a)};_.u.ao=function(a){var b=BX(),c=null;a?c=Object.assign({},b,a):c=b;CX(this,c)};
107
- _.u.cm=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return EX(this,a);try{var b=(new DOMParser).parseFromString(a,_.og)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=AX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ia),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.$c){g=e[f].getAttribute(_.Qe);for(var h=e[f].getElementsByTagName(_.Qb),l=h.length-
108
- 1;0<=l;--l){var m=h[l].getAttribute(_.Qe)||g,n=h[l].getAttribute(_.Gd),p=h[l].getAttribute(_.Ug)||void 0,q=h[l].getAttribute(_.ue)||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(_.Qb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ia).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Zb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=AX();c=a.getElementsByTagName("StreamIndex");
109
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Ob);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.tb)||void 0,h=e[f].getAttribute(_.sb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Hg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Ob).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
110
- _.u.bm=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=iW(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,gX(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 _.y(l,_.Ts(b.m,d),8);case 8:return _.y(l,_.Us(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.cc&&(c.media.hlsVideoSegmentFormat=kW(f.cc,_.Gk)),f.audioMimeType&&(c.media.hlsSegmentFormat=kW(f.audioMimeType,_.Fk));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 _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.Gm=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.Sl;var b=AX().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))}_.Os(this.m)}};
113
- _.u.Lj=function(a){if(0<this.h.size){var b=iW(a.data);this.h.forEach(function(c){return c(b)})}};_.J(cW,xX);xX.prototype.updateContentMetadata=xX.prototype.ao;xX.prototype.setContentMetadata=xX.prototype.bc;xX.prototype.getContentMetadata=xX.prototype.Ab;xX.prototype.isApiReady=xX.prototype.Cc;xX.prototype.sendMessage=xX.prototype.sendMessage;xX.prototype.removeMessageListener=xX.prototype.removeMessageListener;xX.prototype.addMessageListener=xX.prototype.addMessageListener;xX.prototype.off=xX.prototype.off;
114
- xX.prototype.on=xX.prototype.on;xX.prototype.setLoadRequestDataInterceptor=xX.prototype.Kn;xX.prototype.setPlayerConfigInterceptor=xX.prototype.pe;xX.prototype.stop=xX.prototype.stop;xX.prototype.start=xX.prototype.start;xX.prototype.init=xX.prototype.init;xX.getInstance=zX;var yX=null;_.u=FX.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Wm.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.C(g)})};_.u.start=function(){return _.I(function(a){_.C(a)})};_.u.Yc=function(){};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
115
- _.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(eW,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.Tc=function(){return!0};_.u.uc=function(){var a=this;return _.I(function(b){a.h.release();_.C(b)})};
116
- _.u.Wm=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Nc,{adsTimeline:new bX(a.breaks)})));break;case "isPlayingBreak":a.value?HX(this,_.tc):(HX(this,_.xc),HX(this,_.Kc),HX(this,_.uc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(HX(this,_.xc),HX(this,_.Kc)),HX(this,_.Jc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?HX(this,_.Fc):HX(this,_.Hc))}};FX.prototype.getPosition=FX.prototype.getPosition;
117
- FX.prototype.setVolume=FX.prototype.setVolume;FX.prototype.getVolume=FX.prototype.getVolume;FX.prototype.skip=FX.prototype.skip;FX.prototype.pause=FX.prototype.pause;FX.prototype.resume=FX.prototype.resume;IX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};IX.prototype.a=function(a,b){return a.namespace()!==_.Ad?!1:!(!b||!b.ima)};IX.prototype.create=function(a){return new FX(a.a)};_.tq(new IX);JX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};JX.prototype.a=function(a,b){return zX().Cc()?!(!b||!b.ima):!1};JX.prototype.create=function(a){return new dX(a)};_.tq(new JX);};
93
+ _.u.getLoadedSource=function(){var a=IX().getMediaInformation();if(a){var b=IX().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,Mo:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return IX().getStartAbsoluteTime()};
94
+ _.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=IX().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.Wp};
95
+ _.u.getStats=function(){var a=_.Rp();if(this.f){a=IX().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.u.isLive=function(){return Infinity===this.getDuration()};
96
+ _.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.Qp;b.a.j=b.f.a;b.A=_.mq(a);b.h=_.Em(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:yW(b.h),local:!0};return _.y(e,IX().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.sa);return new _.vm};
97
+ _.u.getTrackManager=function(){return this.j};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return this.B};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Bb)};_.u.appendLoad=function(){return Promise.reject(_.Bb)};_.u.seekWith=function(){return Promise.reject(_.Bb)};_.u.setNetworkEngine=function(a){this.G=a};_.u.setCmsdManager=function(){};_.u.getNetworkEngine=function(){return this.G};_.u.getSourceIndex=function(){return this.l};
98
+ _.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return sW};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(oW)};_.u.onError=function(a){this.trigger(new _.L(_.qe,{detail:a}))};_.u.canPlay=function(){return _.El()?2:0};
99
+ _.u.Sm=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=yW(this.getStats());var b=IX(),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=IX().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
+ _.u.wj=function(a,b){var c=null,d=b;a.media.customData&&(c=zW(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;LX(c,d);e=null;a.media.customData&&(e=zW(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};_.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u=MX.prototype;_.u.init=function(a){var b=this;a&&(this.f=new HX,_.Ss(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.Vp?_.y(c,wW(b.m),0):c.F(0)})}))};
103
+ _.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=PX(),b=PX().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[uW]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.lm.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.km.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(uW,this.w)}};
105
+ _.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=PX();PX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(uW,this.w);a.stop();this.m=this.f=null}};_.u.pe=function(a){this.j=a};_.u.Sn=function(a){this.l=a};_.u.on=function(a,b){PX().addEventListener(a,b)};_.u.off=function(a,b){PX().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.ue&&this.h.add(a)};
106
+ _.u.removeMessageListener=function(a){typeof a===_.ue&&this.h["delete"](a)};_.u.sendMessage=function(a,b){PX().sendCustomMessage(uW,b,yW(a))};_.u.Ac=function(){return this.a};_.u.Cb=function(){return QX()};_.u.ac=function(a){RX(this,a)};_.u.ko=function(a){var b=QX(),c=null;a?c=Object.assign({},b,a):c=b;RX(this,c)};
107
+ _.u.lm=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return TX(this,a);try{var b=(new DOMParser).parseFromString(a,_.pg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=PX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ia),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.Zc){g=e[f].getAttribute(_.Re);for(var h=e[f].getElementsByTagName(_.Pb),l=h.length-
108
+ 1;0<=l;--l){var m=h[l].getAttribute(_.Re)||g,n=h[l].getAttribute(_.Fd),p=h[l].getAttribute(_.Wg)||void 0,q=h[l].getAttribute(_.ve)||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(_.Pb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ia).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Yb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=PX();c=a.getElementsByTagName("StreamIndex");
109
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Nb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.sb)||void 0,h=e[f].getAttribute(_.rb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Jg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Nb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
110
+ _.u.km=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=zW(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,vX(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 _.y(l,_.bt(b.m,d),8);case 8:return _.y(l,_.ct(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.bc&&(c.media.hlsVideoSegmentFormat=BW(f.bc,_.Jk)),f.audioMimeType&&(c.media.hlsSegmentFormat=BW(f.audioMimeType,_.Ik));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 _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.Om=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.am;var b=PX().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))}_.Xs(this.m)}};
113
+ _.u.Nj=function(a){if(0<this.h.size){var b=zW(a.data);this.h.forEach(function(c){return c(b)})}};_.J(tW,MX);MX.prototype.updateContentMetadata=MX.prototype.ko;MX.prototype.setContentMetadata=MX.prototype.ac;MX.prototype.getContentMetadata=MX.prototype.Cb;MX.prototype.isApiReady=MX.prototype.Ac;MX.prototype.sendMessage=MX.prototype.sendMessage;MX.prototype.removeMessageListener=MX.prototype.removeMessageListener;MX.prototype.addMessageListener=MX.prototype.addMessageListener;MX.prototype.off=MX.prototype.off;
114
+ MX.prototype.on=MX.prototype.on;MX.prototype.setLoadRequestDataInterceptor=MX.prototype.Sn;MX.prototype.setPlayerConfigInterceptor=MX.prototype.pe;MX.prototype.stop=MX.prototype.stop;MX.prototype.start=MX.prototype.start;MX.prototype.init=MX.prototype.init;MX.getInstance=OX;var NX=null;_.u=UX.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.dn.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.B(g)})};_.u.start=function(){return _.I(function(a){_.B(a)})};_.u.Vc=function(){};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
115
+ _.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(vW,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.Sc=function(){return!0};_.u.sc=function(){var a=this;return _.I(function(b){a.h.release();_.B(b)})};
116
+ _.u.dn=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Lc,{adsTimeline:new qX(a.breaks)})));break;case "isPlayingBreak":a.value?WX(this,_.rc):(WX(this,_.vc),WX(this,_.Ic),WX(this,_.sc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(WX(this,_.vc),WX(this,_.Ic)),WX(this,_.Hc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?WX(this,_.Dc):WX(this,_.Fc))}};UX.prototype.getPosition=UX.prototype.getPosition;
117
+ UX.prototype.setVolume=UX.prototype.setVolume;UX.prototype.getVolume=UX.prototype.getVolume;UX.prototype.skip=UX.prototype.skip;UX.prototype.pause=UX.prototype.pause;UX.prototype.resume=UX.prototype.resume;XX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};XX.prototype.a=function(a,b){return a.namespace()!==_.zd?!1:!(!b||!b.ima)};XX.prototype.create=function(a){return new UX(a.a)};_.Cq(new XX);YX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};YX.prototype.a=function(a,b){return OX().Ac()?!(!b||!b.ima):!1};YX.prototype.create=function(a){return new sX(a)};_.Cq(new YX);};
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));}