@castlabs/prestoplay 6.17.1 → 6.18.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 (63) hide show
  1. package/CHANGELOG.md +30 -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 +111 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +566 -558
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +75 -74
  10. package/cjs/cl.externs.js +46 -46
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +71 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +311 -311
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +15 -15
  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 +69 -69
  26. package/cjs/cl.ttml.js +28 -28
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +13 -13
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.youbora.js +18 -18
  32. package/cl.adobe.js +3 -3
  33. package/cl.airplay.js +3 -3
  34. package/cl.broadpeak.js +5 -5
  35. package/cl.cast.js +87 -87
  36. package/cl.conviva.js +27 -27
  37. package/cl.core.js +456 -450
  38. package/cl.crypto.js +8 -8
  39. package/cl.dash.js +70 -69
  40. package/cl.externs.js +46 -46
  41. package/cl.freewheel.js +19 -19
  42. package/cl.hls.js +72 -72
  43. package/cl.hlssmpte.js +5 -5
  44. package/cl.htmlcue.js +26 -26
  45. package/cl.ima.js +17 -17
  46. package/cl.mse.js +274 -273
  47. package/cl.muxdata.js +13 -13
  48. package/cl.onboard.js +4 -4
  49. package/cl.persistent.js +10 -10
  50. package/cl.playlist.js +5 -5
  51. package/cl.sessions.js +10 -10
  52. package/cl.simid.js +13 -13
  53. package/cl.smooth.js +59 -59
  54. package/cl.thumbnails.js +19 -19
  55. package/cl.tizen.js +57 -57
  56. package/cl.ttml.js +22 -22
  57. package/cl.verimatrix.js +4 -4
  58. package/cl.vimond.js +8 -8
  59. package/cl.vr.js +15 -15
  60. package/cl.vtt.js +12 -12
  61. package/cl.youbora.js +15 -15
  62. package/package.json +2 -2
  63. package/typings.d.ts +37 -3
