@castlabs/prestoplay 6.31.1 → 6.32.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +2 -2
  3. package/cjs/cl.adobe.js +3 -3
  4. package/cjs/cl.airplay.js +3 -3
  5. package/cjs/cl.broadpeak.js +18 -18
  6. package/cjs/cl.cast.js +127 -125
  7. package/cjs/cl.cdn.js +13 -0
  8. package/cjs/cl.conviva.js +32 -32
  9. package/cjs/cl.core.js +615 -610
  10. package/cjs/cl.crypto.js +9 -9
  11. package/cjs/cl.dash.js +101 -95
  12. package/cjs/cl.externs.js +113 -44
  13. package/cjs/cl.freewheel.js +26 -26
  14. package/cjs/cl.hls.js +78 -78
  15. package/cjs/cl.hlssmpte.js +6 -6
  16. package/cjs/cl.htmlcue.js +30 -30
  17. package/cjs/cl.ima.js +26 -26
  18. package/cjs/cl.mediatailor.js +3 -3
  19. package/cjs/cl.mse.js +351 -350
  20. package/cjs/cl.muxdata.js +14 -14
  21. package/cjs/cl.onboard.js +4 -4
  22. package/cjs/cl.persistent.js +14 -14
  23. package/cjs/cl.playlist.js +6 -6
  24. package/cjs/cl.simid.js +16 -16
  25. package/cjs/cl.smooth.js +71 -71
  26. package/cjs/cl.thumbnails.js +26 -26
  27. package/cjs/cl.tizen.js +71 -71
  28. package/cjs/cl.ttml.js +29 -29
  29. package/cjs/cl.verimatrix.js +5 -5
  30. package/cjs/cl.vimond.js +11 -11
  31. package/cjs/cl.vr.js +19 -19
  32. package/cjs/cl.vtt.js +14 -14
  33. package/cjs/cl.yospace.js +4 -4
  34. package/cjs/cl.youbora.js +40 -40
  35. package/cl.adobe.js +3 -3
  36. package/cl.airplay.js +3 -3
  37. package/cl.broadpeak.js +14 -14
  38. package/cl.cast.js +102 -101
  39. package/cl.cdn.js +7 -0
  40. package/cl.conviva.js +27 -27
  41. package/cl.core.js +498 -495
  42. package/cl.crypto.js +9 -9
  43. package/cl.dash.js +91 -87
  44. package/cl.externs.js +109 -44
  45. package/cl.freewheel.js +20 -20
  46. package/cl.hls.js +82 -82
  47. package/cl.hlssmpte.js +5 -5
  48. package/cl.htmlcue.js +26 -26
  49. package/cl.ima.js +20 -20
  50. package/cl.mediatailor.js +2 -2
  51. package/cl.mse.js +301 -300
  52. package/cl.muxdata.js +13 -13
  53. package/cl.onboard.js +4 -4
  54. package/cl.persistent.js +10 -10
  55. package/cl.playlist.js +5 -5
  56. package/cl.simid.js +14 -14
  57. package/cl.smooth.js +61 -61
  58. package/cl.thumbnails.js +19 -19
  59. package/cl.tizen.js +56 -56
  60. package/cl.ttml.js +22 -22
  61. package/cl.verimatrix.js +4 -4
  62. package/cl.vimond.js +8 -8
  63. package/cl.vr.js +14 -14
  64. package/cl.vtt.js +12 -12
  65. package/cl.yospace.js +3 -3
  66. package/cl.youbora.js +31 -31
  67. package/package.json +7 -1
  68. package/typings.d.ts +328 -114
