@castlabs/prestoplay 6.20.0 → 6.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +109 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +553 -550
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +78 -77
  10. package/cjs/cl.externs.js +81 -97
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +22 -24
  16. package/cjs/cl.mse.js +305 -305
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +16 -16
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +25 -25
  25. package/cjs/cl.tizen.js +70 -69
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +13 -13
  29. package/cjs/cl.vr.js +18 -18
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +9 -0
  32. package/cjs/cl.youbora.js +38 -20
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +5 -5
  36. package/cl.cast.js +88 -89
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +471 -468
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +74 -72
  41. package/cl.externs.js +71 -99
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +74 -74
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +16 -17
  47. package/cl.mse.js +276 -276
  48. package/cl.muxdata.js +13 -13
  49. package/cl.onboard.js +4 -4
  50. package/cl.persistent.js +11 -11
  51. package/cl.playlist.js +5 -5
  52. package/cl.sessions.js +10 -10
  53. package/cl.simid.js +13 -13
  54. package/cl.smooth.js +59 -59
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -0
  63. package/cl.youbora.js +27 -15
  64. package/package.json +3 -1
  65. package/typings.d.ts +123 -24
package/cjs/cl.cast.js CHANGED
@@ -1,119 +1,118 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var FU="Cannot seek during ads playout.",GU="Cannot switch track",HU="Media session does not exist.",IU="No receivers available",JU="Reset ABR functionality not available on cast.",KU="SDK not yet ready",LU="Sender is destroyed.",MU="clpp.cast.CastProxy",NU="clpp.cast.Player",OU="clpp.cast.Receiver",PU="urn:x-cast:castlabs",QU="urn:x-cast:com.google.cast.media",RU=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.zc(_.Ye),2):_.y(b,a.zc(_.Xe),0)})},SU=function(a,b){this.log=new _.K(b);this.player=
3
- a;this.j=null;this.f=_.yp;this.l=_.zp;this.h=2;this.B=Date.now();this.A=-1},TU=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.re){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ue?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.k?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},UU=function(a){if(typeof a!==_.fg)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
- "Infinity"===c?Infinity:c})}catch(b){return a}},VU=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.Xk(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Wj(a.url);return _.y(q,c.fetch(l).U,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.xj(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},WU=function(a,b){if(window.chrome&&
5
- chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.Fg:return d.FMP4;case _.Eg:return b===_.yk?d.MPEG2_TS:c.TS;case _.ad:return c.AAC;case _.bd:return c.AC3;case _.cd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.dd:return c.FMP4}},YU=function(a){a=
6
- void 0===a?XU:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.N(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},ZU=function(a){SU.call(this,a,"clpp.cast.SenderStateManager");
7
- this.o=this.a=null;this.w=this.Ub.bind(this)},$U=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},aV=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},cV=function(a,b){var c=aV(a);return bV(a,b).find(function(d){return c.includes(d.id)})||null},bV=function(a,b){return a.h.filter(function(c){return c.type===b})},eV=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.S){var e=a.xa();
8
- e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;dV(a,b)},function(f){a.f[b]=null;a.g.debug(GU,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){dV(a,b)},function(f){a.g.debug(GU,f)}))},dV=function(a,b){b===_.xk?a.a.trigger(new _.L(_.cm)):b===_.S&&a.a.trigger(new _.L(_.dm))},iV=function(a,b,c,d){_.jm.call(this);this.g=new _.K(_.Ad);this.ba=a;this.o=new _.ll(b);this.$=c;this.fa=d;this.h=this.J=
9
- _.pm();this.C=[];this.B=0;this.L=new _.rk;this.G=this.l=this.a=null;this.A=this.w=!1;this.ga="";this.Fa=1E6;this.f=new $U;this.f.initialize(this);this.j=new ZU(this);this.H=new _.Qh;this.K=null;this.I=new Set;this.P=this.im.bind(this);this.ta=this.Dm.bind(this);this.ca=this.vm.bind(this);this.V=this.mm.bind(this);this.N=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){fV(!0)},0)}});gV(this);hV.add(this)},
10
- jV=function(a){var b,c;return _.I(function(d){if(1==d.a)return hV["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.ta)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.$=null;a.fa=null;_.B(d)})},lV=function(a){if(!a)return null;
11
- a:{var b=a.metadataType;var c=Object.entries(kV);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=YU(kV[b]);return Object.assign(b,a)},mV=function(a){var b=void 0===b?XU:b;return Object.values(kV).includes(a)?a:b},sV=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},gV=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
- a.ba.length){a.w=!0;a.o.wg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ba;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.ta);xV&&a.o.ea(.02)}},CV=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},EV=function(a,b){DV(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ca);b.addMessageListener(PU,a.V)},DV=function(a,b){a.a=b;a.a&&(a.H.release(),a.G=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.l),a.H.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.tj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.um.bind(a)),
14
- a.j&&a.j.init(),a.trigger(new _.L(_.He)))},FV=function(a){return _.I(function(b){return a.Hb()?b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},GV=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,C,F,G;return _.I(function(A){switch(A.a){case 1:return c=chrome.cast.media.StreamType,d=_.xv,_.y(A,FV(a),2);case 2:if(!b)return A["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=
15
- b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Yb;m=h.audioMimeType;g.hlsVideoSegmentFormat=WU(l,d.VIDEO);g.hlsSegmentFormat=WU(m,d.AUDIO);if(!b.bb){A.F(3);break}if(!a.N){A.F(4);break}return _.y(A,Promise.resolve(a.N(b.bb)),5);case 5:if(n=A.f)b.bb=n;case 4:a.h=b.bb;a.C=_.Qp(a.h);a.B=a.C.findIndex(function(H){return H.url===b.source.url});if(!b.bb.remoteTextTracks){A.F(6);break}return _.y(A,Promise.all(b.bb.remoteTextTracks.map(a.Fk.bind(a))),7);case 7:p=A.f,g.tracks=p.filter(function(H){return H}),b.bb.remoteTextTracks=
16
- void 0;case 6:delete b.bb.autoplay,b.bb.startTime=null,g.customData={playerConfiguration:TU(b.bb)};case 3:q=a.zb()||{};t=mV(q.metadataType);typeof b.gg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.gg});b.source.name&&(z={metadataType:t,title:b.source.name});C=sV(q);if(F=lV(Object.assign({},v,z,C)))g.metadata=F;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.id&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.y(A,f.loadMedia(G),0)}})},
17
- HV=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.xa())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.ma())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,GV(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),gg:a.getPresentationStartTime(),autoplay:b,bb:a.h}),0)})},fV=function(a){if(a){a=_.w(hV);for(var b=a.next();!b.done;b=a.next())gV(b.value)}},JV=function(a,b,c){_.jm.call(this);this.f=a;this.h=b;this.j=typeof c===_.re?c:this.mn;
18
- this.a=IV(this);this.g=new _.K(MU);this.f&&this.forwardEventsTo(this.f)},IV=function(a){return new iV(a.h,function(){a.trigger(new _.L(_.pd))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.Ig&&(d.preferredAudioLanguage=c.Ig);c.Ki&&(d.preferredTextLanguage=c.Ki);_.ss(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return KV(a)})},KV=function(a){var b;
19
- return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.od)),b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.ss(a.f,a.a);_.B(c)})},LV=function(a){SU.call(this,a,"clpp.cast.StateManager");this.I=this.xj.bind(this);this.H=this.wj.bind(this);this.w=this.qm.bind(this);this.o=this.hm.bind(this);this.K=this.zj.bind(this);this.J=this.yj.bind(this);this.L=this.Gm.bind(this);this.G=this.tm.bind(this);this.C=this.S.bind(this);this.a=this.vj.bind(this)},MV=function(a,b,c,d,e){this.a=a;this.f=
20
- b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},NV=function(a){this.a=a},PV=function(a){this.m=a;this.a=null;this.h=this.Aj.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,
21
- cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];OV().addEventListener(this.f,this.h)},SV=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);QV=!1;e=_.Wj(d);return _.y(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.R.aa(f.data),h=new DOMParser,l=h.parseFromString(g,_.mg),l.getElementsByTagName("vmap:VMAP").length)_.Bh("VMAP detected."),a.vmapAdsRequest=RV(g);else if(l.getElementsByTagName("VAST").length){_.Bh("VAST detected.");
22
- var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=RV(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Bh("Unsupported schema."),QV=!0;return _.mh(n,0)}m=_.E(n);_.Bh("Failed to fetch an ad",m);QV=!0;_.B(n)})},RV=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},OV=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},UV=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
- -1!==a.getPosition()){var d=null;(c=TV(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},VV=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},TV=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.fg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.fg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=
24
- g.position}).sort(function(g,h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new MV(d,e,b.index,b.total,f)}return c},WV=function(a){this.fb=a;this.a=this.f.bind(this)},XV=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]},YV=function(a){var b=a.dashTimedMetadata,c=_.vg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.ug)?
25
- _.pi:_.sg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},ZV=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.$m.bind(this);this.a=this.f=null},$V=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},bW=function(a){a.a=$V().getTextTracksManager();var b=a.a.getTracks();a.j=aW(_.S,b)},cW=function(a,b,c,d){c=_.ti(c).filter(function(h){return h});
26
- var e=!1,f=[];b===_.xk?f=a.getAudioTracks():b===_.S&&(f=a.ia());if(c=c.find(function(h){var l=_.oj(h);return f.some(function(m){m=_.oj(m.language||"");return _.pj(l,m)})})){var g=_.oj(c);c=f.filter(function(h){h=_.oj(h.language||"");return _.pj(g,h)});f=c.length?c:f;e=e||!!c.length}_.R.Me(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===_.xk?a.Da(e):b===_.S&&a.Qa(e))},aW=function(a,b){for(var c=[],d=_.w(b),
27
- e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.vk(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.Ek(f.id,f));c.push(f)}return c},dW=function(){_.jm.call(this);this.g=new _.K(NU);this.h=this.w=_.pm();this.A=null;
28
- this.l=-1;this.G=new _.rk;this.f=this.o=this.j=this.a=this.B=null;this.C=!1},eW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},hW=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=_.Nm(d);if(e){var f=[_.Nd];_.Qp(a)[0].type!==_.Yc&&f.unshift(_.Pd);d.preferredDrmSystem===_.Nd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
- h=e.eb[g];h?(d=g===_.Pd?cast.framework.ContentProtection.WIDEVINE:g===_.Nd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},fW(b,h,a,d),gW(b,h,a,d)):c()}else c()}else c()},fW=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Wj({method:_.Ib,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);
30
- e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},gW=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.ak(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.xj(g.data))})}:a.licenseHandler=void 0},iW=function(){this.a=!1;this.g=new _.K(OU);this.f=this.m=null;this.h=new Set;this.A=this.sm.bind(this);
31
- this.w=this.uj.bind(this);this.j=null;this.o=new _.Qh;this.l=null},kW=function(){return jW||(jW=new iW)},lW=function(){return cast.framework.CastReceiverContext.getInstance()},mW=function(){var a=lW().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},nW=function(a,b){var c=lW().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;lW().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
- pW=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=lW();c=(lW().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Fg:_.Eg;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=oW(h,_.sa),m=oW(h,_.Rb),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);
33
- if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},oW=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},qW=function(a){this.f=a;this.a=null;this.h=new _.Qh;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
34
- cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},sW=function(a,b){var c=null,d=rW(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},rW=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===
35
- c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new MV(d,c,e,f,g)}return b},tW=function(){},uW=function(){};_.u=SU.prototype;_.u.release=function(){this.va(_.yp)};_.u.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.u.getState=function(){return this.f};_.u.onError=function(a){a.severity===_.P&&this.va(_.Jp)};
36
- _.u.va=function(a){if(a!==this.f)if(this.f===_.Jp&&a!==_.yp)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;this.f===_.Dp?(this.A=b,this.player.trigger(new _.L(_.kd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.Dp&&this.player.trigger(new _.L(_.jd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.op(this.j,this.f);this.player.trigger(new _.L(_.cg,
37
- {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var XU=0,kV={GENERIC:XU,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(ZU,SU);ZU.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.l)};ZU.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,SU.prototype.destroy.call(a),0)})};ZU.prototype.va=function(a){var b=this.player.l;b&&b.isPlayingBreak||SU.prototype.va.call(this,a)};
38
- ZU.prototype.Ub=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.va(_.Fp);break;case chrome.cast.media.IdleReason.ERROR:this.va(_.Jp);break;default:this.va(_.yp)}break;case chrome.cast.media.PlayerState.PLAYING:this.va(_.Mp);break;case chrome.cast.media.PlayerState.PAUSED:this.va(_.Lp);break;case chrome.cast.media.PlayerState.BUFFERING:this.va(_.Dp)}};_.x($U,_.U);_.u=$U.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
39
- _.u.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.yk;break;case chrome.cast.media.TrackType.AUDIO:c=_.xk;break;case chrome.cast.media.TrackType.TEXT:c=_.S}c=new _.vk(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
40
- c.renditions.push(new _.Ek(c.id,c));return c}):[],this.a.trigger(new _.L(_.zv)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return bV(this,_.yk)};_.u.getAudioTracks=function(){return bV(this,_.xk)};_.u.ia=function(){return bV(this,_.S)};_.u.na=function(){var a=this.Oa();return a?a.renditions[0]:null};_.u.Sa=function(){var a=this.ma();return a?a.renditions[0]:null};_.u.Na=function(){var a=this.xa();return a?a.renditions[0]:null};_.u.lb=function(){return this.f[_.yk]||null};
41
- _.u.Ab=function(){return this.f[_.xk]||null};_.u.Bb=function(){return this.f[_.S]||null};_.u.Oa=function(){return cV(this,_.yk)};_.u.ma=function(){return cV(this,_.xk)};_.u.xa=function(){return cV(this,_.S)};_.u.wb=function(a){eV(this,_.yk,a)};_.u.Da=function(a){eV(this,_.xk,a)};_.u.Qa=function(a){eV(this,_.S,a)};_.u.cb=function(a){this.wb(a&&a.track)};_.u.ub=function(a){this.Da(a&&a.track)};_.u.vb=function(a){this.Qa(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.B(a)})};
42
- _.u.ra=function(){return!0};$U.prototype.isAbrEnabled=$U.prototype.ra;$U.prototype.addTextTrack=$U.prototype.addTextTrack;$U.prototype.setTextRendition=$U.prototype.vb;$U.prototype.setAudioRendition=$U.prototype.ub;$U.prototype.setVideoRendition=$U.prototype.cb;$U.prototype.setTextTrack=$U.prototype.Qa;$U.prototype.setAudioTrack=$U.prototype.Da;$U.prototype.setVideoTrack=$U.prototype.wb;$U.prototype.getTextTrack=$U.prototype.xa;$U.prototype.getAudioTrack=$U.prototype.ma;
43
- $U.prototype.getVideoTrack=$U.prototype.Oa;$U.prototype.getLoadingTextRendition=$U.prototype.Bb;$U.prototype.getLoadingAudioRendition=$U.prototype.Ab;$U.prototype.getLoadingVideoRendition=$U.prototype.lb;$U.prototype.getTextRendition=$U.prototype.Na;$U.prototype.getAudioRendition=$U.prototype.Sa;$U.prototype.getVideoRendition=$U.prototype.na;$U.prototype.getTextTracks=$U.prototype.ia;$U.prototype.getAudioTracks=$U.prototype.getAudioTracks;$U.prototype.getVideoTracks=$U.prototype.getVideoTracks;_.x(iV,_.jm);_.u=iV.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Eb)};_.u.appendLoad=function(){return Promise.reject(_.Eb)};_.u.seekWith=function(){return Promise.reject(_.Eb)};
44
- _.u.setSeekInterceptor=function(){};_.u.destroy=function(){return _.I(function(a){_.B(a)})};_.u.de=function(a){this.N=a};_.u.xc=function(){return this.w};_.u.Hb=function(){return this.A};_.u.Kf=function(){return this.ga};
45
- _.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.N(1,8,8004,void 0);g.F(2);break}_.D(g,3);return _.y(g,e.sendMessage(a,TU(b)),5);case 5:_.mh(g,2);break;case 3:f=_.E(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.B(g)}})};
46
- _.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.xc())throw a.g.warn(KU),new _.N(1,8,8001,void 0);if(!xV)throw a.g.warn(IU),new _.N(1,8,8002,void 0);if(a.Hb())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.D(d,2);return _.y(d,FV(a),4)}if(2!=d.a)return _.mh(d,0);b=_.E(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.N(1,8,8E3,c);})};_.u.Hf=function(){this.Hb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
- _.u.addMessageListener=function(a){typeof a===_.re&&this.I.add(a)};_.u.removeMessageListener=function(a){typeof a===_.re&&this.I["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?HV(this,!0):new Promise(function(b,c){if(!a.a)return c(HU);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(HU);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
- _.u.isEnded=function(){return this.getState()===_.Fp};_.u.seek=function(a){var b=this;return this.isEnded()?HV(this,!1,a):new Promise(function(c,d){b.a||d(HU);b.l.isPlayingBreak&&d(FU);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.xg));b.a.seek(e,function(){b.trigger(new _.L(_.wg));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
49
- _.u.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(QU,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
2
+ var f=function(window){var pV="Cannot seek during ads playout.",qV="Cannot switch track",rV="Media session does not exist.",sV="No receivers available",tV="Reset ABR functionality not available on cast.",uV="SDK not yet ready",vV="Sender is destroyed.",wV="clpp.cast.CastProxy",xV="clpp.cast.Player",yV="clpp.cast.Receiver",zV="urn:x-cast:castlabs",AV="urn:x-cast:com.google.cast.media",BV=function(a){return _.I(function(b){return 1==b.a?_.y(b,a.zc(_.Ye),2):_.y(b,a.zc(_.Xe),0)})},CV=function(a,b){this.log=new _.K(b);this.player=
3
+ a;this.j=null;this.f=_.Gp;this.l=_.Hp;this.h=2;this.B=Date.now();this.A=-1},DV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.re){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ue?"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}})},EV=function(a){if(typeof a!==_.fg)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
4
+ "Infinity"===c?Infinity:c})}catch(b){return a}},FV=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.I(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.al(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.Yj(a.url);return _.y(q,c.fetch(l).U,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.zj(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)})},GV=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 _.Eg:return d.FMP4;case _.Dg:return b===_.Ck?d.MPEG2_TS:c.TS;case _.ad:return c.AAC;case _.bd:return c.AC3;case _.cd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.dd:return c.FMP4}},IV=function(a){a=
6
+ void 0===a?HV:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.N(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},JV=function(a){CV.call(this,a,"clpp.cast.SenderStateManager");
7
+ this.o=this.a=null;this.w=this.Vb.bind(this)},KV=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},LV=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},NV=function(a,b){var c=LV(a);return MV(a,b).find(function(d){return c.includes(d.id)})||null},MV=function(a,b){return a.h.filter(function(c){return c.type===b})},PV=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.S){var e=a.xa();
8
+ e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;OV(a,b)},function(f){a.f[b]=null;a.g.debug(qV,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){OV(a,b)},function(f){a.g.debug(qV,f)}))},OV=function(a,b){b===_.Bk?a.a.trigger(new _.L(_.gm)):b===_.S&&a.a.trigger(new _.L(_.hm))},TV=function(a,b,c,d){_.nm.call(this);this.g=new _.K(_.Ad);this.ba=a;this.o=new _.pl(b);this.Z=c;this.fa=d;this.h=this.J=
9
+ _.tm();this.C=[];this.B=0;this.L=new _.tk;this.G=this.l=this.a=null;this.A=this.w=!1;this.ga="";this.za=1E6;this.f=new KV;this.f.initialize(this);this.j=new JV(this);this.H=new _.Sh;this.K=null;this.I=new Set;this.P=this.km.bind(this);this.ta=this.Fm.bind(this);this.ca=this.xm.bind(this);this.V=this.om.bind(this);this.N=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){QV(!0)},0)}});RV(this);SV.add(this)},
10
+ UV=function(a){var b,c;return _.I(function(d){if(1==d.a)return SV["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.ta)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Z=null;a.fa=null;_.A(d)})},WV=function(a){if(!a)return null;
11
+ a:{var b=a.metadataType;var c=Object.entries(VV);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=IV(VV[b]);return Object.assign(b,a)},XV=function(a){var b=void 0===b?HV:b;return Object.values(VV).includes(a)?a:b},cW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},RV=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
12
+ a.ba.length){a.w=!0;a.o.yg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ba;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.ta);hW&&a.o.ea(.02)}},mW=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},oW=function(a,b){nW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ca);b.addMessageListener(zV,a.V)},nW=function(a,b){a.a=b;a.a&&(a.H.release(),a.G=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.l),a.H.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.wj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.wm.bind(a)),
14
+ a.j&&a.j.init(),a.trigger(new _.L(_.Ge)))},pW=function(a){return _.I(function(b){return a.Hb()?b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},qW=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,C,F,G;return _.I(function(B){switch(B.a){case 1:return c=chrome.cast.media.StreamType,d=_.Iv,_.y(B,pW(a),2);case 2:if(!b)return B["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=
15
+ b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Zb;m=h.audioMimeType;g.hlsVideoSegmentFormat=GV(l,d.VIDEO);g.hlsSegmentFormat=GV(m,d.AUDIO);if(!b.gb){B.F(3);break}if(!a.N){B.F(4);break}return _.y(B,Promise.resolve(a.N(b.gb)),5);case 5:if(n=B.f)b.gb=n;case 4:a.h=b.gb;a.C=_.Yp(a.h);a.B=a.C.findIndex(function(H){return H.url===b.source.url});if(!b.gb.remoteTextTracks){B.F(6);break}return _.y(B,Promise.all(b.gb.remoteTextTracks.map(a.Ik.bind(a))),7);case 7:p=B.f,g.tracks=p.filter(function(H){return H}),b.gb.remoteTextTracks=
16
+ void 0;case 6:delete b.gb.autoplay,b.gb.startTime=null,g.customData={playerConfiguration:DV(b.gb)};case 3:q=a.zb()||{};t=XV(q.metadataType);typeof b.hg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.hg});b.source.name&&(z={metadataType:t,title:b.source.name});C=cW(q);if(F=WV(Object.assign({},v,z,C)))g.metadata=F;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.id&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.y(B,f.loadMedia(G),0)}})},
17
+ rW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.xa())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.na())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,qW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),hg:a.getPresentationStartTime(),autoplay:b,gb:a.h}),0)})},QV=function(a){if(a){a=_.w(SV);for(var b=a.next();!b.done;b=a.next())RV(b.value)}},tW=function(a,b,c){_.nm.call(this);this.f=a;this.h=b;this.j=typeof c===_.re?c:this.qn;
18
+ this.a=sW(this);this.g=new _.K(wV);this.f&&this.forwardEventsTo(this.f)},sW=function(a){return new TV(a.h,function(){a.trigger(new _.L(_.pd))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.Mg&&(d.preferredAudioLanguage=c.Mg);c.Oi&&(d.preferredTextLanguage=c.Oi);_.Bs(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return uW(a)})},uW=function(a){var b;
19
+ return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.od)),b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Bs(a.f,a.a);_.A(c)})},vW=function(a){CV.call(this,a,"clpp.cast.StateManager");this.I=this.Aj.bind(this);this.H=this.zj.bind(this);this.w=this.sm.bind(this);this.o=this.jm.bind(this);this.K=this.Cj.bind(this);this.J=this.Bj.bind(this);this.L=this.Im.bind(this);this.G=this.vm.bind(this);this.C=this.S.bind(this);this.a=this.yj.bind(this)},wW=function(a,b,c,d,e){this.a=a;this.f=
20
+ b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},xW=function(a){this.a=a},zW=function(a){this.m=a;this.a=null;this.h=this.Dj.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,
21
+ cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];yW().addEventListener(this.f,this.h)},CW=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);AW=!1;e=_.Yj(d);return _.y(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.R.aa(f.data),h=new DOMParser,l=h.parseFromString(g,_.mg),l.getElementsByTagName("vmap:VMAP").length)_.Dh("VMAP detected."),a.vmapAdsRequest=BW(g);else if(l.getElementsByTagName("VAST").length){_.Dh("VAST detected.");
22
+ var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=BW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Dh("Unsupported schema."),AW=!0;return _.oh(n,0)}m=_.E(n);_.Dh("Failed to fetch an ad",m);AW=!0;_.A(n)})},BW=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},yW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},EW=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
23
+ -1!==a.getPosition()){var d=null;(c=DW(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},FW=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},DW=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.fg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.fg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=
24
+ g.position}).sort(function(g,h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new wW(d,e,b.index,b.total,f)}return c},GW=function(a){this.ib=a;this.a=this.f.bind(this)},HW=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]},IW=function(a){var b=a.dashTimedMetadata,c=_.vg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.ug)?
25
+ _.ri:_.sg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},JW=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.cn.bind(this);this.a=this.f=null},KW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},MW=function(a){a.a=KW().getTextTracksManager();var b=a.a.getTracks();a.j=LW(_.S,b)},NW=function(a,b,c,d){c=_.vi(c).filter(function(h){return h});
26
+ var e=!1,f=[];b===_.Bk?f=a.getAudioTracks():b===_.S&&(f=a.ia());if(c=c.find(function(h){var l=_.qj(h);return f.some(function(m){m=_.qj(m.language||"");return _.rj(l,m)})})){var g=_.qj(c);c=f.filter(function(h){h=_.qj(h.language||"");return _.rj(g,h)});f=c.length?c:f;e=e||!!c.length}_.R.Me(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===_.Bk?a.Ea(e):b===_.S&&a.Ta(e))},LW=function(a,b){for(var c=[],d=_.w(b),
27
+ e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.zk(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.Ik(f.id,f));c.push(f)}return c},OW=function(){_.nm.call(this);this.g=new _.K(xV);this.h=this.w=_.tm();this.A=null;
28
+ this.l=-1;this.G=new _.tk;this.f=this.o=this.j=this.a=this.B=null;this.C=!1},PW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},SW=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=_.Rm(d);if(e){var f=[_.Nd];_.Yp(a)[0].type!==_.Yc&&f.unshift(_.Pd);d.preferredDrmSystem===_.Nd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
29
+ h=e.La[g];h?(d=g===_.Pd?cast.framework.ContentProtection.WIDEVINE:g===_.Nd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},QW(b,h,a,d),RW(b,h,a,d)):c()}else c()}else c()},QW=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Yj({method:_.Ib,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);
30
+ e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},RW=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.ck(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.zj(g.data))})}:a.licenseHandler=void 0},TW=function(){this.a=!1;this.g=new _.K(yV);this.f=this.m=null;this.h=new Set;this.A=this.um.bind(this);
31
+ this.w=this.xj.bind(this);this.j=null;this.o=new _.Sh;this.l=null},VW=function(){return UW||(UW=new TW)},WW=function(){return cast.framework.CastReceiverContext.getInstance()},XW=function(){var a=WW().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},YW=function(a,b){var c=WW().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;WW().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
32
+ $W=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=WW();c=(WW().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Eg:_.Dg;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=ZW(h,_.sa),m=ZW(h,_.Rb),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);
33
+ if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},ZW=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},aX=function(a){this.f=a;this.a=null;this.h=new _.Sh;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
34
+ cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},cX=function(a,b){var c=null,d=bX(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},bX=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===
35
+ c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new wW(d,c,e,f,g)}return b},dX=function(){},eX=function(){};_.u=CV.prototype;_.u.release=function(){this.va(_.Gp)};_.u.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.u.getState=function(){return this.f};_.u.onError=function(a){a.severity===_.P&&this.va(_.Rp)};
36
+ _.u.va=function(a){if(a!==this.f)if(this.f===_.Rp&&a!==_.Gp)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;this.f===_.Lp?(this.A=b,this.player.trigger(new _.L(_.kd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.Lp&&this.player.trigger(new _.L(_.jd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.wp(this.j,this.f);this.player.trigger(new _.L(_.cg,
37
+ {detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var HV=0,VV={GENERIC:HV,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(JV,CV);JV.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.l)};JV.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,CV.prototype.destroy.call(a),0)})};JV.prototype.va=function(a){var b=this.player.l;b&&b.isPlayingBreak||CV.prototype.va.call(this,a)};
38
+ JV.prototype.Vb=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.va(_.Np);break;case chrome.cast.media.IdleReason.ERROR:this.va(_.Rp);break;default:this.va(_.Gp)}break;case chrome.cast.media.PlayerState.PLAYING:this.va(_.Up);break;case chrome.cast.media.PlayerState.PAUSED:this.va(_.Tp);break;case chrome.cast.media.PlayerState.BUFFERING:this.va(_.Lp)}};_.x(KV,_.U);_.u=KV.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
39
+ _.u.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.Ck;break;case chrome.cast.media.TrackType.AUDIO:c=_.Bk;break;case chrome.cast.media.TrackType.TEXT:c=_.S}c=new _.zk(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
40
+ c.renditions.push(new _.Ik(c.id,c));return c}):[],this.a.trigger(new _.L(_.Kv)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return MV(this,_.Ck)};_.u.getAudioTracks=function(){return MV(this,_.Bk)};_.u.ia=function(){return MV(this,_.S)};_.u.ja=function(){var a=this.Ga();return a?a.renditions[0]:null};_.u.Va=function(){var a=this.na();return a?a.renditions[0]:null};_.u.Ra=function(){var a=this.xa();return a?a.renditions[0]:null};_.u.qb=function(){return this.f[_.Ck]||null};
41
+ _.u.Ab=function(){return this.f[_.Bk]||null};_.u.Bb=function(){return this.f[_.S]||null};_.u.Ga=function(){return NV(this,_.Ck)};_.u.na=function(){return NV(this,_.Bk)};_.u.xa=function(){return NV(this,_.S)};_.u.xb=function(a){PV(this,_.Ck,a)};_.u.Ea=function(a){PV(this,_.Bk,a)};_.u.Ta=function(a){PV(this,_.S,a)};_.u.hb=function(a){this.xb(a&&a.track)};_.u.vb=function(a){this.Ea(a&&a.track)};_.u.wb=function(a){this.Ta(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.A(a)})};
42
+ _.u.ra=function(){return!0};KV.prototype.isAbrEnabled=KV.prototype.ra;KV.prototype.addTextTrack=KV.prototype.addTextTrack;KV.prototype.setTextRendition=KV.prototype.wb;KV.prototype.setAudioRendition=KV.prototype.vb;KV.prototype.setVideoRendition=KV.prototype.hb;KV.prototype.setTextTrack=KV.prototype.Ta;KV.prototype.setAudioTrack=KV.prototype.Ea;KV.prototype.setVideoTrack=KV.prototype.xb;KV.prototype.getTextTrack=KV.prototype.xa;KV.prototype.getAudioTrack=KV.prototype.na;
43
+ KV.prototype.getVideoTrack=KV.prototype.Ga;KV.prototype.getLoadingTextRendition=KV.prototype.Bb;KV.prototype.getLoadingAudioRendition=KV.prototype.Ab;KV.prototype.getLoadingVideoRendition=KV.prototype.qb;KV.prototype.getTextRendition=KV.prototype.Ra;KV.prototype.getAudioRendition=KV.prototype.Va;KV.prototype.getVideoRendition=KV.prototype.ja;KV.prototype.getTextTracks=KV.prototype.ia;KV.prototype.getAudioTracks=KV.prototype.getAudioTracks;KV.prototype.getVideoTracks=KV.prototype.getVideoTracks;_.x(TV,_.nm);_.u=TV.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Eb)};_.u.appendLoad=function(){return Promise.reject(_.Eb)};_.u.seekWith=function(){return Promise.reject(_.Eb)};
44
+ _.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.destroy=function(){return _.I(function(a){_.A(a)})};_.u.de=function(a){this.N=a};_.u.xc=function(){return this.w};_.u.Hb=function(){return this.A};_.u.Kf=function(){return this.ga};
45
+ _.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.N(1,8,8004,void 0);g.F(2);break}_.D(g,3);return _.y(g,e.sendMessage(a,DV(b)),5);case 5:_.oh(g,2);break;case 3:f=_.E(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.A(g)}})};
46
+ _.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.xc())throw a.g.warn(uV),new _.N(1,8,8001,void 0);if(!hW)throw a.g.warn(sV),new _.N(1,8,8002,void 0);if(a.Hb())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.D(d,2);return _.y(d,pW(a),4)}if(2!=d.a)return _.oh(d,0);b=_.E(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.N(1,8,8E3,c);})};_.u.Hf=function(){this.Hb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
47
+ _.u.addMessageListener=function(a){typeof a===_.re&&this.I.add(a)};_.u.removeMessageListener=function(a){typeof a===_.re&&this.I["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?rW(this,!0):new Promise(function(b,c){if(!a.a)return c(rV);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(rV);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
48
+ _.u.isEnded=function(){return this.getState()===_.Np};_.u.seek=function(a){var b=this;return this.isEnded()?rW(this,!1,a):new Promise(function(c,d){b.a||d(rV);b.l.isPlayingBreak&&d(pV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.xg));b.a.seek(e,function(){b.trigger(new _.L(_.wg));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
49
+ _.u.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(AV,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
50
50
  _.u.getVolume=function(){return this.a&&this.a.volume.level};_.u.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.u.isMuted=function(){return this.a&&this.a.volume.muted};_.u.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
51
- _.u.getPresentationStartTime=function(){if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};_.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.j?this.j.getState():_.zp};
52
- _.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?UU(this.a.customData.stats):_.up()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.xc())return b.g.warn(KU),e["return"]();if(!xV)return b.g.warn(IU),e["return"]();b.C=_.Qp(a);b.h=_.rm(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,bb:b.h,Yb:c.Yb,audioMimeType:c.audioMimeType};return _.y(e,GV(b,d),0)})};
53
- _.u.getBufferInfo=function(){return new _.im};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.L=a};_.u.getNetworkEngine=function(){return this.L};_.u.getSourceIndex=function(){return this.B};_.u.setSourceIndex=function(a){this.B=a};_.u.setCmsdManager=function(){};_.u.getLoadedSource=function(){return this.C[this.B]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
54
- _.u.getTimelineCues=function(){return[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(JU)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.ne,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Ad};_.u.canPlay=function(){return this.xc()?2:0};_.u.zb=function(){return this.K};_.u.Xb=function(a){this.K=lV(a)};_.u.wf=function(){this.K=null};
55
- _.u.qg=function(a){var b=this.zb()||{};a={metadataType:mV(b.metadataType),title:a};this.Xb(Object.assign({},b,a))};_.u.og=function(a){var b=this.zb()||{},c=mV(b.metadataType);a=new chrome.cast.Image(a);this.Xb(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.ng=function(a){var b=this.zb()||{};this.Xb(Object.assign({},b,{metadataType:3,artist:a}))};_.u.pg=function(a){var b=this.zb()||{};a={metadataType:mV(b.metadataType),releaseDate:a};this.Xb(Object.assign({},b,a))};
56
- _.u.im=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;xV=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ga=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.wg()};
57
- _.u.Dm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;EV(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Hb()||(this.A=!0,EV(this,a.session),this.fa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Hb()&&this.a){var b=this.a.media,c=this.f.ma(),d=this.f.xa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.$(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
- isLive:this.isLive()},currentTime:CV(this),Ki:d,Ig:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(PU,this.V);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.u.vm=function(a){this.g.debug("New media session",a.mediaSession);DV(this,a.mediaSession)};_.u.um=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.u.mm=function(a,b){if(a===PU&&0<this.I.size){var c=UU(b);this.I.forEach(function(d){return d(c)})}};
59
- _.u.tj=function(){this.trigger(new _.L(_.ng))};_.u.Fk=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,VU(a,[_.lg,_.Xc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Fa++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.u.getTextDisplayer=function(){return null};iV.prototype.getTextDisplayer=iV.prototype.getTextDisplayer;
60
- iV.prototype.getNetworkEngine=iV.prototype.getNetworkEngine;iV.prototype.setNetworkEngine=iV.prototype.setNetworkEngine;var xV=!1,hV=new Set;window.__onGCastApiAvailable=fV;_.x(JV,_.jm);_.u=JV.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,jV(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.B(b)})};_.u.mn=function(a,b){this.f&&a!==_.Fp&&a!==_.yp&&(delete b.license,this.f.load(b))};_.u.tf=function(){return!!this.a&&this.a.xc()&&xV};_.u.Hb=function(){return!!this.a&&this.a.Hb()};_.u.Kf=function(){return this.a?this.a.Kf():""};_.u.de=function(a){this.a&&this.a.de(a)};
61
- _.u.cast=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.D(f,2);return _.y(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.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.xa())l.language&&
62
- (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.id?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),gg:b.f.getPresentationStartTime(),Yb:m,audioMimeType:p,bb:g}}c=g;return _.y(f,KV(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.y(f,GV(b.a,c),7);case 7:_.mh(f,0);break;case 2:d=_.E(f),
63
- b.g.error("Error while trying to cast",d),e=new _.L(_.ne,{detail:d}),b.trigger(e),_.B(f)}})};_.u.Hf=function(){this.a&&this.a.Hf()};_.u.pj=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,jV(b.a),2):c.F(2)}b.a=IV(b);_.B(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(PU,a),0):(b.g.warn(LU),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(LU)};
64
- _.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(LU)};_.u.zb=function(){return this.a&&this.a.zb()};_.u.Xb=function(a){this.a&&this.a.Xb(a)};_.u.wf=function(){this.a&&this.a.wf()};_.u.qg=function(a){this.a&&this.a.qg(a)};_.u.og=function(a){this.a&&this.a.og(a)};_.u.ng=function(a){this.a&&this.a.ng(a)};_.u.pg=function(a){this.a&&this.a.pg(a)};_.J(MU,JV);JV.prototype.setContentReleaseDate=JV.prototype.pg;JV.prototype.setContentArtist=JV.prototype.ng;
65
- JV.prototype.setContentImage=JV.prototype.og;JV.prototype.setContentTitle=JV.prototype.qg;JV.prototype.clearContentMetadata=JV.prototype.wf;JV.prototype.setContentMetadata=JV.prototype.Xb;JV.prototype.getContentMetadata=JV.prototype.zb;JV.prototype.removeMessageListener=JV.prototype.removeMessageListener;JV.prototype.addMessageListener=JV.prototype.addMessageListener;JV.prototype.sendMessage=JV.prototype.sendMessage;JV.prototype.changeReceiverId=JV.prototype.pj;JV.prototype.forceDisconnect=JV.prototype.Hf;
66
- JV.prototype.cast=JV.prototype.cast;JV.prototype.setPlayerConfigInterceptor=JV.prototype.de;JV.prototype.getReceiverName=JV.prototype.Kf;JV.prototype.isCasting=JV.prototype.Hb;JV.prototype.canCast=JV.prototype.tf;JV.prototype.destroy=JV.prototype.destroy;_.x(LV,SU);_.u=LV.prototype;
51
+ _.u.getPresentationStartTime=function(){if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};_.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.j?this.j.getState():_.Hp};
52
+ _.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?EV(this.a.customData.stats):_.Cp()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.xc())return b.g.warn(uV),e["return"]();if(!hW)return b.g.warn(sV),e["return"]();b.C=_.Yp(a);b.h=_.vm(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,gb:b.h,Zb:c.Zb,audioMimeType:c.audioMimeType};return _.y(e,qW(b,d),0)})};
53
+ _.u.getBufferInfo=function(){return new _.mm};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.L=a};_.u.getNetworkEngine=function(){return this.L};_.u.getSourceIndex=function(){return this.B};_.u.setSourceIndex=function(a){this.B=a};_.u.setCmsdManager=function(){};_.u.getLoadedSource=function(){return this.C[this.B]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
54
+ _.u.getTimelineCues=function(){return[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(tV)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.ne,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Ad};_.u.canPlay=function(){return this.xc()?2:0};_.u.zb=function(){return this.K};_.u.Yb=function(a){this.K=WV(a)};_.u.wf=function(){this.K=null};
55
+ _.u.rg=function(a){var b=this.zb()||{};a={metadataType:XV(b.metadataType),title:a};this.Yb(Object.assign({},b,a))};_.u.pg=function(a){var b=this.zb()||{},c=XV(b.metadataType);a=new chrome.cast.Image(a);this.Yb(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.og=function(a){var b=this.zb()||{};this.Yb(Object.assign({},b,{metadataType:3,artist:a}))};_.u.qg=function(a){var b=this.zb()||{};a={metadataType:XV(b.metadataType),releaseDate:a};this.Yb(Object.assign({},b,a))};
56
+ _.u.km=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;hW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ga=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.yg()};
57
+ _.u.Fm=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;oW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Hb()||(this.A=!0,oW(this,a.session),this.fa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Hb()&&this.a){var b=this.a.media,c=this.f.na(),d=this.f.xa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Z(this.getState(),{source:{url:b.contentId,type:b.contentType,
58
+ isLive:this.isLive()},currentTime:mW(this),Oi:d,Mg:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(zV,this.V);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.u.xm=function(a){this.g.debug("New media session",a.mediaSession);nW(this,a.mediaSession)};_.u.wm=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.u.om=function(a,b){if(a===zV&&0<this.I.size){var c=EV(b);this.I.forEach(function(d){return d(c)})}};
59
+ _.u.wj=function(){this.trigger(new _.L(_.ng))};_.u.Ik=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,FV(a,[_.lg,_.Xc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.za++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.u.getTextDisplayer=function(){return null};var hW=!1,SV=new Set;
60
+ window.__onGCastApiAvailable=QV;_.x(tW,_.nm);_.u=tW.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,UV(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.A(b)})};_.u.qn=function(a,b){this.f&&a!==_.Np&&a!==_.Gp&&(delete b.license,this.f.load(b))};_.u.tf=function(){return!!this.a&&this.a.xc()&&hW};_.u.Hb=function(){return!!this.a&&this.a.Hb()};_.u.Kf=function(){return this.a?this.a.Kf():""};_.u.de=function(a){this.a&&this.a.de(a)};
61
+ _.u.cast=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.D(f,2);return _.y(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.na();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.xa())l.language&&
62
+ (g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.id?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),hg:b.f.getPresentationStartTime(),Zb:m,audioMimeType:p,gb:g}}c=g;return _.y(f,uW(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.y(f,qW(b.a,c),7);case 7:_.oh(f,0);break;case 2:d=_.E(f),
63
+ b.g.error("Error while trying to cast",d),e=new _.L(_.ne,{detail:d}),b.trigger(e),_.A(f)}})};_.u.Hf=function(){this.a&&this.a.Hf()};_.u.sj=function(a){var b=this;return _.I(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.y(c,UV(b.a),2):c.F(2)}b.a=sW(b);_.A(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(zV,a),0):(b.g.warn(vV),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(vV)};
64
+ _.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(vV)};_.u.zb=function(){return this.a&&this.a.zb()};_.u.Yb=function(a){this.a&&this.a.Yb(a)};_.u.wf=function(){this.a&&this.a.wf()};_.u.rg=function(a){this.a&&this.a.rg(a)};_.u.pg=function(a){this.a&&this.a.pg(a)};_.u.og=function(a){this.a&&this.a.og(a)};_.u.qg=function(a){this.a&&this.a.qg(a)};_.J(wV,tW);tW.prototype.setContentReleaseDate=tW.prototype.qg;tW.prototype.setContentArtist=tW.prototype.og;
65
+ tW.prototype.setContentImage=tW.prototype.pg;tW.prototype.setContentTitle=tW.prototype.rg;tW.prototype.clearContentMetadata=tW.prototype.wf;tW.prototype.setContentMetadata=tW.prototype.Yb;tW.prototype.getContentMetadata=tW.prototype.zb;tW.prototype.removeMessageListener=tW.prototype.removeMessageListener;tW.prototype.addMessageListener=tW.prototype.addMessageListener;tW.prototype.sendMessage=tW.prototype.sendMessage;tW.prototype.changeReceiverId=tW.prototype.sj;tW.prototype.forceDisconnect=tW.prototype.Hf;
66
+ tW.prototype.cast=tW.prototype.cast;tW.prototype.setPlayerConfigInterceptor=tW.prototype.de;tW.prototype.getReceiverName=tW.prototype.Kf;tW.prototype.isCasting=tW.prototype.Hb;tW.prototype.canCast=tW.prototype.tf;tW.prototype.destroy=tW.prototype.destroy;_.x(vW,CV);_.u=vW.prototype;
67
67
  _.u.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.K);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.L);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.C);b.addEventListener(a.BITRATE_CHANGED,this.a)};