package/cjs/cl.cast.js CHANGED
@@ -1,118 +1,118 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var ZT="Cannot seek during ads playout.",$T="Cannot switch track",aU="Media session does not exist.",bU="No receivers available",cU="Reset ABR functionality not available on cast.",dU="SDK not yet ready",eU="Sender is destroyed.",fU="clpp.cast.CastProxy",gU="clpp.cast.Player",hU="clpp.cast.Receiver",iU="urn:x-cast:castlabs",jU="urn:x-cast:com.google.cast.media",kU=function(a){return _.H(function(b){return 1==b.a?_.y(b,a.xc(_.af),2):_.y(b,a.xc(_.$e),0)})},lU=function(a,b){this.log=new _.K(b);this.player=
3
- a;this.j=null;this.f=_.lp;this.l=_.mp;this.h=2;this.B=Date.now();this.A=-1},mU=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}})},nU=function(a){if(typeof a!==_.jg)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}},oU=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.H(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.Ik(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Jj(a.url);return _.y(q,c.fetch(l).P,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.lj(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)})},pU=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===_.hk?d.MPEG2_TS:c.TS;case _.bd:return c.AAC;case _.cd:return c.AC3;case _.dd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.ed:return c.FMP4}},rU=function(a){a=
6
- void 0===a?qU:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.P(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}},sU=function(a){lU.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.a=null;this.w=this.Ib.bind(this)},tU=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},uU=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},wU=function(a,b){var c=uU(a);return vU(a,b).find(function(d){return c.includes(d.id)})||null},vU=function(a,b){return a.h.filter(function(c){return c.type===b})},yU=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.ua();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;xU(a,b)},function(f){a.f[b]=null;a.g.debug($T,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){xU(a,b)},function(f){a.g.debug($T,f)}))},xU=function(a,b){b===_.gk?a.a.trigger(new _.L(_.Ol)):b===_.T&&a.a.trigger(new _.L(_.Pl))},CU=function(a,b,c,d){_.Vl.call(this);this.g=new _.K(_.Ed);this.aa=a;this.o=new _.Wk(b);this.$=c;this.fa=d;this.h=this.J=
9
- _.am();this.D=[];this.B=0;this.L=new _.ak;this.H=this.l=this.a=null;this.A=this.w=!1;this.ja="";this.Ma=1E6;this.f=new tU;this.f.initialize(this);this.j=new sU(this);this.I=new _.Uh;this.K=null;this.G=new Set;this.S=this.Yl.bind(this);this.Ea=this.sm.bind(this);this.ea=this.jm.bind(this);this.V=this.bm.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(){zU(!0)},0)}});AU(this);BU.add(this)},
10
- DU=function(a){var b,c;return _.H(function(d){if(1==d.a)return BU["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.S),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ea)),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.$=null;a.fa=null;_.A(d)})},IU=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(EU);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=rU(EU[b]);return Object.assign(b,a)},NU=function(a){var b=void 0===b?qU:b;return Object.values(EU).includes(a)?a:b},SU=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},AU=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.kg();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.S);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ea);TU&&a.o.da(.02)}},UU=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},WU=function(a,b){VU(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ea);b.addMessageListener(iU,a.V)},VU=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.l),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.dj.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Je)))},XU=function(a){return _.H(function(b){return a.tb()?
14
- b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},YU=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,u,v,z,C,I,F;return _.H(function(D){switch(D.a){case 1:return c=chrome.cast.media.StreamType,d=_.gv,_.y(D,XU(a),2);case 2:if(!b)return D["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Mb;m=h.audioMimeType;g.hlsVideoSegmentFormat=pU(l,d.VIDEO);
15
- g.hlsSegmentFormat=pU(m,d.AUDIO);if(!b.Ya){D.F(3);break}if(!a.N){D.F(4);break}return _.y(D,Promise.resolve(a.N(b.Ya)),5);case 5:if(n=D.f)b.Ya=n;case 4:a.h=b.Ya;a.D=_.Dp(a.h);a.B=a.D.findIndex(function(G){return G.url===b.source.url});if(!b.Ya.remoteTextTracks){D.F(6);break}return _.y(D,Promise.all(b.Ya.remoteTextTracks.map(a.pk.bind(a))),7);case 7:p=D.f,g.tracks=p.filter(function(G){return G}),b.Ya.remoteTextTracks=void 0;case 6:delete b.Ya.autoplay,b.Ya.startTime=null,g.customData={playerConfiguration:mU(b.Ya)};
16
- case 3:q=a.mb()||{};u=NU(q.metadataType);typeof b.Xf===_.k&&(v={metadataType:u,sectionStartAbsoluteTime:b.Xf});b.source.name&&(z={metadataType:u,title:b.source.name});C=SU(q);if(I=IU(Object.assign({},v,z,C)))g.metadata=I;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.kd&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.y(D,f.loadMedia(F),0)}})},ZU=function(a,b,c){c=void 0===c?0:c;var d,e;return _.H(function(f){(d=a.f.ua())&&d.language&&(a.h.preferredTextLanguage=
17
- d.language);(e=a.f.ma())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,YU(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Xf:a.getPresentationStartTime(),autoplay:b,Ya:a.h}),0)})},zU=function(a){if(a){a=_.w(BU);for(var b=a.next();!b.done;b=a.next())AU(b.value)}},aV=function(a,b,c){_.Vl.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.ue?c:function(e,f){d.f&&e!==_.sp&&e!==_.lp&&d.f.load(f)};this.a=$U(this);this.g=new _.K(fU);this.f&&this.forwardEventsTo(this.f)},
18
- $U=function(a){return new CU(a.h,function(){a.trigger(new _.L(_.rd))},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.si&&(d.preferredTextLanguage=c.si);_.Mq(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return bV(a)})},bV=function(a){var b;return _.H(function(c){if(1==c.a)return a.trigger(new _.L(_.qd)),
19
- b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Mq(a.f,a.a);_.A(c)})},cV=function(a){lU.call(this,a,"clpp.cast.StateManager");this.I=this.hj.bind(this);this.H=this.gj.bind(this);this.w=this.fm.bind(this);this.o=this.Xl.bind(this);this.K=this.jj.bind(this);this.J=this.ij.bind(this);this.L=this.vm.bind(this);this.G=this.im.bind(this);this.D=this.T.bind(this);this.a=this.fj.bind(this)},dV=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.l=typeof d===_.k?d:1;this.h=
20
- typeof e===_.k?e:0},eV=function(a){this.a=a},gV=function(a){this.m=a;this.a=null;this.h=this.kj.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,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];
21
- fV().addEventListener(this.f,this.h)},jV=function(a,b,c){var d,e,f,g,h,l,m;return _.H(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.B(n,2);hV=!1;e=_.Jj(d);return _.y(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.S.ba(f.data),h=new DOMParser,l=h.parseFromString(g,_.qg),l.getElementsByTagName("vmap:VMAP").length)_.Fh("VMAP detected."),a.vmapAdsRequest=iV(g);else if(l.getElementsByTagName("VAST").length){_.Fh("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
- p.vastAdsRequest=iV(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Fh("Unsupported schema."),hV=!0;return _.qh(n,0)}m=_.E(n);_.Fh("Failed to fetch an ad",m);hV=!0;_.A(n)})},iV=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},fV=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},lV=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
- (c=kV(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},mV=function(a,b){var c=new _.P(1,10,10003,{errorType:b});a.m.onError(c)},kV=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.jg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.jg&&(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<=g.position}).sort(function(g,
24
- h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new dV(d,e,b.index,b.total,f)}return c},nV=function(a){this.fc=a;this.a=this.f.bind(this)},oV=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]},pV=function(a){var b=a.dashTimedMetadata,c=_.zg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.yg)?
25
- _.ei:_.ci,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},qV=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Pm.bind(this);this.a=this.f=null},rV=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},tV=function(a){a.a=rV().getTextTracksManager();var b=a.a.getTracks();a.j=sV(_.T,b)},uV=function(a,b,c,d){c=_.ji(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.gk?f=a.getAudioTracks():b===_.T&&(f=a.ia());if(c=c.find(function(h){var l=_.dj(h);return f.some(function(m){m=_.dj(m.language||"");return _.ej(l,m)})})){var g=_.dj(c);c=f.filter(function(h){h=_.dj(h.language||"");return _.ej(g,h)});f=c.length?c:f;e=e||!!c.length}_.S.Fe(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===_.gk?a.za(e):b===_.T&&a.La(e))},sV=function(a,b){for(var c=[],d=_.w(b),
27
- e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.ek(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},vV=function(){_.Vl.call(this);this.g=new _.K(gU);this.h=this.w=_.am();this.A=null;
28
- this.l=-1;this.G=new _.ak;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},wV=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},zV=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.ym(d);if(e){var f=[_.Rd];_.Dp(a)[0].type!==_.Zc&&f.unshift(_.Td);d.preferredDrmSystem===_.Rd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
- h=e.$a[g];h?(d=g===_.Td?cast.framework.ContentProtection.WIDEVINE:g===_.Rd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},xV(b,h,a,d),yV(b,h,a,d)):c()}else c()}else c()},xV=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Jj({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,
30
- d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},yV=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.H(function(h){return 1==h.a?(g=_.Kj(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.lj(g.data))})}:a.licenseHandler=void 0},AV=function(){this.a=!1;this.g=new _.K(hU);this.f=this.m=null;this.h=new Set;this.A=this.hm.bind(this);
31
- this.w=this.ej.bind(this);this.j=null;this.o=new _.Uh;this.l=null},CV=function(){return BV||(BV=new AV)},DV=function(){return cast.framework.CastReceiverContext.getInstance()},FV=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=DV();c=(DV().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=
32
- EV(h,_.sa),m=EV(h,_.Tb),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);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},EV=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},GV=function(a){this.f=a;this.a=null;this.h=new _.Uh;this.j=
33
- [cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},IV=function(a,b){var c=null,d=HV(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},HV=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})||
34
- 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===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new dV(d,c,e,f,g)}return b},JV=function(){},KV=function(){};_.t=lU.prototype;_.t.release=function(){this.ta(_.lp)};_.t.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.t.getState=function(){return this.f};
35
- _.t.onError=function(a){a.severity===_.Q&&this.ta(_.wp)};
36
- _.t.ta=function(a){if(a!==this.f)if(this.f===_.wp&&a!==_.lp)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===_.qp?(this.A=b,this.player.trigger(new _.L(_.md,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.qp&&this.player.trigger(new _.L(_.ld,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.bp(this.j,this.f);this.player.trigger(new _.L(_.gg,
37
- {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var qU=0,EU={GENERIC:qU,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(sU,lU);sU.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)};sU.prototype.destroy=function(){var a=this;return _.H(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,lU.prototype.destroy.call(a),0)})};sU.prototype.ta=function(a){var b=this.player.l;b&&b.isPlayingBreak||lU.prototype.ta.call(this,a)};
38
- sU.prototype.Ib=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.ta(_.sp);break;case chrome.cast.media.IdleReason.ERROR:this.ta(_.wp);break;default:this.ta(_.lp)}break;case chrome.cast.media.PlayerState.PLAYING:this.ta(_.zp);break;case chrome.cast.media.PlayerState.PAUSED:this.ta(_.yp);break;case chrome.cast.media.PlayerState.BUFFERING:this.ta(_.qp)}};_.x(tU,_.V);_.t=tU.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.h=[];this.f={}};
39
- _.t.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=_.hk;break;case chrome.cast.media.TrackType.AUDIO:c=_.gk;break;case chrome.cast.media.TrackType.TEXT:c=_.T}c=new _.ek(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(_.iv)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return vU(this,_.hk)};_.t.getAudioTracks=function(){return vU(this,_.gk)};_.t.ia=function(){return vU(this,_.T)};_.t.na=function(){var a=this.Ja();return a?a.renditions[0]:null};_.t.Pa=function(){var a=this.ma();return a?a.renditions[0]:null};_.t.Ia=function(){var a=this.ua();return a?a.renditions[0]:null};_.t.eb=function(){return this.f[_.hk]||null};
41
- _.t.nb=function(){return this.f[_.gk]||null};_.t.ob=function(){return this.f[_.T]||null};_.t.Ja=function(){return wU(this,_.hk)};_.t.ma=function(){return wU(this,_.gk)};_.t.ua=function(){return wU(this,_.T)};_.t.kb=function(a){yU(this,_.hk,a)};_.t.za=function(a){yU(this,_.gk,a)};_.t.La=function(a){yU(this,_.T,a)};_.t.Za=function(a){this.kb(a&&a.track)};_.t.ib=function(a){this.za(a&&a.track)};_.t.jb=function(a){this.La(a&&a.track)};_.t.addTextTrack=function(){return _.H(function(a){_.A(a)})};
42
- _.t.qa=function(){return!0};tU.prototype.isAbrEnabled=tU.prototype.qa;tU.prototype.addTextTrack=tU.prototype.addTextTrack;tU.prototype.setTextRendition=tU.prototype.jb;tU.prototype.setAudioRendition=tU.prototype.ib;tU.prototype.setVideoRendition=tU.prototype.Za;tU.prototype.setTextTrack=tU.prototype.La;tU.prototype.setAudioTrack=tU.prototype.za;tU.prototype.setVideoTrack=tU.prototype.kb;tU.prototype.getTextTrack=tU.prototype.ua;tU.prototype.getAudioTrack=tU.prototype.ma;
43
- tU.prototype.getVideoTrack=tU.prototype.Ja;tU.prototype.getLoadingTextRendition=tU.prototype.ob;tU.prototype.getLoadingAudioRendition=tU.prototype.nb;tU.prototype.getLoadingVideoRendition=tU.prototype.eb;tU.prototype.getTextRendition=tU.prototype.Ia;tU.prototype.getAudioRendition=tU.prototype.Pa;tU.prototype.getVideoRendition=tU.prototype.na;tU.prototype.getTextTracks=tU.prototype.ia;tU.prototype.getAudioTracks=tU.prototype.getAudioTracks;tU.prototype.getVideoTracks=tU.prototype.getVideoTracks;_.x(CU,_.Vl);_.t=CU.prototype;_.t.init=function(a,b){this.h=this.J=b};_.t.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)})};_.t.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.t.getTimeline=function(){return null};_.t.setupPlaylist=function(){return Promise.reject(_.Hb)};_.t.appendLoad=function(){return Promise.reject(_.Hb)};_.t.seekWith=function(){return Promise.reject(_.Hb)};
44
- _.t.destroy=function(){return _.H(function(a){_.A(a)})};_.t.$d=function(a){this.N=a};_.t.sc=function(){return this.w};_.t.tb=function(){return this.A};_.t.Df=function(){return this.ja};
45
- _.t.sendMessage=function(a,b){var c=this,d,e,f;return _.H(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.P(1,8,8004,void 0);g.F(2);break}_.B(g,3);return _.y(g,e.sendMessage(a,mU(b)),5);case 5:_.qh(g,2);break;case 3:f=_.E(g),d=new _.P(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.A(g)}})};
46
- _.t.cast=function(){var a=this,b,c;return _.H(function(d){if(1==d.a){if(!a.sc())throw a.g.warn(dU),new _.P(1,8,8001,void 0);if(!TU)throw a.g.warn(bU),new _.P(1,8,8002,void 0);if(a.tb())throw a.g.warn("Already casting"),new _.P(1,8,8003,void 0);_.B(d,2);return _.y(d,XU(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 _.P(1,8,8E3,c);})};_.t.zf=function(){this.tb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
- _.t.addMessageListener=function(a){typeof a===_.ue&&this.G.add(a)};_.t.removeMessageListener=function(a){typeof a===_.ue&&this.G["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?ZU(this,!0):new Promise(function(b,c){if(!a.a)return c(aU);a.a.play(null,b,c)})};_.t.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(aU);a.a.pause(null,b,c)})};_.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
- _.t.isEnded=function(){return this.getState()===_.sp};_.t.seek=function(a){var b=this;return this.isEnded()?ZU(this,!1,a):new Promise(function(c,d){b.a||d(aU);b.l.isPlayingBreak&&d(ZT);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Dg));b.a.seek(e,function(){b.trigger(new _.L(_.Cg));c()},d)})};_.t.getPosition=function(){return this.getMediaPosition()};_.t.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.t.getDuration=function(){return this.getMediaDuration()};
49
- _.t.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};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(jU,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
2
+ var f=function(window){var fU="Cannot seek during ads playout.",gU="Cannot switch track",hU="Media session does not exist.",iU="No receivers available",jU="Reset ABR functionality not available on cast.",kU="SDK not yet ready",lU="Sender is destroyed.",mU="clpp.cast.CastProxy",nU="clpp.cast.Player",oU="clpp.cast.Receiver",pU="urn:x-cast:castlabs",qU="urn:x-cast:com.google.cast.media",rU=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.yc(_.df),2):_.y(b,a.yc(_.cf),0)})},sU=function(a,b){this.log=new _.K(b);this.player=
3
+ a;this.j=null;this.f=_.np;this.l=_.op;this.h=2;this.B=Date.now();this.A=-1},tU=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.we){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.$e?"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}})},uU=function(a){if(typeof a!==_.mg)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}},vU=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=_.Lk(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Mj(a.url);return _.y(q,c.fetch(l).P,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.oj(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},wU=function(a,b){if(window.chrome&&
5
+ chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Mg:return d.FMP4;case _.Lg:return b===_.kk?d.MPEG2_TS:c.TS;case _.dd:return c.AAC;case _.ed:return c.AC3;case _.gd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.hd:return c.FMP4}},yU=function(a){a=
6
+ void 0===a?xU: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}},zU=function(a){sU.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.Mb.bind(this)},AU=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},BU=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},DU=function(a,b){var c=BU(a);return CU(a,b).find(function(d){return c.includes(d.id)})||null},CU=function(a,b){return a.h.filter(function(c){return c.type===b})},FU=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.wa();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;EU(a,b)},function(f){a.f[b]=null;a.g.debug(gU,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){EU(a,b)},function(f){a.g.debug(gU,f)}))},EU=function(a,b){b===_.jk?a.a.trigger(new _.L(_.Rl)):b===_.T&&a.a.trigger(new _.L(_.Sl))},JU=function(a,b,c,d){_.Yl.call(this);this.g=new _.K(_.Hd);this.aa=a;this.o=new _.Zk(b);this.$=c;this.fa=d;this.h=this.J=
9
+ _.dm();this.D=[];this.B=0;this.L=new _.dk;this.H=this.l=this.a=null;this.A=this.w=!1;this.ja="";this.Na=1E6;this.f=new AU;this.f.initialize(this);this.j=new zU(this);this.I=new _.Xh;this.K=null;this.G=new Set;this.R=this.am.bind(this);this.Ga=this.vm.bind(this);this.ea=this.mm.bind(this);this.V=this.em.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(){GU(!0)},0)}});HU(this);IU.add(this)},
10
+ KU=function(a){var b,c;return _.I(function(d){if(1==d.a)return IU["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.R),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga)),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.$=null;a.fa=null;_.B(d)})},PU=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(LU);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=yU(LU[b]);return Object.assign(b,a)},UU=function(a){var b=void 0===b?xU:b;return Object.values(LU).includes(a)?a:b},ZU=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},HU=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.ng();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.R);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga);$U&&a.o.da(.02)}},aV=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},cV=function(a,b){bV(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ea);b.addMessageListener(pU,a.V)},bV=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.l),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.fj.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Ne)))},dV=function(a){return _.I(function(b){return a.ub()?
14
+ b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},eV=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,u,v,z,A,G,F;return _.I(function(C){switch(C.a){case 1:return c=chrome.cast.media.StreamType,d=_.nv,_.y(C,dV(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=b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Qb;m=h.audioMimeType;g.hlsVideoSegmentFormat=wU(l,d.VIDEO);
15
+ g.hlsSegmentFormat=wU(m,d.AUDIO);if(!b.Za){C.F(3);break}if(!a.N){C.F(4);break}return _.y(C,Promise.resolve(a.N(b.Za)),5);case 5:if(n=C.f)b.Za=n;case 4:a.h=b.Za;a.D=_.Fp(a.h);a.B=a.D.findIndex(function(H){return H.url===b.source.url});if(!b.Za.remoteTextTracks){C.F(6);break}return _.y(C,Promise.all(b.Za.remoteTextTracks.map(a.rk.bind(a))),7);case 7:p=C.f,g.tracks=p.filter(function(H){return H}),b.Za.remoteTextTracks=void 0;case 6:delete b.Za.autoplay,b.Za.startTime=null,g.customData={playerConfiguration:tU(b.Za)};
16
+ case 3:q=a.nb()||{};u=UU(q.metadataType);typeof b.$f===_.k&&(v={metadataType:u,sectionStartAbsoluteTime:b.$f});b.source.name&&(z={metadataType:u,title:b.source.name});A=ZU(q);if(G=PU(Object.assign({},v,z,A)))g.metadata=G;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.md&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.y(C,f.loadMedia(F),0)}})},fV=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.wa())&&d.language&&(a.h.preferredTextLanguage=
17
+ d.language);(e=a.f.ma())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,eV(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),$f:a.getPresentationStartTime(),autoplay:b,Za:a.h}),0)})},GU=function(a){if(a){a=_.w(IU);for(var b=a.next();!b.done;b=a.next())HU(b.value)}},hV=function(a,b,c){_.Yl.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.we?c:function(e,f){d.f&&e!==_.up&&e!==_.np&&d.f.load(f)};this.a=gV(this);this.g=new _.K(mU);this.f&&this.forwardEventsTo(this.f)},
18
+ gV=function(a){return new JU(a.h,function(){a.trigger(new _.L(_.td))},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.Ag&&(d.preferredAudioLanguage=c.Ag);c.xi&&(d.preferredTextLanguage=c.xi);_.Oq(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return iV(a)})},iV=function(a){var b;return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.sd)),
19
+ b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Oq(a.f,a.a);_.B(c)})},jV=function(a){sU.call(this,a,"clpp.cast.StateManager");this.I=this.jj.bind(this);this.H=this.ij.bind(this);this.w=this.im.bind(this);this.o=this.$l.bind(this);this.K=this.lj.bind(this);this.J=this.kj.bind(this);this.L=this.ym.bind(this);this.G=this.lm.bind(this);this.D=this.T.bind(this);this.a=this.hj.bind(this)},kV=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.l=typeof d===_.k?d:1;this.h=
20
+ typeof e===_.k?e:0},lV=function(a){this.a=a},nV=function(a){this.m=a;this.a=null;this.h=this.mj.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,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];
21
+ mV().addEventListener(this.f,this.h)},qV=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);oV=!1;e=_.Mj(d);return _.y(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.S.ba(f.data),h=new DOMParser,l=h.parseFromString(g,_.tg),l.getElementsByTagName("vmap:VMAP").length)_.Ih("VMAP detected."),a.vmapAdsRequest=pV(g);else if(l.getElementsByTagName("VAST").length){_.Ih("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
+ p.vastAdsRequest=pV(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Ih("Unsupported schema."),oV=!0;return _.th(n,0)}m=_.E(n);_.Ih("Failed to fetch an ad",m);oV=!0;_.B(n)})},pV=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},mV=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},sV=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
+ (c=rV(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},tV=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},rV=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.mg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.mg&&(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<=g.position}).sort(function(g,
24
+ h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new kV(d,e,b.index,b.total,f)}return c},uV=function(a){this.gc=a;this.a=this.f.bind(this)},vV=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]},wV=function(a){var b=a.dashTimedMetadata,c=_.Cg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Bg)?
25
+ _.hi:_.fi,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},xV=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Sm.bind(this);this.a=this.f=null},yV=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},AV=function(a){a.a=yV().getTextTracksManager();var b=a.a.getTracks();a.j=zV(_.T,b)},BV=function(a,b,c,d){c=_.mi(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.jk?f=a.getAudioTracks():b===_.T&&(f=a.ia());if(c=c.find(function(h){var l=_.gj(h);return f.some(function(m){m=_.gj(m.language||"");return _.hj(l,m)})})){var g=_.gj(c);c=f.filter(function(h){h=_.gj(h.language||"");return _.hj(g,h)});f=c.length?c:f;e=e||!!c.length}_.S.He(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===_.jk?a.Ba(e):b===_.T&&a.Ma(e))},zV=function(a,b){for(var c=[],d=_.w(b),
27
+ e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.hk(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 _.sk(f.id,f));c.push(f)}return c},CV=function(){_.Yl.call(this);this.g=new _.K(nU);this.h=this.w=_.dm();this.A=null;
28
+ this.l=-1;this.G=new _.dk;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},DV=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},GV=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=_.Bm(d);if(e){var f=[_.Td];_.Fp(a)[0].type!==_.ad&&f.unshift(_.Vd);d.preferredDrmSystem===_.Td&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
+ h=e.ab[g];h?(d=g===_.Vd?cast.framework.ContentProtection.WIDEVINE:g===_.Td?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},EV(b,h,a,d),FV(b,h,a,d)):c()}else c()}else c()},EV=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Mj({method:_.Mb,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},FV=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.Nj(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.oj(g.data))})}:a.licenseHandler=void 0},HV=function(){this.a=!1;this.g=new _.K(oU);this.f=this.m=null;this.h=new Set;this.A=this.km.bind(this);
31
+ this.w=this.gj.bind(this);this.j=null;this.o=new _.Xh;this.l=null},JV=function(){return IV||(IV=new HV)},KV=function(){return cast.framework.CastReceiverContext.getInstance()},MV=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=KV();c=(KV().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Mg:_.Lg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=
32
+ LV(h,_.ta),m=LV(h,_.Vb),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);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},LV=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},NV=function(a){this.f=a;this.a=null;this.h=new _.Xh;this.j=
33
+ [cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},PV=function(a,b){var c=null,d=OV(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},OV=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})||
34
+ 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===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new kV(d,c,e,f,g)}return b},QV=function(){},RV=function(){};_.t=sU.prototype;_.t.release=function(){this.ua(_.np)};_.t.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.t.getState=function(){return this.f};
35
+ _.t.onError=function(a){a.severity===_.O&&this.ua(_.yp)};
36
+ _.t.ua=function(a){if(a!==this.f)if(this.f===_.yp&&a!==_.np)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===_.sp?(this.A=b,this.player.trigger(new _.L(_.od,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.sp&&this.player.trigger(new _.L(_.nd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.dp(this.j,this.f);this.player.trigger(new _.L(_.jg,
37
+ {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var xU=0,LU={GENERIC:xU,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(zU,sU);zU.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)};zU.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,sU.prototype.destroy.call(a),0)})};zU.prototype.ua=function(a){var b=this.player.l;b&&b.isPlayingBreak||sU.prototype.ua.call(this,a)};
38
+ zU.prototype.Mb=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.ua(_.up);break;case chrome.cast.media.IdleReason.ERROR:this.ua(_.yp);break;default:this.ua(_.np)}break;case chrome.cast.media.PlayerState.PLAYING:this.ua(_.Bp);break;case chrome.cast.media.PlayerState.PAUSED:this.ua(_.Ap);break;case chrome.cast.media.PlayerState.BUFFERING:this.ua(_.sp)}};_.x(AU,_.U);_.t=AU.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.h=[];this.f={}};
39
+ _.t.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=_.kk;break;case chrome.cast.media.TrackType.AUDIO:c=_.jk;break;case chrome.cast.media.TrackType.TEXT:c=_.T}c=new _.hk(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 _.sk(c.id,c));return c}):[],this.a.trigger(new _.L(_.pv)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return CU(this,_.kk)};_.t.getAudioTracks=function(){return CU(this,_.jk)};_.t.ia=function(){return CU(this,_.T)};_.t.na=function(){var a=this.Ka();return a?a.renditions[0]:null};_.t.Qa=function(){var a=this.ma();return a?a.renditions[0]:null};_.t.Ja=function(){var a=this.wa();return a?a.renditions[0]:null};_.t.fb=function(){return this.f[_.kk]||null};
41
+ _.t.ob=function(){return this.f[_.jk]||null};_.t.pb=function(){return this.f[_.T]||null};_.t.Ka=function(){return DU(this,_.kk)};_.t.ma=function(){return DU(this,_.jk)};_.t.wa=function(){return DU(this,_.T)};_.t.lb=function(a){FU(this,_.kk,a)};_.t.Ba=function(a){FU(this,_.jk,a)};_.t.Ma=function(a){FU(this,_.T,a)};_.t.$a=function(a){this.lb(a&&a.track)};_.t.jb=function(a){this.Ba(a&&a.track)};_.t.kb=function(a){this.Ma(a&&a.track)};_.t.addTextTrack=function(){return _.I(function(a){_.B(a)})};
42
+ _.t.ra=function(){return!0};AU.prototype.isAbrEnabled=AU.prototype.ra;AU.prototype.addTextTrack=AU.prototype.addTextTrack;AU.prototype.setTextRendition=AU.prototype.kb;AU.prototype.setAudioRendition=AU.prototype.jb;AU.prototype.setVideoRendition=AU.prototype.$a;AU.prototype.setTextTrack=AU.prototype.Ma;AU.prototype.setAudioTrack=AU.prototype.Ba;AU.prototype.setVideoTrack=AU.prototype.lb;AU.prototype.getTextTrack=AU.prototype.wa;AU.prototype.getAudioTrack=AU.prototype.ma;
43
+ AU.prototype.getVideoTrack=AU.prototype.Ka;AU.prototype.getLoadingTextRendition=AU.prototype.pb;AU.prototype.getLoadingAudioRendition=AU.prototype.ob;AU.prototype.getLoadingVideoRendition=AU.prototype.fb;AU.prototype.getTextRendition=AU.prototype.Ja;AU.prototype.getAudioRendition=AU.prototype.Qa;AU.prototype.getVideoRendition=AU.prototype.na;AU.prototype.getTextTracks=AU.prototype.ia;AU.prototype.getAudioTracks=AU.prototype.getAudioTracks;AU.prototype.getVideoTracks=AU.prototype.getVideoTracks;_.x(JU,_.Yl);_.t=JU.prototype;_.t.init=function(a,b){this.h=this.J=b};_.t.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)})};_.t.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.t.getTimeline=function(){return null};_.t.setupPlaylist=function(){return Promise.reject(_.Ib)};_.t.appendLoad=function(){return Promise.reject(_.Ib)};_.t.seekWith=function(){return Promise.reject(_.Ib)};
44
+ _.t.destroy=function(){return _.I(function(a){_.B(a)})};_.t.ae=function(a){this.N=a};_.t.uc=function(){return this.w};_.t.ub=function(){return this.A};_.t.Gf=function(){return this.ja};
45
+ _.t.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,tU(b)),5);case 5:_.th(g,2);break;case 3:f=_.E(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.B(g)}})};
46
+ _.t.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.uc())throw a.g.warn(kU),new _.N(1,8,8001,void 0);if(!$U)throw a.g.warn(iU),new _.N(1,8,8002,void 0);if(a.ub())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.D(d,2);return _.y(d,dV(a),4)}if(2!=d.a)return _.th(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);})};_.t.Cf=function(){this.ub()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
+ _.t.addMessageListener=function(a){typeof a===_.we&&this.G.add(a)};_.t.removeMessageListener=function(a){typeof a===_.we&&this.G["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?fV(this,!0):new Promise(function(b,c){if(!a.a)return c(hU);a.a.play(null,b,c)})};_.t.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(hU);a.a.pause(null,b,c)})};_.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
+ _.t.isEnded=function(){return this.getState()===_.up};_.t.seek=function(a){var b=this;return this.isEnded()?fV(this,!1,a):new Promise(function(c,d){b.a||d(hU);b.l.isPlayingBreak&&d(fU);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Gg));b.a.seek(e,function(){b.trigger(new _.L(_.Dg));c()},d)})};_.t.getPosition=function(){return this.getMediaPosition()};_.t.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.t.getDuration=function(){return this.getMediaDuration()};
49
+ _.t.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};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(qU,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
50
50
  _.t.getVolume=function(){return this.a&&this.a.volume.level};_.t.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.t.isMuted=function(){return this.a&&this.a.volume.muted};_.t.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
51
- _.t.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};_.t.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};_.t.getState=function(){return this.j?this.j.getState():_.mp};
52
- _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?nU(this.a.customData.stats):_.hp()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.H(function(e){if(!b.sc())return b.g.warn(dU),e["return"]();if(!TU)return b.g.warn(bU),e["return"]();b.D=_.Dp(a);b.h=_.cm(b.J,a);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,Ya:b.h,Mb:c.Mb,audioMimeType:c.audioMimeType};return _.y(e,YU(b,d),0)})};
53
- _.t.getBufferInfo=function(){return new _.Ul};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.h};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.L=a};_.t.getNetworkEngine=function(){return this.L};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.D[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
54
- _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.g.warn(cU)};_.t.onError=function(a){if(a&&(this.trigger(new _.L(_.re,{detail:a})),this.j))this.j.onError(a)};_.t.namespace=function(){return _.Ed};_.t.canPlay=function(){return this.sc()?2:0};_.t.mb=function(){return this.K};_.t.yc=function(a){this.K=IU(a)};_.t.nf=function(){this.K=null};_.t.eg=function(a){var b=this.mb()||{};a={metadataType:NU(b.metadataType),title:a};this.yc(Object.assign({},b,a))};
55
- _.t.cg=function(a){var b=this.mb()||{},c=NU(b.metadataType);a=new chrome.cast.Image(a);this.yc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.bg=function(a){var b=this.mb()||{};this.yc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.dg=function(a){var b=this.mb()||{};a={metadataType:NU(b.metadataType),releaseDate:a};this.yc(Object.assign({},b,a))};
56
- _.t.Yl=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;TU=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ja=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.kg()};
57
- _.t.sm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;WU(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.tb()||(this.A=!0,WU(this,a.session),this.fa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.tb()&&this.a){var b=this.a.media,c=this.f.ma(),d=this.f.ua();c=c&&c.language||void 0;d=d&&d.language||void 0;this.$(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
- isLive:this.isLive()},currentTime:UU(this),si:d,xg:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ea);a.session.removeMessageListener(iU,this.V);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.t.jm=function(a){this.g.debug("New media session",a.mediaSession);VU(this,a.mediaSession)};_.t.bm=function(a,b){if(a===iU&&0<this.G.size){var c=nU(b);this.G.forEach(function(d){return d(c)})}};_.t.dj=function(){this.trigger(new _.L(_.rg))};
59
- _.t.pk=function(a){var b=this,c,d;return _.H(function(e){if(1==e.a)return c=null,_.y(e,oU(a,[_.pg,_.Yc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ma++,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)})};_.t.getTextDisplayer=function(){return null};CU.prototype.getTextDisplayer=CU.prototype.getTextDisplayer;CU.prototype.getNetworkEngine=CU.prototype.getNetworkEngine;
60
- CU.prototype.setNetworkEngine=CU.prototype.setNetworkEngine;var TU=!1,BU=new Set;window.__onGCastApiAvailable=zU;_.x(aV,_.Vl);_.t=aV.prototype;_.t.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.a?_.y(b,DU(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.A(b)})};_.t.kf=function(){return!!this.a&&this.a.sc()&&TU};_.t.tb=function(){return!!this.a&&this.a.tb()};_.t.Df=function(){return this.a?this.a.Df():""};_.t.$d=function(a){this.a&&this.a.$d(a)};
61
- _.t.cast=function(a){var b=this,c,d,e;return _.H(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.B(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.ma();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.ua())l.language&&
62
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.kd?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),Xf:b.f.getPresentationStartTime(),Mb:m,audioMimeType:p,Ya:g}}c=g;return _.y(f,bV(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,YU(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(_.re,{detail:d}),b.trigger(e),_.A(f)}})};_.t.zf=function(){this.a&&this.a.zf()};_.t.$i=function(a){var b=this;return _.H(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,DU(b.a),2):c.F(2)}b.a=$U(b);_.A(c)})};_.t.sendMessage=function(a){var b=this;return _.H(function(c){return b.a?_.y(c,b.a.sendMessage(iU,a),0):(b.g.warn(eU),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(eU)};
64
- _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(eU)};_.t.mb=function(){return this.a&&this.a.mb()};_.t.yc=function(a){this.a&&this.a.yc(a)};_.t.nf=function(){this.a&&this.a.nf()};_.t.eg=function(a){this.a&&this.a.eg(a)};_.t.cg=function(a){this.a&&this.a.cg(a)};_.t.bg=function(a){this.a&&this.a.bg(a)};_.t.dg=function(a){this.a&&this.a.dg(a)};_.J(fU,aV);aV.prototype.setContentReleaseDate=aV.prototype.dg;aV.prototype.setContentArtist=aV.prototype.bg;
65
- aV.prototype.setContentImage=aV.prototype.cg;aV.prototype.setContentTitle=aV.prototype.eg;aV.prototype.clearContentMetadata=aV.prototype.nf;aV.prototype.setContentMetadata=aV.prototype.yc;aV.prototype.getContentMetadata=aV.prototype.mb;aV.prototype.removeMessageListener=aV.prototype.removeMessageListener;aV.prototype.addMessageListener=aV.prototype.addMessageListener;aV.prototype.sendMessage=aV.prototype.sendMessage;aV.prototype.changeReceiverId=aV.prototype.$i;aV.prototype.forceDisconnect=aV.prototype.zf;
66
- aV.prototype.cast=aV.prototype.cast;aV.prototype.setPlayerConfigInterceptor=aV.prototype.$d;aV.prototype.getReceiverName=aV.prototype.Df;aV.prototype.isCasting=aV.prototype.tb;aV.prototype.canCast=aV.prototype.kf;aV.prototype.destroy=aV.prototype.destroy;_.x(cV,lU);_.t=cV.prototype;
51
+ _.t.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};_.t.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};_.t.getState=function(){return this.j?this.j.getState():_.op};
52
+ _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?uU(this.a.customData.stats):_.jp()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.uc())return b.g.warn(kU),e["return"]();if(!$U)return b.g.warn(iU),e["return"]();b.D=_.Fp(a);b.h=_.fm(b.J,a);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,Za:b.h,Qb:c.Qb,audioMimeType:c.audioMimeType};return _.y(e,eV(b,d),0)})};
53
+ _.t.getBufferInfo=function(){return new _.Xl};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.h};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.L=a};_.t.getNetworkEngine=function(){return this.L};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.D[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
54
+ _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.g.warn(jU)};_.t.onError=function(a){if(a&&(this.trigger(new _.L(_.te,{detail:a})),this.j))this.j.onError(a)};_.t.namespace=function(){return _.Hd};_.t.canPlay=function(){return this.uc()?2:0};_.t.nb=function(){return this.K};_.t.zc=function(a){this.K=PU(a)};_.t.rf=function(){this.K=null};_.t.hg=function(a){var b=this.nb()||{};a={metadataType:UU(b.metadataType),title:a};this.zc(Object.assign({},b,a))};
55
+ _.t.fg=function(a){var b=this.nb()||{},c=UU(b.metadataType);a=new chrome.cast.Image(a);this.zc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.eg=function(a){var b=this.nb()||{};this.zc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.gg=function(a){var b=this.nb()||{};a={metadataType:UU(b.metadataType),releaseDate:a};this.zc(Object.assign({},b,a))};
56
+ _.t.am=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;$U=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ja=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.ng()};
57
+ _.t.vm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;cV(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.ub()||(this.A=!0,cV(this,a.session),this.fa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.ub()&&this.a){var b=this.a.media,c=this.f.ma(),d=this.f.wa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.$(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
+ isLive:this.isLive()},currentTime:aV(this),xi:d,Ag:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ea);a.session.removeMessageListener(pU,this.V);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.t.mm=function(a){this.g.debug("New media session",a.mediaSession);bV(this,a.mediaSession)};_.t.em=function(a,b){if(a===pU&&0<this.G.size){var c=uU(b);this.G.forEach(function(d){return d(c)})}};_.t.fj=function(){this.trigger(new _.L(_.ug))};
59
+ _.t.rk=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,vU(a,[_.sg,_.$c],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Na++,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)})};_.t.getTextDisplayer=function(){return null};JU.prototype.getTextDisplayer=JU.prototype.getTextDisplayer;JU.prototype.getNetworkEngine=JU.prototype.getNetworkEngine;
60
+ JU.prototype.setNetworkEngine=JU.prototype.setNetworkEngine;var $U=!1,IU=new Set;window.__onGCastApiAvailable=GU;_.x(hV,_.Yl);_.t=hV.prototype;_.t.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,KU(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.B(b)})};_.t.nf=function(){return!!this.a&&this.a.uc()&&$U};_.t.ub=function(){return!!this.a&&this.a.ub()};_.t.Gf=function(){return this.a?this.a.Gf():""};_.t.ae=function(a){this.a&&this.a.ae(a)};
61
+ _.t.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.ma();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.wa())l.language&&
62
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.md?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),$f:b.f.getPresentationStartTime(),Qb:m,audioMimeType:p,Za:g}}c=g;return _.y(f,iV(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,eV(b.a,c),7);case 7:_.th(f,0);break;case 2:d=_.E(f),
63
+ b.g.error("Error while trying to cast",d),e=new _.L(_.te,{detail:d}),b.trigger(e),_.B(f)}})};_.t.Cf=function(){this.a&&this.a.Cf()};_.t.bj=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,KU(b.a),2):c.F(2)}b.a=gV(b);_.B(c)})};_.t.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(pU,a),0):(b.g.warn(lU),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(lU)};
64
+ _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(lU)};_.t.nb=function(){return this.a&&this.a.nb()};_.t.zc=function(a){this.a&&this.a.zc(a)};_.t.rf=function(){this.a&&this.a.rf()};_.t.hg=function(a){this.a&&this.a.hg(a)};_.t.fg=function(a){this.a&&this.a.fg(a)};_.t.eg=function(a){this.a&&this.a.eg(a)};_.t.gg=function(a){this.a&&this.a.gg(a)};_.J(mU,hV);hV.prototype.setContentReleaseDate=hV.prototype.gg;hV.prototype.setContentArtist=hV.prototype.eg;
65
+ hV.prototype.setContentImage=hV.prototype.fg;hV.prototype.setContentTitle=hV.prototype.hg;hV.prototype.clearContentMetadata=hV.prototype.rf;hV.prototype.setContentMetadata=hV.prototype.zc;hV.prototype.getContentMetadata=hV.prototype.nb;hV.prototype.removeMessageListener=hV.prototype.removeMessageListener;hV.prototype.addMessageListener=hV.prototype.addMessageListener;hV.prototype.sendMessage=hV.prototype.sendMessage;hV.prototype.changeReceiverId=hV.prototype.bj;hV.prototype.forceDisconnect=hV.prototype.Cf;
66
+ hV.prototype.cast=hV.prototype.cast;hV.prototype.setPlayerConfigInterceptor=hV.prototype.ae;hV.prototype.getReceiverName=hV.prototype.Gf;hV.prototype.isCasting=hV.prototype.ub;hV.prototype.canCast=hV.prototype.nf;hV.prototype.destroy=hV.prototype.destroy;_.x(jV,sU);_.t=jV.prototype;
67
67
  _.t.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.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
