@castlabs/prestoplay 6.4.0 → 6.5.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 (58) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +421 -402
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +54 -133
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +47 -49
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -32
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +258 -255
  17. package/cjs/cl.muxdata.js +12 -12
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +69 -69
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +27 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +363 -351
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +49 -132
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +40 -40
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +16 -16
  44. package/cl.mse.js +230 -231
  45. package/cl.muxdata.js +8 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +15 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -16
  58. package/package.json +8 -2
package/cjs/cl.cast.js CHANGED
@@ -1,115 +1,115 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var GK="Cannot seek during ads playout.",HK="Cannot switch track",IK="Media session does not exist.",JK="No receivers available",KK="Reset ABR functionality not available on cast.",LK="SDK not yet ready",MK="Sender is destroyed.",NK="clpp.cast.CastProxy",OK="clpp.cast.Player",PK="clpp.cast.Receiver",QK="urn:x-cast:castlabs",RK="urn:x-cast:com.google.cast.media",SK=function(a){return _.A(function(b){return 1==b.a?_.y(b,a.gc(_.Kd),2):_.y(b,a.gc(_.Jd),0)})},TK=function(a,b){this.log=new _.H(b);this.a=
3
- a;this.j=null;this.g=_.jm;this.m=_.km;this.h=2;this.B=Date.now();this.A=-1},UK=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.fd){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Gd?"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}})},VK=function(a){if(typeof a!==_.se)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}},WK=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.A(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=_.Eh(d,a.mimeType,g);if(!f||!g)return q.H(2);l=_.vh(a.url);return _.y(q,c.fetch(l).P,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.R(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)})},XK=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 _.Qe:return d.FMP4;case _.Pe:return b===_.Ig?d.MPEG2_TS:c.TS;case _.hc:return c.AAC;case _.ic:return c.AC3;case _.jc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.kc:return c.FMP4}},ZK=function(a){a=
6
- void 0===a?YK:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.L(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}},$K=function(a){TK.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.f=null;this.w=this.C.bind(this)},aL=function(){this.h=new _.H("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},bL=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},dL=function(a,b){var c=bL(a);return cL(a,b).find(function(d){return c.includes(d.id)})||null},cL=function(a,b){return a.g.filter(function(c){return c.type===b})},fL=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.N){var e=a.la();e&&
8
- c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;eL(a,b)},function(f){a.f[b]=null;a.h.debug(HK,f)})}else b===_.N&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){eL(a,b)},function(f){a.h.debug(HK,f)}))},eL=function(a,b){b===_.P?a.a.trigger(new _.J(_.Uh)):b===_.N&&a.a.trigger(new _.J(_.Vh))},jL=function(a,b,c,d){_.$h.call(this);this.j=new _.H(_.Dc);this.aa=a;this.o=new _.Ch(b);this.Y=c;this.da=d;this.g=this.J=
9
- _.jj();this.C=[];this.B=0;this.L=new _.yi;this.G=this.m=this.a=null;this.A=this.w=!1;this.ia="";this.Ra=1E6;this.f=new aL;this.f.initialize(this);this.h=new $K(this);this.I=new _.bg;this.K=null;this.D=new Set;this.T=this.Si.bind(this);this.ua=this.kj.bind(this);this.ca=this.bj.bind(this);this.U=this.Wi.bind(this);this.O=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){gL(!0)},0)}});hL(this);iL.add(this)},
10
- kL=function(a){var b,c;return _.A(function(d){if(1==d.a)return iL["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.ua)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.h&&(c.push(a.h.destroy()),a.h=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Y=null;a.da=null;_.z(d)})},mL=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(lL);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=ZK(lL[b]);return Object.assign(b,a)},nL=function(a){var b=void 0===b?YK:b;return Object.values(lL).includes(a)?a:b},oL=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},hL=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.Ye();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.T);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.ua);pL&&a.o.$(.02)}},tL=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},DL=function(a,b){yL(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ca);b.addMessageListener(QK,a.U)},yL=function(a,b){b!==a.a&&(a.a=b,a.a&&(a.I.release(),a.G=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.m),a.I.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Kg.bind(a)),a.f&&a.f.load(),a.h&&a.h.init(),a.trigger(new _.J(_.rd))))},EL=function(a){return _.A(function(b){return a.ib()?
14
- b.H(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},FL=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,r,w,x,B,D,E;return _.A(function(G){switch(G.a){case 1:return c=chrome.cast.media.StreamType,d=_.Op,_.y(G,EL(a),2);case 2:if(!b)return G["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.Cb;m=h.audioMimeType;g.hlsVideoSegmentFormat=XK(l,d.VIDEO);
15
- g.hlsSegmentFormat=XK(m,d.AUDIO);if(!b.Oa){G.H(3);break}if(!a.O){G.H(4);break}return _.y(G,Promise.resolve(a.O(b.Oa)),5);case 5:if(n=G.f)b.Oa=n;case 4:a.g=b.Oa;a.C=_.Gm(a.g);a.B=a.C.findIndex(function(I){return I.url===b.source.url});if(!b.Oa.remoteTextTracks){G.H(6);break}return _.y(G,Promise.all(b.Oa.remoteTextTracks.map(a.Qh.bind(a))),7);case 7:p=G.f,g.tracks=p.filter(function(I){return I}),b.Oa.remoteTextTracks=void 0;case 6:delete b.Oa.autoplay,b.Oa.startTime=null,g.customData={playerConfiguration:UK(b.Oa)};
16
- case 3:q=a.cb()||{};r=nL(q.metadataType);typeof b.Oe===_.k&&(w={metadataType:r,sectionStartAbsoluteTime:b.Oe});b.source.name&&(x={metadataType:r,title:b.source.name});B=oL(q);if(D=mL(Object.assign({},w,x,B)))g.metadata=D;E=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.pc&&(E.autoplay=b.autoplay);typeof b.currentTime===_.k&&(E.currentTime=b.currentTime);return _.y(G,f.loadMedia(E),0)}})},GL=function(a,b,c){c=void 0===c?0:c;var d,e;return _.A(function(f){(d=a.f.la())&&d.language&&(a.g.preferredTextLanguage=
17
- d.language);(e=a.f.ka())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.y(f,FL(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Oe:a.getPresentationStartTime(),autoplay:b,Oa:a.g}),0)})},gL=function(a){if(a){a=_.u(iL);for(var b=a.next();!b.done;b=a.next())hL(b.value)}},IL=function(a,b,c){_.$h.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.fd?c:function(e,f){d.f&&e!==_.qm&&e!==_.jm&&d.f.load(f)};this.a=HL(this);this.g=new _.H(NK);this.addDelegate(this.f)},HL=
18
- function(a){return new jL(a.h,function(){a.trigger(new _.J(_.vc))},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.hf&&(d.preferredAudioLanguage=c.hf);c.rg&&(d.preferredTextLanguage=c.rg);_.Mn(a.f,null);a.trigger(new _.J("castingended"));a.j(b,d)},function(){return JL(a)})},JL=function(a){var b;return _.A(function(c){if(1==c.a)return a.trigger(new _.J(_.uc)),
19
- b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Mn(a.f,a.a);_.z(c)})},KL=function(a){TK.call(this,a,"clpp.cast.StateManager");this.I=this.Og.bind(this);this.G=this.Ng.bind(this);this.w=this.Yi.bind(this);this.o=this.Ri.bind(this);this.K=this.Qg.bind(this);this.J=this.Pg.bind(this);this.L=this.nj.bind(this);this.D=this.aj.bind(this);this.C=this.S.bind(this);this.f=this.Mg.bind(this)},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.h=typeof c===_.k?c:1;this.j=typeof d===_.k?d:1;this.g=
20
- typeof e===_.k?e:0},LL=function(a){this.a=a},NL=function(a){this.l=a;this.a=null;this.g=this.Rg.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
- ML().addEventListener(this.f,this.g)},QL=function(a,b,c){var d,e,f,g,h,l,m;return _.A(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.wf(n,2);OL=!1;e=_.vh(d);return _.y(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.ah(f.data),h=new DOMParser,l=h.parseFromString(g,_.Be),l.getElementsByTagName("vmap:VMAP").length)_.F("VMAP detected."),a.vmapAdsRequest=PL(g);else if(l.getElementsByTagName("VAST").length){_.F("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
- p.vastAdsRequest=PL(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.F("Unsupported schema."),OL=!0;return _.xf(n,0)}m=_.yf(n);_.F("Failed to fetch an ad",m);OL=!0;_.z(n)})},PL=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},ML=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},SL=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
- (c=RL(a,c))&&(d={ad:c});a.l.trigger(new _.J(b,d))}},TL=function(a,b){var c=new _.L(1,10,10003,{errorType:b});a.l.onError(c)},RL=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.se&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.se&&(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 Z(d,e,b.index,b.total,f)}return c},UL=function(a){this.Sb=a;this.a=this.f.bind(this)},VL=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]},WL=function(a){var b=a.dashTimedMetadata,c=_.Ie;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.He)?
25
- _.lg:_.jg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},XL=function(){this.g=new _.H("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.h=[];this.j=[];this.m=this.tj.bind(this);this.a=this.f=null},YL=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},$L=function(a){a.a=YL().getTextTracksManager();var b=a.a.getTracks();a.j=ZL(_.N,b)},aM=function(a,b,c,d){c=_.Dg(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.P?f=a.getAudioTracks():b===_.N&&(f=a.ea());if(c=c.find(function(h){var l=_.Gh(h);return f.some(function(m){m=_.Gh(m.language||"");return _.Hh(l,m)})})){var g=_.Gh(c);c=f.filter(function(h){h=_.Gh(h.language||"");return _.Hh(g,h)});f=c.length?c:f;e=e||!!c.length}_.jh(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===_.P?a.ra(e):b===_.N&&a.Ba(e))},ZL=function(a,b){for(var c=[],d=_.u(b),e=
27
- d.next();!e.done;e=d.next()){e=e.value;var f=new _.Gg(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=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 _.Og(f.id,f));c.push(f)}return c},bM=function(){_.$h.call(this);this.A=new _.H(OK);this.g=this.o=_.jj();this.w=null;this.j=-1;this.D=new _.yi;this.f=this.m=
28
- this.h=this.a=this.B=null;this.C=!1},cM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},fM=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=_.Ij(d);if(e){var f=[_.Mc];_.Gm(a)[0].type!==_.dc&&f.unshift(_.Nc);d.preferredDrmSystem===_.Mc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Qa[g];h?(d=g===_.Nc?cast.framework.ContentProtection.WIDEVINE:
29
- g===_.Mc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},dM(b,h,a,d),eM(b,h,a,d)):c()}else c()}else c()},dM=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.vh({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=
30
- f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},eM=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.A(function(h){return 1==h.a?(g=_.wh(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.R(g.data))})}:a.licenseHandler=void 0},gM=function(){this.a=!1;this.h=new _.H(PK);this.f=this.l=null;this.g=new Set;this.A=this.$i.bind(this);this.w=this.Lg.bind(this);this.j=null;this.o=new _.bg;this.m=null},
31
- iM=function(){return hM||(hM=new gM)},jM=function(){return cast.framework.CastReceiverContext.getInstance()},lM=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=jM();c=(jM().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Qe:_.Pe;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=kM(h,_.oa),m=kM(h,"RESOLUTION"),
32
- n=_.u([]),p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},kM=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},mM=function(a){this.f=a;this.a=null;this.g=new _.bg;this.h=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,
33
- cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},oM=function(a,b){var c=null,d=nM(a);d&&(c={ad:d});a.f.trigger(new _.J(b,c))},nM=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:
34
- 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 Z(d,c,e,f,g)}return b},pM=function(){},qM=function(){};_.t=TK.prototype;_.t.release=function(){this.ja(_.jm)};_.t.destroy=function(){this.j=this.a=null;return Promise.resolve()};_.t.getState=function(){return this.g};_.t.onError=function(a){a.severity===_.M&&this.ja(_.um)};
35
- _.t.ja=function(a){if(a!==this.g)if(this.g===_.um&&a!==_.jm)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.m=this.g;this.g=a;this.g===_.om?(this.A=b,this.a.trigger(new _.J(_.rc,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.m===_.om&&this.a.trigger(new _.J(_.qc,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.g,previousState:this.m,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.$l(this.j,this.g);this.a.trigger(new _.J(_.oe,
36
- {detail:a}))}};_.C("clpp.cast.CastUtils",function(){});var YK=0,lL={GENERIC:YK,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.v($K,TK);$K.prototype.init=function(){var a=this.a,b=a.a;b&&(this.f&&this.f.removeUpdateListener(this.w),this.f=b,this.f.addUpdateListener(this.w),this.o=a.m)};$K.prototype.destroy=function(){var a=this;return _.A(function(b){a.f&&(a.f.removeUpdateListener(a.w),a.f=null);return _.y(b,TK.prototype.destroy.call(a),0)})};$K.prototype.ja=function(a){var b=this.a.m;b&&b.isPlayingBreak||TK.prototype.ja.call(this,a)};
37
- $K.prototype.C=function(){if(this.f&&this.o&&!this.o.isPlayingBreak)switch(this.f.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.f.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.ja(_.qm);break;case chrome.cast.media.IdleReason.ERROR:this.ja(_.um);break;default:this.ja(_.jm)}break;case chrome.cast.media.PlayerState.PLAYING:this.ja(_.xm);break;case chrome.cast.media.PlayerState.PAUSED:this.ja(_.wm);break;case chrome.cast.media.PlayerState.BUFFERING:this.ja(_.om)}};_.v(aL,_.Q);_.t=aL.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.g=[];this.f={}};
38
- _.t.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.Ig;break;case chrome.cast.media.TrackType.AUDIO:c=_.P;break;case chrome.cast.media.TrackType.TEXT:c=_.N}c=new _.Gg(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);
39
- c.renditions.push(new _.Og(c.id,c));return c}):[],this.a.trigger(new _.J(_.Rp)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return cL(this,_.Ig)};_.t.getAudioTracks=function(){return cL(this,_.P)};_.t.ea=function(){return cL(this,_.N)};_.t.fa=function(){var a=this.Ia();return a?a.renditions[0]:null};_.t.Fa=function(){var a=this.ka();return a?a.renditions[0]:null};_.t.Ga=function(){var a=this.la();return a?a.renditions[0]:null};_.t.Ta=function(){return this.f[_.Ig]||null};
40
- _.t.eb=function(){return this.f[_.P]||null};_.t.fb=function(){return this.f[_.N]||null};_.t.Ia=function(){return dL(this,_.Ig)};_.t.ka=function(){return dL(this,_.P)};_.t.la=function(){return dL(this,_.N)};_.t.$a=function(a){fL(this,_.Ig,a)};_.t.ra=function(a){fL(this,_.P,a)};_.t.Ba=function(a){fL(this,_.N,a)};_.t.Za=function(a){this.$a(a&&a.track)};_.t.lb=function(a){this.ra(a&&a.track)};_.t.mb=function(a){this.Ba(a&&a.track)};_.t.addTextTrack=function(){return _.A(function(a){_.z(a)})};_.t.ha=function(){return!0};
41
- aL.prototype.isAbrEnabled=aL.prototype.ha;aL.prototype.addTextTrack=aL.prototype.addTextTrack;aL.prototype.setTextRendition=aL.prototype.mb;aL.prototype.setAudioRendition=aL.prototype.lb;aL.prototype.setVideoRendition=aL.prototype.Za;aL.prototype.setTextTrack=aL.prototype.Ba;aL.prototype.setAudioTrack=aL.prototype.ra;aL.prototype.setVideoTrack=aL.prototype.$a;aL.prototype.getTextTrack=aL.prototype.la;aL.prototype.getAudioTrack=aL.prototype.ka;aL.prototype.getVideoTrack=aL.prototype.Ia;
42
- aL.prototype.getLoadingTextRendition=aL.prototype.fb;aL.prototype.getLoadingAudioRendition=aL.prototype.eb;aL.prototype.getLoadingVideoRendition=aL.prototype.Ta;aL.prototype.getTextRendition=aL.prototype.Ga;aL.prototype.getAudioRendition=aL.prototype.Fa;aL.prototype.getVideoRendition=aL.prototype.fa;aL.prototype.getTextTracks=aL.prototype.ea;aL.prototype.getAudioTracks=aL.prototype.getAudioTracks;aL.prototype.getVideoTracks=aL.prototype.getVideoTracks;_.v(jL,_.$h);_.t=jL.prototype;_.t.init=function(a,b){this.g=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.h&&a.h.release()})};_.t.destroy=function(){return _.A(function(a){_.z(a)})};_.t.jd=function(a){this.O=a};_.t.bc=function(){return this.w};_.t.ib=function(){return this.A};_.t.qe=function(){return this.ia};
43
- _.t.sendMessage=function(a,b){var c=this,d,e,f;return _.A(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.L(1,8,8004,void 0);g.H(2);break}_.wf(g,3);return _.y(g,e.sendMessage(a,UK(b)),5);case 5:_.xf(g,2);break;case 3:f=_.yf(g),d=new _.L(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.z(g)}})};
44
- _.t.cast=function(){var a=this,b,c;return _.A(function(d){if(1==d.a){if(!a.bc())throw a.j.warn(LK),new _.L(1,8,8001,void 0);if(!pL)throw a.j.warn(JK),new _.L(1,8,8002,void 0);if(a.ib())throw a.j.warn("Already casting"),new _.L(1,8,8003,void 0);_.wf(d,2);return _.y(d,EL(a),4)}if(2!=d.a)return _.xf(d,0);b=_.yf(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.L(1,8,8E3,c);})};
45
- _.t.me=function(){this.ib()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.fd&&this.D.add(a)};_.t.removeMessageListener=function(a){typeof a===_.fd&&this.D["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?GL(this,!0):new Promise(function(b,c){if(!a.a)return c(IK);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(IK);a.a.pause(null,b,c)})};
46
- _.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.t.isEnded=function(){return this.getState()===_.qm};_.t.seek=function(a){var b=this;return this.isEnded()?GL(this,!1,a):new Promise(function(c,d){b.a||d(IK);b.m.isPlayingBreak&&d(GK);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.J(_.Ke));b.a.seek(e,function(){b.trigger(new _.J(_.Je));c()},d)})};_.t.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
47
- _.t.getDuration=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.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(RK,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
2
+ var f=function(window){var bL="Cannot seek during ads playout.",cL="Cannot switch track",dL="Media session does not exist.",eL="No receivers available",fL="Reset ABR functionality not available on cast.",gL="SDK not yet ready",hL="Sender is destroyed.",iL="clpp.cast.CastProxy",jL="clpp.cast.Player",kL="clpp.cast.Receiver",lL="urn:x-cast:castlabs",mL="urn:x-cast:com.google.cast.media",nL=function(a){return _.B(function(b){return 1==b.a?_.x(b,a.hc(_.Nd),2):_.x(b,a.hc(_.Md),0)})},oL=function(a,b){this.log=new _.H(b);this.a=
3
+ a;this.j=null;this.g=_.Pm;this.m=_.Qm;this.h=2;this.B=Date.now();this.A=-1},pL=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.id){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Jd?"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}})},qL=function(a){if(typeof a!==_.ue)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}},rL=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.B(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=_.Ei(d,a.mimeType,g);if(!f||!g)return q.H(2);l=_.Ih(a.url);return _.x(q,c.fetch(l).P,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.N(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)})},sL=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 _.Se:return d.FMP4;case _.Re:return b===_.gi?d.MPEG2_TS:c.TS;case _.jc:return c.AAC;case _.kc:return c.AC3;case _.lc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.nc:return c.FMP4}},uL=function(a){a=
6
+ void 0===a?tL:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.L(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}},vL=function(a){oL.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.f=null;this.w=this.Bb.bind(this)},wL=function(){this.h=new _.H("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},xL=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},zL=function(a,b){var c=xL(a);return yL(a,b).find(function(d){return c.includes(d.id)})||null},yL=function(a,b){return a.g.filter(function(c){return c.type===b})},BL=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.P){var e=a.na();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;AL(a,b)},function(f){a.f[b]=null;a.h.debug(cL,f)})}else b===_.P&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){AL(a,b)},function(f){a.h.debug(cL,f)}))},AL=function(a,b){b===_.Q?a.a.trigger(new _.J(_.Dj)):b===_.P&&a.a.trigger(new _.J(_.Ej))},FL=function(a,b,c,d){_.Kj.call(this);this.j=new _.H(_.Gc);this.aa=a;this.o=new _.Ni(b);this.$=c;this.da=d;this.g=this.K=
9
+ _.Qj();this.D=[];this.B=0;this.N=new _.Zh;this.I=this.m=this.a=null;this.A=this.w=!1;this.fa="";this.Sa=1E6;this.f=new wL;this.f.initialize(this);this.h=new vL(this);this.J=new _.dg;this.L=null;this.F=new Set;this.T=this.Vi.bind(this);this.Ma=this.nj.bind(this);this.ba=this.ej.bind(this);this.V=this.Zi.bind(this);this.R=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){CL(!0)},0)}});DL(this);EL.add(this)},
10
+ GL=function(a){var b,c;return _.B(function(d){if(1==d.a)return EL["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ma)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.h&&(c.push(a.h.destroy()),a.h=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.$=null;a.da=null;_.z(d)})},IL=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(HL);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=uL(HL[b]);return Object.assign(b,a)},JL=function(a){var b=void 0===b?tL:b;return Object.values(HL).includes(a)?a:b},NL=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},DL=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.bf();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.T);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ma);SL&&a.o.Z(.02)}},XL=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},ZL=function(a,b){YL(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ba);b.addMessageListener(lL,a.V)},YL=function(a,b){b!==a.a&&(a.a=b,a.a&&(a.J.release(),a.I=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.I=new cast.framework.RemotePlayerController(a.m),a.J.on(a.I,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Pg.bind(a)),a.f&&a.f.load(),a.h&&a.h.init(),a.trigger(new _.J(_.vd))))},$L=function(a){return _.B(function(b){return a.jb()?
14
+ b.H(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},aM=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,r,w,y,A,E,F;return _.B(function(D){switch(D.a){case 1:return c=chrome.cast.media.StreamType,d=_.sq,_.x(D,$L(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.Eb;m=h.audioMimeType;g.hlsVideoSegmentFormat=sL(l,d.VIDEO);
15
+ g.hlsSegmentFormat=sL(m,d.AUDIO);if(!b.Pa){D.H(3);break}if(!a.R){D.H(4);break}return _.x(D,Promise.resolve(a.R(b.Pa)),5);case 5:if(n=D.f)b.Pa=n;case 4:a.g=b.Pa;a.D=_.gn(a.g);a.B=a.D.findIndex(function(I){return I.url===b.source.url});if(!b.Pa.remoteTextTracks){D.H(6);break}return _.x(D,Promise.all(b.Pa.remoteTextTracks.map(a.Uh.bind(a))),7);case 7:p=D.f,g.tracks=p.filter(function(I){return I}),b.Pa.remoteTextTracks=void 0;case 6:delete b.Pa.autoplay,b.Pa.startTime=null,g.customData={playerConfiguration:pL(b.Pa)};
16
+ case 3:q=a.eb()||{};r=JL(q.metadataType);typeof b.Se===_.k&&(w={metadataType:r,sectionStartAbsoluteTime:b.Se});b.source.name&&(y={metadataType:r,title:b.source.name});A=NL(q);if(E=IL(Object.assign({},w,y,A)))g.metadata=E;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.rc&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.x(D,f.loadMedia(F),0)}})},bM=function(a,b,c){c=void 0===c?0:c;var d,e;return _.B(function(f){(d=a.f.na())&&d.language&&(a.g.preferredTextLanguage=
17
+ d.language);(e=a.f.ma())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.x(f,aM(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Se:a.getPresentationStartTime(),autoplay:b,Pa:a.g}),0)})},CL=function(a){if(a){a=_.u(EL);for(var b=a.next();!b.done;b=a.next())DL(b.value)}},dM=function(a,b,c){_.Kj.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.id?c:function(e,f){d.f&&e!==_.Wm&&e!==_.Pm&&d.f.load(f)};this.a=cM(this);this.g=new _.H(iL);this.addDelegate(this.f)},cM=
18
+ function(a){return new FL(a.h,function(){a.trigger(new _.J(_.xc))},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.mf&&(d.preferredAudioLanguage=c.mf);c.wg&&(d.preferredTextLanguage=c.wg);_.oo(a.f,null);a.trigger(new _.J("castingended"));a.j(b,d)},function(){return eM(a)})},eM=function(a){var b;return _.B(function(c){if(1==c.a)return a.trigger(new _.J(_.wc)),
19
+ b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.oo(a.f,a.a);_.z(c)})},fM=function(a){oL.call(this,a,"clpp.cast.StateManager");this.J=this.Tg.bind(this);this.I=this.Sg.bind(this);this.w=this.aj.bind(this);this.o=this.Ui.bind(this);this.L=this.Vg.bind(this);this.K=this.Ug.bind(this);this.N=this.qj.bind(this);this.F=this.dj.bind(this);this.D=this.U.bind(this);this.f=this.Rg.bind(this)},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.h=typeof c===_.k?c:1;this.j=typeof d===_.k?d:1;this.g=
20
+ typeof e===_.k?e:0},gM=function(a){this.a=a},iM=function(a){this.l=a;this.a=null;this.g=this.Wg.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
+ hM().addEventListener(this.f,this.g)},lM=function(a,b,c){var d,e,f,g,h,l,m;return _.B(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.yf(n,2);jM=!1;e=_.Ih(d);return _.x(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.ph(f.data),h=new DOMParser,l=h.parseFromString(g,_.De),l.getElementsByTagName("vmap:VMAP").length)_.G("VMAP detected."),a.vmapAdsRequest=kM(g);else if(l.getElementsByTagName("VAST").length){_.G("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
22
+ p.vastAdsRequest=kM(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.G("Unsupported schema."),jM=!0;return _.zf(n,0)}m=_.Af(n);_.G("Failed to fetch an ad",m);jM=!0;_.z(n)})},kM=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},hM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},nM=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
23
+ (c=mM(a,c))&&(d={ad:c});a.l.trigger(new _.J(b,d))}},oM=function(a,b){var c=new _.L(1,10,10003,{errorType:b});a.l.onError(c)},mM=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.ue&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.ue&&(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 Z(d,e,b.index,b.total,f)}return c},pM=function(a){this.Ub=a;this.a=this.f.bind(this)},qM=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]},rM=function(a){var b=a.dashTimedMetadata,c=_.Ke;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Je)?
25
+ _.ng:_.lg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},sM=function(){this.g=new _.H("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.h=[];this.j=[];this.m=this.xj.bind(this);this.a=this.f=null},tM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},vM=function(a){a.a=tM().getTextTracksManager();var b=a.a.getTracks();a.j=uM(_.P,b)},wM=function(a,b,c,d){c=_.bi(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.Q?f=a.getAudioTracks():b===_.P&&(f=a.ha());if(c=c.find(function(h){var l=_.Gi(h);return f.some(function(m){m=_.Gi(m.language||"");return _.Hi(l,m)})})){var g=_.Gi(c);c=f.filter(function(h){h=_.Gi(h.language||"");return _.Hi(g,h)});f=c.length?c:f;e=e||!!c.length}_.yh(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===_.Q?a.sa(e):b===_.P&&a.Ba(e))},uM=function(a,b){for(var c=[],d=_.u(b),e=
27
+ d.next();!e.done;e=d.next()){e=e.value;var f=new _.ei(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=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 _.mi(f.id,f));c.push(f)}return c},xM=function(){_.Kj.call(this);this.A=new _.H(jL);this.g=this.o=_.Qj();this.w=null;this.j=-1;this.F=new _.Zh;this.f=this.m=
28
+ this.h=this.a=this.B=null;this.D=!1},yM=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},BM=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=_.pk(d);if(e){var f=[_.Pc];_.gn(a)[0].type!==_.gc&&f.unshift(_.Qc);d.preferredDrmSystem===_.Pc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Ra[g];h?(d=g===_.Qc?cast.framework.ContentProtection.WIDEVINE:
29
+ g===_.Pc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},zM(b,h,a,d),AM(b,h,a,d)):c()}else c()}else c()},zM=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Ih({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=
30
+ f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},AM=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.B(function(h){return 1==h.a?(g=_.Jh(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.N(g.data))})}:a.licenseHandler=void 0},CM=function(){this.a=!1;this.h=new _.H(kL);this.f=this.l=null;this.g=new Set;this.A=this.cj.bind(this);this.w=this.Qg.bind(this);this.j=null;this.o=new _.dg;this.m=null},
31
+ EM=function(){return DM||(DM=new CM)},FM=function(){return cast.framework.CastReceiverContext.getInstance()},HM=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=FM();c=(FM().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Se:_.Re;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=GM(h,_.pa),m=GM(h,_.ib),n=_.u([]),
32
+ p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},GM=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},IM=function(a){this.f=a;this.a=null;this.g=new _.dg;this.h=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,
33
+ cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},KM=function(a,b){var c=null,d=JM(a);d&&(c={ad:d});a.f.trigger(new _.J(b,c))},JM=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:
34
+ 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 Z(d,c,e,f,g)}return b},LM=function(){},MM=function(){};_.t=oL.prototype;_.t.release=function(){this.la(_.Pm)};_.t.destroy=function(){this.j=this.a=null;return Promise.resolve()};_.t.getState=function(){return this.g};_.t.onError=function(a){a.severity===_.M&&this.la(_.$m)};
35
+ _.t.la=function(a){if(a!==this.g)if(this.g===_.$m&&a!==_.Pm)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.m=this.g;this.g=a;this.g===_.Um?(this.A=b,this.a.trigger(new _.J(_.tc,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.m===_.Um&&this.a.trigger(new _.J(_.sc,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.g,previousState:this.m,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Fm(this.j,this.g);this.a.trigger(new _.J(_.re,
36
+ {detail:a}))}};_.C("clpp.cast.CastUtils",function(){});var tL=0,HL={GENERIC:tL,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.v(vL,oL);vL.prototype.init=function(){var a=this.a,b=a.a;b&&(this.f&&this.f.removeUpdateListener(this.w),this.f=b,this.f.addUpdateListener(this.w),this.o=a.m)};vL.prototype.destroy=function(){var a=this;return _.B(function(b){a.f&&(a.f.removeUpdateListener(a.w),a.f=null);return _.x(b,oL.prototype.destroy.call(a),0)})};vL.prototype.la=function(a){var b=this.a.m;b&&b.isPlayingBreak||oL.prototype.la.call(this,a)};
37
+ vL.prototype.Bb=function(){if(this.f&&this.o&&!this.o.isPlayingBreak)switch(this.f.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.f.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.la(_.Wm);break;case chrome.cast.media.IdleReason.ERROR:this.la(_.$m);break;default:this.la(_.Pm)}break;case chrome.cast.media.PlayerState.PLAYING:this.la(_.cn);break;case chrome.cast.media.PlayerState.PAUSED:this.la(_.bn);break;case chrome.cast.media.PlayerState.BUFFERING:this.la(_.Um)}};_.v(wL,_.R);_.t=wL.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.g=[];this.f={}};
38
+ _.t.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.gi;break;case chrome.cast.media.TrackType.AUDIO:c=_.Q;break;case chrome.cast.media.TrackType.TEXT:c=_.P}c=new _.ei(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);
39
+ c.renditions.push(new _.mi(c.id,c));return c}):[],this.a.trigger(new _.J(_.uq)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return yL(this,_.gi)};_.t.getAudioTracks=function(){return yL(this,_.Q)};_.t.ha=function(){return yL(this,_.P)};_.t.ga=function(){var a=this.Ia();return a?a.renditions[0]:null};_.t.Fa=function(){var a=this.ma();return a?a.renditions[0]:null};_.t.Ga=function(){var a=this.na();return a?a.renditions[0]:null};_.t.Ua=function(){return this.f[_.gi]||null};
40
+ _.t.fb=function(){return this.f[_.Q]||null};_.t.gb=function(){return this.f[_.P]||null};_.t.Ia=function(){return zL(this,_.gi)};_.t.ma=function(){return zL(this,_.Q)};_.t.na=function(){return zL(this,_.P)};_.t.ab=function(a){BL(this,_.gi,a)};_.t.sa=function(a){BL(this,_.Q,a)};_.t.Ba=function(a){BL(this,_.P,a)};_.t.$a=function(a){this.ab(a&&a.track)};_.t.mb=function(a){this.sa(a&&a.track)};_.t.nb=function(a){this.Ba(a&&a.track)};_.t.addTextTrack=function(){return _.B(function(a){_.z(a)})};_.t.ja=function(){return!0};
41
+ wL.prototype.isAbrEnabled=wL.prototype.ja;wL.prototype.addTextTrack=wL.prototype.addTextTrack;wL.prototype.setTextRendition=wL.prototype.nb;wL.prototype.setAudioRendition=wL.prototype.mb;wL.prototype.setVideoRendition=wL.prototype.$a;wL.prototype.setTextTrack=wL.prototype.Ba;wL.prototype.setAudioTrack=wL.prototype.sa;wL.prototype.setVideoTrack=wL.prototype.ab;wL.prototype.getTextTrack=wL.prototype.na;wL.prototype.getAudioTrack=wL.prototype.ma;wL.prototype.getVideoTrack=wL.prototype.Ia;
42
+ wL.prototype.getLoadingTextRendition=wL.prototype.gb;wL.prototype.getLoadingAudioRendition=wL.prototype.fb;wL.prototype.getLoadingVideoRendition=wL.prototype.Ua;wL.prototype.getTextRendition=wL.prototype.Ga;wL.prototype.getAudioRendition=wL.prototype.Fa;wL.prototype.getVideoRendition=wL.prototype.ga;wL.prototype.getTextTracks=wL.prototype.ha;wL.prototype.getAudioTracks=wL.prototype.getAudioTracks;wL.prototype.getVideoTracks=wL.prototype.getVideoTracks;_.v(FL,_.Kj);_.t=FL.prototype;_.t.init=function(a,b){this.g=this.K=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.h&&a.h.release()})};_.t.destroy=function(){return _.B(function(a){_.z(a)})};_.t.nd=function(a){this.R=a};_.t.dc=function(){return this.w};_.t.jb=function(){return this.A};_.t.ue=function(){return this.fa};
43
+ _.t.sendMessage=function(a,b){var c=this,d,e,f;return _.B(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.L(1,8,8004,void 0);g.H(2);break}_.yf(g,3);return _.x(g,e.sendMessage(a,pL(b)),5);case 5:_.zf(g,2);break;case 3:f=_.Af(g),d=new _.L(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.z(g)}})};
44
+ _.t.cast=function(){var a=this,b,c;return _.B(function(d){if(1==d.a){if(!a.dc())throw a.j.warn(gL),new _.L(1,8,8001,void 0);if(!SL)throw a.j.warn(eL),new _.L(1,8,8002,void 0);if(a.jb())throw a.j.warn("Already casting"),new _.L(1,8,8003,void 0);_.yf(d,2);return _.x(d,$L(a),4)}if(2!=d.a)return _.zf(d,0);b=_.Af(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.L(1,8,8E3,c);})};
45
+ _.t.qe=function(){this.jb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.id&&this.F.add(a)};_.t.removeMessageListener=function(a){typeof a===_.id&&this.F["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?bM(this,!0):new Promise(function(b,c){if(!a.a)return c(dL);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(dL);a.a.pause(null,b,c)})};
46
+ _.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.t.isEnded=function(){return this.getState()===_.Wm};_.t.seek=function(a){var b=this;return this.isEnded()?bM(this,!1,a):new Promise(function(c,d){b.a||d(dL);b.m.isPlayingBreak&&d(bL);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.J(_.Me));b.a.seek(e,function(){b.trigger(new _.J(_.Le));c()},d)})};_.t.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
47
+ _.t.getDuration=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.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(mL,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
48
48
  _.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))};