package/cjs/cl.cast.js CHANGED
@@ -1,134 +1,136 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var qV="Cannot seek during ads playout.",rV="Cannot switch track",sV="Media session does not exist.",tV="No receivers available",uV="QUEUE_ITEM_CHANGED",vV="Reset ABR functionality not available on cast.",wV="SDK not yet ready",xV="Sender is destroyed.",yV="clpp.cast.CastProxy",zV="clpp.cast.Player",AV="clpp.cast.Receiver",BV="urn:x-cast:castlabs",CV="urn:x-cast:castlabs:int",DV="urn:x-cast:com.google.cast.media",EV="volume control is not supported",FV=function(a){return _.I(function(b){return 1==
3
- b.a?_.x(b,a.Zc(_.ef),2):_.x(b,a.Zc(_.df),0)})},GV=function(a,b){this.log=new _.M(b);this.player=a;this.j=null;this.f=_.du;this.l=7;this.h=2;this.B=Date.now();this.A=-1},HV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ue){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.$e?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.h?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},IV=function(a){if(typeof a!==_.lg)return a;
4
- try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:"Infinity"===c?Infinity:c})}catch(b){return a}},JV=function(a,b){var c=new Set(b);return Object.keys(a).reduce(function(d,e){c.has(e)&&(d[e]=a[e]);return d},{})},KV=function(a,b,c,d){var e,f,g,k,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(k=0;k<b.length&&!f;)g=b[k++],f=_.ut(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.Zk(a.url);return _.x(q,c.fetch(l).U,3)}2!=
5
- q.a&&(m=q.f)&&m.data&&(n=f.a(_.Qi(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)})},LV=function(a,b){if(window.chrome&&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 _.Ug:return d.FMP4;
6
- case _.Tg:return b===_.bt?d.MPEG2_TS:c.TS;case _.Tc:return c.AAC;case _.Uc:return c.AC3;case _.Vc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.Wc:return c.FMP4}},NV=function(a){a=void 0===a?MV:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.O(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,k=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;
7
- case c.MUSIC_TRACK:return new g;case c.PHOTO:return new k;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},OV=function(){return Math.round(1E3*Math.random())},PV=function(a){GV.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.mc.bind(this)},QV=function(){this.g=new _.M("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},RV=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},TV=function(a,b){var c=
8
- RV(a);return SV(a,b).find(function(d){return c.includes(d.id)})||null},SV=function(a,b){return a.h.filter(function(c){return c.type===b})},VV=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.at){var e=a.xa();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;UV(a,b)},function(f){a.f[b]=null;a.g.debug(rV,f)})}else b===_.at&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){UV(a,b)},
9
- function(f){a.g.debug(rV,f)}))},UV=function(a,b){b===_.X?a.a.trigger(new _.Q(_.Zc)):b===_.at&&a.a.trigger(new _.Q(_.ug))},ZV=function(a,b,c,d){_.Di.call(this);this.g=new _.M(_.xd);this.X=a;this.w=new _.gj(b);this.W=c;this.ma=d;this.j=this.H=_.Ln();this.D=[];this.B=0;this.J=new _.Xm;this.a=null;this.f=!1;this.M=new _.nm;this.A=!1;this.Aa="";this.Va=1E6;this.h=new QV;this.h.initialize(this);this.l=new PV(this);this.G=new _.wi;this.I=null;this.L=new Set;this.P=this.Cn.bind(this);this.Ba=this.Zn.bind(this);
10
- this.ha=this.Pn.bind(this);this.T=this.In.bind(this);this.ba=this.Hn.bind(this);this.o=this.K=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){WV(!0)},0)}});XV(this);YV.add(this)},$V=function(a){var b,c;return _.I(function(d){if(1==d.a)return a.G.release(),YV["delete"](a),a.f&&(a.f=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,
11
- a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ba)),c=[],a.h&&(c.push(a.h.destroy()),a.h=null),a.l&&(c.push(a.l.destroy()),a.l=null),_.x(d,Promise.all(c),2);a.A=!1;a.w&&(a.w.stop(),a.w=null);a.W=null;a.ma=null;_.A(d)})},bW=function(a){if(!a)return null;a:{var b=a.metadataType;var c=Object.entries(aW);c=_.v(c);for(var d=c.next();!d.done;d=c.next()){d=_.v(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=NV(aW[b]);return Object.assign(b,
12
- a)},cW=function(a){var b=void 0===b?MV:b;return Object.values(aW).includes(a)?a:b},dW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},XV=function(a){if(!a.f&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&a.X.length){a.o=new cast.framework.RemotePlayer;var b=new cast.framework.RemotePlayerController(a.o);a.G.on(b,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Dk.bind(a));a.G.on(b,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
13
- a.On.bind(a));a.f=!0;a.M.resolve();a.w.mh();b=cast.framework.CastContext.getInstance();var c=new cast.framework.CastOptions;c.receiverApplicationId=a.X;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.Ba);eW&&a.w.ia(.02)}},fW=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==
14
- _.h?null:a):a=null;a=null===a?null:a+b;return null===a?b:a},hW=function(a,b){gW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(BV,a.T);b.addMessageListener(CV,a.ba)},gW=function(a,b){a.a=b;a.a&&(a.l&&a.l.init(),a.trigger(new _.Q(_.Le)))},iW=function(a){return _.I(function(b){return a.Ea()?b.C(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},jW=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,t,u,y,C,D,B,E,z;return _.I(function(L){switch(L.a){case 1:if(!a.f)return L["return"]();
15
- c=chrome.cast.media.StreamType;d=_.yw;return _.x(L,iW(a),2);case 2:if(!b)return L["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;k=b;l=k.sc;m=k.vb;g.hlsVideoSegmentFormat=LV(l,d.VIDEO);g.hlsSegmentFormat=LV(m,d.AUDIO);if(!b.Ka){L.C(3);break}if(!a.K){L.C(4);break}return _.x(L,Promise.resolve(a.K(b.Ka)),5);case 5:if(n=L.f)b.Ka=n;case 4:a.j=b.Ka;a.D=_.Rn(a.j);a.B=a.D.findIndex(function(J){return J.url===
16
- b.source.url});if(!b.Ka.remoteTextTracks){L.C(6);break}return _.x(L,Promise.all(b.Ka.remoteTextTracks.map(a.Ql.bind(a))),7);case 7:p=L.f,g.tracks=p.filter(function(J){return J}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:HV(b.Ka)};case 3:q=a.Sb()||{};t=cW(q.metadataType);typeof b.Xg===_.h&&(u={metadataType:t,sectionStartAbsoluteTime:b.Xg});b.source.name&&(y={metadataType:t,title:b.source.name});C=dW(q);if(D=bW(Object.assign({},u,
17
- y,C)))g.metadata=D;B=new chrome.cast.media.LoadRequest(g);(E=b.queueData)&&E.items&&0<E.items.length&&(z=new chrome.cast.media.QueueData,z.items=E.items,z.startIndex=E.startIndex,B.queueData=z);typeof b.autoplay===_.bd&&(B.autoplay=b.autoplay);typeof b.currentTime===_.h&&(B.currentTime=b.currentTime);return _.x(L,f.loadMedia(B),8);case 8:null!=b.Ka.muted&&a.setMuted(b.Ka.muted),null!=b.Ka.volume&&a.setVolume(b.Ka.volume),_.A(L)}})},kW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=
18
- a.h.xa())&&d.language&&(a.j.preferredTextLanguage=d.language);(e=a.h.qa())&&e.language&&(a.j.preferredAudioLanguage=e.language);return _.x(f,jW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),Xg:a.getPresentationStartTime(),autoplay:b,Ka:a.j}),0)})},WV=function(a){if(a){a=_.v(YV);for(var b=a.next();!b.done;b=a.next())XV(b.value)}},mW=function(a,b,c){_.Di.call(this);this.f=a;this.h=b;this.j=typeof c===_.ue?c:this.Ho;this.a=lW(this);this.g=new _.M(yV);this.forwardEventsTo(this.f)},lW=
19
- function(a){return new ZV(a.h,function(){a.trigger(new _.Q(_.id))},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.Gh&&(d.preferredAudioLanguage=c.Gh);c.Qj&&(d.preferredTextLanguage=c.Qj);_.Mo(a.f,null);a.trigger(new _.Q("castingended"));a.j(b,d)},function(){return nW(a)})},nW=function(a){var b,c,d;return _.I(function(e){if(1==e.a){a.trigger(new _.Q(_.hd));
20
- b=a.f.a;if(b===a.a||!a.a)return e["return"]();c=null!=a.f.getLoadedSource();return _.x(e,a.f.release(),2)}_.Mo(a.f,a.a);if(!c)return e.C(0);_.Vo(a.f);return(d=a.f.getAdsManager())?_.x(e,d.load(),0):e.C(0)})},oW=function(a){GV.call(this,a,"clpp.cast.StateManager");this.I=this.Kk.bind(this);this.H=this.Jk.bind(this);this.w=this.Kn.bind(this);this.o=this.An.bind(this);this.K=this.Mk.bind(this);this.J=this.Lk.bind(this);this.L=this.bo.bind(this);this.G=this.Nn.bind(this);this.D=this.Ik.bind(this);this.a=
21
- this.Hk.bind(this)},pW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.Di.call(this);this.a=a.slice();this.f=b},qW=function(a,b){0>b||b>=a.a.length||(a.f=b,a.trigger(new _.Q(_.Bf,{item:a.Tb()})))},rW=function(a){a.trigger(new _.Q(_.Cf))},wW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.Di.call(this);var d=this;this.m=a;this.a=b;this.w=c;this.j=this.f=this.h=!1;this.o=function(){var e,f;return _.I(function(g){switch(g.a){case 1:if(d.f)return g["return"]();e=d.a.Tb();if(!e)return g["return"]();
22
- d.f=!0;_.F(g,2,3);return _.x(g,d.w(e),5);case 5:return _.x(g,d.m.load(Object.assign({},e.configuration,{autoplay:!0})),3);case 3:_.Eh(g);d.f=!1;_.Fh(g);break;case 2:throw f=_.H(g),f;}})};this.l=function(){sW(d)}},sW=function(a){BW(a);var b=Math.min(a.a.pe().length-1,a.a.getPosition()+1);qW(a.a,b)},BW=function(a){a.j||(a.a.on(_.Bf,a.o),a.j=!0)},GW=function(a,b,c){var d=this;this.player=a;this.$b=new pW(c);this.Ld=new wW({load:this.player.load.bind(this.player),off:this.player.off.bind(this.player),
23
- on:this.player.on.bind(this.player)},this.$b,function(){return _.I(function(e){_.A(e)})});this.a=new mW(this.player,b,function(e,f){var g;return _.I(function(k){if(1==k.a)return g=d.$b.getPosition(),d.Ld.Cd(g),f.autoplay=!0,delete f.license,_.x(k,d.player.load(f),2);if(3!=k.a)return typeof f.currentTime!==_.h?k.C(3):_.x(k,d.player.seek(Math.max(f.currentTime-1,0)),3);d.player.play();_.A(k)})});this.f=function(e){e&&e.type===uV&&typeof e.index===_.h&&qW(d.$b,e.index)};this.a.addMessageListener(this.f)},
24
- HW=function(a){return a.map(function(b){var c={};c.media={contentId:b.configuration.source};c.customData={skippable:!1!==b.skippable};return c})},IW=function(a,b,c,d,e){this.a=a;this.f=b;this.l=typeof c===_.h?c:1;this.h=typeof d===_.h?d:1;this.j=typeof e===_.h?e:0},JW=function(a){this.a=a},LW=function(a){this.m=a;this.a=null;this.j=this.Nk.bind(this);this.h=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,
25
- cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];this.f=!1;KW().addEventListener(this.h,this.j)},PW=function(a,b,c){var d,e,f,g,k,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.F(n,2);MW=!1;e=_.Zk(d);return _.x(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&
26
- f.data)if(g=_.R.ga(f.data),k=new DOMParser,l=k.parseFromString(g,_.tg),l.getElementsByTagName("vmap:VMAP").length)NW.warn("VMAP detected."),a.vmapAdsRequest=OW(g);else if(l.getElementsByTagName("VAST").length){NW.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=OW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else NW.warn("Unsupported schema."),MW=!0;return _.G(n,0)}m=_.H(n);NW.warn("Failed to fetch an ad",m);MW=!0;
27
- _.A(n)})},OW=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},KW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},RW=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=QW(a,c))&&(d={ad:c});a.m.trigger(new _.Q(b,d))}},SW=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},QW=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=
28
- null,e=null,f;typeof b.breakClipId===_.lg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.lg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,k){return g.position-k.position}).findIndex(function(g){return g===e})));c=new IW(d,e,b.index,b.total,f)}return c},TW=function(a){this.a=a;this.f=this.h.bind(this)},UW=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,
29
- cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},VW=function(a){var b=a.dashTimedMetadata,c=_.Lg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Kg)?_.Zf:_.Ig,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},WW=function(){this.g=new _.M("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=
30
- this.yo.bind(this);this.a=this.f=null},XW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},ZW=function(a){a.a=XW().getTextTracksManager();var b=a.a.getTracks();a.j=YW(_.at,b)},$W=function(a,b,c,d){c=_.Ii(c).filter(function(k){return k});var e=!1,f=[];b===_.X?f=a.getAudioTracks():b===_.at&&(f=a.ra());if(c=c.find(function(k){var l=_.ro(k);return f.some(function(m){m=_.ro(m.language||"");return _.so(l,m)})})){var g=_.ro(c);c=f.filter(function(k){k=_.ro(k.language||
31
- "");return _.so(g,k)});f=c.length?c:f;e=e||!!c.length}_.R.If(d)&&(c=f.filter(function(k){return k.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===_.X?a.La(e):b===_.at&&a.ib(e))},YW=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Zs(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||
32
- 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 _.gt(f.id,f));c.push(f)}return c},aX=function(){_.Di.call(this);this.g=new _.M(zV);this.h=this.w=_.Ln();this.A=null;this.l=-1;this.G=new _.Xm;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},bX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},cX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},
33
- a,{shakaConfig:c})},fX=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=_.Xn(d);if(e){var f=[_.Kd];_.Rn(a)[0].type!==_.Qc&&f.unshift(_.Md);d.preferredDrmSystem===_.Kd&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Ua[g];k?(d=g===_.Md?cast.framework.ContentProtection.WIDEVINE:g===_.Kd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,
34
- b.licenseUrl=k.licenseUrl,d={ldlDelay:0,customData:{}},dX(b,k,a,d),eX(b,k,a,d)):c()}else c()}else c()},dX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Zk({method:_.rb,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},eX=function(a,
35
- b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(k){return 1==k.a?(g=_.dl(Object.assign({},f.headers),e.buffer,200,""),_.x(k,b.modifiers.licenseResponse(c,g,d),2)):k["return"](_.Qi(g.data))})}:a.licenseHandler=void 0},gX=function(){this.a=!1;this.g=new _.M(AV);this.f=this.m=null;this.w=new Set;this.D=this.Mn.bind(this);this.B=this.Fk.bind(this);this.o=null;this.l=new _.wi;this.j=this.h=this.A=null},iX=function(){return hX||(hX=new gX)},jX=function(){return cast.framework.CastReceiverContext.getInstance()},
36
- kX=function(){var a=jX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},lX=function(a,b){var c=jX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;jX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},nX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=jX();c=(jX().getPlayerManager().getMediaInformation()||
37
- {}).hlsVideoSegmentFormat===c.FMP4?_.Ug:_.Tg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var k=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=mX(k,_.ua),m=mX(k,_.zb),n=_.v([]),p=n.next().value;n=n.next().value;m&&(m=_.v(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(k);++g}return f.join("\n")},mX=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+
38
- 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},oX=function(a){a=_.v(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c={};b.customData&&_.N.Wb(b.customData)&&(c=b.customData);b.roles&&(c.roles=b.roles);b.audioTrackInfo&&(c.audioTrackInfo=b.audioTrackInfo);_.N.Wb(c)&&(b.customData=c)}},qX=function(a){this.h=a;this.a=null;this.j=new _.wi;this.f=null;pX(this)},pX=function(a){_.I(function(b){if(1==b.a)return _.x(b,
39
- a.h.M,2);a.a=a.h.o;a.j.on(a.a.controller,cast.framework.RemotePlayerEventType.ANY_CHANGE,a.eo.bind(a));_.A(b)})},rX=function(a,b,c){var d=null;c&&(d={ad:c});a.h.trigger(new _.Q(b,d))},sX=function(a){if(!a.a||!a.a.mediaInfo)return null;var b=a.a.mediaInfo.breaks,c=a.a.mediaInfo.breakClips,d=a.a.isPlayingBreak,e=a.a.breakId,f=a.a.currentBreakClipNumber,g=a.a.numberBreakClips,k=a.a.breakClipId;if(!(b&&c&&null!=e&&null!=f&&null!=g&&null!=k&&d))return null;var l=b.find(function(m){return m.id===e})||null;
40
- a=0;l&&(a=0>=l.position?l.position:b.filter(function(m){return 0<=m.position}).sort(function(m,n){return m.position-n.position}).findIndex(function(m){return m===l}));b=c.find(function(m){return m.id===k})||null;return new IW(b,l,f,g,a)},tX=function(){},uX=function(){};_.r=GV.prototype;_.r.release=function(){this.Da(_.du)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.P&&this.Da(_.Bo)};
41
- _.r.Da=function(a){if(a!==this.f)if(this.f===_.Bo&&a!==_.du)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;2===this.f?(this.A=b,this.player.trigger(new _.Q(_.dd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):2===this.l&&this.player.trigger(new _.Q(_.cd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Xt(this.j,this.f);this.player.trigger(new _.Q(_.ig,
42
- {detail:a}))}};var vX;_.K("clpp.cast.CastUtils",function(){});var MV=0,aW={GENERIC:MV,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},wX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),xX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.w(PV,GV);PV.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.o)};PV.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,GV.prototype.destroy.call(a),0)})};PV.prototype.Da=function(a){var b=this.player.o;b&&b.isPlayingBreak||GV.prototype.Da.call(this,a)};
43
- PV.prototype.mc=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.Da(5);break;case chrome.cast.media.IdleReason.ERROR:this.Da(_.Bo);break;default:this.Da(_.du)}break;case chrome.cast.media.PlayerState.PLAYING:this.Da(3);break;case chrome.cast.media.PlayerState.PAUSED:this.Da(4);break;case chrome.cast.media.PlayerState.BUFFERING:this.Da(2)}};_.w(QV,_.wt);_.r=QV.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
44
- _.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.bt;break;case chrome.cast.media.TrackType.AUDIO:c=_.X;break;case chrome.cast.media.TrackType.TEXT:c=_.at}c=new _.Zs(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;if(b.customData){c.src=b.customData.url||c.src;c.mimeType=b.customData.mimeType||c.mimeType;
45
- var d=b.customData.roles;d&&(c.roles=d);if(b=b.customData.audioTrackInfo)void 0!==b.numAudioChannels&&(c.channelsCount=b.numAudioChannels),void 0!==b.spatialAudio&&(c.spatialAudio=b.spatialAudio)}c.renditions.push(new _.gt(c.id,c));return c}):[],this.a.trigger(new _.Q(_.Ag)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return SV(this,_.bt)};_.r.getAudioTracks=function(){return SV(this,_.X)};_.r.ra=function(){return SV(this,_.at)};
46
- _.r.sa=function(){var a=this.Qa();return a?a.renditions[0]:null};_.r.Za=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.gb=function(){var a=this.xa();return a?a.renditions[0]:null};_.r.Fb=function(){return this.f[_.bt]||null};_.r.Ub=function(){return this.f[_.X]||null};_.r.Vb=function(){return this.f[_.at]||null};_.r.Qa=function(){return TV(this,_.bt)};_.r.qa=function(){return TV(this,_.X)};_.r.xa=function(){return TV(this,_.at)};_.r.Ob=function(a){VV(this,_.bt,a)};
47
- _.r.La=function(a){VV(this,_.X,a)};_.r.ib=function(a){VV(this,_.at,a)};_.r.Bb=function(a){this.Ob(a&&a.track)};_.r.Mb=function(a){this.La(a&&a.track)};_.r.Nb=function(a){this.ib(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.A(a)})};_.r.ya=function(){return!0};QV.prototype.isAbrEnabled=QV.prototype.ya;QV.prototype.addTextTrack=QV.prototype.addTextTrack;QV.prototype.setTextRendition=QV.prototype.Nb;QV.prototype.setAudioRendition=QV.prototype.Mb;QV.prototype.setVideoRendition=QV.prototype.Bb;
48
- QV.prototype.setTextTrack=QV.prototype.ib;QV.prototype.setAudioTrack=QV.prototype.La;QV.prototype.setVideoTrack=QV.prototype.Ob;QV.prototype.getTextTrack=QV.prototype.xa;QV.prototype.getAudioTrack=QV.prototype.qa;QV.prototype.getVideoTrack=QV.prototype.Qa;QV.prototype.getLoadingTextRendition=QV.prototype.Vb;QV.prototype.getLoadingAudioRendition=QV.prototype.Ub;QV.prototype.getLoadingVideoRendition=QV.prototype.Fb;QV.prototype.getTextRendition=QV.prototype.gb;QV.prototype.getAudioRendition=QV.prototype.Za;
49
- QV.prototype.getVideoRendition=QV.prototype.sa;QV.prototype.getTextTracks=QV.prototype.ra;QV.prototype.getAudioTracks=QV.prototype.getAudioTracks;QV.prototype.getVideoTracks=QV.prototype.getVideoTracks;_.w(ZV,_.Di);_.r=ZV.prototype;_.r.init=function(a,b){this.j=this.H=b};_.r.unload=function(){var a=this;return this.f?new Promise(function(b,c){a.h&&a.h.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)}):Promise.resolve()};_.r.release=function(){var a=this;return this.f?this.unload().then(function(){a.l&&a.l.release()}):Promise.resolve()};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.nb)};_.r.appendLoad=function(){return Promise.reject(_.nb)};
50
- _.r.seekWith=function(){return Promise.reject(_.nb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.I(function(a){_.A(a)})};_.r.Ne=function(a){this.K=a};_.r.Ed=function(){return this.f};_.r.Ea=function(){return this.A};_.r.Cg=function(){return this.Aa};
51
- _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.f)return g["return"]();e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.O(1,8,8004,void 0);g.C(2);break}_.F(g,3);return _.x(g,e.sendMessage(a,b),5);case 5:_.G(g,2);break;case 3:f=_.H(g),d=new _.O(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.A(g)}})};
52
- _.r.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Ed())throw a.g.warn(wV),new _.O(1,8,8001,void 0);if(!eW)throw a.g.warn(tV),new _.O(1,8,8002,void 0);if(a.Ea())throw a.g.warn("Already casting"),new _.O(1,8,8003,void 0);_.F(d,2);return _.x(d,iW(a),4)}if(2!=d.a)return _.G(d,0);b=_.H(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.O(1,8,8E3,c);})};
53
- _.r.uf=function(){this.f&&this.Ea()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.L.add(a)};_.r.removeMessageListener=function(a){typeof a===_.ue&&this.L["delete"](a)};_.r.play=function(){var a=this;return this.f?this.isEnded()?kW(this,!0):new Promise(function(b,c){if(!a.a)return c(sV);a.a.play(null,b,c)}):Promise.resolve()};
54
- _.r.pause=function(){var a=this;return this.f?new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(sV);a.a.pause(null,b,c)}):Promise.resolve()};_.r.isPaused=function(){return this.f?!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED:!1};_.r.isEnded=function(){return this.f?5===this.getState():!1};
55
- _.r.seek=function(a){var b=this;return this.f?this.isEnded()?kW(this,!1,a):new Promise(function(c,d){b.a||d(sV);b.o.isPlayingBreak&&d(qV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.Q(_.Ng));b.a.seek(e,function(){b.trigger(new _.Q(_.Mg));c()},d)}):Promise.resolve()};_.r.getPosition=function(){return this.f?this.getMediaPosition():0};_.r.getMediaPosition=function(){return this.f?this.a&&this.a.getEstimatedTime()||0:0};
2
+ var f=function(window){var LV="Cannot seek during ads playout.",MV="Cannot switch track",NV="Media session does not exist.",OV="No receivers available",PV="QUEUE_ITEM_CHANGED",QV="Reset ABR functionality not available on cast.",RV="SDK not yet ready",SV="Sender is destroyed.",TV="clpp.cast.CastProxy",UV="clpp.cast.Player",VV="clpp.cast.Receiver",WV="urn:x-cast:castlabs",XV="urn:x-cast:castlabs:int",YV="urn:x-cast:com.google.cast.media",ZV="volume control is not supported",$V=function(a){return _.I(function(b){return 1==
3
+ b.a?_.y(b,a.jd(_.ef),2):_.y(b,a.jd(_.df),0)})},aW=function(a,b){this.log=new _.M(b);this.player=a;this.j=null;this.f=_.mu;this.l=7;this.h=2;this.B=Date.now();this.A=-1},bW=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.ue){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.$e?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.h?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},cW=function(a){if(typeof a!==_.ng)return a;
4
+ try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:"Infinity"===c?Infinity:c})}catch(b){return a}},dW=function(a,b){var c=new Set(b);return Object.keys(a).reduce(function(d,e){c.has(e)&&(d[e]=a[e]);return d},{})},eW=function(a,b,c,d){var e,f,g,k,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(k=0;k<b.length&&!f;)g=b[k++],f=_.Dt(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.dl(a.url);return _.y(q,c.fetch(l).U,3)}2!=
5
+ q.a&&(m=q.f)&&m.data&&(n=f.a(_.Vi(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)})},fW=function(a,b){if(window.chrome&&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 _.Vg:return d.FMP4;
6
+ case _.Ug:return b===_.kt?d.MPEG2_TS:c.TS;case _.Tc:return c.AAC;case _.Vc:return c.AC3;case _.Wc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.Xc:return c.FMP4}},hW=function(a){a=void 0===a?gW:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.O(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,k=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;
7
+ case c.MUSIC_TRACK:return new g;case c.PHOTO:return new k;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},iW=function(){return Math.round(1E3*Math.random())},jW=function(a){aW.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.rc.bind(this)},kW=function(){this.g=new _.M("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},lW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},nW=function(a,b){var c=
8
+ lW(a);return mW(a,b).find(function(d){return c.includes(d.id)})||null},mW=function(a,b){return a.h.filter(function(c){return c.type===b})},pW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.jt){var e=a.wa();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;oW(a,b)},function(f){a.f[b]=null;a.g.debug(MV,f)})}else b===_.jt&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){oW(a,b)},
9
+ function(f){a.g.debug(MV,f)}))},oW=function(a,b){b===_.X?a.a.trigger(new _.Q(_.$c)):b===_.jt&&a.a.trigger(new _.Q(_.wg))},tW=function(a,b,c,d){_.Ii.call(this);this.g=new _.M(_.xd);this.X=a;this.w=new _.lj(b);this.W=c;this.ma=d;this.j=this.H=_.Pn();this.D=[];this.B=0;this.J=new _.an;this.a=null;this.f=!1;this.M=new _.rm;this.A=!1;this.Aa="";this.Va=1E6;this.h=new kW;this.h.initialize(this);this.l=new jW(this);this.G=new _.Bi;this.I=null;this.L=new Set;this.P=this.Ln.bind(this);this.Ba=this.jo.bind(this);
10
+ this.ha=this.Yn.bind(this);this.T=this.Rn.bind(this);this.ba=this.Qn.bind(this);this.o=this.K=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){qW(!0)},0)}});rW(this);sW.add(this)},uW=function(a){var b,c;return _.I(function(d){if(1==d.a)return a.G.release(),sW["delete"](a),a.f&&(a.f=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,
11
+ a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ba)),c=[],a.h&&(c.push(a.h.destroy()),a.h=null),a.l&&(c.push(a.l.destroy()),a.l=null),_.y(d,Promise.all(c),2);a.A=!1;a.w&&(a.w.stop(),a.w=null);a.W=null;a.ma=null;_.A(d)})},wW=function(a){if(!a)return null;a:{var b=a.metadataType;var c=Object.entries(vW);c=_.v(c);for(var d=c.next();!d.done;d=c.next()){d=_.v(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=hW(vW[b]);return Object.assign(b,
12
+ a)},xW=function(a){var b=void 0===b?gW:b;return Object.values(vW).includes(a)?a:b},yW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},rW=function(a){if(!a.f&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&a.X.length){a.o=new cast.framework.RemotePlayer;var b=new cast.framework.RemotePlayerController(a.o);a.G.on(b,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Mk.bind(a));a.G.on(b,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
13
+ a.Xn.bind(a));a.f=!0;a.M.resolve();a.w.xh();b=cast.framework.CastContext.getInstance();var c=new cast.framework.CastOptions;c.receiverApplicationId=a.X;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.Ba);zW&&a.w.ia(.02)}},AW=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==
14
+ _.h?null:a):a=null;a=null===a?null:a+b;return null===a?b:a},CW=function(a,b){BW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(WV,a.T);b.addMessageListener(XV,a.ba)},BW=function(a,b){a.a=b;a.a&&(a.l&&a.l.init(),a.trigger(new _.Q(_.Me)))},DW=function(a){return _.I(function(b){return a.Ea()?b.C(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},EW=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,t,u,z,B,D,C,E,x;return _.I(function(J){switch(J.a){case 1:if(!a.f)return J["return"]();
15
+ c=chrome.cast.media.StreamType;d=_.Hw;return _.y(J,DW(a),2);case 2:if(!b)return J["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;k=b;l=k.xc;m=k.wb;g.hlsVideoSegmentFormat=fW(l,d.VIDEO);g.hlsSegmentFormat=fW(m,d.AUDIO);if(!b.Ka){J.C(3);break}if(!a.K){J.C(4);break}return _.y(J,Promise.resolve(a.K(b.Ka)),5);case 5:if(n=J.f)b.Ka=n;case 4:a.j=b.Ka;a.D=_.Vn(a.j);a.B=a.D.findIndex(function(L){return L.url===
16
+ b.source.url});if(!b.Ka.remoteTextTracks){J.C(6);break}return _.y(J,Promise.all(b.Ka.remoteTextTracks.map(a.Zl.bind(a))),7);case 7:p=J.f,g.tracks=p.filter(function(L){return L}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:bW(b.Ka)};case 3:q=a.Vb()||{};t=xW(q.metadataType);typeof b.hh===_.h&&(u={metadataType:t,sectionStartAbsoluteTime:b.hh});b.source.name&&(z={metadataType:t,title:b.source.name});B=yW(q);if(D=wW(Object.assign({},u,
17
+ z,B)))g.metadata=D;C=new chrome.cast.media.LoadRequest(g);(E=b.queueData)&&E.items&&0<E.items.length&&(x=new chrome.cast.media.QueueData,x.items=E.items,x.startIndex=E.startIndex,C.queueData=x);typeof b.autoplay===_.cd&&(C.autoplay=b.autoplay);typeof b.currentTime===_.h&&(C.currentTime=b.currentTime);return _.y(J,f.loadMedia(C),8);case 8:null!=b.Ka.muted&&a.setMuted(b.Ka.muted),null!=b.Ka.volume&&a.setVolume(b.Ka.volume),_.A(J)}})},FW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=
18
+ a.h.wa())&&d.language&&(a.j.preferredTextLanguage=d.language);(e=a.h.qa())&&e.language&&(a.j.preferredAudioLanguage=e.language);return _.y(f,EW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),hh:a.getPresentationStartTime(),autoplay:b,Ka:a.j}),0)})},qW=function(a){if(a){a=_.v(sW);for(var b=a.next();!b.done;b=a.next())rW(b.value)}},HW=function(a,b,c){_.Ii.call(this);this.f=a;this.h=b;this.j=typeof c===_.ue?c:this.Ro;this.a=GW(this);this.g=new _.M(TV);this.forwardEventsTo(this.f)},GW=
19
+ function(a){return new tW(a.h,function(){a.trigger(new _.Q(_.jd))},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.Qh&&(d.preferredAudioLanguage=c.Qh);c.Yj&&(d.preferredTextLanguage=c.Yj);_.Qo(a.f,null);a.trigger(new _.Q("castingended"));a.j(b,d)},function(){return IW(a)})},IW=function(a){var b,c,d;return _.I(function(e){if(1==e.a){a.trigger(new _.Q(_.id));
20
+ b=a.f.a;if(b===a.a||!a.a)return e["return"]();c=null!=a.f.ab();return _.y(e,a.f.release(),2)}_.Qo(a.f,a.a);if(!c)return e.C(0);_.Zo(a.f);return(d=a.f.getAdsManager())?_.y(e,d.load(),0):e.C(0)})},MW=function(a){aW.call(this,a,"clpp.cast.StateManager");this.I=this.Tk.bind(this);this.H=this.Sk.bind(this);this.w=this.Tn.bind(this);this.o=this.Jn.bind(this);this.K=this.Vk.bind(this);this.J=this.Uk.bind(this);this.L=this.mo.bind(this);this.G=this.Wn.bind(this);this.D=this.Rk.bind(this);this.a=this.Qk.bind(this)},
21
+ RW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.Ii.call(this);this.a=a.slice();this.f=b},WW=function(a){a.trigger(new _.Q(_.Cf))},YW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.Ii.call(this);var d=this;this.m=a;this.a=b;this.w=c;this.j=this.f=this.h=!1;this.o=function(){var e,f;return _.I(function(g){switch(g.a){case 1:if(d.f)return g["return"]();e=d.a.Wb();if(!e)return g["return"]();d.f=!0;_.F(g,2,3);return _.y(g,d.w(e),5);case 5:return _.y(g,d.m.open(Object.assign({},
22
+ e.configuration,{autoplay:!0})),3);case 3:_.Jh(g);d.f=!1;_.Kh(g);break;case 2:throw f=_.H(g),f;}})};this.l=function(){XW(d)}},XW=function(a){ZW(a);var b=Math.min(a.a.Ae().length-1,a.a.getPosition()+1);a.a.setPosition(b)},ZW=function(a){a.j||(a.a.on(_.Bf,a.o),a.j=!0)},$W=function(a,b,c){var d=this;this.player=a;this.cc=new RW(c);this.Ud=new YW({open:this.player.open.bind(this.player),off:this.player.off.bind(this.player),on:this.player.on.bind(this.player)},this.cc,function(){return _.I(function(e){_.A(e)})});
23
+ this.a=new HW(this.player,b,function(e,f){var g;return _.I(function(k){if(1==k.a)return g=d.cc.getPosition(),d.Ud.Md(g),f.autoplay=!0,delete f.license,_.y(k,d.player.open(f),2);if(3!=k.a)return typeof f.currentTime!==_.h?k.C(3):_.y(k,d.player.setPosition(Math.max(f.currentTime-1,0)),3);d.player.play();_.A(k)})});this.f=function(e){e&&e.type===PV&&typeof e.index===_.h&&d.cc.setPosition(e.index)};this.a.addMessageListener(this.f)},aX=function(a){return a.map(function(b){var c={};c.media={contentId:b.configuration.source};
24
+ c.customData={skippable:!1!==b.skippable};return c})},bX=function(a,b,c,d,e){this.a=a;this.f=b;this.l=typeof c===_.h?c:1;this.h=typeof d===_.h?d:1;this.j=typeof e===_.h?e:0},cX=function(a){this.a=a},eX=function(a){this.m=a;this.a=null;this.j=this.Wk.bind(this);this.h=[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,
25
+ cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];this.f=!1;dX().addEventListener(this.h,this.j)},iX=function(a,b,c){var d,e,f,g,k,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.F(n,2);fX=!1;e=_.dl(d);return _.y(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.R.ea(f.data),k=new DOMParser,l=k.parseFromString(g,_.vg),l.getElementsByTagName("vmap:VMAP").length)gX.warn("VMAP detected."),
26
+ a.vmapAdsRequest=hX(g);else if(l.getElementsByTagName("VAST").length){gX.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=hX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else gX.warn("Unsupported schema."),fX=!0;return _.G(n,0)}m=_.H(n);gX.warn("Failed to fetch an ad",m);fX=!0;_.A(n)})},hX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},dX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},
27
+ kX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=jX(a,c))&&(d={ad:c});a.m.trigger(new _.Q(b,d))}},lX=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},jX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.ng&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.ng&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||
28
+ null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,k){return g.position-k.position}).findIndex(function(g){return g===e})));c=new bX(d,e,b.index,b.total,f)}return c},mX=function(a){this.a=a;this.f=this.h.bind(this)},nX=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]},oX=function(a){var b=
29
+ a.dashTimedMetadata,c=_.Mg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Lg)?_.ag:_.Hg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},pX=function(){this.g=new _.M("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Io.bind(this);this.a=this.f=null},qX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},sX=function(a){a.a=qX().getTextTracksManager();var b=a.a.getTracks();
30
+ a.j=rX(_.jt,b)},tX=function(a,b,c,d){c=_.Ni(c).filter(function(k){return k});var e=!1,f=[];b===_.X?f=a.getAudioTracks():b===_.jt&&(f=a.ra());if(c=c.find(function(k){var l=_.vo(k);return f.some(function(m){m=_.vo(m.language||"");return _.wo(l,m)})})){var g=_.vo(c);c=f.filter(function(k){k=_.vo(k.language||"");return _.wo(g,k)});f=c.length?c:f;e=e||!!c.length}_.R.Tf(d)&&(c=f.filter(function(k){return k.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",
31
+ e),b===_.X?a.La(e):b===_.jt&&a.kb(e))},rX=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.ht(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 _.pt(f.id,f));c.push(f)}return c},uX=
32
+ function(){_.Ii.call(this);this.g=new _.M(UV);this.h=this.w=_.Pn();this.A=null;this.l=-1;this.G=new _.an;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},vX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},wX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},a,{shakaConfig:c})},zX=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=
33
+ void 0}if(a&&a.drm){var d=a.drm,e=_.ao(d);if(e){var f=[_.Kd];_.Vn(a)[0].type!==_.Qc&&f.unshift(_.Md);d.preferredDrmSystem===_.Kd&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Ua[g];k?(d=g===_.Md?cast.framework.ContentProtection.WIDEVINE:g===_.Kd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=k.licenseUrl,d={ldlDelay:0,customData:{}},xX(b,k,a,d),yX(b,k,a,d)):c()}else c()}else c()},xX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=
34
+ function(e){var f=_.dl({method:_.rb,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},yX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(k){return 1==k.a?(g=_.hl(Object.assign({},f.headers),e.buffer,200,""),_.y(k,b.modifiers.licenseResponse(c,
35
+ g,d),2)):k["return"](_.Vi(g.data))})}:a.licenseHandler=void 0},AX=function(){this.a=!1;this.g=new _.M(VV);this.f=this.m=null;this.w=new Set;this.D=this.Vn.bind(this);this.B=this.Ok.bind(this);this.o=null;this.l=new _.Bi;this.j=this.h=this.A=null},CX=function(){return BX||(BX=new AX)},DX=function(){return cast.framework.CastReceiverContext.getInstance()},EX=function(){var a=DX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},FX=function(a,b){var c=DX().getPlayerManager().getMediaInformation();
36
+ if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;DX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},HX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=DX();c=(DX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Vg:_.Ug;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var k=e[g].trim();
37
+ if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=GX(k,_.ua),m=GX(k,_.zb),n=_.v([]),p=n.next().value;n=n.next().value;m&&(m=_.v(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(k);++g}return f.join("\n")},GX=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},IX=function(a){a=
38
+ _.v(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c={};b.customData&&_.N.Zb(b.customData)&&(c=b.customData);b.roles&&(c.roles=b.roles);b.audioTrackInfo&&(c.audioTrackInfo=b.audioTrackInfo);_.N.Zb(c)&&(b.customData=c)}},KX=function(a){this.h=a;this.a=null;this.j=new _.Bi;this.f=null;JX(this)},JX=function(a){_.I(function(b){if(1==b.a)return _.y(b,a.h.M,2);a.a=a.h.o;a.j.on(a.a.controller,cast.framework.RemotePlayerEventType.ANY_CHANGE,a.oo.bind(a));_.A(b)})},LX=function(a,b,c){var d=null;c&&
39
+ (d={ad:c});a.h.trigger(new _.Q(b,d))},MX=function(a){if(!a.a||!a.a.mediaInfo)return null;var b=a.a.mediaInfo.breaks,c=a.a.mediaInfo.breakClips,d=a.a.isPlayingBreak,e=a.a.breakId,f=a.a.currentBreakClipNumber,g=a.a.numberBreakClips,k=a.a.breakClipId;if(!(b&&c&&null!=e&&null!=f&&null!=g&&null!=k&&d))return null;var l=b.find(function(m){return m.id===e})||null;a=0;l&&(a=0>=l.position?l.position:b.filter(function(m){return 0<=m.position}).sort(function(m,n){return m.position-n.position}).findIndex(function(m){return m===
40
+ l}));b=c.find(function(m){return m.id===k})||null;return new bX(b,l,f,g,a)},NX=function(){},OX=function(){};_.r=aW.prototype;_.r.release=function(){this.Da(_.mu)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.P&&this.Da(_.Fo)};
41
+ _.r.Da=function(a){if(a!==this.f)if(this.f===_.Fo&&a!==_.mu)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;2===this.f?(this.A=b,this.player.trigger(new _.Q(_.ed,{detail:{bufferedTimeMS:-1,reason:this.h}}))):2===this.l&&this.player.trigger(new _.Q(_.dd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.fu(this.j,this.f);this.player.trigger(new _.Q(_.kg,
42
+ {detail:a}))}};var PX;_.K("clpp.cast.CastUtils",function(){});var gW=0,vW={GENERIC:gW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},QX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),RX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.w(jW,aW);jW.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.o)};jW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,aW.prototype.destroy.call(a),0)})};jW.prototype.Da=function(a){var b=this.player.o;b&&b.isPlayingBreak||aW.prototype.Da.call(this,a)};
43
+ jW.prototype.rc=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.Da(5);break;case chrome.cast.media.IdleReason.ERROR:this.Da(_.Fo);break;default:this.Da(_.mu)}break;case chrome.cast.media.PlayerState.PLAYING:this.Da(3);break;case chrome.cast.media.PlayerState.PAUSED:this.Da(4);break;case chrome.cast.media.PlayerState.BUFFERING:this.Da(2)}};_.w(kW,_.Ft);_.r=kW.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
44
+ _.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.kt;break;case chrome.cast.media.TrackType.AUDIO:c=_.X;break;case chrome.cast.media.TrackType.TEXT:c=_.jt}c=new _.ht(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;if(b.customData){c.src=b.customData.url||c.src;c.mimeType=b.customData.mimeType||c.mimeType;
45
+ var d=b.customData.roles;d&&(c.roles=d);if(b=b.customData.audioTrackInfo)void 0!==b.numAudioChannels&&(c.channelsCount=b.numAudioChannels),void 0!==b.spatialAudio&&(c.spatialAudio=b.spatialAudio)}c.renditions.push(new _.pt(c.id,c));return c}):[],this.a.trigger(new _.Q(_.Cg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return mW(this,_.kt)};_.r.getAudioTracks=function(){return mW(this,_.X)};_.r.ra=function(){return mW(this,_.jt)};
46
+ _.r.sa=function(){var a=this.Ra();return a?a.renditions[0]:null};_.r.Za=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.hb=function(){var a=this.wa();return a?a.renditions[0]:null};_.r.Hb=function(){return this.f[_.kt]||null};_.r.Xb=function(){return this.f[_.X]||null};_.r.Yb=function(){return this.f[_.jt]||null};_.r.Ra=function(){return nW(this,_.kt)};_.r.qa=function(){return nW(this,_.X)};_.r.wa=function(){return nW(this,_.jt)};_.r.Qb=function(a){pW(this,_.kt,a)};
47
+ _.r.La=function(a){pW(this,_.X,a)};_.r.kb=function(a){pW(this,_.jt,a)};_.r.Db=function(a){this.Qb(a&&a.track)};_.r.Ob=function(a){this.La(a&&a.track)};_.r.Pb=function(a){this.kb(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.A(a)})};_.r.xa=function(){return!0};kW.prototype.isAbrEnabled=kW.prototype.xa;kW.prototype.addTextTrack=kW.prototype.addTextTrack;kW.prototype.setTextRendition=kW.prototype.Pb;kW.prototype.setAudioRendition=kW.prototype.Ob;kW.prototype.setVideoRendition=kW.prototype.Db;
48
+ kW.prototype.setTextTrack=kW.prototype.kb;kW.prototype.setAudioTrack=kW.prototype.La;kW.prototype.setVideoTrack=kW.prototype.Qb;kW.prototype.getTextTrack=kW.prototype.wa;kW.prototype.getAudioTrack=kW.prototype.qa;kW.prototype.getVideoTrack=kW.prototype.Ra;kW.prototype.getLoadingTextRendition=kW.prototype.Yb;kW.prototype.getLoadingAudioRendition=kW.prototype.Xb;kW.prototype.getLoadingVideoRendition=kW.prototype.Hb;kW.prototype.getTextRendition=kW.prototype.hb;kW.prototype.getAudioRendition=kW.prototype.Za;
49
+ kW.prototype.getVideoRendition=kW.prototype.sa;kW.prototype.getTextTracks=kW.prototype.ra;kW.prototype.getAudioTracks=kW.prototype.getAudioTracks;kW.prototype.getVideoTracks=kW.prototype.getVideoTracks;_.w(tW,_.Ii);_.r=tW.prototype;_.r.init=function(a,b){this.j=this.H=b};_.r.unload=function(){var a=this;return this.f?new Promise(function(b,c){a.h&&a.h.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)}):Promise.resolve()};_.r.release=function(){var a=this;return this.f?this.unload().then(function(){a.l&&a.l.release()}):Promise.resolve()};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.nb)};_.r.appendLoad=function(){return Promise.reject(_.nb)};
50
+ _.r.seekWith=function(){return Promise.reject(_.nb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.I(function(a){_.A(a)})};_.r.Ye=function(a){this.K=a};_.r.Od=function(){return this.f};_.r.Ea=function(){return this.A};_.r.Mg=function(){return this.Aa};
51
+ _.r.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.f)return g["return"]();e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.O(1,8,8004,void 0);g.C(2);break}_.F(g,3);return _.y(g,e.sendMessage(a,b),5);case 5:_.G(g,2);break;case 3:f=_.H(g),d=new _.O(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.A(g)}})};
52
+ _.r.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Od())throw a.g.warn(RV),new _.O(1,8,8001,void 0);if(!zW)throw a.g.warn(OV),new _.O(1,8,8002,void 0);if(a.Ea())throw a.g.warn("Already casting"),new _.O(1,8,8003,void 0);_.F(d,2);return _.y(d,DW(a),4)}if(2!=d.a)return _.G(d,0);b=_.H(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.O(1,8,8E3,c);})};
53
+ _.r.Hf=function(){this.f&&this.Ea()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.L.add(a)};_.r.removeMessageListener=function(a){typeof a===_.ue&&this.L["delete"](a)};_.r.play=function(){var a=this;return this.f?this.isEnded()?FW(this,!0):new Promise(function(b,c){if(!a.a)return c(NV);a.a.play(null,b,c)}):Promise.resolve()};
54
+ _.r.pause=function(){var a=this;return this.f?new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(NV);a.a.pause(null,b,c)}):Promise.resolve()};_.r.isPaused=function(){return this.f?!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED:!1};_.r.isEnded=function(){return this.f?5===this.getState():!1};
55
+ _.r.seek=function(a){var b=this;return this.f?this.isEnded()?FW(this,!1,a):new Promise(function(c,d){b.a||d(NV);b.o.isPlayingBreak&&d(LV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.Q(_.Og));b.a.seek(e,function(){b.trigger(new _.Q(_.Ng));c()},d)}):Promise.resolve()};_.r.getPosition=function(){return this.f?this.getMediaPosition():0};_.r.getMediaPosition=function(){return this.f?this.a&&this.a.getEstimatedTime()||0:0};
56
56
  _.r.getDuration=function(){return this.f?this.getMediaDuration():0};_.r.getMediaDuration=function(){if(!this.f)return 0;if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.h?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.f?this.a&&this.a.playbackRate||0:0};