68
- _.t.destroy=function(){var a=this,b,c;return _.H(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.K);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.L);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
69
- a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,lU.prototype.destroy.call(a),0)})};_.t.hj=function(){this.player.trigger(new _.L(_.lf));this.ta(_.zp)};_.t.gj=function(){this.ta(_.yp)};_.t.fm=function(){this.ta(_.sp)};_.t.Xl=function(a){a.isBuffering?this.ta(_.qp):(a=this.player.isPaused()?_.yp:_.zp,this.ta(a))};_.t.jj=function(){this.h=1;this.player.trigger(new _.L(_.Dg))};_.t.ij=function(){this.player.trigger(new _.L(_.Cg))};_.t.vm=function(){this.h=2};_.t.im=function(){this.ta(_.xp)};
70
- _.t.fj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.jd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.T=function(a){a=new _.P(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.re,{detail:a}));this.ta(_.wp)};_.t=dV.prototype;_.t.zb=function(){return"Google Cast Framework"};_.t.Ab=function(){return cast.framework.VERSION};_.t.Gb=function(){return 0};_.t.getId=function(){return""};_.t.getCreativeId=function(){return""};_.t.getApiFramework=function(){return null};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return this.a.title||""};_.t.getDuration=function(){return this.a.duration||0};
71
- _.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.tc=function(){return!1};_.t.Tb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.Db=function(){return 0};_.t.Cb=function(){return 0};_.t.pb=function(){return 0};_.t.fb=function(){switch(this.Ub()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.h};_.t.Ub=function(){return this.f.position};_.t.Vb=function(){return this.j};
72
- _.t.Fb=function(){return this.l};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};dV.prototype.getWrapperCreativeIds=dV.prototype.getWrapperCreativeIds;dV.prototype.getWrapperAdSystems=dV.prototype.getWrapperAdSystems;dV.prototype.getWrapperAdIds=dV.prototype.getWrapperAdIds;dV.prototype.getSequenceLength=dV.prototype.Fb;dV.prototype.getPositionInSequence=dV.prototype.Vb;dV.prototype.getPodTimeOffset=dV.prototype.Ub;
73
- dV.prototype.getPodIndex=dV.prototype.getPodIndex;dV.prototype.getPodType=dV.prototype.fb;dV.prototype.getMediaBitrate=dV.prototype.pb;dV.prototype.getMediaHeight=dV.prototype.Cb;dV.prototype.getMediaWidth=dV.prototype.Db;dV.prototype.getMediaUrl=dV.prototype.getMediaUrl;dV.prototype.getClickThroughUrl=dV.prototype.Tb;dV.prototype.isBumper=dV.prototype.tc;dV.prototype.getSkipTimeOffset=dV.prototype.getSkipTimeOffset;dV.prototype.getDuration=dV.prototype.getDuration;dV.prototype.getTitle=dV.prototype.getTitle;
74
- dV.prototype.getAdvertiserName=dV.prototype.getAdvertiserName;dV.prototype.getAdSystem=dV.prototype.getAdSystem;dV.prototype.getApiFramework=dV.prototype.getApiFramework;dV.prototype.getCreativeId=dV.prototype.getCreativeId;dV.prototype.getId=dV.prototype.getId;dV.prototype.getTechnology=dV.prototype.Gb;dV.prototype.getAdManagerVersion=dV.prototype.Ab;dV.prototype.getAdManagerName=dV.prototype.zb;eV.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};eV.prototype.Xb=function(){return!!this.a.find(function(a){return 0===a.position})};eV.prototype.rb=function(){return!!this.a.find(function(a){return-1===a.position})};eV.prototype.hasPostroll=eV.prototype.rb;eV.prototype.hasPreroll=eV.prototype.Xb;eV.prototype.getCuePoints=eV.prototype.getCuePoints;_.t=gV.prototype;_.t.load=function(){var a=this;return _.H(function(b){hV&&(hV=!1,mV(a,0));_.A(b)})};_.t.start=function(){return _.H(function(a){fV().play();_.A(a)})};_.t.resume=function(){-1!==this.getPosition()&&fV().play()};_.t.pause=function(){-1!==this.getPosition()&&fV().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.m.getVolume()||0};_.t.setVolume=function(a){this.m.setVolume(a)};
75
- _.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.H(function(b){fV().removeEventListener(a.f,a.h);_.A(b)})};
76
- _.t.kj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=fV().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Oc,{adsTimeline:new eV(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:lV(this,_.Ec,a);break;case cast.framework.events.EventType.BREAK_STARTED:lV(this,_.xc,a);break;case cast.framework.events.EventType.BREAK_ENDED:lV(this,_.yc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:lV(this,
77
- _.Kc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(lV(this,_.Jc,a),lV(this,_.Lc,a)):a.endedReason===b.STOPPED?lV(this,_.Lc,a):a.endedReason===b.END_OF_STREAM?(lV(this,_.Bc,a),lV(this,_.Lc,a)):a.endedReason===b.ERROR&&mV(this,1);break;case cast.framework.events.EventType.PLAYING:lV(this,_.Ic,a);break;case cast.framework.events.EventType.PAUSE:lV(this,_.Gc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?lV(this,_.zc,a):lV(this,_.Ic,a)}};
78
- gV.prototype.getPosition=gV.prototype.getPosition;gV.prototype.setVolume=gV.prototype.setVolume;gV.prototype.getVolume=gV.prototype.getVolume;gV.prototype.skip=gV.prototype.skip;gV.prototype.pause=gV.prototype.pause;gV.prototype.resume=gV.prototype.resume;var hV=!1;nV.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(oV(),this.a)};nV.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(oV(),this.a)};nV.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return pV(a)})};
79
- nV.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=_.fi;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.hi;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ii}b&&this.fc(new _.L(b,{detail:pV(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.fc(new _.L(_.fi,{detail:b.value}))};_.x(qV,_.V);_.t=qV.prototype;_.t.initialize=function(a){this.m=a;rV().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.t.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.m=null;rV().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.h};_.t.ia=function(){return this.j};_.t.na=function(){return null};
80
- _.t.Pa=function(){var a=this.ma();return a&&a.renditions[0]};_.t.Ia=function(){var a=this.ua();return a&&a.renditions[0]};_.t.eb=function(){return null};_.t.nb=function(){return null};_.t.ob=function(){return null};_.t.Ja=function(){return null};_.t.ma=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};
81
- _.t.ua=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.t.kb=function(){this.g.warn("Video tracks unavailable on Cast")};_.t.za=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.La=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.Za=function(){this.g.warn("Video renditions unavailable on Cast")};_.t.ib=function(a){this.za(a&&a.track)};
82
- _.t.jb=function(a){this.La(a&&a.track)};
83
- _.t.addTextTrack=function(a){var b=this,c,d,e;return _.H(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,oU(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]),tV(b)}catch(g){throw b.g.warn("failed on track",
84
- a),g;}}_.A(f)})};_.t.qa=function(){return!0};_.t.Pm=function(){this.f=rV().getAudioTracksManager();var a=this.f.getTracks();this.h=sV(_.gk,a);tV(this);a=this.m.getConfiguration();uV(this,_.gk,a.preferredAudioLanguage,a.preferredAudioRole);uV(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};qV.prototype.isAbrEnabled=qV.prototype.qa;qV.prototype.addTextTrack=qV.prototype.addTextTrack;qV.prototype.setTextRendition=qV.prototype.jb;qV.prototype.setAudioRendition=qV.prototype.ib;
85
- qV.prototype.setVideoRendition=qV.prototype.Za;qV.prototype.setTextTrack=qV.prototype.La;qV.prototype.setAudioTrack=qV.prototype.za;qV.prototype.setVideoTrack=qV.prototype.kb;qV.prototype.getTextTrack=qV.prototype.ua;qV.prototype.getAudioTrack=qV.prototype.ma;qV.prototype.getVideoTrack=qV.prototype.Ja;qV.prototype.getLoadingTextRendition=qV.prototype.ob;qV.prototype.getLoadingAudioRendition=qV.prototype.nb;qV.prototype.getLoadingVideoRendition=qV.prototype.eb;qV.prototype.getTextRendition=qV.prototype.Ia;
86
- qV.prototype.getAudioRendition=qV.prototype.Pa;qV.prototype.getVideoRendition=qV.prototype.na;qV.prototype.getTextTracks=qV.prototype.ia;qV.prototype.getAudioTracks=qV.prototype.getAudioTracks;qV.prototype.getVideoTracks=qV.prototype.getVideoTracks;_.x(vV,_.Vl);_.t=vV.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=wV();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.km.bind(this));d.setMediaPlaybackInfoHandler(this.Pi.bind(this));this.a=new cV(this);this.a.init();this.j=new qV;this.j.initialize(this);this.o=new nV(function(e){return c.trigger(e)});this.o.init()};
87
- _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=wV();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.t.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.t.destroy=function(){var a=this;return _.H(function(b){if(1==b.a)return a.B=null,a.w=_.am(),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);_.A(b)})};
88
- _.t.play=function(){var a=wV();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=wV();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return wV().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
- _.t.isEnded=function(){return wV().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=wV();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(ZT);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return this.getMediaPosition()};_.t.getMediaPosition=function(){return wV().getCurrentTimeSec()};_.t.getDuration=function(){return this.getMediaDuration()};
90
- _.t.getMediaDuration=function(){var a=wV().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return wV().getPlaybackRate()};_.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;wV().sendLocalMediaRequest(b)}};_.t.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.t.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
68
+ _.t.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.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,sU.prototype.destroy.call(a),0)})};_.t.jj=function(){this.player.trigger(new _.L(_.of));this.ua(_.Bp)};_.t.ij=function(){this.ua(_.Ap)};_.t.im=function(){this.ua(_.up)};_.t.$l=function(a){a.isBuffering?this.ua(_.sp):(a=this.player.isPaused()?_.Ap:_.Bp,this.ua(a))};_.t.lj=function(){this.h=1;this.player.trigger(new _.L(_.Gg))};_.t.kj=function(){this.player.trigger(new _.L(_.Dg))};_.t.ym=function(){this.h=2};_.t.lm=function(){this.ua(_.zp)};
70
+ _.t.hj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.ld,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.T=function(a){a=new _.N(_.O,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.te,{detail:a}));this.ua(_.yp)};_.t=kV.prototype;_.t.Cb=function(){return"Google Cast Framework"};_.t.Db=function(){return cast.framework.VERSION};_.t.Jb=function(){return 0};_.t.getId=function(){return""};_.t.getCreativeId=function(){return""};_.t.getApiFramework=function(){return null};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return this.a.title||""};_.t.getDuration=function(){return this.a.duration||0};
71
+ _.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.vc=function(){return!1};_.t.Wb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.Gb=function(){return 0};_.t.Fb=function(){return 0};_.t.qb=function(){return 0};_.t.gb=function(){switch(this.Xb()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.h};_.t.Xb=function(){return this.f.position};_.t.Yb=function(){return this.j};
72
+ _.t.Ib=function(){return this.l};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};kV.prototype.getWrapperCreativeIds=kV.prototype.getWrapperCreativeIds;kV.prototype.getWrapperAdSystems=kV.prototype.getWrapperAdSystems;kV.prototype.getWrapperAdIds=kV.prototype.getWrapperAdIds;kV.prototype.getSequenceLength=kV.prototype.Ib;kV.prototype.getPositionInSequence=kV.prototype.Yb;kV.prototype.getPodTimeOffset=kV.prototype.Xb;
73
+ kV.prototype.getPodIndex=kV.prototype.getPodIndex;kV.prototype.getPodType=kV.prototype.gb;kV.prototype.getMediaBitrate=kV.prototype.qb;kV.prototype.getMediaHeight=kV.prototype.Fb;kV.prototype.getMediaWidth=kV.prototype.Gb;kV.prototype.getMediaUrl=kV.prototype.getMediaUrl;kV.prototype.getClickThroughUrl=kV.prototype.Wb;kV.prototype.isBumper=kV.prototype.vc;kV.prototype.getSkipTimeOffset=kV.prototype.getSkipTimeOffset;kV.prototype.getDuration=kV.prototype.getDuration;kV.prototype.getTitle=kV.prototype.getTitle;
74
+ kV.prototype.getAdvertiserName=kV.prototype.getAdvertiserName;kV.prototype.getAdSystem=kV.prototype.getAdSystem;kV.prototype.getApiFramework=kV.prototype.getApiFramework;kV.prototype.getCreativeId=kV.prototype.getCreativeId;kV.prototype.getId=kV.prototype.getId;kV.prototype.getTechnology=kV.prototype.Jb;kV.prototype.getAdManagerVersion=kV.prototype.Db;kV.prototype.getAdManagerName=kV.prototype.Cb;lV.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};lV.prototype.Zb=function(){return!!this.a.find(function(a){return 0===a.position})};lV.prototype.sb=function(){return!!this.a.find(function(a){return-1===a.position})};lV.prototype.hasPostroll=lV.prototype.sb;lV.prototype.hasPreroll=lV.prototype.Zb;lV.prototype.getCuePoints=lV.prototype.getCuePoints;_.t=nV.prototype;_.t.load=function(){var a=this;return _.I(function(b){oV&&(oV=!1,tV(a,0));_.B(b)})};_.t.start=function(){return _.I(function(a){mV().play();_.B(a)})};_.t.resume=function(){-1!==this.getPosition()&&mV().play()};_.t.pause=function(){-1!==this.getPosition()&&mV().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.m.getVolume()||0};_.t.setVolume=function(a){this.m.setVolume(a)};
75
+ _.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.I(function(b){mV().removeEventListener(a.f,a.h);_.B(b)})};
76
+ _.t.mj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=mV().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Qc,{adsTimeline:new lV(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:sV(this,_.Gc,a);break;case cast.framework.events.EventType.BREAK_STARTED:sV(this,_.zc,a);break;case cast.framework.events.EventType.BREAK_ENDED:sV(this,_.Ac,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:sV(this,
77
+ _.Mc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(sV(this,_.Lc,a),sV(this,_.Nc,a)):a.endedReason===b.STOPPED?sV(this,_.Nc,a):a.endedReason===b.END_OF_STREAM?(sV(this,_.Dc,a),sV(this,_.Nc,a)):a.endedReason===b.ERROR&&tV(this,1);break;case cast.framework.events.EventType.PLAYING:sV(this,_.Kc,a);break;case cast.framework.events.EventType.PAUSE:sV(this,_.Ic,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?sV(this,_.Bc,a):sV(this,_.Kc,a)}};
78
+ nV.prototype.getPosition=nV.prototype.getPosition;nV.prototype.setVolume=nV.prototype.setVolume;nV.prototype.getVolume=nV.prototype.getVolume;nV.prototype.skip=nV.prototype.skip;nV.prototype.pause=nV.prototype.pause;nV.prototype.resume=nV.prototype.resume;var oV=!1;uV.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(vV(),this.a)};uV.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(vV(),this.a)};uV.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return wV(a)})};
79
+ uV.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=_.ii;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.ki;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.li}b&&this.gc(new _.L(b,{detail:wV(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.gc(new _.L(_.ii,{detail:b.value}))};_.x(xV,_.U);_.t=xV.prototype;_.t.initialize=function(a){this.m=a;yV().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.t.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.m=null;yV().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.h};_.t.ia=function(){return this.j};_.t.na=function(){return null};
80
+ _.t.Qa=function(){var a=this.ma();return a&&a.renditions[0]};_.t.Ja=function(){var a=this.wa();return a&&a.renditions[0]};_.t.fb=function(){return null};_.t.ob=function(){return null};_.t.pb=function(){return null};_.t.Ka=function(){return null};_.t.ma=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};
81
+ _.t.wa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.t.lb=function(){this.g.warn("Video tracks unavailable on Cast")};_.t.Ba=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Ma=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.$a=function(){this.g.warn("Video renditions unavailable on Cast")};_.t.jb=function(a){this.Ba(a&&a.track)};
82
+ _.t.kb=function(a){this.Ma(a&&a.track)};
83
+ _.t.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,vU(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]),AV(b)}catch(g){throw b.g.warn("failed on track",
84
+ a),g;}}_.B(f)})};_.t.ra=function(){return!0};_.t.Sm=function(){this.f=yV().getAudioTracksManager();var a=this.f.getTracks();this.h=zV(_.jk,a);AV(this);a=this.m.getConfiguration();BV(this,_.jk,a.preferredAudioLanguage,a.preferredAudioRole);BV(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};xV.prototype.isAbrEnabled=xV.prototype.ra;xV.prototype.addTextTrack=xV.prototype.addTextTrack;xV.prototype.setTextRendition=xV.prototype.kb;xV.prototype.setAudioRendition=xV.prototype.jb;
85
+ xV.prototype.setVideoRendition=xV.prototype.$a;xV.prototype.setTextTrack=xV.prototype.Ma;xV.prototype.setAudioTrack=xV.prototype.Ba;xV.prototype.setVideoTrack=xV.prototype.lb;xV.prototype.getTextTrack=xV.prototype.wa;xV.prototype.getAudioTrack=xV.prototype.ma;xV.prototype.getVideoTrack=xV.prototype.Ka;xV.prototype.getLoadingTextRendition=xV.prototype.pb;xV.prototype.getLoadingAudioRendition=xV.prototype.ob;xV.prototype.getLoadingVideoRendition=xV.prototype.fb;xV.prototype.getTextRendition=xV.prototype.Ja;
86
+ xV.prototype.getAudioRendition=xV.prototype.Qa;xV.prototype.getVideoRendition=xV.prototype.na;xV.prototype.getTextTracks=xV.prototype.ia;xV.prototype.getAudioTracks=xV.prototype.getAudioTracks;xV.prototype.getVideoTracks=xV.prototype.getVideoTracks;_.x(CV,_.Yl);_.t=CV.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=DV();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.nm.bind(this));d.setMediaPlaybackInfoHandler(this.Ri.bind(this));this.a=new jV(this);this.a.init();this.j=new xV;this.j.initialize(this);this.o=new uV(function(e){return c.trigger(e)});this.o.init()};
87
+ _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=DV();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.t.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.t.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.dm(),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)})};
88
+ _.t.play=function(){var a=DV();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=DV();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return DV().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
+ _.t.isEnded=function(){return DV().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=DV();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(fU);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return this.getMediaPosition()};_.t.getMediaPosition=function(){return DV().getCurrentTimeSec()};_.t.getDuration=function(){return this.getMediaDuration()};
90
+ _.t.getMediaDuration=function(){var a=DV().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return DV().getPlaybackRate()};_.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;DV().sendLocalMediaRequest(b)}};_.t.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.t.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
91
91
  _.t.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