49
- _.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.h?this.h.getState():_.km};
50
- _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?VK(this.a.customData.stats):_.fm()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.A(function(e){if(!b.bc())return b.j.warn(LK),e["return"]();if(!pL)return b.j.warn(JK),e["return"]();b.C=_.Gm(a);_.mj(a)&&(b.g=_.lj(b.J,a));c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Oa:b.g,Cb:c.Cb,audioMimeType:c.audioMimeType};return _.y(e,FL(b,d),0)})};
51
- _.t.getBufferInfo=function(){return new _.Zh};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.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.C[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
52
- _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.j.warn(KK)};_.t.onError=function(a){if(a&&(this.trigger(new _.J(_.dd,{detail:a})),this.h))this.h.onError(a)};_.t.namespace=function(){return _.Dc};_.t.canPlay=function(){return this.bc()?2:0};_.t.cb=function(){return this.K};_.t.jc=function(a){this.K=mL(a)};_.t.fe=function(){this.K=null};_.t.Ue=function(a){var b=this.cb()||{};a={metadataType:nL(b.metadataType),title:a};this.jc(Object.assign({},b,a))};
53
- _.t.Se=function(a){var b=this.cb()||{},c=nL(b.metadataType);a=new chrome.cast.Image(a);this.jc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.Re=function(a){var b=this.cb()||{};this.jc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.Te=function(a){var b=this.cb()||{};a={metadataType:nL(b.metadataType),releaseDate:a};this.jc(Object.assign({},b,a))};
54
- _.t.Si=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;pL=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ia=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Ye()};
55
- _.t.kj=function(a){this.j.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;DL(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.ib()||(this.A=!0,DL(this,a.session),this.da());break;case cast.framework.SessionState.SESSION_ENDED:if(this.ib()&&this.a){var b=this.a.media,c=this.f.ka(),d=this.f.la();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Y(this.getState(),{source:{url:b.contentId,type:b.contentType,
56
- isLive:this.isLive()},currentTime:tL(this),rg:d,hf:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(QK,this.U);this.A=!1;this.a=null;this.I.release();this.m=this.G=null}};_.t.bj=function(a){this.j.debug("New media session",a.mediaSession);yL(this,a.mediaSession)};_.t.Wi=function(a,b){if(a===QK&&0<this.D.size){var c=VK(b);this.D.forEach(function(d){return d(c)})}};_.t.Kg=function(){this.trigger(new _.J(_.Ce))};
57
- _.t.Qh=function(a){var b=this,c,d;return _.A(function(e){if(1==e.a)return c=null,_.y(e,WK(a,[_.Ae,_.cc],b.L,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ra++,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};jL.prototype.getTextDisplayer=jL.prototype.getTextDisplayer;jL.prototype.getNetworkEngine=jL.prototype.getNetworkEngine;
58
- jL.prototype.setNetworkEngine=jL.prototype.setNetworkEngine;var pL=!1,iL=new Set;window.__onGCastApiAvailable=gL;_.v(IL,_.$h);_.t=IL.prototype;_.t.destroy=function(){var a=this;return _.A(function(b){if(1==b.a)return a.a?_.y(b,kL(a.a),3):b.H(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.z(b)})};_.t.de=function(){return!!this.a&&this.a.bc()&&pL};_.t.ib=function(){return!!this.a&&this.a.ib()};_.t.qe=function(){return this.a?this.a.qe():""};_.t.jd=function(a){this.a&&this.a.jd(a)};
59
- _.t.cast=function(a){var b=this,c,d,e;return _.A(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.wf(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.ka();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.la())l.language&&
60
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.pc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),Oe:b.f.getPresentationStartTime(),Cb:m,audioMimeType:p,Oa:g}}c=g;return _.y(f,JL(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.H(7);break}return _.y(f,FL(b.a,c),7);case 7:_.xf(f,0);break;case 2:d=_.yf(f),
61
- b.g.error("Error while trying to cast",d),e=new _.J(_.dd,{detail:d}),b.trigger(e),_.z(f)}})};_.t.me=function(){this.a&&this.a.me()};_.t.Gg=function(a){var b=this;return _.A(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,kL(b.a),2):c.H(2)}b.a=HL(b);_.z(c)})};_.t.sendMessage=function(a){var b=this;return _.A(function(c){return b.a?_.y(c,b.a.sendMessage(QK,a),0):(b.g.warn(MK),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(MK)};
62
- _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(MK)};_.t.cb=function(){return this.a&&this.a.cb()};_.t.jc=function(a){this.a&&this.a.jc(a)};_.t.fe=function(){this.a&&this.a.fe()};_.t.Ue=function(a){this.a&&this.a.Ue(a)};_.t.Se=function(a){this.a&&this.a.Se(a)};_.t.Re=function(a){this.a&&this.a.Re(a)};_.t.Te=function(a){this.a&&this.a.Te(a)};_.C(NK,IL);IL.prototype.setContentReleaseDate=IL.prototype.Te;IL.prototype.setContentArtist=IL.prototype.Re;
63
- IL.prototype.setContentImage=IL.prototype.Se;IL.prototype.setContentTitle=IL.prototype.Ue;IL.prototype.clearContentMetadata=IL.prototype.fe;IL.prototype.setContentMetadata=IL.prototype.jc;IL.prototype.getContentMetadata=IL.prototype.cb;IL.prototype.removeMessageListener=IL.prototype.removeMessageListener;IL.prototype.addMessageListener=IL.prototype.addMessageListener;IL.prototype.sendMessage=IL.prototype.sendMessage;IL.prototype.changeReceiverId=IL.prototype.Gg;IL.prototype.forceDisconnect=IL.prototype.me;
64
- IL.prototype.cast=IL.prototype.cast;IL.prototype.setPlayerConfigInterceptor=IL.prototype.jd;IL.prototype.getReceiverName=IL.prototype.qe;IL.prototype.isCasting=IL.prototype.ib;IL.prototype.canCast=IL.prototype.de;IL.prototype.destroy=IL.prototype.destroy;_.v(KL,TK);_.t=KL.prototype;
65
- _.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.G);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.D);b.addEventListener(a.ERROR,this.C);b.addEventListener(a.BITRATE_CHANGED,this.f)};
66
- _.t.destroy=function(){var a=this,b,c;return _.A(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.G);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.D);c.removeEventListener(b.ERROR,
67
- a.C);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.y(d,TK.prototype.destroy.call(a),0)})};_.t.Og=function(){this.a.trigger(new _.J(_.Ud));this.ja(_.xm)};_.t.Ng=function(){this.ja(_.wm)};_.t.Yi=function(){this.ja(_.qm)};_.t.Ri=function(a){a.isBuffering?this.ja(_.om):(a=this.a.isPaused()?_.wm:_.xm,this.ja(a))};_.t.Qg=function(){this.h=1;this.a.trigger(new _.J(_.Ke))};_.t.Pg=function(){this.a.trigger(new _.J(_.Je))};_.t.nj=function(){this.h=2};_.t.aj=function(){this.ja(_.vm)};
68
- _.t.Mg=function(a){var b=this.a.getStats();this.a.trigger(new _.J(_.oc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.S=function(a){a=new _.L(_.M,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.J(_.dd,{detail:a}));this.ja(_.um)};_.t=Z.prototype;_.t.sb=function(){return"Google Cast Framework"};_.t.tb=function(){return cast.framework.VERSION};_.t.yb=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};
69
- _.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.dc=function(){return!1};_.t.Ib=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.vb=function(){return 0};_.t.ub=function(){return 0};_.t.gb=function(){return 0};_.t.Ua=function(){switch(this.Jb()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Jb=function(){return this.f.position};_.t.Kb=function(){return this.h};
70
- _.t.xb=function(){return this.j};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};Z.prototype.getWrapperCreativeIds=Z.prototype.getWrapperCreativeIds;Z.prototype.getWrapperAdSystems=Z.prototype.getWrapperAdSystems;Z.prototype.getWrapperAdIds=Z.prototype.getWrapperAdIds;Z.prototype.getSequenceLength=Z.prototype.xb;Z.prototype.getPositionInSequence=Z.prototype.Kb;Z.prototype.getPodTimeOffset=Z.prototype.Jb;
71
- Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.Ua;Z.prototype.getMediaBitrate=Z.prototype.gb;Z.prototype.getMediaHeight=Z.prototype.ub;Z.prototype.getMediaWidth=Z.prototype.vb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Ib;Z.prototype.isBumper=Z.prototype.dc;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;
72
- Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.getId;Z.prototype.getTechnology=Z.prototype.yb;Z.prototype.getAdManagerVersion=Z.prototype.tb;Z.prototype.getAdManagerName=Z.prototype.sb;LL.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};LL.prototype.Lb=function(){return!!this.a.find(function(a){return 0===a.position})};LL.prototype.hb=function(){return!!this.a.find(function(a){return-1===a.position})};LL.prototype.hasPostroll=LL.prototype.hb;LL.prototype.hasPreroll=LL.prototype.Lb;LL.prototype.getCuePoints=LL.prototype.getCuePoints;_.t=NL.prototype;_.t.load=function(){var a=this;return _.A(function(b){OL&&(OL=!1,TL(a,0));_.z(b)})};_.t.start=function(){return _.A(function(a){ML().play();_.z(a)})};_.t.resume=function(){-1!==this.getPosition()&&ML().play()};_.t.pause=function(){-1!==this.getPosition()&&ML().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.l.getVolume()||0};_.t.setVolume=function(a){this.l.setVolume(a)};
73
- _.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.A(function(b){ML().removeEventListener(a.f,a.g);_.z(b)})};
74
- _.t.Rg=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=ML().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.J(_.Tb,{adsTimeline:new LL(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:SL(this,_.Jb,a);break;case cast.framework.events.EventType.BREAK_STARTED:SL(this,_.Bb,a);break;case cast.framework.events.EventType.BREAK_ENDED:SL(this,_.Cb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:SL(this,
75
- _.Pb,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(SL(this,_.Ob,a),SL(this,_.Qb,a)):a.endedReason===b.STOPPED?SL(this,_.Qb,a):a.endedReason===b.END_OF_STREAM?(SL(this,_.Gb,a),SL(this,_.Qb,a)):a.endedReason===b.ERROR&&TL(this,1);break;case cast.framework.events.EventType.PLAYING:SL(this,_.Nb,a);break;case cast.framework.events.EventType.PAUSE:SL(this,_.Lb,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?SL(this,_.Eb,a):SL(this,_.Nb,a)}};
76
- NL.prototype.getPosition=NL.prototype.getPosition;NL.prototype.setVolume=NL.prototype.setVolume;NL.prototype.getVolume=NL.prototype.getVolume;NL.prototype.skip=NL.prototype.skip;NL.prototype.pause=NL.prototype.pause;NL.prototype.resume=NL.prototype.resume;var OL=!1;UL.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(VL(),this.a)};UL.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(VL(),this.a)};UL.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return WL(a)})};
77
- UL.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=_.mg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.pg}b&&this.Sb(new _.J(b,{detail:WL(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Sb(new _.J(_.mg,{detail:b.value}))};_.v(XL,_.Q);_.t=XL.prototype;_.t.initialize=function(a){this.l=a;YL().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.l=null;YL().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.h};_.t.ea=function(){return this.j};_.t.fa=function(){return null};
78
- _.t.Fa=function(){var a=this.ka();return a&&a.renditions[0]};_.t.Ga=function(){var a=this.la();return a&&a.renditions[0]};_.t.Ta=function(){return null};_.t.eb=function(){return null};_.t.fb=function(){return null};_.t.Ia=function(){return null};_.t.ka=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};
79
- _.t.la=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ea().find(function(c){return c.id===b})||null)}return a};_.t.$a=function(){this.g.warn("Video tracks unavailable on Cast")};_.t.ra=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Ba=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.lb=function(a){this.ra(a&&a.track)};
80
- _.t.mb=function(a){this.Ba(a&&a.track)};
81
- _.t.addTextTrack=function(a){var b=this,c,d,e;return _.A(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.y(f,WK(a,Object.values(cast.framework.messages.CaptionMimeType),b.l.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]),$L(b)}catch(g){throw b.g.warn("failed on track",
82
- a),g;}}_.z(f)})};_.t.ha=function(){return!0};_.t.tj=function(){this.f=YL().getAudioTracksManager();var a=this.f.getTracks();this.h=ZL(_.P,a);$L(this);a=this.l.getConfiguration();aM(this,_.P,a.preferredAudioLanguage,a.preferredAudioRole);aM(this,_.N,a.preferredTextLanguage,a.preferredTextRole)};XL.prototype.isAbrEnabled=XL.prototype.ha;XL.prototype.addTextTrack=XL.prototype.addTextTrack;XL.prototype.setTextRendition=XL.prototype.mb;XL.prototype.setAudioRendition=XL.prototype.lb;
83
- XL.prototype.setVideoRendition=XL.prototype.Za;XL.prototype.setTextTrack=XL.prototype.Ba;XL.prototype.setAudioTrack=XL.prototype.ra;XL.prototype.setVideoTrack=XL.prototype.$a;XL.prototype.getTextTrack=XL.prototype.la;XL.prototype.getAudioTrack=XL.prototype.ka;XL.prototype.getVideoTrack=XL.prototype.Ia;XL.prototype.getLoadingTextRendition=XL.prototype.fb;XL.prototype.getLoadingAudioRendition=XL.prototype.eb;XL.prototype.getLoadingVideoRendition=XL.prototype.Ta;XL.prototype.getTextRendition=XL.prototype.Ga;
84
- XL.prototype.getAudioRendition=XL.prototype.Fa;XL.prototype.getVideoRendition=XL.prototype.fa;XL.prototype.getTextTracks=XL.prototype.ea;XL.prototype.getAudioTracks=XL.prototype.getAudioTracks;XL.prototype.getVideoTracks=XL.prototype.getVideoTracks;_.v(bM,_.$h);_.t=bM.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.o=b);var d=cM();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.cj.bind(this));d.setMediaPlaybackInfoHandler(this.Bg.bind(this));this.a=new KL(this);this.a.init();this.h=new XL;this.h.initialize(this);this.m=new UL(function(e){return c.trigger(e)});this.m.init()};
85
- _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=cM();b.getPlayerState()!==a.IDLE&&b.stop();this.h&&this.h.release();this.m&&this.m.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 _.A(function(b){if(1==b.a)return a.B=null,a.o=_.jj(),a.g=a.o,a.j=-1,a.w=null,a.a?_.y(b,a.a.destroy(),3):b.H(2);2!=b.a&&(a.a=null);a.h&&(a.h.destroy(),a.h=null);_.z(b)})};
86
- _.t.play=function(){var a=cM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=cM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return cM().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
87
- _.t.isEnded=function(){return cM().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=cM();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(GK);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return cM().getCurrentTimeSec()};_.t.getDuration=function(){var a=cM().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return cM().getPlaybackRate()};
88
- _.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;cM().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)};_.t.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
89
- _.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.t.getLoadedSource=function(){var a=cM().getMediaInformation();if(a){var b=cM().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.w&&-1!==this.j?this.w[this.j]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,jk:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
90
- _.t.getPresentationStartTime=function(){return cM().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=cM().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():_.km};
91
- _.t.getStats=function(){var a=_.fm();if(this.f){a=cM().getStats();this.f.m=a.estimatedBandwidth||NaN;this.f.A=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.j=a.width||NaN;b.f=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.h=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.g=c;a=this.f.getStats()}return a};_.t.isLive=function(){return Infinity===this.getDuration()};
92
- _.t.load=function(a){var b=this,c,d;return _.A(function(e){b.f=new _.em;b.a.j=b.f.a;b.w=_.Gm(a);_.mj(a)&&(b.g=_.lj(b.o,a));if(b.C)return b.C=!1,e["return"]();c=b.w[b.j];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.k&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:UK(b.g),local:!0};return _.y(e,cM().load(d),0)})};_.t.getBufferInfo=function(){this.A.warn(_.ra);return new _.Zh};
93
- _.t.getTrackManager=function(){return this.h};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.D=a};_.t.getNetworkEngine=function(){return this.D};_.t.getSourceIndex=function(){return this.j};_.t.setSourceIndex=function(a){this.j=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return OK};_.t.getTimelineCues=function(){return this.m&&this.m.getTimelineCues()||[]};_.t.resetAbr=function(){this.A.warn(KK)};
94
- _.t.onError=function(a){this.trigger(new _.J(_.dd,{detail:a}))};_.t.canPlay=function(){return _.Hi()?2:0};
95
- _.t.cj=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=UK(this.getStats());var b=cM(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.A.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&&
96
- (!e||e&&f)){d=cM().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.Bg=function(a,b){var c=null;a.media.customData&&(c=VK(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;fM(c,b);return b};
97
- _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};bM.prototype.getTextDisplayer=bM.prototype.getTextDisplayer;bM.prototype.getNetworkEngine=bM.prototype.getNetworkEngine;bM.prototype.setNetworkEngine=bM.prototype.setNetworkEngine;_.t=gM.prototype;_.t.init=function(a){var b=this;a&&(this.f=new bM,_.Mn(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.A(function(c){return b.l&&b.l.getState()!==_.jm?_.y(c,SK(b.l),0):c.H(0)})}))};
98
- _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=jM(),b=jM().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[QK]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.xi.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.l&&this.l.getSurface().getMedia())c.mediaElement=
99
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.wi.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(QK,this.w)}};
100
- _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=jM();jM().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(QK,this.w);a.stop();this.l=this.f=null}};_.t.jd=function(a){this.j=a};_.t.Gj=function(a){this.m=a};_.t.on=function(a,b){jM().addEventListener(a,b)};_.t.off=function(a,b){jM().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.fd&&this.g.add(a)};
101
- _.t.removeMessageListener=function(a){typeof a===_.fd&&this.g["delete"](a)};_.t.sendMessage=function(a,b){jM().sendCustomMessage(QK,b,UK(a))};_.t.bc=function(){return this.a};_.t.cb=function(){var a=jM().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
102
- _.t.xi=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return lM(this,a);try{var b=(new DOMParser).parseFromString(a,_.Be)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=jM();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===_.Oe||g===_.gc){g=e[f].getAttribute(_.xd);for(var h=e[f].getElementsByTagName(_.ib),l=
103
- h.length-1;0<=l;--l){var m=h[l].getAttribute(_.xd)||g,n=h[l].getAttribute(_.Ic),p=h[l].getAttribute(_.cf)||void 0,q=h[l].getAttribute(_.gd)||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(_.ib).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ja).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.rb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=jM();c=a.getElementsByTagName("StreamIndex");
104
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Oe){e=c[d].getElementsByTagName(_.gb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Ta)||void 0,h=e[f].getAttribute(_.Sa)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Qe,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.gb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
105
- _.t.wi=function(a){var b=this,c,d,e,f,g,h;return _.A(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=VK(c.media.customData.playerConfiguration));if(!b.l||!d){l.H(2);break}if(!b.j){l.H(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.H(5);break}return _.y(l,QL(c.media,d.ima,b.l.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.H(7);
106
- break}b.f.C=!0;return _.y(l,_.Qn(b.l,d),8);case 8:return _.y(l,_.Rn(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Cb&&(c.media.hlsVideoSegmentFormat=XK(f.Cb,_.Ig)),f.audioMimeType&&(c.media.hlsSegmentFormat=XK(f.audioMimeType,_.P));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.l.getConfiguration().autoplay);case 2:if(!b.m){l.H(10);
107
- break}return _.y(l,Promise.resolve(b.m(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.$i=function(a){if(this.l&&(!a.media.customData||!a.media.customData.local)){a=_.K.oi;var b=jM().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.l.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.l.seek(b))}_.Tn(this.l)}};
108
- _.t.Lg=function(a){if(0<this.g.size){var b=VK(a.data);this.g.forEach(function(c){return c(b)})}};_.C(PK,gM);gM.prototype.getContentMetadata=gM.prototype.cb;gM.prototype.isApiReady=gM.prototype.bc;gM.prototype.sendMessage=gM.prototype.sendMessage;gM.prototype.removeMessageListener=gM.prototype.removeMessageListener;gM.prototype.addMessageListener=gM.prototype.addMessageListener;gM.prototype.off=gM.prototype.off;gM.prototype.on=gM.prototype.on;gM.prototype.setLoadRequestDataInterceptor=gM.prototype.Gj;
109
- gM.prototype.setPlayerConfigInterceptor=gM.prototype.jd;gM.prototype.stop=gM.prototype.stop;gM.prototype.start=gM.prototype.start;gM.prototype.init=gM.prototype.init;gM.getInstance=iM;var hM=null;_.t=mM.prototype;_.t.load=function(){var a=this,b,c,d,e,f;return _.A(function(g){a.a=a.f.m;if(a.a)for(b=a.a.controller,c=a.pj.bind(a),d=_.u(a.h),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.z(g)})};_.t.start=function(){return _.A(function(a){_.z(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()};
110
- _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(RK,{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 _.A(function(b){a.g.release();_.z(b)})};
111
- _.t.pj=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.J(_.Tb,{adsTimeline:new LL(a.breaks)})));break;case "isPlayingBreak":a.value?oM(this,_.Bb):(oM(this,_.Gb),oM(this,_.Qb),oM(this,_.Cb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(oM(this,_.Gb),oM(this,_.Qb)),oM(this,_.Pb));break;case "isPaused":this.a.isPlayingBreak&&(a.value?oM(this,_.Lb):oM(this,_.Nb))}};mM.prototype.getPosition=mM.prototype.getPosition;
112
- mM.prototype.setVolume=mM.prototype.setVolume;mM.prototype.getVolume=mM.prototype.getVolume;mM.prototype.skip=mM.prototype.skip;mM.prototype.pause=mM.prototype.pause;mM.prototype.resume=mM.prototype.resume;pM.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};pM.prototype.W=function(a,b){return a.namespace()!==_.Dc?!1:!(!b||!b.ima)};pM.prototype.create=function(a){return new mM(a.a)};pM.prototype.create=pM.prototype.create;pM.prototype.isSupported=pM.prototype.W;pM.prototype.name=pM.prototype.name;_.Um(new pM);qM.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};qM.prototype.W=function(a,b){return iM().bc()?!(!b||!b.ima):!1};qM.prototype.create=function(a){return new NL(a)};qM.prototype.create=qM.prototype.create;qM.prototype.isSupported=qM.prototype.W;qM.prototype.name=qM.prototype.name;_.Um(new qM);};
49
+ _.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.h?this.h.getState():_.Qm};
50
+ _.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?qL(this.a.customData.stats):_.Lm()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.B(function(e){if(!b.dc())return b.j.warn(gL),e["return"]();if(!SL)return b.j.warn(eL),e["return"]();b.D=_.gn(a);_.Tj(a)&&(b.g=_.Sj(b.K,a));c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Pa:b.g,Eb:c.Eb,audioMimeType:c.audioMimeType};return _.x(e,aM(b,d),0)})};
51
+ _.t.getBufferInfo=function(){return new _.Jj};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.N=a};_.t.getNetworkEngine=function(){return this.N};_.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};
52
+ _.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.j.warn(fL)};_.t.onError=function(a){if(a&&(this.trigger(new _.J(_.gd,{detail:a})),this.h))this.h.onError(a)};_.t.namespace=function(){return _.Gc};_.t.canPlay=function(){return this.dc()?2:0};_.t.eb=function(){return this.L};_.t.kc=function(a){this.L=IL(a)};_.t.ke=function(){this.L=null};_.t.Ye=function(a){var b=this.eb()||{};a={metadataType:JL(b.metadataType),title:a};this.kc(Object.assign({},b,a))};
53
+ _.t.We=function(a){var b=this.eb()||{},c=JL(b.metadataType);a=new chrome.cast.Image(a);this.kc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.Ve=function(a){var b=this.eb()||{};this.kc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.Xe=function(a){var b=this.eb()||{};a={metadataType:JL(b.metadataType),releaseDate:a};this.kc(Object.assign({},b,a))};
54
+ _.t.Vi=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;SL=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.fa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.bf()};
55
+ _.t.nj=function(a){this.j.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;ZL(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.jb()||(this.A=!0,ZL(this,a.session),this.da());break;case cast.framework.SessionState.SESSION_ENDED:if(this.jb()&&this.a){var b=this.a.media,c=this.f.ma(),d=this.f.na();c=c&&c.language||void 0;d=d&&d.language||void 0;this.$(this.getState(),{source:{url:b.contentId,type:b.contentType,
56
+ isLive:this.isLive()},currentTime:XL(this),wg:d,mf:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ba);a.session.removeMessageListener(lL,this.V);this.A=!1;this.a=null;this.J.release();this.m=this.I=null}};_.t.ej=function(a){this.j.debug("New media session",a.mediaSession);YL(this,a.mediaSession)};_.t.Zi=function(a,b){if(a===lL&&0<this.F.size){var c=qL(b);this.F.forEach(function(d){return d(c)})}};_.t.Pg=function(){this.trigger(new _.J(_.Ee))};
57
+ _.t.Uh=function(a){var b=this,c,d;return _.B(function(e){if(1==e.a)return c=null,_.x(e,rL(a,[_.Ce,_.fc],b.N,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Sa++,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};FL.prototype.getTextDisplayer=FL.prototype.getTextDisplayer;FL.prototype.getNetworkEngine=FL.prototype.getNetworkEngine;
58
+ FL.prototype.setNetworkEngine=FL.prototype.setNetworkEngine;var SL=!1,EL=new Set;window.__onGCastApiAvailable=CL;_.v(dM,_.Kj);_.t=dM.prototype;_.t.destroy=function(){var a=this;return _.B(function(b){if(1==b.a)return a.a?_.x(b,GL(a.a),3):b.H(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.z(b)})};_.t.ge=function(){return!!this.a&&this.a.dc()&&SL};_.t.jb=function(){return!!this.a&&this.a.jb()};_.t.ue=function(){return this.a?this.a.ue():""};_.t.nd=function(a){this.a&&this.a.nd(a)};
59
+ _.t.cast=function(a){var b=this,c,d,e;return _.B(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.yf(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.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.na())l.language&&
60
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.rc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),Se:b.f.getPresentationStartTime(),Eb:m,audioMimeType:p,Pa:g}}c=g;return _.x(f,eM(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.H(7);break}return _.x(f,aM(b.a,c),7);case 7:_.zf(f,0);break;case 2:d=_.Af(f),
61
+ b.g.error("Error while trying to cast",d),e=new _.J(_.gd,{detail:d}),b.trigger(e),_.z(f)}})};_.t.qe=function(){this.a&&this.a.qe()};_.t.Lg=function(a){var b=this;return _.B(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,GL(b.a),2):c.H(2)}b.a=cM(b);_.z(c)})};_.t.sendMessage=function(a){var b=this;return _.B(function(c){return b.a?_.x(c,b.a.sendMessage(lL,a),0):(b.g.warn(hL),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(hL)};
62
+ _.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(hL)};_.t.eb=function(){return this.a&&this.a.eb()};_.t.kc=function(a){this.a&&this.a.kc(a)};_.t.ke=function(){this.a&&this.a.ke()};_.t.Ye=function(a){this.a&&this.a.Ye(a)};_.t.We=function(a){this.a&&this.a.We(a)};_.t.Ve=function(a){this.a&&this.a.Ve(a)};_.t.Xe=function(a){this.a&&this.a.Xe(a)};_.C(iL,dM);dM.prototype.setContentReleaseDate=dM.prototype.Xe;dM.prototype.setContentArtist=dM.prototype.Ve;
63
+ dM.prototype.setContentImage=dM.prototype.We;dM.prototype.setContentTitle=dM.prototype.Ye;dM.prototype.clearContentMetadata=dM.prototype.ke;dM.prototype.setContentMetadata=dM.prototype.kc;dM.prototype.getContentMetadata=dM.prototype.eb;dM.prototype.removeMessageListener=dM.prototype.removeMessageListener;dM.prototype.addMessageListener=dM.prototype.addMessageListener;dM.prototype.sendMessage=dM.prototype.sendMessage;dM.prototype.changeReceiverId=dM.prototype.Lg;dM.prototype.forceDisconnect=dM.prototype.qe;
64
+ dM.prototype.cast=dM.prototype.cast;dM.prototype.setPlayerConfigInterceptor=dM.prototype.nd;dM.prototype.getReceiverName=dM.prototype.ue;dM.prototype.isCasting=dM.prototype.jb;dM.prototype.canCast=dM.prototype.ge;dM.prototype.destroy=dM.prototype.destroy;_.v(fM,oL);_.t=fM.prototype;
65
+ _.t.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.J);b.addEventListener(a.PAUSE,this.I);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.L);b.addEventListener(a.SEEKED,this.K);b.addEventListener(a.STALLED,this.N);b.addEventListener(a.PLAYER_LOADING,this.F);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.f)};
66
+ _.t.destroy=function(){var a=this,b,c;return _.B(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.J);c.removeEventListener(b.PAUSE,a.I);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.L);c.removeEventListener(b.SEEKED,a.K);c.removeEventListener(b.STALLED,a.N);c.removeEventListener(b.PLAYER_LOADING,a.F);c.removeEventListener(b.ERROR,
67
+ a.D);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.x(d,oL.prototype.destroy.call(a),0)})};_.t.Tg=function(){this.a.trigger(new _.J(_.Xd));this.la(_.cn)};_.t.Sg=function(){this.la(_.bn)};_.t.aj=function(){this.la(_.Wm)};_.t.Ui=function(a){a.isBuffering?this.la(_.Um):(a=this.a.isPaused()?_.bn:_.cn,this.la(a))};_.t.Vg=function(){this.h=1;this.a.trigger(new _.J(_.Me))};_.t.Ug=function(){this.a.trigger(new _.J(_.Le))};_.t.qj=function(){this.h=2};_.t.dj=function(){this.la(_.an)};
68
+ _.t.Rg=function(a){var b=this.a.getStats();this.a.trigger(new _.J(_.qc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.U=function(a){a=new _.L(_.M,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.J(_.gd,{detail:a}));this.la(_.$m)};_.t=Z.prototype;_.t.sb=function(){return"Google Cast Framework"};_.t.tb=function(){return cast.framework.VERSION};_.t.yb=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};
69
+ _.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.fc=function(){return!1};_.t.Kb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.vb=function(){return 0};_.t.ub=function(){return 0};_.t.hb=function(){return 0};_.t.Va=function(){switch(this.Lb()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Lb=function(){return this.f.position};_.t.Mb=function(){return this.h};
70
+ _.t.xb=function(){return this.j};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};Z.prototype.getWrapperCreativeIds=Z.prototype.getWrapperCreativeIds;Z.prototype.getWrapperAdSystems=Z.prototype.getWrapperAdSystems;Z.prototype.getWrapperAdIds=Z.prototype.getWrapperAdIds;Z.prototype.getSequenceLength=Z.prototype.xb;Z.prototype.getPositionInSequence=Z.prototype.Mb;Z.prototype.getPodTimeOffset=Z.prototype.Lb;
71
+ Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.Va;Z.prototype.getMediaBitrate=Z.prototype.hb;Z.prototype.getMediaHeight=Z.prototype.ub;Z.prototype.getMediaWidth=Z.prototype.vb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Kb;Z.prototype.isBumper=Z.prototype.fc;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;
72
+ Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.getId;Z.prototype.getTechnology=Z.prototype.yb;Z.prototype.getAdManagerVersion=Z.prototype.tb;Z.prototype.getAdManagerName=Z.prototype.sb;gM.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};gM.prototype.Nb=function(){return!!this.a.find(function(a){return 0===a.position})};gM.prototype.ib=function(){return!!this.a.find(function(a){return-1===a.position})};gM.prototype.hasPostroll=gM.prototype.ib;gM.prototype.hasPreroll=gM.prototype.Nb;gM.prototype.getCuePoints=gM.prototype.getCuePoints;_.t=iM.prototype;_.t.load=function(){var a=this;return _.B(function(b){jM&&(jM=!1,oM(a,0));_.z(b)})};_.t.start=function(){return _.B(function(a){hM().play();_.z(a)})};_.t.resume=function(){-1!==this.getPosition()&&hM().play()};_.t.pause=function(){-1!==this.getPosition()&&hM().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.l.getVolume()||0};_.t.setVolume=function(a){this.l.setVolume(a)};
73
+ _.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.B(function(b){hM().removeEventListener(a.f,a.g);_.z(b)})};
74
+ _.t.Wg=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=hM().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.J(_.Wb,{adsTimeline:new gM(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:nM(this,_.Mb,a);break;case cast.framework.events.EventType.BREAK_STARTED:nM(this,_.Fb,a);break;case cast.framework.events.EventType.BREAK_ENDED:nM(this,_.Gb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:nM(this,
75
+ _.Sb,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(nM(this,_.Rb,a),nM(this,_.Tb,a)):a.endedReason===b.STOPPED?nM(this,_.Tb,a):a.endedReason===b.END_OF_STREAM?(nM(this,_.Jb,a),nM(this,_.Tb,a)):a.endedReason===b.ERROR&&oM(this,1);break;case cast.framework.events.EventType.PLAYING:nM(this,_.Qb,a);break;case cast.framework.events.EventType.PAUSE:nM(this,_.Ob,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?nM(this,_.Hb,a):nM(this,_.Qb,a)}};
76
+ iM.prototype.getPosition=iM.prototype.getPosition;iM.prototype.setVolume=iM.prototype.setVolume;iM.prototype.getVolume=iM.prototype.getVolume;iM.prototype.skip=iM.prototype.skip;iM.prototype.pause=iM.prototype.pause;iM.prototype.resume=iM.prototype.resume;var jM=!1;pM.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(qM(),this.a)};pM.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(qM(),this.a)};pM.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return rM(a)})};
77
+ pM.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.qg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.rg}b&&this.Ub(new _.J(b,{detail:rM(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Ub(new _.J(_.og,{detail:b.value}))};_.v(sM,_.R);_.t=sM.prototype;_.t.initialize=function(a){this.l=a;tM().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.l=null;tM().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.h};_.t.ha=function(){return this.j};_.t.ga=function(){return null};
78
+ _.t.Fa=function(){var a=this.ma();return a&&a.renditions[0]};_.t.Ga=function(){var a=this.na();return a&&a.renditions[0]};_.t.Ua=function(){return null};_.t.fb=function(){return null};_.t.gb=function(){return null};_.t.Ia=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};
79
+ _.t.na=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ha().find(function(c){return c.id===b})||null)}return a};_.t.ab=function(){this.g.warn("Video tracks unavailable on Cast")};_.t.sa=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Ba=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.mb=function(a){this.sa(a&&a.track)};
80
+ _.t.nb=function(a){this.Ba(a&&a.track)};
81
+ _.t.addTextTrack=function(a){var b=this,c,d,e;return _.B(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.x(f,rL(a,Object.values(cast.framework.messages.CaptionMimeType),b.l.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]),vM(b)}catch(g){throw b.g.warn("failed on track",
82
+ a),g;}}_.z(f)})};_.t.ja=function(){return!0};_.t.xj=function(){this.f=tM().getAudioTracksManager();var a=this.f.getTracks();this.h=uM(_.Q,a);vM(this);a=this.l.getConfiguration();wM(this,_.Q,a.preferredAudioLanguage,a.preferredAudioRole);wM(this,_.P,a.preferredTextLanguage,a.preferredTextRole)};sM.prototype.isAbrEnabled=sM.prototype.ja;sM.prototype.addTextTrack=sM.prototype.addTextTrack;sM.prototype.setTextRendition=sM.prototype.nb;sM.prototype.setAudioRendition=sM.prototype.mb;
83
+ sM.prototype.setVideoRendition=sM.prototype.$a;sM.prototype.setTextTrack=sM.prototype.Ba;sM.prototype.setAudioTrack=sM.prototype.sa;sM.prototype.setVideoTrack=sM.prototype.ab;sM.prototype.getTextTrack=sM.prototype.na;sM.prototype.getAudioTrack=sM.prototype.ma;sM.prototype.getVideoTrack=sM.prototype.Ia;sM.prototype.getLoadingTextRendition=sM.prototype.gb;sM.prototype.getLoadingAudioRendition=sM.prototype.fb;sM.prototype.getLoadingVideoRendition=sM.prototype.Ua;sM.prototype.getTextRendition=sM.prototype.Ga;
84
+ sM.prototype.getAudioRendition=sM.prototype.Fa;sM.prototype.getVideoRendition=sM.prototype.ga;sM.prototype.getTextTracks=sM.prototype.ha;sM.prototype.getAudioTracks=sM.prototype.getAudioTracks;sM.prototype.getVideoTracks=sM.prototype.getVideoTracks;_.v(xM,_.Kj);_.t=xM.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.o=b);var d=yM();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.fj.bind(this));d.setMediaPlaybackInfoHandler(this.Gg.bind(this));this.a=new fM(this);this.a.init();this.h=new sM;this.h.initialize(this);this.m=new pM(function(e){return c.trigger(e)});this.m.init()};
85
+ _.t.unload=function(){var a=cast.framework.messages.PlayerState,b=yM();b.getPlayerState()!==a.IDLE&&b.stop();this.h&&this.h.release();this.m&&this.m.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 _.B(function(b){if(1==b.a)return a.B=null,a.o=_.Qj(),a.g=a.o,a.j=-1,a.w=null,a.a?_.x(b,a.a.destroy(),3):b.H(2);2!=b.a&&(a.a=null);a.h&&(a.h.destroy(),a.h=null);_.z(b)})};
86
+ _.t.play=function(){var a=yM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=yM();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return yM().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
87
+ _.t.isEnded=function(){return yM().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=yM();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(bL);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return yM().getCurrentTimeSec()};_.t.getDuration=function(){var a=yM().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return yM().getPlaybackRate()};
88
+ _.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;yM().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)};_.t.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
89
+ _.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.t.getLoadedSource=function(){var a=yM().getMediaInformation();if(a){var b=yM().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.w&&-1!==this.j?this.w[this.j]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,pk:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
90
+ _.t.getPresentationStartTime=function(){return yM().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=yM().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():_.Qm};
91
+ _.t.getStats=function(){var a=_.Lm();if(this.f){a=yM().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.m=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.o=a.width||NaN;b.g=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.j=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.h=c;a=this.f.getStats()}return a};_.t.isLive=function(){return Infinity===this.getDuration()};
92
+ _.t.load=function(a){var b=this,c,d;return _.B(function(e){b.f=new _.Km;b.a.j=b.f.a;b.w=_.gn(a);_.Tj(a)&&(b.g=_.Sj(b.o,a));if(b.D)return b.D=!1,e["return"]();c=b.w[b.j];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.k&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:pL(b.g),local:!0};return _.x(e,yM().load(d),0)})};_.t.getBufferInfo=function(){this.A.warn(_.sa);return new _.Jj};
93
+ _.t.getTrackManager=function(){return this.h};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.F=a};_.t.getNetworkEngine=function(){return this.F};_.t.getSourceIndex=function(){return this.j};_.t.setSourceIndex=function(a){this.j=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return jL};_.t.getTimelineCues=function(){return this.m&&this.m.getTimelineCues()||[]};_.t.resetAbr=function(){this.A.warn(fL)};
94
+ _.t.onError=function(a){this.trigger(new _.J(_.gd,{detail:a}))};_.t.canPlay=function(){return _.Ti()?2:0};
95
+ _.t.fj=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=pL(this.getStats());var b=yM(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.A.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&&
96
+ (!e||e&&f)){d=yM().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.Gg=function(a,b){var c=null;a.media.customData&&(c=qL(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;BM(c,b);return b};
97
+ _.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};xM.prototype.getTextDisplayer=xM.prototype.getTextDisplayer;xM.prototype.getNetworkEngine=xM.prototype.getNetworkEngine;xM.prototype.setNetworkEngine=xM.prototype.setNetworkEngine;_.t=CM.prototype;_.t.init=function(a){var b=this;a&&(this.f=new xM,_.oo(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.B(function(c){return b.l&&b.l.getState()!==_.Pm?_.x(c,nL(b.l),0):c.H(0)})}))};
98
+ _.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=FM(),b=FM().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[lL]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Ai.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.l&&this.l.getSurface().getMedia())c.mediaElement=
99
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.zi.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(lL,this.w)}};
100
+ _.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=FM();FM().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(lL,this.w);a.stop();this.l=this.f=null}};_.t.nd=function(a){this.j=a};_.t.Kj=function(a){this.m=a};_.t.on=function(a,b){FM().addEventListener(a,b)};_.t.off=function(a,b){FM().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.id&&this.g.add(a)};
101
+ _.t.removeMessageListener=function(a){typeof a===_.id&&this.g["delete"](a)};_.t.sendMessage=function(a,b){FM().sendCustomMessage(lL,b,pL(a))};_.t.dc=function(){return this.a};_.t.eb=function(){var a=FM().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
102
+ _.t.Ai=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return HM(this,a);try{var b=(new DOMParser).parseFromString(a,_.De)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=FM();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ha),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Qe||g===_.ic){g=e[f].getAttribute(_.Bd);for(var h=e[f].getElementsByTagName(_.kb),l=
103
+ h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Bd)||g,n=h[l].getAttribute(_.Lc),p=h[l].getAttribute(_.ef)||void 0,q=h[l].getAttribute(_.jd)||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(_.kb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ha).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.tb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=FM();c=a.getElementsByTagName("StreamIndex");
104
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Qe){e=c[d].getElementsByTagName(_.hb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Va)||void 0,h=e[f].getAttribute(_.Ua)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Se,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.hb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
105
+ _.t.zi=function(a){var b=this,c,d,e,f,g,h;return _.B(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=qL(c.media.customData.playerConfiguration));if(!b.l||!d){l.H(2);break}if(!b.j){l.H(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.H(5);break}return _.x(l,lM(c.media,d.ima,b.l.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.H(7);
106
+ break}b.f.D=!0;return _.x(l,_.so(b.l,d),8);case 8:return _.x(l,_.to(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Eb&&(c.media.hlsVideoSegmentFormat=sL(f.Eb,_.gi)),f.audioMimeType&&(c.media.hlsSegmentFormat=sL(f.audioMimeType,_.Q));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.l.getConfiguration().autoplay);case 2:if(!b.m){l.H(10);
107
+ break}return _.x(l,Promise.resolve(b.m(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.cj=function(a){if(this.l&&(!a.media.customData||!a.media.customData.local)){a=_.K.vi;var b=FM().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.l.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.l.seek(b))}_.vo(this.l)}};
108
+ _.t.Qg=function(a){if(0<this.g.size){var b=qL(a.data);this.g.forEach(function(c){return c(b)})}};_.C(kL,CM);CM.prototype.getContentMetadata=CM.prototype.eb;CM.prototype.isApiReady=CM.prototype.dc;CM.prototype.sendMessage=CM.prototype.sendMessage;CM.prototype.removeMessageListener=CM.prototype.removeMessageListener;CM.prototype.addMessageListener=CM.prototype.addMessageListener;CM.prototype.off=CM.prototype.off;CM.prototype.on=CM.prototype.on;CM.prototype.setLoadRequestDataInterceptor=CM.prototype.Kj;
109
+ CM.prototype.setPlayerConfigInterceptor=CM.prototype.nd;CM.prototype.stop=CM.prototype.stop;CM.prototype.start=CM.prototype.start;CM.prototype.init=CM.prototype.init;CM.getInstance=EM;var DM=null;_.t=IM.prototype;_.t.load=function(){var a=this,b,c,d,e,f;return _.B(function(g){a.a=a.f.m;if(a.a)for(b=a.a.controller,c=a.sj.bind(a),d=_.u(a.h),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.z(g)})};_.t.start=function(){return _.B(function(a){_.z(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()};
110
+ _.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(mL,{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 _.B(function(b){a.g.release();_.z(b)})};
111
+ _.t.sj=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.J(_.Wb,{adsTimeline:new gM(a.breaks)})));break;case "isPlayingBreak":a.value?KM(this,_.Fb):(KM(this,_.Jb),KM(this,_.Tb),KM(this,_.Gb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(KM(this,_.Jb),KM(this,_.Tb)),KM(this,_.Sb));break;case "isPaused":this.a.isPlayingBreak&&(a.value?KM(this,_.Ob):KM(this,_.Qb))}};IM.prototype.getPosition=IM.prototype.getPosition;
112
+ IM.prototype.setVolume=IM.prototype.setVolume;IM.prototype.getVolume=IM.prototype.getVolume;IM.prototype.skip=IM.prototype.skip;IM.prototype.pause=IM.prototype.pause;IM.prototype.resume=IM.prototype.resume;LM.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};LM.prototype.ca=function(a,b){return a.namespace()!==_.Gc?!1:!(!b||!b.ima)};LM.prototype.create=function(a){return new IM(a.a)};LM.prototype.create=LM.prototype.create;LM.prototype.isSupported=LM.prototype.ca;LM.prototype.name=LM.prototype.name;_.wn(new LM);MM.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};MM.prototype.ca=function(a,b){return EM().dc()?!(!b||!b.ima):!1};MM.prototype.create=function(a){return new iM(a)};MM.prototype.create=MM.prototype.create;MM.prototype.isSupported=MM.prototype.ca;MM.prototype.name=MM.prototype.name;_.wn(new MM);};
113
113
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
114
114
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
115
115
  else{_=this.clpp._;(f.call(g,this));}