57
- _.r.setPlaybackRate=function(a){this.f&&this.a&&0<a&&this.sendMessage(DV,{type:"SET_PLAYBACK_RATE",requestId:OV(),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};_.r.getVolume=function(){return this.f?this.a&&this.a.volume.level:0};_.r.setVolume=function(a){this.f&&this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.r.isMuted=function(){return this.f?this.a&&this.a.volume.muted:!1};
57
+ _.r.setPlaybackRate=function(a){this.f&&this.a&&0<a&&this.sendMessage(YV,{type:"SET_PLAYBACK_RATE",requestId:iW(),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};_.r.getVolume=function(){return this.f?this.a&&this.a.volume.level:0};_.r.setVolume=function(a){this.f&&this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.r.isMuted=function(){return this.f?this.a&&this.a.volume.muted:!1};
58
58
  _.r.setMuted=function(a){this.f&&this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};_.r.getPresentationStartTime=function(){if(!this.f)return 0;if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.h?null:1E-8===a?0:a};
59
- _.r.getSeekRange=function(){if(!this.f)return{start:0,end:0};var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.f?this.l?this.l.getState():7:7};_.r.getStats=function(){return this.f?this.a&&this.a.customData&&this.a.customData.stats?IV(this.a.customData.stats):_.cu():_.cu()};
60
- _.r.isLive=function(){return this.f?Infinity===this.getDuration():!1};_.r.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Ed())return b.g.warn(wV),e["return"]();if(!eW)return b.g.warn(tV),e["return"]();b.D=_.Rn(a);b.j=_.Nn([b.H,a]);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.j.autoplay,Ka:b.j,sc:c.sc,vb:c.vb};return _.x(e,jW(b,d),0)})};_.r.getBufferInfo=function(){return new _.gi};_.r.getTrackManager=function(){return this.h};_.r.getConfiguration=function(){return this.j};
61
- _.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.J=a};_.r.getNetworkEngine=function(){return this.J};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.setCmsdManager=function(){};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(vV)};
62
- _.r.onError=function(a){if(a&&(this.trigger(new _.Q(_.qe,{detail:a})),this.l))this.l.onError(a)};_.r.namespace=function(){return _.xd};_.r.canPlay=function(){return this.Ed()?2:0};_.r.Sb=function(){return this.I};_.r.pc=function(a){this.I=bW(a)};_.r.sg=function(){this.I=null};_.r.gh=function(a){if(this.f){var b=this.Sb()||{};a={metadataType:cW(b.metadataType),title:a};this.pc(Object.assign({},b,a))}};
63
- _.r.eh=function(a){if(this.f){var b=this.Sb()||{},c=cW(b.metadataType);a=new chrome.cast.Image(a);this.pc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.dh=function(a){if(this.f){var b=this.Sb()||{};this.pc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.fh=function(a){if(this.f){var b=this.Sb()||{};a={metadataType:cW(b.metadataType),releaseDate:a};this.pc(Object.assign({},b,a))}};
64
- _.r.Cn=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;eW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.Aa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.mh()};
65
- _.r.Zn=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;hW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Ea()||(this.A=!0,hW(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Ea()&&this.a){var b=this.a.media,c=this.h.qa(),d=this.h.xa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.W(this.getState(),{source:{url:b.contentId,type:b.contentType,
66
- isLive:this.isLive()},currentTime:fW(this),Qj:d,Gh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(BV,this.T);a.session.removeMessageListener(CV,this.ba);this.A=!1;this.a=null}};_.r.Pn=function(a){this.g.debug("New media session",a.mediaSession);gW(this,a.mediaSession)};_.r.On=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.In=function(a,b){var c=IV(b);this.L.forEach(function(d){return d(c)})};
67
- _.r.Hn=function(a,b){var c=IV(b);"event"===c.type&&c.name===_.Yg&&this.trigger(new _.Q(_.jd,{visible:!!c.visible}))};_.r.Dk=function(){this.trigger(new _.Q(_.zg))};
68
- _.r.Ql=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.x(e,KV(a,[_.sg,_.Pc],b.J,b.j),2);if(d=e.f)c=new chrome.cast.media.Track(b.Va++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.r.getTextDisplayer=function(){return null};var eW=!1,YV=new Set;window.__onGCastApiAvailable=WV;_.w(mW,_.Di);_.r=mW.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.x(b,$V(a.a),3):b.C(2);2!=b.a&&(a.a=null);a.stopForwardingEventsTo(a.f);_.A(b)})};_.r.Ho=function(a,b){5!==a&&a!==_.du&&(delete b.license,this.f.load(b))};_.r.pd=function(){return!!this.a&&this.a.Ed()&&eW};_.r.Ea=function(){return!!this.a&&this.a.Ea()};_.r.Cg=function(){return this.a?this.a.Cg():""};_.r.Ne=function(a){this.a&&this.a.Ne(a)};
69
- _.r.cast=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.a)return g["return"]();_.F(g,2);return _.x(g,c.a.cast(),4);case 4:if(!c.a)return g["return"]();var k=null,l=c.f.getLoadedSource();if(l){var m=c.f.getTrackManager();k=m.getVideoTracks()[0];if(k&&k.mimeType)var n=k.mimeType;k=c.f.getConfiguration();var p=m.qa();if(p){if(p.mimeType)var q=p.mimeType;p.language&&(k.preferredAudioLanguage=p.language);p.roles.length&&(k.preferredAudioRole=p.roles[0])}if(m=m.xa())m.language&&
70
- (k.preferredTextLanguage=m.language),m.roles.length&&(k.preferredTextRole=m.roles[0]);m=l&&typeof l.isLive===_.bd?l.isLive:c.f.isLive();k={source:l,isLive:m,autoplay:!c.f.isPaused(),currentTime:Math.max(c.f.getPosition()-1,0),Xg:c.f.getPresentationStartTime(),sc:n,vb:q,Ka:k}}d=k;b&&d&&(d.queueData={items:b.items,startIndex:b.startIndex});return _.x(g,nW(c),5);case 5:if(!c.a)return g["return"]();d&&(d.autoplay=!c.f.isPaused());if(a)return _.x(g,c.f.load(a),7);if(c.a.a){g.C(7);break}return _.x(g,jW(c.a,
71
- d),7);case 7:_.G(g,0);break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.Q(_.qe,{detail:e}),c.trigger(f),_.A(g)}})};_.r.uf=function(){this.a&&this.a.uf()};_.r.xk=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?_.x(c,$V(b.a),2):c.C(2)}b.a=lW(b);_.A(c)})};_.r.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.x(c,b.a.sendMessage(BV,a),0):(b.g.warn(xV),c["return"]())})};
72
- _.r.Dj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(DV,{type:"QUEUE_NEXT",requestId:OV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Ej=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(DV,{type:"QUEUE_PREV",requestId:OV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Cj=function(a){var b=this;return _.I(function(c){return _.x(c,b.a.sendMessage(DV,{type:"QUEUE_INSERT",requestId:OV(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
73
- _.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(xV)};_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(xV)};_.r.Sb=function(){return this.a&&this.a.Sb()};_.r.pc=function(a){this.a&&this.a.pc(a)};_.r.sg=function(){this.a&&this.a.sg()};_.r.gh=function(a){this.a&&this.a.gh(a)};_.r.eh=function(a){this.a&&this.a.eh(a)};_.r.dh=function(a){this.a&&this.a.dh(a)};_.r.fh=function(a){this.a&&this.a.fh(a)};_.K(yV,mW);
74
- mW.prototype.setContentReleaseDate=mW.prototype.fh;mW.prototype.setContentArtist=mW.prototype.dh;mW.prototype.setContentImage=mW.prototype.eh;mW.prototype.setContentTitle=mW.prototype.gh;mW.prototype.clearContentMetadata=mW.prototype.sg;mW.prototype.setContentMetadata=mW.prototype.pc;mW.prototype.getContentMetadata=mW.prototype.Sb;mW.prototype.removeMessageListener=mW.prototype.removeMessageListener;mW.prototype.addMessageListener=mW.prototype.addMessageListener;mW.prototype.queueAddItems=mW.prototype.Cj;
75
- mW.prototype.queuePreviousItem=mW.prototype.Ej;mW.prototype.queueNextItem=mW.prototype.Dj;mW.prototype.sendMessage=mW.prototype.sendMessage;mW.prototype.changeReceiverId=mW.prototype.xk;mW.prototype.forceDisconnect=mW.prototype.uf;mW.prototype.cast=mW.prototype.cast;mW.prototype.setPlayerConfigInterceptor=mW.prototype.Ne;mW.prototype.getReceiverName=mW.prototype.Cg;mW.prototype.isCasting=mW.prototype.Ea;mW.prototype.canCast=mW.prototype.pd;mW.prototype.destroy=mW.prototype.destroy;_.w(oW,GV);_.r=oW.prototype;
59
+ _.r.getSeekRange=function(){if(!this.f)return{start:0,end:0};var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.f?this.l?this.l.getState():7:7};_.r.getStats=function(){return this.f?this.a&&this.a.customData&&this.a.customData.stats?cW(this.a.customData.stats):_.lu():_.lu()};
60
+ _.r.isLive=function(){return this.f?Infinity===this.getDuration():!1};_.r.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Od())return b.g.warn(RV),e["return"]();if(!zW)return b.g.warn(OV),e["return"]();b.D=_.Vn(a);b.j=_.Rn([b.H,a]);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.j.autoplay,Ka:b.j,xc:c.xc,wb:c.wb};return _.y(e,EW(b,d),0)})};_.r.getBufferInfo=function(){return new _.mi};_.r.getTrackManager=function(){return this.h};_.r.getConfiguration=function(){return this.j};
61
+ _.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.J=a};_.r.getNetworkEngine=function(){return this.J};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.setCmsdManager=function(){};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(QV)};
62
+ _.r.onError=function(a){if(a&&(this.trigger(new _.Q(_.qe,{detail:a})),this.l))this.l.onError(a)};_.r.namespace=function(){return _.xd};_.r.canPlay=function(){return this.Od()?2:0};_.r.Vb=function(){return this.I};_.r.uc=function(a){this.I=wW(a)};_.r.Dg=function(){this.I=null};_.r.rh=function(a){if(this.f){var b=this.Vb()||{};a={metadataType:xW(b.metadataType),title:a};this.uc(Object.assign({},b,a))}};
63
+ _.r.ph=function(a){if(this.f){var b=this.Vb()||{},c=xW(b.metadataType);a=new chrome.cast.Image(a);this.uc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.oh=function(a){if(this.f){var b=this.Vb()||{};this.uc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.qh=function(a){if(this.f){var b=this.Vb()||{};a={metadataType:xW(b.metadataType),releaseDate:a};this.uc(Object.assign({},b,a))}};
64
+ _.r.Ln=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;zW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.Aa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.xh()};
65
+ _.r.jo=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;CW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Ea()||(this.A=!0,CW(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Ea()&&this.a){var b=this.a.media,c=this.h.qa(),d=this.h.wa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.W(this.getState(),{source:{url:b.contentId,type:b.contentType,
66
+ isLive:this.isLive()},currentTime:AW(this),Yj:d,Qh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(WV,this.T);a.session.removeMessageListener(XV,this.ba);this.A=!1;this.a=null}};_.r.Yn=function(a){this.g.debug("New media session",a.mediaSession);BW(this,a.mediaSession)};_.r.Xn=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.Rn=function(a,b){var c=cW(b);this.L.forEach(function(d){return d(c)})};
67
+ _.r.Qn=function(a,b){var c=cW(b);"event"===c.type&&c.name===_.Zg&&this.trigger(new _.Q(_.kd,{visible:!!c.visible}))};_.r.Mk=function(){this.trigger(new _.Q(_.Bg))};
68
+ _.r.Zl=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,eW(a,[_.ug,_.Pc],b.J,b.j),2);if(d=e.f)c=new chrome.cast.media.Track(b.Va++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.r.getTextDisplayer=function(){return null};var zW=!1,sW=new Set;window.__onGCastApiAvailable=qW;_.w(HW,_.Ii);_.r=HW.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,uW(a.a),3):b.C(2);2!=b.a&&(a.a=null);a.stopForwardingEventsTo(a.f);_.A(b)})};_.r.Ro=function(a,b){5!==a&&a!==_.mu&&(delete b.license,this.f.open(b))};_.r.zd=function(){return!!this.a&&this.a.Od()&&zW};_.r.Ea=function(){return!!this.a&&this.a.Ea()};_.r.Mg=function(){return this.a?this.a.Mg():""};_.r.Ye=function(a){this.a&&this.a.Ye(a)};
69
+ _.r.cast=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:if(!c.a)return g["return"]();_.F(g,2);return _.y(g,c.a.cast(),4);case 4:if(!c.a)return g["return"]();var k=null,l=c.f.ab();if(l){var m=c.f.getTrackManager();k=m.getVideoTracks()[0];if(k&&k.mimeType)var n=k.mimeType;k=c.f.getConfiguration();var p=m.qa();if(p){if(p.mimeType)var q=p.mimeType;p.language&&(k.preferredAudioLanguage=p.language);p.roles.length&&(k.preferredAudioRole=p.roles[0])}if(m=m.wa())m.language&&(k.preferredTextLanguage=
70
+ m.language),m.roles.length&&(k.preferredTextRole=m.roles[0]);m=l&&typeof l.isLive===_.cd?l.isLive:c.f.isLive();k={source:l,isLive:m,autoplay:!c.f.isPaused(),currentTime:Math.max(c.f.getPosition()-1,0),hh:c.f.getPresentationStartTime(),xc:n,wb:q,Ka:k}}d=k;b&&d&&(d.queueData={items:b.items,startIndex:b.startIndex});return _.y(g,IW(c),5);case 5:if(!c.a)return g["return"]();d&&(d.autoplay=!c.f.isPaused());if(a)return _.y(g,c.f.open(a),7);if(c.a.a){g.C(7);break}return _.y(g,EW(c.a,d),7);case 7:_.G(g,0);
71
+ break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.Q(_.qe,{detail:e}),c.trigger(f),_.A(g)}})};_.r.Hf=function(){this.a&&this.a.Hf()};_.r.Gk=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,uW(b.a),2):c.C(2)}b.a=GW(b);_.A(c)})};_.r.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(WV,a),0):(b.g.warn(SV),c["return"]())})};
72
+ _.r.Mj=function(){var a=this;return _.I(function(b){return _.y(b,a.a.sendMessage(YV,{type:"QUEUE_NEXT",requestId:iW(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Nj=function(){var a=this;return _.I(function(b){return _.y(b,a.a.sendMessage(YV,{type:"QUEUE_PREV",requestId:iW(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Lj=function(a){var b=this;return _.I(function(c){return _.y(c,b.a.sendMessage(YV,{type:"QUEUE_INSERT",requestId:iW(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
73
+ _.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(SV)};_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(SV)};_.r.Vb=function(){return this.a&&this.a.Vb()};_.r.uc=function(a){this.a&&this.a.uc(a)};_.r.Dg=function(){this.a&&this.a.Dg()};_.r.rh=function(a){this.a&&this.a.rh(a)};_.r.ph=function(a){this.a&&this.a.ph(a)};_.r.oh=function(a){this.a&&this.a.oh(a)};_.r.qh=function(a){this.a&&this.a.qh(a)};_.K(TV,HW);
74
+ HW.prototype.setContentReleaseDate=HW.prototype.qh;HW.prototype.setContentArtist=HW.prototype.oh;HW.prototype.setContentImage=HW.prototype.ph;HW.prototype.setContentTitle=HW.prototype.rh;HW.prototype.clearContentMetadata=HW.prototype.Dg;HW.prototype.setContentMetadata=HW.prototype.uc;HW.prototype.getContentMetadata=HW.prototype.Vb;HW.prototype.removeMessageListener=HW.prototype.removeMessageListener;HW.prototype.addMessageListener=HW.prototype.addMessageListener;HW.prototype.queueAddItems=HW.prototype.Lj;
75
+ HW.prototype.queuePreviousItem=HW.prototype.Nj;HW.prototype.queueNextItem=HW.prototype.Mj;HW.prototype.sendMessage=HW.prototype.sendMessage;HW.prototype.changeReceiverId=HW.prototype.Gk;HW.prototype.forceDisconnect=HW.prototype.Hf;HW.prototype.cast=HW.prototype.cast;HW.prototype.setPlayerConfigInterceptor=HW.prototype.Ye;HW.prototype.getReceiverName=HW.prototype.Mg;HW.prototype.isCasting=HW.prototype.Ea;HW.prototype.canCast=HW.prototype.zd;HW.prototype.destroy=HW.prototype.destroy;_.w(MW,aW);_.r=MW.prototype;
76
76
  _.r.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.K);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.L);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
77
77
  _.r.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,
78
- a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,GV.prototype.destroy.call(a),0)})};_.r.Kk=function(){this.player.trigger(new _.Q(_.pf));this.Da(3)};_.r.Jk=function(){this.Da(4)};_.r.Kn=function(){this.Da(5)};_.r.An=function(a){a.isBuffering?this.Da(2):(a=this.player.isPaused()?4:3,this.Da(a))};_.r.Mk=function(){this.h=1;this.player.trigger(new _.Q(_.Ng))};_.r.Lk=function(){this.player.trigger(new _.Q(_.Mg))};_.r.bo=function(){this.h=2};_.r.Nn=function(){this.Da(1)};
79
- _.r.Hk=function(a){var b=this.player.getStats();this.player.trigger(new _.Q(_.ad,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Ik=function(a){a=new _.O(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.Q(_.qe,{detail:a}));this.Da(_.Bo)};_.w(pW,_.Di);_.r=pW.prototype;_.r.pe=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Tb=function(){return this.a[this.f]||null};_.r.Ji=function(){return this.a[this.f+1]||null};_.r.append=function(a){this.a.push(a);rW(this)};_.r.Oi=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),rW(this))};_.r.remove=function(a){0>a||a>=this.a.length||a===this.f||(this.a.splice(a,1),this.f>a&&this.f--,rW(this))};_.r.clear=function(){this.a=[];this.f=0;rW(this)};_.w(wW,_.Di);_.r=wW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.pe,this.l),BW(this),qW(this.a,this.a.getPosition()))};_.r.next=function(){var a=this.a.Tb();a&&!1===a.skippable||sW(this)};_.r.Ke=function(){var a=this.a.Tb();a&&!1===a.skippable||(BW(this),a=Math.max(0,this.a.getPosition()-1),qW(this.a,a))};_.r.Cd=function(a){var b=this;return _.I(function(c){qW(b.a,a);_.A(c)})};_.r.stop=function(){this.h=!1;this.m.off(_.pe,this.l);this.a.off(_.Bf,this.o);this.j=!1};_.r=GW.prototype;_.r.Un=function(a){return this.$b.on(_.Bf,a)};_.r.Vn=function(a){return this.$b.on(_.Cf,a)};_.r.Dn=function(a){return this.player.on(_.id,a)};_.r.pd=function(){return this.a.pd()};_.r.Am=function(){return this.$b.pe()};_.r.Ea=function(){return this.a.Ea()};_.r.append=function(a){var b=this;return _.I(function(c){b.$b.append(a);return b.a.Ea()?_.x(c,b.a.Cj(HW([a])),0):c["return"]()})};_.r.pm=function(){return this.$b.getPosition()};_.r.start=function(){this.Ld.start()};_.r.play=function(){this.player.play()};
80
- _.r.pause=function(){this.player.pause()};_.r.destroy=function(){this.Ld.stop();this.a.removeMessageListener(this.f);this.a.destroy();this.player.release()};_.r.cp=function(){var a=this,b,c;return _.I(function(d){if(a.a.Ea())return a.a.uf(),d["return"]();a.Ld.stop();b=HW(a.$b.pe());c=a.$b.getPosition();return _.x(d,a.a.cast(void 0,{items:b,startIndex:c}),0)})};
81
- _.r.next=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.x(b,a.a.Dj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Ld.next(),0)})};_.r.Ke=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.x(b,a.a.Ej(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Ld.Ke(),0)})};_.K("clpp.cast.playlist.CastPlaylist",GW);GW.prototype.previous=GW.prototype.Ke;GW.prototype.next=GW.prototype.next;GW.prototype.toggleCast=GW.prototype.cp;GW.prototype.destroy=GW.prototype.destroy;
82
- GW.prototype.pause=GW.prototype.pause;GW.prototype.play=GW.prototype.play;GW.prototype.start=GW.prototype.start;GW.prototype.getCurrentIndex=GW.prototype.pm;GW.prototype.append=GW.prototype.append;GW.prototype.isCasting=GW.prototype.Ea;GW.prototype.getPlaylistItems=GW.prototype.Am;GW.prototype.canCast=GW.prototype.pd;GW.prototype.onCastStatusChanged=GW.prototype.Dn;GW.prototype.onPlaylistModified=GW.prototype.Vn;GW.prototype.onPlaylistItemChange=GW.prototype.Un;_.r=IW.prototype;_.r.jb=function(){return"Google Cast Framework"};_.r.kb=function(){return cast.framework.VERSION};_.r.nb=function(){return 0};_.r.getId=function(){return this.a.id};_.r.getCreativeId=function(){return""};_.r.Hb=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};_.r.getPosition=function(){return 0};
83
- _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.Jb=function(){return!1};_.r.$a=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.eb=function(){return 0};_.r.cb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){switch(this.yb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.j};_.r.yb=function(){return this.f.position};_.r.lb=function(){return this.l};
84
- _.r.fb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Ib=function(){return null};IW.prototype.getVideoElement=IW.prototype.Ib;IW.prototype.getWrapperCreativeIds=IW.prototype.getWrapperCreativeIds;IW.prototype.getWrapperAdSystems=IW.prototype.getWrapperAdSystems;IW.prototype.canSeek=IW.prototype.canSeek;IW.prototype.getWrapperAdIds=IW.prototype.getWrapperAdIds;
85
- IW.prototype.getSequenceLength=IW.prototype.fb;IW.prototype.getPositionInSequence=IW.prototype.lb;IW.prototype.getPodTimeOffset=IW.prototype.yb;IW.prototype.getPodIndex=IW.prototype.getPodIndex;IW.prototype.getPodType=IW.prototype.Ha;IW.prototype.getMediaBitrate=IW.prototype.Ga;IW.prototype.getMediaHeight=IW.prototype.cb;IW.prototype.getMediaWidth=IW.prototype.eb;IW.prototype.getMediaUrl=IW.prototype.getMediaUrl;IW.prototype.getClickThroughUrl=IW.prototype.$a;IW.prototype.isBumper=IW.prototype.Jb;
86
- IW.prototype.getSkipTimeOffset=IW.prototype.getSkipTimeOffset;IW.prototype.getPosition=IW.prototype.getPosition;IW.prototype.getDuration=IW.prototype.getDuration;IW.prototype.getTitle=IW.prototype.getTitle;IW.prototype.getAdvertiserName=IW.prototype.getAdvertiserName;IW.prototype.getAdSystem=IW.prototype.getAdSystem;IW.prototype.getApiFramework=IW.prototype.getApiFramework;IW.prototype.getSourceId=IW.prototype.Hb;IW.prototype.getCreativeId=IW.prototype.getCreativeId;IW.prototype.getId=IW.prototype.getId;
87
- IW.prototype.getTechnology=IW.prototype.nb;IW.prototype.getAdManagerVersion=IW.prototype.kb;IW.prototype.getAdManagerName=IW.prototype.jb;JW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};JW.prototype.Yb=function(){return!!this.a.find(function(a){return 0===a.position})};JW.prototype.Xb=function(){return!!this.a.find(function(a){return-1===a.position})};JW.prototype.hasPostroll=JW.prototype.Xb;JW.prototype.hasPreroll=JW.prototype.Yb;JW.prototype.getCuePoints=JW.prototype.getCuePoints;_.r=LW.prototype;_.r.load=function(){var a=this;return _.I(function(b){MW&&(MW=!1,SW(a,0));_.A(b)})};_.r.Ab=function(){return!0};_.r.Nc=function(){};_.r.pb=function(){-1!==this.getPosition()&&KW().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){NW.warn(EV);return 0};_.r.Oa=function(){NW.warn(EV)};_.r.setMuted=function(){};_.r.isMuted=function(){return!1};_.r.jc=function(){return-1!==this.getPosition()};_.r.isPaused=function(){return this.f};
88
- _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.h?a:-1};_.r.Kc=function(){return!0};_.r.xc=function(){var a=this;return _.I(function(b){KW().removeEventListener(a.h,a.j);_.A(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.pb()};_.r.resume=function(){this.Ab()};
89
- _.r.Nk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=KW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.Q(_.Fc,{adsTimeline:new JW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:RW(this,_.uc,a);break;case cast.framework.events.EventType.BREAK_STARTED:RW(this,_.jc,a);break;case cast.framework.events.EventType.BREAK_ENDED:RW(this,_.kc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:RW(this,
90
- _.Bc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(RW(this,_.Ac,a),RW(this,_.Cc,a)):a.endedReason===b.STOPPED?RW(this,_.Cc,a):a.endedReason===b.END_OF_STREAM?(RW(this,_.nc,a),RW(this,_.Cc,a)):a.endedReason===b.ERROR&&SW(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;RW(this,_.zc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;RW(this,_.xc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?RW(this,_.lc,
91
- a):(this.f=!1,RW(this,_.zc,a))}};LW.prototype.resume=LW.prototype.resume;LW.prototype.pause=LW.prototype.pause;LW.prototype.getVolume=LW.prototype.getVolume;LW.prototype.setVolume=LW.prototype.setVolume;LW.prototype.getPosition=LW.prototype.getPosition;LW.prototype.skip=LW.prototype.skip;var MW=!1,NW=new _.M("clpp.cast.ads.AdsManager");TW.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(UW(),this.f)};TW.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(UW(),this.f)};TW.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return VW(a)})};
92
- TW.prototype.h=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.vg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.wg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.xg}b&&this.a(new _.Q(b,{detail:VW(a.timedMetadataInfo)}))}else for(a=_.v(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.a(new _.Q(_.vg,{detail:b.value}))};_.w(WW,_.wt);_.r=WW.prototype;_.r.initialize=function(a){this.m=a;XW().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;XW().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.ra=function(){return this.j};_.r.sa=function(){return null};
93
- _.r.Za=function(){var a=this.qa();return a&&a.renditions[0]};_.r.gb=function(){var a=this.xa();return a&&a.renditions[0]};_.r.Fb=function(){return null};_.r.Ub=function(){return null};_.r.Vb=function(){return null};_.r.Qa=function(){return null};_.r.qa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.h&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
94
- _.r.xa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.h&&(b=b.toString(),a=this.ra().find(function(c){return c.id===b})||null)}return a};_.r.Ob=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.La=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.ib=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.Bb=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Mb=function(a){this.La(a&&a.track)};
95
- _.r.Nb=function(a){this.ib(a&&a.track)};
96
- _.r.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,KV(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]),ZW(b)}catch(g){throw b.g.warn("failed on track",
97
- a),g;}}_.A(f)})};_.r.ya=function(){return!0};_.r.yo=function(){this.f=XW().getAudioTracksManager();var a=this.f.getTracks();this.h=YW(_.X,a);ZW(this);a=this.m.getConfiguration();$W(this,_.X,a.preferredAudioLanguage,a.preferredAudioRole);$W(this,_.at,a.preferredTextLanguage,a.preferredTextRole)};WW.prototype.isAbrEnabled=WW.prototype.ya;WW.prototype.addTextTrack=WW.prototype.addTextTrack;WW.prototype.setTextRendition=WW.prototype.Nb;WW.prototype.setAudioRendition=WW.prototype.Mb;
98
- WW.prototype.setVideoRendition=WW.prototype.Bb;WW.prototype.setTextTrack=WW.prototype.ib;WW.prototype.setAudioTrack=WW.prototype.La;WW.prototype.setVideoTrack=WW.prototype.Ob;WW.prototype.getTextTrack=WW.prototype.xa;WW.prototype.getAudioTrack=WW.prototype.qa;WW.prototype.getVideoTrack=WW.prototype.Qa;WW.prototype.getLoadingTextRendition=WW.prototype.Vb;WW.prototype.getLoadingAudioRendition=WW.prototype.Ub;WW.prototype.getLoadingVideoRendition=WW.prototype.Fb;WW.prototype.getTextRendition=WW.prototype.gb;
99
- WW.prototype.getAudioRendition=WW.prototype.Za;WW.prototype.getVideoRendition=WW.prototype.sa;WW.prototype.getTextTracks=WW.prototype.ra;WW.prototype.getAudioTracks=WW.prototype.getAudioTracks;WW.prototype.getVideoTracks=WW.prototype.getVideoTracks;_.w(aX,_.Di);_.r=aX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=bX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Ek.bind(this));d.setMediaPlaybackInfoHandler(this.lk.bind(this));this.a=new oW(this);this.a.init();this.j=new WW;this.j.initialize(this);this.o=new TW(function(e){return c.trigger(e)});this.o.init()};
100
- _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=bX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.Ln(),a.h=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.C(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.A(b)})};
101
- _.r.play=function(){bX().play();return Promise.resolve()};_.r.pause=function(){bX().pause();return Promise.resolve()};_.r.isPaused=function(){return bX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return bX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=bX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(qV);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};
102
- _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return bX().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=bX().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return bX().getPlaybackRate()};
103
- _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;bX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){this.g.warn(EV);return null};_.r.setVolume=function(){this.g.warn(EV)};_.r.setMuted=function(){this.g.warn(EV)};_.r.isMuted=function(){this.g.warn(EV);return!1};
104
- _.r.getLoadedSource=function(){var a=bX().getMediaInformation();if(a){var b=bX().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,Op:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return bX().getStartAbsoluteTime()};
105
- _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=bX().getLiveSeekableRange();b&&typeof b.start===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():7};
106
- _.r.getStats=function(){var a=_.cu();if(this.f){a=bX().getStats();this.f.h=a.estimatedBandwidth||NaN;this.f.w=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.A=a.width||NaN;b.j=c;b=this.f;c=typeof a.decodedFrames===_.h?a.decodedFrames:NaN;b.o=typeof a.droppedFrames===_.h?a.droppedFrames:NaN;b.l=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
107
- _.r.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.bu;b.a.j=b.f.a;b.A=_.Rn(a);b.h=_.Nn([b.w,a]);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.h&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:HV(b.h),local:!0};return _.x(e,bX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.xa);return new _.gi};
78
+ a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,aW.prototype.destroy.call(a),0)})};_.r.Tk=function(){this.player.trigger(new _.Q(_.pf));this.Da(3)};_.r.Sk=function(){this.Da(4)};_.r.Tn=function(){this.Da(5)};_.r.Jn=function(a){a.isBuffering?this.Da(2):(a=this.player.isPaused()?4:3,this.Da(a))};_.r.Vk=function(){this.h=1;this.player.trigger(new _.Q(_.Og))};_.r.Uk=function(){this.player.trigger(new _.Q(_.Ng))};_.r.mo=function(){this.h=2};_.r.Wn=function(){this.Da(1)};
79
+ _.r.Qk=function(a){var b=this.player.getStats();this.player.trigger(new _.Q(_.bd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Rk=function(a){a=new _.O(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.Q(_.qe,{detail:a}));this.Da(_.Fo)};_.w(RW,_.Ii);_.r=RW.prototype;_.r.Ae=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Wb=function(){return this.a[this.f]||null};_.r.Si=function(){return this.a[this.f+1]||null};_.r.setPosition=function(a){0>a||a>=this.a.length||(this.f=a,this.trigger(new _.Q(_.Bf,{item:this.Wb()})))};_.r.append=function(a){this.a.push(a);WW(this)};_.r.Xi=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),WW(this))};
80
+ _.r.remove=function(a){0>a||a>=this.a.length||a===this.f||(this.a.splice(a,1),this.f>a&&this.f--,WW(this))};_.r.clear=function(){this.a=[];this.f=0;WW(this)};_.w(YW,_.Ii);_.r=YW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.pe,this.l),ZW(this),this.a.setPosition(this.a.getPosition()))};_.r.next=function(){var a=this.a.Wb();a&&!1===a.skippable||XW(this)};_.r.Ue=function(){var a=this.a.Wb();a&&!1===a.skippable||(ZW(this),a=Math.max(0,this.a.getPosition()-1),this.a.setPosition(a))};_.r.Md=function(a){var b=this;return _.I(function(c){b.a.setPosition(a);_.A(c)})};
81
+ _.r.stop=function(){this.h=!1;this.m.off(_.pe,this.l);this.a.off(_.Bf,this.o);this.j=!1};_.r=$W.prototype;_.r.co=function(a){return this.cc.on(_.Bf,a)};_.r.eo=function(a){return this.cc.on(_.Cf,a)};_.r.Mn=function(a){return this.player.on(_.jd,a)};_.r.zd=function(){return this.a.zd()};_.r.Jm=function(){return this.cc.Ae()};_.r.Ea=function(){return this.a.Ea()};_.r.append=function(a){var b=this;return _.I(function(c){b.cc.append(a);return b.a.Ea()?_.y(c,b.a.Lj(aX([a])),0):c["return"]()})};_.r.ym=function(){return this.cc.getPosition()};_.r.start=function(){this.Ud.start()};_.r.play=function(){this.player.play()};
82
+ _.r.pause=function(){this.player.pause()};_.r.destroy=function(){this.Ud.stop();this.a.removeMessageListener(this.f);this.a.destroy();this.player.release()};_.r.mp=function(){var a=this,b,c;return _.I(function(d){if(a.a.Ea())return a.a.Hf(),d["return"]();a.Ud.stop();b=aX(a.cc.Ae());c=a.cc.getPosition();return _.y(d,a.a.cast(void 0,{items:b,startIndex:c}),0)})};
83
+ _.r.next=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.y(b,a.a.Mj(),3):b.C(2):2!=b.a?b["return"]():_.y(b,a.Ud.next(),0)})};_.r.Ue=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.y(b,a.a.Nj(),3):b.C(2):2!=b.a?b["return"]():_.y(b,a.Ud.Ue(),0)})};_.K("clpp.cast.playlist.CastPlaylist",$W);$W.prototype.previous=$W.prototype.Ue;$W.prototype.next=$W.prototype.next;$W.prototype.toggleCast=$W.prototype.mp;$W.prototype.destroy=$W.prototype.destroy;
84
+ $W.prototype.pause=$W.prototype.pause;$W.prototype.play=$W.prototype.play;$W.prototype.start=$W.prototype.start;$W.prototype.getCurrentIndex=$W.prototype.ym;$W.prototype.append=$W.prototype.append;$W.prototype.isCasting=$W.prototype.Ea;$W.prototype.getPlaylistItems=$W.prototype.Jm;$W.prototype.canCast=$W.prototype.zd;$W.prototype.onCastStatusChanged=$W.prototype.Mn;$W.prototype.onPlaylistModified=$W.prototype.eo;$W.prototype.onPlaylistItemChange=$W.prototype.co;_.r=bX.prototype;_.r.lb=function(){return"Google Cast Framework"};_.r.nb=function(){return cast.framework.VERSION};_.r.pb=function(){return 0};_.r.getId=function(){return this.a.id};_.r.getCreativeId=function(){return""};_.r.Jb=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};_.r.getPosition=function(){return 0};
85
+ _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.Lb=function(){return!1};_.r.$a=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.fb=function(){return 0};_.r.eb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){switch(this.zb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.j};_.r.zb=function(){return this.f.position};_.r.ob=function(){return this.l};
86
+ _.r.gb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Kb=function(){return null};bX.prototype.getVideoElement=bX.prototype.Kb;bX.prototype.getWrapperCreativeIds=bX.prototype.getWrapperCreativeIds;bX.prototype.getWrapperAdSystems=bX.prototype.getWrapperAdSystems;bX.prototype.canSeek=bX.prototype.canSeek;bX.prototype.getWrapperAdIds=bX.prototype.getWrapperAdIds;
87
+ bX.prototype.getSequenceLength=bX.prototype.gb;bX.prototype.getPositionInSequence=bX.prototype.ob;bX.prototype.getPodTimeOffset=bX.prototype.zb;bX.prototype.getPodIndex=bX.prototype.getPodIndex;bX.prototype.getPodType=bX.prototype.Ha;bX.prototype.getMediaBitrate=bX.prototype.Ga;bX.prototype.getMediaHeight=bX.prototype.eb;bX.prototype.getMediaWidth=bX.prototype.fb;bX.prototype.getMediaUrl=bX.prototype.getMediaUrl;bX.prototype.getClickThroughUrl=bX.prototype.$a;bX.prototype.isBumper=bX.prototype.Lb;
88
+ bX.prototype.getSkipTimeOffset=bX.prototype.getSkipTimeOffset;bX.prototype.getPosition=bX.prototype.getPosition;bX.prototype.getDuration=bX.prototype.getDuration;bX.prototype.getTitle=bX.prototype.getTitle;bX.prototype.getAdvertiserName=bX.prototype.getAdvertiserName;bX.prototype.getAdSystem=bX.prototype.getAdSystem;bX.prototype.getApiFramework=bX.prototype.getApiFramework;bX.prototype.getSourceId=bX.prototype.Jb;bX.prototype.getCreativeId=bX.prototype.getCreativeId;bX.prototype.getId=bX.prototype.getId;
89
+ bX.prototype.getTechnology=bX.prototype.pb;bX.prototype.getAdManagerVersion=bX.prototype.nb;bX.prototype.getAdManagerName=bX.prototype.lb;cX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};cX.prototype.ac=function(){return!!this.a.find(function(a){return 0===a.position})};cX.prototype.$b=function(){return!!this.a.find(function(a){return-1===a.position})};cX.prototype.hasPostroll=cX.prototype.$b;cX.prototype.hasPreroll=cX.prototype.ac;cX.prototype.getCuePoints=cX.prototype.getCuePoints;_.r=eX.prototype;_.r.load=function(){var a=this;return _.I(function(b){fX&&(fX=!1,lX(a,0));_.A(b)})};_.r.Cb=function(){return!0};_.r.Uc=function(){};_.r.rb=function(){-1!==this.getPosition()&&dX().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){gX.warn(ZV);return 0};_.r.Pa=function(){gX.warn(ZV)};_.r.setMuted=function(){};_.r.isMuted=function(){return!1};_.r.Ab=function(){return-1!==this.getPosition()};_.r.isPaused=function(){return this.f};
90
+ _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.h?a:-1};_.r.Rc=function(){return!0};_.r.Cc=function(){var a=this;return _.I(function(b){dX().removeEventListener(a.h,a.j);_.A(b)})};_.r.setVolume=function(a){this.Pa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.rb()};_.r.resume=function(){this.Cb()};
91
+ _.r.Wk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=dX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.Q(_.Fc,{adsTimeline:new cX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:kX(this,_.tc,a);break;case cast.framework.events.EventType.BREAK_STARTED:kX(this,_.ic,a);break;case cast.framework.events.EventType.BREAK_ENDED:kX(this,_.jc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:kX(this,
92
+ _.Bc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(kX(this,_.Ac,a),kX(this,_.Cc,a)):a.endedReason===b.STOPPED?kX(this,_.Cc,a):a.endedReason===b.END_OF_STREAM?(kX(this,_.mc,a),kX(this,_.Cc,a)):a.endedReason===b.ERROR&&lX(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;kX(this,_.zc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;kX(this,_.xc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?kX(this,_.kc,
93
+ a):(this.f=!1,kX(this,_.zc,a))}};eX.prototype.resume=eX.prototype.resume;eX.prototype.pause=eX.prototype.pause;eX.prototype.getVolume=eX.prototype.getVolume;eX.prototype.setVolume=eX.prototype.setVolume;eX.prototype.getPosition=eX.prototype.getPosition;eX.prototype.skip=eX.prototype.skip;var fX=!1,gX=new _.M("clpp.cast.ads.AdsManager");mX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(nX(),this.f)};mX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(nX(),this.f)};mX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return oX(a)})};
94
+ mX.prototype.h=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.xg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.yg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.zg}b&&this.a(new _.Q(b,{detail:oX(a.timedMetadataInfo)}))}else for(a=_.v(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.a(new _.Q(_.xg,{detail:b.value}))};_.w(pX,_.Ft);_.r=pX.prototype;_.r.initialize=function(a){this.m=a;qX().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;qX().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.ra=function(){return this.j};_.r.sa=function(){return null};
95
+ _.r.Za=function(){var a=this.qa();return a&&a.renditions[0]};_.r.hb=function(){var a=this.wa();return a&&a.renditions[0]};_.r.Hb=function(){return null};_.r.Xb=function(){return null};_.r.Yb=function(){return null};_.r.Ra=function(){return null};_.r.qa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.h&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
96
+ _.r.wa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.h&&(b=b.toString(),a=this.ra().find(function(c){return c.id===b})||null)}return a};_.r.Qb=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.La=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.kb=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.Db=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Ob=function(a){this.La(a&&a.track)};
97
+ _.r.Pb=function(a){this.kb(a&&a.track)};
98
+ _.r.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,eW(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]),sX(b)}catch(g){throw b.g.warn("failed on track",
99
+ a),g;}}_.A(f)})};_.r.xa=function(){return!0};_.r.Io=function(){this.f=qX().getAudioTracksManager();var a=this.f.getTracks();this.h=rX(_.X,a);sX(this);a=this.m.getConfiguration();tX(this,_.X,a.preferredAudioLanguage,a.preferredAudioRole);tX(this,_.jt,a.preferredTextLanguage,a.preferredTextRole)};pX.prototype.isAbrEnabled=pX.prototype.xa;pX.prototype.addTextTrack=pX.prototype.addTextTrack;pX.prototype.setTextRendition=pX.prototype.Pb;pX.prototype.setAudioRendition=pX.prototype.Ob;
100
+ pX.prototype.setVideoRendition=pX.prototype.Db;pX.prototype.setTextTrack=pX.prototype.kb;pX.prototype.setAudioTrack=pX.prototype.La;pX.prototype.setVideoTrack=pX.prototype.Qb;pX.prototype.getTextTrack=pX.prototype.wa;pX.prototype.getAudioTrack=pX.prototype.qa;pX.prototype.getVideoTrack=pX.prototype.Ra;pX.prototype.getLoadingTextRendition=pX.prototype.Yb;pX.prototype.getLoadingAudioRendition=pX.prototype.Xb;pX.prototype.getLoadingVideoRendition=pX.prototype.Hb;pX.prototype.getTextRendition=pX.prototype.hb;
101
+ pX.prototype.getAudioRendition=pX.prototype.Za;pX.prototype.getVideoRendition=pX.prototype.sa;pX.prototype.getTextTracks=pX.prototype.ra;pX.prototype.getAudioTracks=pX.prototype.getAudioTracks;pX.prototype.getVideoTracks=pX.prototype.getVideoTracks;_.w(uX,_.Ii);_.r=uX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=vX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Nk.bind(this));d.setMediaPlaybackInfoHandler(this.uk.bind(this));this.a=new MW(this);this.a.init();this.j=new pX;this.j.initialize(this);this.o=new mX(function(e){return c.trigger(e)});this.o.init()};
102
+ _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=vX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.Pn(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.C(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.A(b)})};
103
+ _.r.play=function(){vX().play();return Promise.resolve()};_.r.pause=function(){vX().pause();return Promise.resolve()};_.r.isPaused=function(){return vX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return vX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=vX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(LV);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};
104
+ _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return vX().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=vX().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return vX().getPlaybackRate()};
105
+ _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;vX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){this.g.warn(ZV);return null};_.r.setVolume=function(){this.g.warn(ZV)};_.r.setMuted=function(){this.g.warn(ZV)};_.r.isMuted=function(){this.g.warn(ZV);return!1};
106
+ _.r.getLoadedSource=function(){var a=vX().getMediaInformation();if(a){var b=vX().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,Wp:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return vX().getStartAbsoluteTime()};
107
+ _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=vX().getLiveSeekableRange();b&&typeof b.start===_.h&&typeof b.end===_.h&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():7};
108
+ _.r.getStats=function(){var a=_.lu();if(this.f){a=vX().getStats();this.f.h=a.estimatedBandwidth||NaN;this.f.w=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.A=a.width||NaN;b.j=c;b=this.f;c=typeof a.decodedFrames===_.h?a.decodedFrames:NaN;b.o=typeof a.droppedFrames===_.h?a.droppedFrames:NaN;b.l=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
109
+ _.r.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.ku;b.a.j=b.f.a;b.A=_.Vn(a);b.h=_.Rn([b.w,a]);if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.h&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:bW(b.h),local:!0};return _.y(e,vX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.xa);return new _.mi};
108
110
  _.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return this.B};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.nb)};_.r.appendLoad=function(){return Promise.reject(_.nb)};_.r.seekWith=function(){return Promise.reject(_.nb)};_.r.setNetworkEngine=function(a){this.G=a};_.r.setCmsdManager=function(){};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};