92
- _.t.getLoadedSource=function(){var a=wV().getMediaInformation();if(a){var b=wV().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,Vn:b,name:c}}return null};_.t.getDrmInfo=function(){return null};_.t.getPresentationStartTime=function(){return wV().getStartAbsoluteTime()};
93
- _.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=wV().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.a?this.a.getState():_.mp};
94
- _.t.getStats=function(){var a=_.hp();if(this.f){a=wV().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};_.t.isLive=function(){return Infinity===this.getDuration()};
95
- _.t.load=function(a){var b=this,c,d;return _.H(function(e){b.f=new _.gp;b.a.j=b.f.a;b.A=_.Dp(a);b.h=_.cm(b.w,a);if(b.D)return b.D=!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:mU(b.h),local:!0};return _.y(e,wV().load(d),0)})};_.t.getBufferInfo=function(){this.g.warn(_.ua);return new _.Ul};
96
- _.t.getTrackManager=function(){return this.j};_.t.getConfiguration=function(){return this.h};_.t.getSurface=function(){return this.B};_.t.getTimeline=function(){return null};_.t.setupPlaylist=function(){return Promise.reject(_.Hb)};_.t.appendLoad=function(){return Promise.reject(_.Hb)};_.t.seekWith=function(){return Promise.reject(_.Hb)};_.t.setNetworkEngine=function(a){this.G=a};_.t.getNetworkEngine=function(){return this.G};_.t.getSourceIndex=function(){return this.l};
97
- _.t.setSourceIndex=function(a){this.l=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return gU};_.t.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.t.resetAbr=function(){this.g.warn(cU)};_.t.onError=function(a){this.trigger(new _.L(_.re,{detail:a}))};_.t.canPlay=function(){return _.bl()?2:0};
98
- _.t.km=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=mU(this.getStats());var b=wV(),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&&
99
- (!e||e&&f)){d=wV().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};_.t.Pi=function(a,b){var c=null;a.media.customData&&(c=nU(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;zV(c,b);return b};
100
- _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};vV.prototype.getTextDisplayer=vV.prototype.getTextDisplayer;vV.prototype.getNetworkEngine=vV.prototype.getNetworkEngine;vV.prototype.setNetworkEngine=vV.prototype.setNetworkEngine;_.t=AV.prototype;_.t.init=function(a){var b=this;a&&(this.f=new vV,_.Mq(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.H(function(c){return b.m&&b.m.getState()!==_.lp?_.y(c,kU(b.m),0):c.F(0)})}))};
101
- _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=DV(),b=DV().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[iU]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Bl.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
102
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.zl.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(iU,this.w)}};
103
- _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=DV();DV().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(iU,this.w);a.stop();this.m=this.f=null}};_.t.$d=function(a){this.j=a};_.t.cn=function(a){this.l=a};_.t.on=function(a,b){DV().addEventListener(a,b)};_.t.off=function(a,b){DV().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.ue&&this.h.add(a)};
104
- _.t.removeMessageListener=function(a){typeof a===_.ue&&this.h["delete"](a)};_.t.sendMessage=function(a,b){DV().sendCustomMessage(iU,b,mU(a))};_.t.sc=function(){return this.a};_.t.mb=function(){var a=DV().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
105
- _.t.Bl=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return FV(this,a);try{var b=(new DOMParser).parseFromString(a,_.qg)}catch(u){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=DV();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ja),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.ad){g=e[f].getAttribute(_.Re);for(var h=e[f].getElementsByTagName(_.Ub),l=h.length-
106
- 1;0<=l;--l){var m=h[l].getAttribute(_.Re)||g,n=h[l].getAttribute(_.Md),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(_.Ub).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ja).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.cc)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=DV();c=a.getElementsByTagName("StreamIndex");
107
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Sb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.zb)||void 0,h=e[f].getAttribute(_.yb)||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(_.Sb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
108
- _.t.zl=function(a){var b=this,c,d,e,f,g,h;return _.H(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=nU(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,jV(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);
109
- break}b.f.D=!0;return _.y(l,_.Wq(b.m,d),8);case 8:return _.y(l,_.Xq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Mb&&(c.media.hlsVideoSegmentFormat=pU(f.Mb,_.hk)),f.audioMimeType&&(c.media.hlsSegmentFormat=pU(f.audioMimeType,_.gk));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);
110
- break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.hm=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.O.ql;var b=DV().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))}_.Tq(this.m)}};
111
- _.t.ej=function(a){if(0<this.h.size){var b=nU(a.data);this.h.forEach(function(c){return c(b)})}};_.J(hU,AV);AV.prototype.getContentMetadata=AV.prototype.mb;AV.prototype.isApiReady=AV.prototype.sc;AV.prototype.sendMessage=AV.prototype.sendMessage;AV.prototype.removeMessageListener=AV.prototype.removeMessageListener;AV.prototype.addMessageListener=AV.prototype.addMessageListener;AV.prototype.off=AV.prototype.off;AV.prototype.on=AV.prototype.on;AV.prototype.setLoadRequestDataInterceptor=AV.prototype.cn;
112
- AV.prototype.setPlayerConfigInterceptor=AV.prototype.$d;AV.prototype.stop=AV.prototype.stop;AV.prototype.start=AV.prototype.start;AV.prototype.init=AV.prototype.init;AV.getInstance=CV;var BV=null;_.t=GV.prototype;_.t.load=function(){var a=this,b,c,d,e,f;return _.H(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.xm.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.A(g)})};_.t.start=function(){return _.H(function(a){_.A(a)})};_.t.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.t.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
113
- _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(jU,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.t.getVolume=function(){return this.f.getVolume()||0};_.t.setVolume=function(a){this.f.setVolume(a)};_.t.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.t.dispose=function(){var a=this;return _.H(function(b){a.h.release();_.A(b)})};
114
- _.t.xm=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Oc,{adsTimeline:new eV(a.breaks)})));break;case "isPlayingBreak":a.value?IV(this,_.xc):(IV(this,_.Bc),IV(this,_.Lc),IV(this,_.yc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(IV(this,_.Bc),IV(this,_.Lc)),IV(this,_.Kc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?IV(this,_.Gc):IV(this,_.Ic))}};GV.prototype.getPosition=GV.prototype.getPosition;
115
- GV.prototype.setVolume=GV.prototype.setVolume;GV.prototype.getVolume=GV.prototype.getVolume;GV.prototype.skip=GV.prototype.skip;GV.prototype.pause=GV.prototype.pause;GV.prototype.resume=GV.prototype.resume;JV.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};JV.prototype.isSupported=function(a,b){return a.namespace()!==_.Ed?!1:!(!b||!b.ima)};JV.prototype.create=function(a){return new GV(a.a)};JV.prototype.create=JV.prototype.create;JV.prototype.isSupported=JV.prototype.isSupported;JV.prototype.name=JV.prototype.name;_.Tp(new JV);KV.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};KV.prototype.isSupported=function(a,b){return CV().sc()?!(!b||!b.ima):!1};KV.prototype.create=function(a){return new gV(a)};KV.prototype.create=KV.prototype.create;KV.prototype.isSupported=KV.prototype.isSupported;KV.prototype.name=KV.prototype.name;_.Tp(new KV);};
92
+ _.t.getLoadedSource=function(){var a=DV().getMediaInformation();if(a){var b=DV().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,ao:b,name:c}}return null};_.t.getDrmInfo=function(){return null};_.t.getPresentationStartTime=function(){return DV().getStartAbsoluteTime()};
93
+ _.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=DV().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.a?this.a.getState():_.op};
94
+ _.t.getStats=function(){var a=_.jp();if(this.f){a=DV().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};_.t.isLive=function(){return Infinity===this.getDuration()};
95
+ _.t.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.ip;b.a.j=b.f.a;b.A=_.Fp(a);b.h=_.fm(b.w,a);if(b.D)return b.D=!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:tU(b.h),local:!0};return _.y(e,DV().load(d),0)})};_.t.getBufferInfo=function(){this.g.warn(_.va);return new _.Xl};
96
+ _.t.getTrackManager=function(){return this.j};_.t.getConfiguration=function(){return this.h};_.t.getSurface=function(){return this.B};_.t.getTimeline=function(){return null};_.t.setupPlaylist=function(){return Promise.reject(_.Ib)};_.t.appendLoad=function(){return Promise.reject(_.Ib)};_.t.seekWith=function(){return Promise.reject(_.Ib)};_.t.setNetworkEngine=function(a){this.G=a};_.t.getNetworkEngine=function(){return this.G};_.t.getSourceIndex=function(){return this.l};
97
+ _.t.setSourceIndex=function(a){this.l=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return nU};_.t.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.t.resetAbr=function(){this.g.warn(jU)};_.t.onError=function(a){this.trigger(new _.L(_.te,{detail:a}))};_.t.canPlay=function(){return _.fl()?2:0};
98
+ _.t.nm=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=tU(this.getStats());var b=DV(),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&&
99
+ (!e||e&&f)){d=DV().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};_.t.Ri=function(a,b){var c=null;a.media.customData&&(c=uU(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;GV(c,b);return b};
100
+ _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};CV.prototype.getTextDisplayer=CV.prototype.getTextDisplayer;CV.prototype.getNetworkEngine=CV.prototype.getNetworkEngine;CV.prototype.setNetworkEngine=CV.prototype.setNetworkEngine;_.t=HV.prototype;_.t.init=function(a){var b=this;a&&(this.f=new CV,_.Oq(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.np?_.y(c,rU(b.m),0):c.F(0)})}))};
101
+ _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=KV(),b=KV().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[pU]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.El.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
102
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Cl.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(pU,this.w)}};
103
+ _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=KV();KV().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(pU,this.w);a.stop();this.m=this.f=null}};_.t.ae=function(a){this.j=a};_.t.gn=function(a){this.l=a};_.t.on=function(a,b){KV().addEventListener(a,b)};_.t.off=function(a,b){KV().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.we&&this.h.add(a)};
104
+ _.t.removeMessageListener=function(a){typeof a===_.we&&this.h["delete"](a)};_.t.sendMessage=function(a,b){KV().sendCustomMessage(pU,b,tU(a))};_.t.uc=function(){return this.a};_.t.nb=function(){var a=KV().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
105
+ _.t.El=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return MV(this,a);try{var b=(new DOMParser).parseFromString(a,_.tg)}catch(u){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=KV();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.cd){g=e[f].getAttribute(_.Ue);for(var h=e[f].getElementsByTagName(_.Wb),l=h.length-
106
+ 1;0<=l;--l){var m=h[l].getAttribute(_.Ue)||g,n=h[l].getAttribute(_.Od),p=h[l].getAttribute(_.Zg)||void 0,q=h[l].getAttribute(_.xe)||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(_.Wb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.ec)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=KV();c=a.getElementsByTagName("StreamIndex");
107
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Ub);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Ab)||void 0,h=e[f].getAttribute(_.zb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Mg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Ub).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
108
+ _.t.Cl=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=uU(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,qV(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);
109
+ break}b.f.D=!0;return _.y(l,_.Yq(b.m,d),8);case 8:return _.y(l,_.Zq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Qb&&(c.media.hlsVideoSegmentFormat=wU(f.Qb,_.kk)),f.audioMimeType&&(c.media.hlsSegmentFormat=wU(f.audioMimeType,_.jk));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);
110
+ break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.km=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.tl;var b=KV().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))}_.Vq(this.m)}};
111
+ _.t.gj=function(a){if(0<this.h.size){var b=uU(a.data);this.h.forEach(function(c){return c(b)})}};_.J(oU,HV);HV.prototype.getContentMetadata=HV.prototype.nb;HV.prototype.isApiReady=HV.prototype.uc;HV.prototype.sendMessage=HV.prototype.sendMessage;HV.prototype.removeMessageListener=HV.prototype.removeMessageListener;HV.prototype.addMessageListener=HV.prototype.addMessageListener;HV.prototype.off=HV.prototype.off;HV.prototype.on=HV.prototype.on;HV.prototype.setLoadRequestDataInterceptor=HV.prototype.gn;
112
+ HV.prototype.setPlayerConfigInterceptor=HV.prototype.ae;HV.prototype.stop=HV.prototype.stop;HV.prototype.start=HV.prototype.start;HV.prototype.init=HV.prototype.init;HV.getInstance=JV;var IV=null;_.t=NV.prototype;_.t.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.Am.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)})};_.t.start=function(){return _.I(function(a){_.B(a)})};_.t.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.t.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
113
+ _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(qU,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.t.getVolume=function(){return this.f.getVolume()||0};_.t.setVolume=function(a){this.f.setVolume(a)};_.t.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.t.dispose=function(){var a=this;return _.I(function(b){a.h.release();_.B(b)})};
114
+ _.t.Am=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Qc,{adsTimeline:new lV(a.breaks)})));break;case "isPlayingBreak":a.value?PV(this,_.zc):(PV(this,_.Dc),PV(this,_.Nc),PV(this,_.Ac));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(PV(this,_.Dc),PV(this,_.Nc)),PV(this,_.Mc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?PV(this,_.Ic):PV(this,_.Kc))}};NV.prototype.getPosition=NV.prototype.getPosition;
115
+ NV.prototype.setVolume=NV.prototype.setVolume;NV.prototype.getVolume=NV.prototype.getVolume;NV.prototype.skip=NV.prototype.skip;NV.prototype.pause=NV.prototype.pause;NV.prototype.resume=NV.prototype.resume;QV.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};QV.prototype.isSupported=function(a,b){return a.namespace()!==_.Hd?!1:!(!b||!b.ima)};QV.prototype.create=function(a){return new NV(a.a)};QV.prototype.create=QV.prototype.create;QV.prototype.isSupported=QV.prototype.isSupported;QV.prototype.name=QV.prototype.name;_.Vp(new QV);RV.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};RV.prototype.isSupported=function(a,b){return JV().uc()?!(!b||!b.ima):!1};RV.prototype.create=function(a){return new nV(a)};RV.prototype.create=RV.prototype.create;RV.prototype.isSupported=RV.prototype.isSupported;RV.prototype.name=RV.prototype.name;_.Vp(new RV);};
116
116
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
117
117
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
118
118
  else{_=this.clpp._;(f.call(g,this));}