68
68
  _.u.destroy=function(){var a=this,b,c;return _.I(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.K);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.L);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
69
- a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,SU.prototype.destroy.call(a),0)})};_.u.xj=function(){this.player.trigger(new _.L(_.hf));this.va(_.Mp)};_.u.wj=function(){this.va(_.Lp)};_.u.qm=function(){this.va(_.Fp)};_.u.hm=function(a){a.isBuffering?this.va(_.Dp):(a=this.player.isPaused()?_.Lp:_.Mp,this.va(a))};_.u.zj=function(){this.h=1;this.player.trigger(new _.L(_.xg))};_.u.yj=function(){this.player.trigger(new _.L(_.wg))};_.u.Gm=function(){this.h=2};_.u.tm=function(){this.va(_.Kp)};
70
- _.u.vj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.hd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.S=function(a){a=new _.N(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.ne,{detail:a}));this.va(_.Jp)};_.u=MV.prototype;_.u.jb=function(){return"Google Cast Framework"};_.u.kb=function(){return cast.framework.VERSION};_.u.qb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};_.u.getPosition=function(){return 0};
71
- _.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Sb=function(){return!1};_.u.yb=function(){return this.a.clickThroughUrl||null};_.u.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.u.ob=function(){return 0};_.u.nb=function(){return 0};_.u.ab=function(){return 0};_.u.Ua=function(){switch(this.Cb()){case 0:return 0;case -1:return 2;default:return 1}};_.u.getPodIndex=function(){return this.j};_.u.Cb=function(){return this.f.position};_.u.Db=function(){return this.l};
72
- _.u.pb=function(){return this.h};_.u.getWrapperAdIds=function(){return[]};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};MV.prototype.getWrapperCreativeIds=MV.prototype.getWrapperCreativeIds;MV.prototype.getWrapperAdSystems=MV.prototype.getWrapperAdSystems;MV.prototype.getWrapperAdIds=MV.prototype.getWrapperAdIds;MV.prototype.getSequenceLength=MV.prototype.pb;MV.prototype.getPositionInSequence=MV.prototype.Db;MV.prototype.getPodTimeOffset=MV.prototype.Cb;
73
- MV.prototype.getPodIndex=MV.prototype.getPodIndex;MV.prototype.getPodType=MV.prototype.Ua;MV.prototype.getMediaBitrate=MV.prototype.ab;MV.prototype.getMediaHeight=MV.prototype.nb;MV.prototype.getMediaWidth=MV.prototype.ob;MV.prototype.getMediaUrl=MV.prototype.getMediaUrl;MV.prototype.getClickThroughUrl=MV.prototype.yb;MV.prototype.isBumper=MV.prototype.Sb;MV.prototype.getSkipTimeOffset=MV.prototype.getSkipTimeOffset;MV.prototype.getPosition=MV.prototype.getPosition;MV.prototype.getDuration=MV.prototype.getDuration;
74
- MV.prototype.getTitle=MV.prototype.getTitle;MV.prototype.getAdvertiserName=MV.prototype.getAdvertiserName;MV.prototype.getAdSystem=MV.prototype.getAdSystem;MV.prototype.getApiFramework=MV.prototype.getApiFramework;MV.prototype.getCreativeId=MV.prototype.getCreativeId;MV.prototype.getId=MV.prototype.getId;MV.prototype.getTechnology=MV.prototype.qb;MV.prototype.getAdManagerVersion=MV.prototype.kb;MV.prototype.getAdManagerName=MV.prototype.jb;NV.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};NV.prototype.Fb=function(){return!!this.a.find(function(a){return 0===a.position})};NV.prototype.Eb=function(){return!!this.a.find(function(a){return-1===a.position})};NV.prototype.hasPostroll=NV.prototype.Eb;NV.prototype.hasPreroll=NV.prototype.Fb;NV.prototype.getCuePoints=NV.prototype.getCuePoints;_.u=PV.prototype;_.u.load=function(){var a=this;return _.I(function(b){QV&&(QV=!1,VV(a,0));_.B(b)})};_.u.start=function(){return _.I(function(a){OV().play();_.B(a)})};_.u.Tc=function(){};_.u.resume=function(){-1!==this.getPosition()&&OV().play()};_.u.pause=function(){-1!==this.getPosition()&&OV().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
75
- _.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.Pc=function(){return!0};_.u.pc=function(){var a=this;return _.I(function(b){OV().removeEventListener(a.f,a.h);_.B(b)})};
76
- _.u.Aj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=OV().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Nc,{adsTimeline:new NV(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:UV(this,_.Dc,a);break;case cast.framework.events.EventType.BREAK_STARTED:UV(this,_.uc,a);break;case cast.framework.events.EventType.BREAK_ENDED:UV(this,_.vc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:UV(this,
77
- _.Jc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(UV(this,_.Ic,a),UV(this,_.Kc,a)):a.endedReason===b.STOPPED?UV(this,_.Kc,a):a.endedReason===b.END_OF_STREAM?(UV(this,_.yc,a),UV(this,_.Kc,a)):a.endedReason===b.ERROR&&VV(this,1);break;case cast.framework.events.EventType.PLAYING:UV(this,_.Hc,a);break;case cast.framework.events.EventType.PAUSE:UV(this,_.Fc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?UV(this,_.wc,a):UV(this,_.Hc,a)}};
78
- PV.prototype.getPosition=PV.prototype.getPosition;PV.prototype.setVolume=PV.prototype.setVolume;PV.prototype.getVolume=PV.prototype.getVolume;PV.prototype.skip=PV.prototype.skip;PV.prototype.pause=PV.prototype.pause;PV.prototype.resume=PV.prototype.resume;var QV=!1;WV.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(XV(),this.a)};WV.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(XV(),this.a)};WV.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return YV(a)})};
79
- WV.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.ii;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.di;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ei}b&&this.fb(new _.L(b,{detail:YV(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.fb(new _.L(_.ii,{detail:b.value}))};_.x(ZV,_.U);_.u=ZV.prototype;_.u.initialize=function(a){this.m=a;$V().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;$V().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ia=function(){return this.j};_.u.na=function(){return null};
80
- _.u.Sa=function(){var a=this.ma();return a&&a.renditions[0]};_.u.Na=function(){var a=this.xa();return a&&a.renditions[0]};_.u.lb=function(){return null};_.u.Ab=function(){return null};_.u.Bb=function(){return null};_.u.Oa=function(){return null};_.u.ma=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
81
- _.u.xa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.u.wb=function(){this.g.warn("Video tracks unavailable on Cast")};_.u.Da=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.u.Qa=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.u.cb=function(){this.g.warn("Video renditions unavailable on Cast")};_.u.ub=function(a){this.Da(a&&a.track)};
82
- _.u.vb=function(a){this.Qa(a&&a.track)};
83
- _.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,VU(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),bW(b)}catch(g){throw b.g.warn("failed on track",
84
- a),g;}}_.B(f)})};_.u.ra=function(){return!0};_.u.$m=function(){this.f=$V().getAudioTracksManager();var a=this.f.getTracks();this.h=aW(_.xk,a);bW(this);a=this.m.getConfiguration();cW(this,_.xk,a.preferredAudioLanguage,a.preferredAudioRole);cW(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};ZV.prototype.isAbrEnabled=ZV.prototype.ra;ZV.prototype.addTextTrack=ZV.prototype.addTextTrack;ZV.prototype.setTextRendition=ZV.prototype.vb;ZV.prototype.setAudioRendition=ZV.prototype.ub;
85
- ZV.prototype.setVideoRendition=ZV.prototype.cb;ZV.prototype.setTextTrack=ZV.prototype.Qa;ZV.prototype.setAudioTrack=ZV.prototype.Da;ZV.prototype.setVideoTrack=ZV.prototype.wb;ZV.prototype.getTextTrack=ZV.prototype.xa;ZV.prototype.getAudioTrack=ZV.prototype.ma;ZV.prototype.getVideoTrack=ZV.prototype.Oa;ZV.prototype.getLoadingTextRendition=ZV.prototype.Bb;ZV.prototype.getLoadingAudioRendition=ZV.prototype.Ab;ZV.prototype.getLoadingVideoRendition=ZV.prototype.lb;ZV.prototype.getTextRendition=ZV.prototype.Na;
86
- ZV.prototype.getAudioRendition=ZV.prototype.Sa;ZV.prototype.getVideoRendition=ZV.prototype.na;ZV.prototype.getTextTracks=ZV.prototype.ia;ZV.prototype.getAudioTracks=ZV.prototype.getAudioTracks;ZV.prototype.getVideoTracks=ZV.prototype.getVideoTracks;_.x(dW,_.jm);_.u=dW.prototype;_.u.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=eW();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.wm.bind(this));d.setMediaPlaybackInfoHandler(this.ej.bind(this));this.a=new LV(this);this.a.init();this.j=new ZV;this.j.initialize(this);this.o=new WV(function(e){return c.trigger(e)});this.o.init()};
87
- _.u.unload=function(){var a=cast.framework.messages.PlayerState,b=eW();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.pm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.B(b)})};
88
- _.u.play=function(){var a=eW();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=eW();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return eW().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
- _.u.isEnded=function(){return eW().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=eW();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(FU);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.setSeekInterceptor=function(){};_.u.getMediaPosition=function(){return eW().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
90
- _.u.getMediaDuration=function(){var a=eW().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return eW().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;eW().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
69
+ a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,CV.prototype.destroy.call(a),0)})};_.u.Aj=function(){this.player.trigger(new _.L(_.hf));this.va(_.Up)};_.u.zj=function(){this.va(_.Tp)};_.u.sm=function(){this.va(_.Np)};_.u.jm=function(a){a.isBuffering?this.va(_.Lp):(a=this.player.isPaused()?_.Tp:_.Up,this.va(a))};_.u.Cj=function(){this.h=1;this.player.trigger(new _.L(_.xg))};_.u.Bj=function(){this.player.trigger(new _.L(_.wg))};_.u.Im=function(){this.h=2};_.u.vm=function(){this.va(_.Sp)};
70
+ _.u.yj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.hd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.S=function(a){a=new _.N(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.ne,{detail:a}));this.va(_.Rp)};_.u=wW.prototype;_.u.nb=function(){return"Google Cast Framework"};_.u.ob=function(){return cast.framework.VERSION};_.u.rb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};_.u.getPosition=function(){return 0};
71
+ _.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Tb=function(){return!1};_.u.pb=function(){return this.a.clickThroughUrl||null};_.u.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.u.eb=function(){return 0};_.u.cb=function(){return 0};_.u.Pa=function(){return 0};_.u.Qa=function(){switch(this.Cb()){case 0:return 0;case -1:return 2;default:return 1}};_.u.getPodIndex=function(){return this.j};_.u.Cb=function(){return this.f.position};_.u.Db=function(){return this.l};
72
+ _.u.fb=function(){return this.h};_.u.getWrapperAdIds=function(){return[]};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};wW.prototype.getWrapperCreativeIds=wW.prototype.getWrapperCreativeIds;wW.prototype.getWrapperAdSystems=wW.prototype.getWrapperAdSystems;wW.prototype.getWrapperAdIds=wW.prototype.getWrapperAdIds;wW.prototype.getSequenceLength=wW.prototype.fb;wW.prototype.getPositionInSequence=wW.prototype.Db;wW.prototype.getPodTimeOffset=wW.prototype.Cb;
73
+ wW.prototype.getPodIndex=wW.prototype.getPodIndex;wW.prototype.getPodType=wW.prototype.Qa;wW.prototype.getMediaBitrate=wW.prototype.Pa;wW.prototype.getMediaHeight=wW.prototype.cb;wW.prototype.getMediaWidth=wW.prototype.eb;wW.prototype.getMediaUrl=wW.prototype.getMediaUrl;wW.prototype.getClickThroughUrl=wW.prototype.pb;wW.prototype.isBumper=wW.prototype.Tb;wW.prototype.getSkipTimeOffset=wW.prototype.getSkipTimeOffset;wW.prototype.getPosition=wW.prototype.getPosition;wW.prototype.getDuration=wW.prototype.getDuration;
74
+ wW.prototype.getTitle=wW.prototype.getTitle;wW.prototype.getAdvertiserName=wW.prototype.getAdvertiserName;wW.prototype.getAdSystem=wW.prototype.getAdSystem;wW.prototype.getApiFramework=wW.prototype.getApiFramework;wW.prototype.getCreativeId=wW.prototype.getCreativeId;wW.prototype.getId=wW.prototype.getId;wW.prototype.getTechnology=wW.prototype.rb;wW.prototype.getAdManagerVersion=wW.prototype.ob;wW.prototype.getAdManagerName=wW.prototype.nb;xW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};xW.prototype.Fb=function(){return!!this.a.find(function(a){return 0===a.position})};xW.prototype.Eb=function(){return!!this.a.find(function(a){return-1===a.position})};xW.prototype.hasPostroll=xW.prototype.Eb;xW.prototype.hasPreroll=xW.prototype.Fb;xW.prototype.getCuePoints=xW.prototype.getCuePoints;_.u=zW.prototype;_.u.load=function(){var a=this;return _.I(function(b){AW&&(AW=!1,FW(a,0));_.A(b)})};_.u.start=function(){return _.I(function(a){yW().play();_.A(a)})};_.u.Tc=function(){};_.u.resume=function(){-1!==this.getPosition()&&yW().play()};_.u.pause=function(){-1!==this.getPosition()&&yW().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
75
+ _.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.Pc=function(){return!0};_.u.pc=function(){var a=this;return _.I(function(b){yW().removeEventListener(a.f,a.h);_.A(b)})};
76
+ _.u.Dj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=yW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Nc,{adsTimeline:new xW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:EW(this,_.Dc,a);break;case cast.framework.events.EventType.BREAK_STARTED:EW(this,_.uc,a);break;case cast.framework.events.EventType.BREAK_ENDED:EW(this,_.vc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:EW(this,
77
+ _.Jc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(EW(this,_.Ic,a),EW(this,_.Kc,a)):a.endedReason===b.STOPPED?EW(this,_.Kc,a):a.endedReason===b.END_OF_STREAM?(EW(this,_.yc,a),EW(this,_.Kc,a)):a.endedReason===b.ERROR&&FW(this,1);break;case cast.framework.events.EventType.PLAYING:EW(this,_.Hc,a);break;case cast.framework.events.EventType.PAUSE:EW(this,_.Fc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?EW(this,_.wc,a):EW(this,_.Hc,a)}};
78
+ zW.prototype.getPosition=zW.prototype.getPosition;zW.prototype.setVolume=zW.prototype.setVolume;zW.prototype.getVolume=zW.prototype.getVolume;zW.prototype.skip=zW.prototype.skip;zW.prototype.pause=zW.prototype.pause;zW.prototype.resume=zW.prototype.resume;var AW=!1;GW.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(HW(),this.a)};GW.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(HW(),this.a)};GW.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return IW(a)})};
79
+ GW.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=_.ki;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.fi;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.gi}b&&this.ib(new _.L(b,{detail:IW(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.ib(new _.L(_.ki,{detail:b.value}))};_.x(JW,_.U);_.u=JW.prototype;_.u.initialize=function(a){this.m=a;KW().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;KW().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ia=function(){return this.j};_.u.ja=function(){return null};
80
+ _.u.Va=function(){var a=this.na();return a&&a.renditions[0]};_.u.Ra=function(){var a=this.xa();return a&&a.renditions[0]};_.u.qb=function(){return null};_.u.Ab=function(){return null};_.u.Bb=function(){return null};_.u.Ga=function(){return null};_.u.na=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
81
+ _.u.xa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.u.xb=function(){this.g.warn("Video tracks unavailable on Cast")};_.u.Ea=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.u.Ta=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.u.hb=function(){this.g.warn("Video renditions unavailable on Cast")};_.u.vb=function(a){this.Ea(a&&a.track)};
82
+ _.u.wb=function(a){this.Ta(a&&a.track)};
83
+ _.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,FV(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),MW(b)}catch(g){throw b.g.warn("failed on track",
84
+ a),g;}}_.A(f)})};_.u.ra=function(){return!0};_.u.cn=function(){this.f=KW().getAudioTracksManager();var a=this.f.getTracks();this.h=LW(_.Bk,a);MW(this);a=this.m.getConfiguration();NW(this,_.Bk,a.preferredAudioLanguage,a.preferredAudioRole);NW(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};JW.prototype.isAbrEnabled=JW.prototype.ra;JW.prototype.addTextTrack=JW.prototype.addTextTrack;JW.prototype.setTextRendition=JW.prototype.wb;JW.prototype.setAudioRendition=JW.prototype.vb;
85
+ JW.prototype.setVideoRendition=JW.prototype.hb;JW.prototype.setTextTrack=JW.prototype.Ta;JW.prototype.setAudioTrack=JW.prototype.Ea;JW.prototype.setVideoTrack=JW.prototype.xb;JW.prototype.getTextTrack=JW.prototype.xa;JW.prototype.getAudioTrack=JW.prototype.na;JW.prototype.getVideoTrack=JW.prototype.Ga;JW.prototype.getLoadingTextRendition=JW.prototype.Bb;JW.prototype.getLoadingAudioRendition=JW.prototype.Ab;JW.prototype.getLoadingVideoRendition=JW.prototype.qb;JW.prototype.getTextRendition=JW.prototype.Ra;
86
+ JW.prototype.getAudioRendition=JW.prototype.Va;JW.prototype.getVideoRendition=JW.prototype.ja;JW.prototype.getTextTracks=JW.prototype.ia;JW.prototype.getAudioTracks=JW.prototype.getAudioTracks;JW.prototype.getVideoTracks=JW.prototype.getVideoTracks;_.x(OW,_.nm);_.u=OW.prototype;_.u.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=PW();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.ym.bind(this));d.setMediaPlaybackInfoHandler(this.hj.bind(this));this.a=new vW(this);this.a.init();this.j=new JW;this.j.initialize(this);this.o=new GW(function(e){return c.trigger(e)});this.o.init()};
87
+ _.u.unload=function(){var a=cast.framework.messages.PlayerState,b=PW();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.tm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.A(b)})};
88
+ _.u.play=function(){var a=PW();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=PW();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return PW().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
89
+ _.u.isEnded=function(){return PW().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=PW();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(pV);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.getMediaPosition=function(){return PW().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
90
+ _.u.getMediaDuration=function(){var a=PW().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return PW().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;PW().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
91
91
  _.u.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.u.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
92
- _.u.getLoadedSource=function(){var a=eW().getMediaInformation();if(a){var b=eW().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,oo:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return eW().getStartAbsoluteTime()};
93
- _.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=eW().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.zp};
94
- _.u.getStats=function(){var a=_.up();if(this.f){a=eW().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.u.isLive=function(){return Infinity===this.getDuration()};
95
- _.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.tp;b.a.j=b.f.a;b.A=_.Qp(a);b.h=_.rm(b.w,a);if(b.C)return b.C=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:TU(b.h),local:!0};return _.y(e,eW().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.ua);return new _.im};
92
+ _.u.getLoadedSource=function(){var a=PW().getMediaInformation();if(a){var b=PW().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,so:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return PW().getStartAbsoluteTime()};
93
+ _.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=PW().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.Hp};
94
+ _.u.getStats=function(){var a=_.Cp();if(this.f){a=PW().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.u.isLive=function(){return Infinity===this.getDuration()};
95
+ _.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.Bp;b.a.j=b.f.a;b.A=_.Yp(a);b.h=_.vm(b.w,a);if(b.C)return b.C=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:DV(b.h),local:!0};return _.y(e,PW().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.ua);return new _.mm};
96
96
  _.u.getTrackManager=function(){return this.j};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return this.B};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Eb)};_.u.appendLoad=function(){return Promise.reject(_.Eb)};_.u.seekWith=function(){return Promise.reject(_.Eb)};_.u.setNetworkEngine=function(a){this.G=a};_.u.setCmsdManager=function(){};_.u.getNetworkEngine=function(){return this.G};_.u.getSourceIndex=function(){return this.l};
97
- _.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return NU};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(JU)};_.u.onError=function(a){this.trigger(new _.L(_.ne,{detail:a}))};_.u.canPlay=function(){return _.rl()?2:0};
98
- _.u.wm=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=TU(this.getStats());var b=eW(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
99
- (!e||e&&f)){d=eW().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};
100
- _.u.ej=function(a,b){var c=null;a.media.customData&&(c=UU(a.media.customData.playerConfiguration));var d=c?c.abr||null:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;hW(c,b);return b};_.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};dW.prototype.getTextDisplayer=dW.prototype.getTextDisplayer;dW.prototype.getNetworkEngine=dW.prototype.getNetworkEngine;
101
- dW.prototype.setNetworkEngine=dW.prototype.setNetworkEngine;_.u=iW.prototype;_.u.init=function(a){var b=this;a&&(this.f=new dW,_.ss(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.yp?_.y(c,RU(b.m),0):c.F(0)})}))};
102
- _.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=lW(),b=lW().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[PU]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Nl.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
103
- d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Ml.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(PU,this.w)}};
104
- _.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=lW();lW().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(PU,this.w);a.stop();this.m=this.f=null}};_.u.de=function(a){this.j=a};_.u.vn=function(a){this.l=a};_.u.on=function(a,b){lW().addEventListener(a,b)};_.u.off=function(a,b){lW().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.re&&this.h.add(a)};
105
- _.u.removeMessageListener=function(a){typeof a===_.re&&this.h["delete"](a)};_.u.sendMessage=function(a,b){lW().sendCustomMessage(PU,b,TU(a))};_.u.xc=function(){return this.a};_.u.zb=function(){return mW()};_.u.Xb=function(a){nW(this,a)};_.u.Mn=function(a){var b=mW(),c=null;a?c=Object.assign({},b,a):c=b;nW(this,c)};
106
- _.u.Nl=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return pW(this,a);try{var b=(new DOMParser).parseFromString(a,_.mg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=lW();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.$c){g=e[f].getAttribute(_.Oe);for(var h=e[f].getElementsByTagName(_.Sb),l=h.length-
107
- 1;0<=l;--l){var m=h[l].getAttribute(_.Oe)||g,n=h[l].getAttribute(_.Hd),p=h[l].getAttribute(_.Sg)||void 0,q=h[l].getAttribute(_.se)||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(_.Sb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.ac)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=lW();c=a.getElementsByTagName("StreamIndex");
108
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Qb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.vb)||void 0,h=e[f].getAttribute(_.ub)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Fg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Qb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
109
- _.u.Ml=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=UU(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,SV(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.F(7);
110
- break}b.f.C=!0;return _.y(l,_.Bs(b.m,d),8);case 8:return _.y(l,_.Cs(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Yb&&(c.media.hlsVideoSegmentFormat=WU(f.Yb,_.yk)),f.audioMimeType&&(c.media.hlsSegmentFormat=WU(f.audioMimeType,_.xk));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.l){l.F(10);
111
- break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.sm=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.Cl;var b=lW().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.m.seek(b))}_.xs(this.m)}};
112
- _.u.uj=function(a){if(0<this.h.size){var b=UU(a.data);this.h.forEach(function(c){return c(b)})}};_.J(OU,iW);iW.prototype.updateContentMetadata=iW.prototype.Mn;iW.prototype.setContentMetadata=iW.prototype.Xb;iW.prototype.getContentMetadata=iW.prototype.zb;iW.prototype.isApiReady=iW.prototype.xc;iW.prototype.sendMessage=iW.prototype.sendMessage;iW.prototype.removeMessageListener=iW.prototype.removeMessageListener;iW.prototype.addMessageListener=iW.prototype.addMessageListener;iW.prototype.off=iW.prototype.off;
113
- iW.prototype.on=iW.prototype.on;iW.prototype.setLoadRequestDataInterceptor=iW.prototype.vn;iW.prototype.setPlayerConfigInterceptor=iW.prototype.de;iW.prototype.stop=iW.prototype.stop;iW.prototype.start=iW.prototype.start;iW.prototype.init=iW.prototype.init;iW.getInstance=kW;var jW=null;_.u=qW.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Im.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.B(g)})};_.u.start=function(){return _.I(function(a){_.B(a)})};_.u.Tc=function(){};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
114
- _.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(QU,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.Pc=function(){return!0};_.u.pc=function(){var a=this;return _.I(function(b){a.h.release();_.B(b)})};
115
- _.u.Im=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Nc,{adsTimeline:new NV(a.breaks)})));break;case "isPlayingBreak":a.value?sW(this,_.uc):(sW(this,_.yc),sW(this,_.Kc),sW(this,_.vc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(sW(this,_.yc),sW(this,_.Kc)),sW(this,_.Jc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?sW(this,_.Fc):sW(this,_.Hc))}};qW.prototype.getPosition=qW.prototype.getPosition;
116
- qW.prototype.setVolume=qW.prototype.setVolume;qW.prototype.getVolume=qW.prototype.getVolume;qW.prototype.skip=qW.prototype.skip;qW.prototype.pause=qW.prototype.pause;qW.prototype.resume=qW.prototype.resume;tW.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};tW.prototype.a=function(a,b){return a.namespace()!==_.Ad?!1:!(!b||!b.ima)};tW.prototype.create=function(a){return new qW(a.a)};_.fq(new tW);uW.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};uW.prototype.a=function(a,b){return kW().xc()?!(!b||!b.ima):!1};uW.prototype.create=function(a){return new PV(a)};_.fq(new uW);};
97
+ _.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return xV};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(tV)};_.u.onError=function(a){this.trigger(new _.L(_.ne,{detail:a}))};_.u.canPlay=function(){return _.vl()?2:0};
98
+ _.u.ym=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=DV(this.getStats());var b=PW(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
99
+ (!e||e&&f)){d=PW().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};
100
+ _.u.hj=function(a,b){var c=null;a.media.customData&&(c=EV(a.media.customData.playerConfiguration));var d=c?c.abr||null:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;SW(c,b);return b};_.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u=TW.prototype;_.u.init=function(a){var b=this;a&&(this.f=new OW,_.Bs(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.Gp?_.y(c,BV(b.m),0):c.F(0)})}))};
101
+ _.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=WW(),b=WW().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[zV]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Ql.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
102
+ d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Pl.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(zV,this.w)}};
103
+ _.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=WW();WW().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(zV,this.w);a.stop();this.m=this.f=null}};_.u.de=function(a){this.j=a};_.u.yn=function(a){this.l=a};_.u.on=function(a,b){WW().addEventListener(a,b)};_.u.off=function(a,b){WW().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.re&&this.h.add(a)};
104
+ _.u.removeMessageListener=function(a){typeof a===_.re&&this.h["delete"](a)};_.u.sendMessage=function(a,b){WW().sendCustomMessage(zV,b,DV(a))};_.u.xc=function(){return this.a};_.u.zb=function(){return XW()};_.u.Yb=function(a){YW(this,a)};_.u.Pn=function(a){var b=XW(),c=null;a?c=Object.assign({},b,a):c=b;YW(this,c)};
105
+ _.u.Ql=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return $W(this,a);try{var b=(new DOMParser).parseFromString(a,_.mg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=WW();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ka),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.$c){g=e[f].getAttribute(_.Oe);for(var h=e[f].getElementsByTagName(_.Sb),l=h.length-
106
+ 1;0<=l;--l){var m=h[l].getAttribute(_.Oe)||g,n=h[l].getAttribute(_.Gd),p=h[l].getAttribute(_.Sg)||void 0,q=h[l].getAttribute(_.se)||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(_.Sb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.ac)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=WW();c=a.getElementsByTagName("StreamIndex");
107
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Qb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.wb)||void 0,h=e[f].getAttribute(_.ub)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Eg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Qb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
108
+ _.u.Pl=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=EV(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,CW(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.F(7);
109
+ break}b.f.C=!0;return _.y(l,_.Ls(b.m,d),8);case 8:return _.y(l,_.Ms(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Zb&&(c.media.hlsVideoSegmentFormat=GV(f.Zb,_.Ck)),f.audioMimeType&&(c.media.hlsSegmentFormat=GV(f.audioMimeType,_.Bk));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.l){l.F(10);
110
+ break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.um=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.Fl;var b=WW().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.m.seek(b))}_.Gs(this.m)}};
111
+ _.u.xj=function(a){if(0<this.h.size){var b=EV(a.data);this.h.forEach(function(c){return c(b)})}};_.J(yV,TW);TW.prototype.updateContentMetadata=TW.prototype.Pn;TW.prototype.setContentMetadata=TW.prototype.Yb;TW.prototype.getContentMetadata=TW.prototype.zb;TW.prototype.isApiReady=TW.prototype.xc;TW.prototype.sendMessage=TW.prototype.sendMessage;TW.prototype.removeMessageListener=TW.prototype.removeMessageListener;TW.prototype.addMessageListener=TW.prototype.addMessageListener;TW.prototype.off=TW.prototype.off;
112
+ TW.prototype.on=TW.prototype.on;TW.prototype.setLoadRequestDataInterceptor=TW.prototype.yn;TW.prototype.setPlayerConfigInterceptor=TW.prototype.de;TW.prototype.stop=TW.prototype.stop;TW.prototype.start=TW.prototype.start;TW.prototype.init=TW.prototype.init;TW.getInstance=VW;var UW=null;_.u=aX.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Km.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.A(g)})};_.u.start=function(){return _.I(function(a){_.A(a)})};_.u.Tc=function(){};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
113
+ _.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(AV,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.Pc=function(){return!0};_.u.pc=function(){var a=this;return _.I(function(b){a.h.release();_.A(b)})};
114
+ _.u.Km=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Nc,{adsTimeline:new xW(a.breaks)})));break;case "isPlayingBreak":a.value?cX(this,_.uc):(cX(this,_.yc),cX(this,_.Kc),cX(this,_.vc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(cX(this,_.yc),cX(this,_.Kc)),cX(this,_.Jc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?cX(this,_.Fc):cX(this,_.Hc))}};aX.prototype.getPosition=aX.prototype.getPosition;
115
+ aX.prototype.setVolume=aX.prototype.setVolume;aX.prototype.getVolume=aX.prototype.getVolume;aX.prototype.skip=aX.prototype.skip;aX.prototype.pause=aX.prototype.pause;aX.prototype.resume=aX.prototype.resume;dX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};dX.prototype.a=function(a,b){return a.namespace()!==_.Ad?!1:!(!b||!b.ima)};dX.prototype.create=function(a){return new aX(a.a)};_.nq(new dX);eX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};eX.prototype.a=function(a,b){return VW().xc()?!(!b||!b.ima):!1};eX.prototype.create=function(a){return new zW(a)};_.nq(new eX);};
117
116
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
118
117
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
119
118
  else{_=this.clpp._;(f.call(g,this));}