109
- _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return zV};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(vV)};_.r.onError=function(a){this.trigger(new _.Q(_.qe,{detail:a}))};_.r.canPlay=function(){return _.nj()?2:0};
110
- _.r.Ek=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=HV(this.getStats());var b=bX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.h&&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&&
111
- (!e||e&&f)){d=bX().getStartAbsoluteTime();if(typeof d===_.h){b.startAbsoluteTime=d;var k;f?k=new cast.framework.messages.GenericMediaMetadata:k=b.metadata;k.sectionStartAbsoluteTime=d;b.metadata=k}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};
112
- _.r.lk=function(a,b){var c=null,d=b;a.media.customData&&(c=IV(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=IV(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=IV(a.media.customData.playerConfiguration));var g=e&&e.LiveConfiguration;g=g?0===g.liveEdgeLatencyMs:!1;e=!(!e||!e.lowLatencyMode);d=null!=f&&f.lowLatencyMode||g||e?cX(d,{streaming:{lowLatencyMode:!0}}):d;if(!c)return d;f=c.chromecast||null;e=c.abr||null;g=d;e&&typeof e.defaultBandwidthEstimate===
113
- _.h?g.initialBandwidth=e.defaultBandwidthEstimate:g.initialBandwidth=void 0;fX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=JV(g,wX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=JV(c,xX));_.N.Wb(e)&&(d=cX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=gX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new aX,_.Mo(a,this.f),this.m=a,this.l.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.du?_.x(c,FV(b.m),0):c.C(0)})}))};
114
- _.r.start=function(){var a=this;if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var b=jX(),c=jX().getPlayerManager(),d=new cast.framework.CastReceiverOptions;d.customNamespaces={};d.customNamespaces[BV]=cast.framework.system.MessageType.JSON;d.customNamespaces[CV]=cast.framework.system.MessageType.JSON;var e=new cast.framework.PlaybackConfig;e.manifestHandler=this.cn.bind(this);e.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};e.enableSmoothLiveRefresh=
115
- !0;d.playbackConfig=e;if(e=this.m&&this.m.getSurface().getMedia())d.mediaElement=e;d.disableIdleTimeout=!0;d.maxInactivity=Infinity;this.h&&(d.queue=this.h);c.setMessageInterceptor(cast.framework.messages.MessageType.QUEUE_UPDATE,function(f){a.g.info("QUEUE_UPDATE message received",f);var g=a.getQueueManager();if(!g)return f;g=g.getCurrentItem();return g?(g=g.customData)&&!1===g.skippable?null:f:f});c.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.bn.bind(this));c.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,
116
- this.en.bind(this));c.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);c.addEventListener(cast.framework.events.EventType.MEDIA_STATUS,this.Gk.bind(this));b.start(d);b.addCustomMessageListener(BV,this.B);this.l.on(document,_.Yg,function(){var f={type:"event",name:_.Yg,visible:!document.hidden};jX().sendCustomMessage(CV,void 0,f)})}};
117
- _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=jX();jX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);a.removeCustomMessageListener(BV,this.B);a.stop();this.j=this.h=this.m=this.f=null}};_.r.Ne=function(a){this.o=a};_.r.Po=function(a){this.A=a};_.r.on=function(a,b){jX().addEventListener(a,b)};_.r.off=function(a,b){jX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.w.add(a)};
118
- _.r.removeMessageListener=function(a){typeof a===_.ue&&this.w["delete"](a)};_.r.sendMessage=function(a,b){jX().sendCustomMessage(BV,b,a)};_.r.Ed=function(){return this.a};_.r.Ig=function(){return this.a};_.r.Sb=function(){return kX()};_.r.pc=function(a){lX(this,a)};_.r.lp=function(a){var b=kX(),c=null;a?c=Object.assign({},b,a):c=b;lX(this,c)};_.r.Ro=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return jX().getPlayerManager().getQueueManager()};
119
- _.r.Gk=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,jX().sendCustomMessage(BV,void 0,{type:uV,index:a})))};
120
- _.r.cn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return nX(this,a);try{var b=(new DOMParser).parseFromString(a,_.tg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=jX();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===_.Sg||g===_.Sc){g=e[f].getAttribute(_.Ue);for(var k=e[f].getElementsByTagName(_.Ab),l=
121
- k.length-1;0<=l;--l){var m=k[l].getAttribute(_.Ue)||g,n=k[l].getAttribute(_.Fd),p=k[l].getAttribute(_.gh)||void 0,q=k[l].getAttribute(_.ve)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(k[l])}e[f].getElementsByTagName(_.Ab).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Jb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=jX();c=a.getElementsByTagName("StreamIndex");
122
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Sg){e=c[d].getElementsByTagName(_.yb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.eb)||void 0,k=e[f].getAttribute(_.db)||void 0,void 0!==g&&(g=+g),void 0!==k&&(k=+k),b.canDisplayType(_.Ug,void 0,g,k)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.yb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
123
- _.r.bn=function(a){var b=this,c,d,e,f,g,k;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=IV(c.media.customData.playerConfiguration));if(!b.m||!d){l.C(2);break}if(!b.o){l.C(3);break}return _.x(l,Promise.resolve(b.o(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.C(5);break}return _.x(l,PW(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.h&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.C(7);
124
- break}b.f.D=!0;return _.x(l,_.Wo(b.m,d),8);case 8:return _.x(l,_.Xo(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.sc&&(c.media.hlsVideoSegmentFormat=LV(f.sc,_.bt)),f.vb&&(c.media.hlsSegmentFormat=LV(f.vb,_.X));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.h){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.A){l.C(10);break}return _.x(l,
125
- Promise.resolve(b.A(c)),11);case 11:(k=l.f)&&(c=k);case 10:return l["return"](c)}})};_.r.en=function(a){var b=a.media;b&&b.tracks&&b.tracks.length&&oX(b.tracks);if((b=a.items)&&b.length){b=_.v(b);for(var c=b.next();!c.done;c=b.next())(c=(c=c.value)&&c.media)&&c.tracks&&c.tracks.length&&oX(c.tracks)}return a};
126
- _.r.Mn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.Pm;var b=jX().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.h||typeof c!==_.h||typeof e!==_.h||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.h&&a(b,d,c)&&this.m.seek(b))}_.Ro(this.m)}};_.r.Fk=function(a){this.w.forEach(function(b){return b(a.data)})};_.K(AV,gX);gX.prototype.getQueueManager=gX.prototype.getQueueManager;
127
- gX.prototype.setQueue=gX.prototype.Ro;gX.prototype.updateContentMetadata=gX.prototype.lp;gX.prototype.setContentMetadata=gX.prototype.pc;gX.prototype.getContentMetadata=gX.prototype.Sb;gX.prototype.isApiReady=gX.prototype.Ed;gX.prototype.sendMessage=gX.prototype.sendMessage;gX.prototype.removeMessageListener=gX.prototype.removeMessageListener;gX.prototype.addMessageListener=gX.prototype.addMessageListener;gX.prototype.off=gX.prototype.off;gX.prototype.on=gX.prototype.on;
128
- gX.prototype.setLoadRequestDataInterceptor=gX.prototype.Po;gX.prototype.setPlayerConfigInterceptor=gX.prototype.Ne;gX.prototype.stop=gX.prototype.stop;gX.prototype.start=gX.prototype.start;gX.prototype.init=gX.prototype.init;gX.getInstance=iX;var hX=null;_.r=qX.prototype;_.r.load=function(){return _.I(function(a){_.A(a)})};_.r.Ab=function(){return!0};_.r.Nc=function(){};_.r.pb=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};_.r.skip=function(){var a=this.h.a;a&&this.h.sendMessage(DV,{type:"SKIP_AD",requestId:OV(),mediaSessionId:a.mediaSessionId})};_.r.getAdVolume=function(){return this.h.getVolume()||0};_.r.Oa=function(a){this.h.setVolume(a)};_.r.setMuted=function(a){this.h.setMuted(a)};_.r.isMuted=function(){return!!this.h.isMuted()};
129
- _.r.jc=function(){return this.a?this.a.isPlayingBreak:!1};_.r.isPaused=function(){return this.a&&this.a.isPlayingBreak?this.a.isPaused:!1};_.r.getPosition=function(){var a=-1,b=this.h.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.h&&(a=b));return a};_.r.Kc=function(){return!0};_.r.xc=function(){var a=this;return _.I(function(b){a.j.release();_.A(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.pb()};_.r.resume=function(){this.Ab()};
130
- _.r.eo=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.Q(_.Fc,{adsTimeline:new JW(a.breaks)})));break;case "isPlayingBreak":a.value?rX(this,_.jc):(rX(this,_.nc,this.f),rX(this,_.Cc,this.f),this.f=null,rX(this,_.kc));break;case "isPaused":this.f&&(a.value?rX(this,_.xc):rX(this,_.zc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(rX(this,_.nc,this.f),rX(this,_.Cc,this.f),this.f=sX(this),rX(this,_.Bc,this.f)));break;
131
- default:this.f||(this.f=sX(this))&&rX(this,_.Bc,this.f)}};qX.prototype.resume=qX.prototype.resume;qX.prototype.pause=qX.prototype.pause;qX.prototype.getVolume=qX.prototype.getVolume;qX.prototype.setVolume=qX.prototype.setVolume;qX.prototype.getPosition=qX.prototype.getPosition;qX.prototype.skip=qX.prototype.skip;tX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};tX.prototype.a=function(a,b){return a.namespace()!==_.xd?!1:!(!b||!b.ima)};tX.prototype.create=function(a){return new qX(a.a)};uX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};uX.prototype.a=function(a,b){return iX().Ig()?!(!b||!b.ima):!1};uX.prototype.create=function(a){return new LW(a)};_.K("clpp.cast.createCastQueue",function(){vX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(vX,cast.framework.QueueBase);vX.prototype.initialize=function(a){var b=a.queueData;b||(b=new cast.framework.messages.QueueData,b.name="queue",b.description="queue",b.items=[{media:a.media}],b.startTime=a.currentTime);return b};return new vX});_.ei(new tX);_.ei(new uX);};
111
+ _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return UV};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(QV)};_.r.onError=function(a){this.trigger(new _.Q(_.qe,{detail:a}))};_.r.canPlay=function(){return _.sj()?2:0};
112
+ _.r.Nk=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=bW(this.getStats());var b=vX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.h&&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&&
113
+ (!e||e&&f)){d=vX().getStartAbsoluteTime();if(typeof d===_.h){b.startAbsoluteTime=d;var k;f?k=new cast.framework.messages.GenericMediaMetadata:k=b.metadata;k.sectionStartAbsoluteTime=d;b.metadata=k}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};
114
+ _.r.uk=function(a,b){var c=null,d=b;a.media.customData&&(c=cW(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=cW(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=cW(a.media.customData.playerConfiguration));var g=e&&e.LiveConfiguration;g=g?0===g.liveEdgeLatencyMs:!1;e=!(!e||!e.lowLatencyMode);d=null!=f&&f.lowLatencyMode||g||e?wX(d,{streaming:{lowLatencyMode:!0}}):d;if(!c)return d;f=c.chromecast||null;e=c.abr||null;g=d;e&&typeof e.defaultBandwidthEstimate===
115
+ _.h?g.initialBandwidth=e.defaultBandwidthEstimate:g.initialBandwidth=void 0;zX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=dW(g,QX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=dW(c,RX));_.N.Zb(e)&&(d=wX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=AX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new uX,_.Qo(a,this.f),this.m=a,this.l.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.mu?_.y(c,$V(b.m),0):c.C(0)})}))};
116
+ _.r.start=function(a){var b=this;if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var c=DX(),d=DX().getPlayerManager(),e=new cast.framework.CastReceiverOptions;a&&null!=a.useShakaForHls&&(e.useShakaForHls=a.useShakaForHls);e.customNamespaces={};e.customNamespaces[WV]=cast.framework.system.MessageType.JSON;e.customNamespaces[XV]=cast.framework.system.MessageType.JSON;a=new cast.framework.PlaybackConfig;a.manifestHandler=this.mn.bind(this);a.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};
117
+ a.enableSmoothLiveRefresh=!0;e.playbackConfig=a;if(a=this.m&&this.m.getSurface().getMedia())e.mediaElement=a;e.disableIdleTimeout=!0;e.maxInactivity=Infinity;this.h&&(e.queue=this.h);d.setMessageInterceptor(cast.framework.messages.MessageType.QUEUE_UPDATE,function(f){b.g.info("QUEUE_UPDATE message received",f);var g=b.getQueueManager();if(!g)return f;g=g.getCurrentItem();return g?(g=g.customData)&&!1===g.skippable?null:f:f});d.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.ln.bind(this));
118
+ d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.pn.bind(this));d.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);d.addEventListener(cast.framework.events.EventType.MEDIA_STATUS,this.Pk.bind(this));c.start(e);c.addCustomMessageListener(WV,this.B);this.l.on(document,_.Zg,function(){var f={type:"event",name:_.Zg,visible:!document.hidden};DX().sendCustomMessage(XV,void 0,f)})}};
119
+ _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=DX();DX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);a.removeCustomMessageListener(WV,this.B);a.stop();this.j=this.h=this.m=this.f=null}};_.r.Ye=function(a){this.o=a};_.r.Zo=function(a){this.A=a};_.r.on=function(a,b){DX().addEventListener(a,b)};_.r.off=function(a,b){DX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.ue&&this.w.add(a)};
120
+ _.r.removeMessageListener=function(a){typeof a===_.ue&&this.w["delete"](a)};_.r.sendMessage=function(a,b){DX().sendCustomMessage(WV,b,a)};_.r.Od=function(){return this.a};_.r.Sg=function(){return this.a};_.r.Vb=function(){return EX()};_.r.uc=function(a){FX(this,a)};_.r.up=function(a){var b=EX(),c=null;a?c=Object.assign({},b,a):c=b;FX(this,c)};_.r.ap=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return DX().getPlayerManager().getQueueManager()};
121
+ _.r.Pk=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,DX().sendCustomMessage(WV,void 0,{type:PV,index:a})))};
122
+ _.r.mn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return HX(this,a);try{var b=(new DOMParser).parseFromString(a,_.vg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=DX();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===_.Tg||g===_.Sc){g=e[f].getAttribute(_.Ue);for(var k=e[f].getElementsByTagName(_.Ab),l=
123
+ k.length-1;0<=l;--l){var m=k[l].getAttribute(_.Ue)||g,n=k[l].getAttribute(_.Fd),p=k[l].getAttribute(_.hh)||void 0,q=k[l].getAttribute(_.ve)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(k[l])}e[f].getElementsByTagName(_.Ab).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ka).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Jb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=DX();c=a.getElementsByTagName("StreamIndex");
124
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Tg){e=c[d].getElementsByTagName(_.yb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.eb)||void 0,k=e[f].getAttribute(_.db)||void 0,void 0!==g&&(g=+g),void 0!==k&&(k=+k),b.canDisplayType(_.Vg,void 0,g,k)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.yb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
125
+ _.r.ln=function(a){var b=this,c,d,e,f,g,k;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=cW(c.media.customData.playerConfiguration));if(!b.m||!d){l.C(2);break}if(!b.o){l.C(3);break}return _.y(l,Promise.resolve(b.o(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.C(5);break}return _.y(l,iX(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.h&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.C(7);
126
+ break}b.f.D=!0;return _.y(l,_.$o(b.m,d),8);case 8:return _.y(l,_.ap(b.m),9);case 9:f=b.m.ab(),c.media.contentId=f.url,c.media.contentType=f.type,f.xc&&(c.media.hlsVideoSegmentFormat=fW(f.xc,_.kt)),f.wb&&(c.media.hlsSegmentFormat=fW(f.wb,_.X));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.h){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.A){l.C(10);break}return _.y(l,Promise.resolve(b.A(c)),
127
+ 11);case 11:(k=l.f)&&(c=k);case 10:return l["return"](c)}})};_.r.pn=function(a){var b=a.media;b&&b.tracks&&b.tracks.length&&IX(b.tracks);if((b=a.items)&&b.length){b=_.v(b);for(var c=b.next();!c.done;c=b.next())(c=(c=c.value)&&c.media)&&c.tracks&&c.tracks.length&&IX(c.tracks)}return a};
128
+ _.r.Vn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.Ym;var b=DX().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.h||typeof c!==_.h||typeof e!==_.h||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.h&&a(b,d,c)&&this.m.setPosition(b))}_.Vo(this.m)}};_.r.Ok=function(a){this.w.forEach(function(b){return b(a.data)})};_.K(VV,AX);AX.prototype.getQueueManager=AX.prototype.getQueueManager;
129
+ AX.prototype.setQueue=AX.prototype.ap;AX.prototype.updateContentMetadata=AX.prototype.up;AX.prototype.setContentMetadata=AX.prototype.uc;AX.prototype.getContentMetadata=AX.prototype.Vb;AX.prototype.isApiReady=AX.prototype.Od;AX.prototype.sendMessage=AX.prototype.sendMessage;AX.prototype.removeMessageListener=AX.prototype.removeMessageListener;AX.prototype.addMessageListener=AX.prototype.addMessageListener;AX.prototype.off=AX.prototype.off;AX.prototype.on=AX.prototype.on;
130
+ AX.prototype.setLoadRequestDataInterceptor=AX.prototype.Zo;AX.prototype.setPlayerConfigInterceptor=AX.prototype.Ye;AX.prototype.stop=AX.prototype.stop;AX.prototype.start=AX.prototype.start;AX.prototype.init=AX.prototype.init;AX.getInstance=CX;var BX=null;_.r=KX.prototype;_.r.load=function(){return _.I(function(a){_.A(a)})};_.r.Cb=function(){return!0};_.r.Uc=function(){};_.r.rb=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};_.r.skip=function(){var a=this.h.a;a&&this.h.sendMessage(YV,{type:"SKIP_AD",requestId:iW(),mediaSessionId:a.mediaSessionId})};_.r.getAdVolume=function(){return this.h.getVolume()||0};_.r.Pa=function(a){this.h.setVolume(a)};_.r.setMuted=function(a){this.h.setMuted(a)};_.r.isMuted=function(){return!!this.h.isMuted()};
131
+ _.r.Ab=function(){return this.a?this.a.isPlayingBreak:!1};_.r.isPaused=function(){return this.a&&this.a.isPlayingBreak?this.a.isPaused:!1};_.r.getPosition=function(){var a=-1,b=this.h.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.h&&(a=b));return a};_.r.Rc=function(){return!0};_.r.Cc=function(){var a=this;return _.I(function(b){a.j.release();_.A(b)})};_.r.setVolume=function(a){this.Pa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.rb()};_.r.resume=function(){this.Cb()};
132
+ _.r.oo=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.Q(_.Fc,{adsTimeline:new cX(a.breaks)})));break;case "isPlayingBreak":a.value?LX(this,_.ic):(LX(this,_.mc,this.f),LX(this,_.Cc,this.f),this.f=null,LX(this,_.jc));break;case "isPaused":this.f&&(a.value?LX(this,_.xc):LX(this,_.zc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(LX(this,_.mc,this.f),LX(this,_.Cc,this.f),this.f=MX(this),LX(this,_.Bc,this.f)));break;
133
+ default:this.f||(this.f=MX(this))&&LX(this,_.Bc,this.f)}};KX.prototype.resume=KX.prototype.resume;KX.prototype.pause=KX.prototype.pause;KX.prototype.getVolume=KX.prototype.getVolume;KX.prototype.setVolume=KX.prototype.setVolume;KX.prototype.getPosition=KX.prototype.getPosition;KX.prototype.skip=KX.prototype.skip;NX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};NX.prototype.a=function(a,b){return a.namespace()!==_.xd?!1:!(!b||!b.ima)};NX.prototype.create=function(a){return new KX(a.a)};OX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};OX.prototype.a=function(a,b){return CX().Sg()?!(!b||!b.ima):!1};OX.prototype.create=function(a){return new eX(a)};_.K("clpp.cast.createCastQueue",function(){PX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(PX,cast.framework.QueueBase);PX.prototype.initialize=function(a){var b=a.queueData;b||(b=new cast.framework.messages.QueueData,b.name="queue",b.description="queue",b.items=[{media:a.media}],b.startTime=a.currentTime);return b};return new PX});_.ki(new NX);_.ki(new OX);};
132
134
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
133
135
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
134
136
  else{_=this.clpp._;(f.call(g,this));}