@castlabs/prestoplay 6.34.0-beta.1 → 6.35.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +8 -2
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +18 -18
  5. package/cjs/cl.cast.js +127 -127
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +601 -597
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +100 -100
  10. package/cjs/cl.externs.js +37 -38
  11. package/cjs/cl.freewheel.js +26 -26
  12. package/cjs/cl.hls.js +76 -76
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +26 -26
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +351 -352
  18. package/cjs/cl.muxdata.js +14 -14
  19. package/cjs/cl.onboard.js +4 -4
  20. package/cjs/cl.persistent.js +14 -14
  21. package/cjs/cl.playlist.js +5 -5
  22. package/cjs/cl.simid.js +16 -16
  23. package/cjs/cl.smooth.js +71 -71
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +68 -68
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +11 -11
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +3 -3
  32. package/cjs/cl.youbora.js +39 -39
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +14 -14
  36. package/cl.cast.js +98 -98
  37. package/cl.conviva.js +28 -27
  38. package/cl.core.js +477 -473
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +89 -89
  41. package/cl.externs.js +37 -38
  42. package/cl.freewheel.js +20 -20
  43. package/cl.hls.js +82 -82
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +19 -19
  47. package/cl.mediatailor.js +2 -2
  48. package/cl.mse.js +299 -301
  49. package/cl.muxdata.js +12 -12
  50. package/cl.onboard.js +5 -5
  51. package/cl.persistent.js +10 -10
  52. package/cl.playlist.js +5 -5
  53. package/cl.simid.js +14 -14
  54. package/cl.smooth.js +60 -60
  55. package/cl.thumbnails.js +17 -17
  56. package/cl.tizen.js +55 -55
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +7 -7
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +31 -31
  64. package/package.json +1 -1
  65. package/typings.d.ts +24 -125
package/cjs/cl.cast.js CHANGED
@@ -1,138 +1,138 @@
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.hd(_.Ye),2):_.x(b,a.hd(_.Xe),0)})},GV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.pe){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Te?"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}})},HV=function(a){if(typeof a!==_.gg)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:"Infinity"===c?Infinity:c})}catch(b){return a}},
4
- IV=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},{})},JV=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=_.Im(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.Tk(a.url);return _.x(q,c.fetch(l).U,3)}2!=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,
5
- mimeType:g});return q["return"](e)})},KV=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 _.Og:return d.FMP4;case _.Ng:return b===_.fm?d.MPEG2_TS:c.TS;case _.Tc:return c.AAC;case _.Uc:return c.AC3;case _.Vc:return c.E_AC3;
6
- case "audio/mpeg":return c.MP3;case _.Wc:return c.FMP4}},MV=function(a){a=void 0===a?LV: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;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new k;case c.AUDIOBOOK_CHAPTER:return new b;
7
- default:return new d}},NV=function(){return Math.round(1E3*Math.random())},OV=function(a,b){this.log=new _.L(b);this.player=a;this.j=null;this.l=this.f=0;this.h=2;this.B=Date.now();this.A=-1},PV=function(a){OV.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.qc.bind(this)},QV=function(){this.g=new _.L("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=
8
- function(a,b){var c=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!==_.dm){var e=a.wa();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===_.dm&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,
9
- function(){UV(a,b)},function(f){a.g.debug(rV,f)}))},UV=function(a,b){b===_.em?a.a.trigger(new _.R(_.Zc)):b===_.dm&&a.a.trigger(new _.R(_.pg))},ZV=function(a,b,c,d){_.kn.call(this);this.g=new _.L(_.wd);this.X=a;this.w=new _.Yh(b);this.W=c;this.na=d;this.j=this.H=_.rn();this.D=[];this.B=0;this.J=new _.Tl;this.a=null;this.f=!1;this.M=new _.ml;this.A=!1;this.Aa="";this.vb=1E6;this.h=new QV;this.h.initialize(this);this.l=new PV(this);this.G=new _.ki;this.I=null;this.L=new Set;this.P=this.Fn.bind(this);
10
- this.Fa=this.co.bind(this);this.ha=this.Tn.bind(this);this.T=this.Mn.bind(this);this.ba=this.Ln.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.Fa)),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.na=null;_.z(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=MV(aW[b]);return Object.assign(b,
12
- a)},cW=function(a){var b=void 0===b?LV: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.Ik.bind(a));a.G.on(b,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
13
- a.Sn.bind(a));a.f=!0;a.M.resolve();a.w.rh();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.Fa);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 _.R(_.Fe)))},iW=function(a){return _.I(function(b){return a.Da()?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,A,D,B,E,C;return _.I(function(K){switch(K.a){case 1:if(!a.f)return K["return"]();
15
- c=chrome.cast.media.StreamType;d=_.bw;return _.x(K,iW(a),2);case 2:if(!b)return K["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.videoMimeType;m=k.audioMimeType;g.hlsVideoSegmentFormat=KV(l,d.VIDEO);g.hlsSegmentFormat=KV(m,d.AUDIO);if(!b.Ka){K.C(3);break}if(!a.K){K.C(4);break}return _.x(K,Promise.resolve(a.K(b.Ka)),5);case 5:if(n=K.f)b.Ka=n;case 4:a.j=b.Ka;
16
- a.D=_.Oq(a.j);a.B=a.D.findIndex(function(P){return P.url===b.source.url});if(!b.Ka.remoteTextTracks){K.C(6);break}return _.x(K,Promise.all(b.Ka.remoteTextTracks.map(a.Ul.bind(a))),7);case 7:p=K.f,g.tracks=p.filter(function(P){return P}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:GV(b.Ka)};case 3:q=a.Ub()||{};t=cW(q.metadataType);typeof b.bh===_.h&&(u={metadataType:t,sectionStartAbsoluteTime:b.bh});b.source.name&&(y={metadataType:t,
17
- title:b.source.name});A=dW(q);if(D=bW(Object.assign({},u,y,A)))g.metadata=D;B=new chrome.cast.media.LoadRequest(g);(E=b.queueData)&&E.items&&0<E.items.length&&(C=new chrome.cast.media.QueueData,C.items=E.items,C.startIndex=E.startIndex,B.queueData=C);typeof b.autoplay===_.bd&&(B.autoplay=b.autoplay);typeof b.currentTime===_.h&&(B.currentTime=b.currentTime);return _.x(K,f.loadMedia(B),8);case 8:null!=b.Ka.muted&&a.setMuted(b.Ka.muted),null!=b.Ka.volume&&a.setVolume(b.Ka.volume),_.z(K)}})},kW=function(a,
18
- b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.h.wa())&&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(),bh: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);lW=!0;a=_.v(mW);for(b=a.next();!b.done;b=a.next())b=b.value,b()}},oW=function(a,b,c){_.kn.call(this);
19
- this.f=a;this.h=b;this.j=this.No;typeof c===_.pe&&(this.j=function(d,e){return c(_.Dq(d),e)});this.a=nW(this);this.g=new _.L(yV);this.forwardEventsTo(this.f)},nW=function(a){return new ZV(a.h,function(){a.trigger(new _.R(_.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.Jh&&(d.preferredAudioLanguage=c.Jh);c.Tj&&(d.preferredTextLanguage=c.Tj);_.It(a.f,
20
- null);a.trigger(new _.R("castingended"));a.j(b,d)},function(){return pW(a)})},pW=function(a){var b,c,d;return _.I(function(e){if(1==e.a){a.trigger(new _.R(_.hd));b=a.f.a;if(b===a.a||!a.a)return e["return"]();c=null!=a.f.$a();return _.x(e,a.f.release(),2)}_.It(a.f,a.a);if(!c)return e.C(0);_.Rt(a.f);return(d=a.f.getAdsManager())?_.x(e,d.load(),0):e.C(0)})},qW=function(a){OV.call(this,a,"clpp.cast.StateManager");this.I=this.Pk.bind(this);this.H=this.Ok.bind(this);this.w=this.On.bind(this);this.o=this.Dn.bind(this);
21
- this.K=this.Rk.bind(this);this.J=this.Qk.bind(this);this.L=this.ho.bind(this);this.G=this.Rn.bind(this);this.D=this.Nk.bind(this);this.a=this.Mk.bind(this)},rW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.kn.call(this);this.a=a.slice();this.f=b},sW=function(a){a.trigger(new _.R(_.wf))},uW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.kn.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"]();
22
- e=d.a.Vb();if(!e)return g["return"]();d.f=!0;_.F(g,2,3);return _.x(g,d.w(e),5);case 5:return _.x(g,d.m.open(Object.assign({},e.configuration,{autoplay:!0})),3);case 3:_.yh(g);d.f=!1;_.zh(g);break;case 2:throw f=_.H(g),f;}})};this.l=function(){tW(d)}},tW=function(a){yW(a);var b=Math.min(a.a.ze().length-1,a.a.getPosition()+1);a.a.setPosition(b)},yW=function(a){a.j||(a.a.on(_.vf,a.o),a.j=!0)},DW=function(a,b,c){var d=this;this.player=a;this.cc=new rW(c);this.Vd=new uW({open:this.player.open.bind(this.player),
23
- off:this.player.off.bind(this.player),on:this.player.on.bind(this.player)},this.cc,function(){return _.I(function(e){_.z(e)})});this.a=new oW(this.player,b,function(e,f){var g;return _.I(function(k){if(1==k.a)return g=d.cc.getPosition(),d.Vd.Nd(g),f.autoplay=!0,delete f.license,_.x(k,d.player.open(f),2);if(3!=k.a)return typeof f.currentTime!==_.h?k.C(3):_.x(k,d.player.setPosition(Math.max(f.currentTime-1,0)),3);d.player.play();_.z(k)})});this.f=function(e){e&&e.type===uV&&typeof e.index===_.h&&d.cc.setPosition(e.index)};
24
- this.a.addMessageListener(this.f)},IW=function(a){return a.map(function(b){var c={};c.media={contentId:b.configuration.source};c.customData={skippable:!1!==b.skippable};return c})},JW=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},KW=function(a){this.a=a},MW=function(a){this.m=a;this.a=null;this.j=this.Sk.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;LW().addEventListener(this.h,this.j)},QW=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);NW=!1;e=_.Tk(d);return _.x(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&
26
- f.data)if(g=_.S.ga(f.data),k=new DOMParser,l=k.parseFromString(g,_.og),l.getElementsByTagName("vmap:VMAP").length)OW.warn("VMAP detected."),a.vmapAdsRequest=PW(g);else if(l.getElementsByTagName("VAST").length){OW.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=PW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else OW.warn("Unsupported schema."),NW=!0;return _.G(n,0)}m=_.H(n);OW.warn("Failed to fetch an ad",m);NW=!0;
27
- _.z(n)})},PW=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},LW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},SW=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=RW(a,c))&&(d={ad:c});a.m.trigger(new _.R(b,d))}},TW=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},RW=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===_.gg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.gg&&(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 JW(d,e,b.index,b.total,f)}return c},UW=function(a){this.a=a;this.f=this.h.bind(this)},VW=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]},WW=function(a){var b=a.dashTimedMetadata,c=_.Dg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Cg)?_.Aj:_.Ag,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},XW=function(){this.g=new _.L("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=
30
- this.Eo.bind(this);this.a=this.f=null},YW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},$W=function(a){a.a=YW().getTextTracksManager();var b=a.a.getTracks();a.j=ZW(_.dm,b)},aX=function(a,b,c,d){c=_.Ej(c).filter(function(k){return k});var e=!1,f=[];b===_.em?f=a.getAudioTracks():b===_.dm&&(f=a.ra());if(c=c.find(function(k){var l=_.Hk(k);return f.some(function(m){m=_.Hk(m.language||"");return _.Ik(l,m)})})){var g=_.Hk(c);c=f.filter(function(k){k=_.Hk(k.language||
31
- "");return _.Ik(g,k)});f=c.length?c:f;e=e||!!c.length}_.S.Of(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===_.em?a.La(e):b===_.dm&&a.jb(e))},ZW=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.bm(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 _.km(f.id,f));c.push(f)}return c},bX=function(){_.kn.call(this);this.g=new _.L(zV);this.h=this.w=_.rn();this.A=null;this.l=-1;this.G=new _.Tl;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},cX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},dX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},
33
- a,{shakaConfig:c})},gX=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=_.dl(d);if(e){var f=[_.Hd];_.Oq(a)[0].type!==_.Pc&&f.unshift(_.Jd);d.preferredDrmSystem===_.Hd&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Ua[g];k?(d=g===_.Jd?cast.framework.ContentProtection.WIDEVINE:g===_.Hd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,
34
- b.licenseUrl=k.licenseUrl,d={ldlDelay:0,customData:{}},eX(b,k,a,d),fX(b,k,a,d)):c()}else c()}else c()},eX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Tk({method:_.pb,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},fX=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=_.Xk(Object.assign({},f.headers),e.buffer,200,""),_.x(k,b.modifiers.licenseResponse(c,g,d),2)):k["return"](_.Vi(g.data))})}:a.licenseHandler=void 0},hX=function(){this.a=!1;this.g=new _.L(AV);this.f=this.m=null;this.w=new Set;this.D=this.Qn.bind(this);this.B=this.Kk.bind(this);this.o=null;this.l=new _.ki;this.j=this.h=this.A=null},jX=function(){return iX||(iX=new hX)},kX=function(){return cast.framework.CastReceiverContext.getInstance()},
36
- lX=function(){var a=kX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},mX=function(a,b){var c=kX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;kX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},oX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=kX();c=(kX().getPlayerManager().getMediaInformation()||
37
- {}).hlsVideoSegmentFormat===c.FMP4?_.Og:_.Ng;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=nX(k,_.xa),m=nX(k,_.wb),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")},nX=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},pX=function(a){a=_.v(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c={};b.customData&&_.N.Yb(b.customData)&&(c=b.customData);b.roles&&(c.roles=b.roles);b.audioTrackInfo&&(c.audioTrackInfo=b.audioTrackInfo);_.N.Yb(c)&&(b.customData=c)}},rX=function(a){this.h=a;this.a=null;this.j=new _.ki;this.f=null;qX(this)},qX=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.ko.bind(a));_.z(b)})},sX=function(a,b,c){var d=null;c&&(d={ad:c});a.h.trigger(new _.R(b,d))},tX=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 JW(b,l,f,g,a)},uX=function(){},vX=function(){},wX,LV=0,aW={GENERIC:LV,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},xX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),
41
- yX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.r=OV.prototype;_.r.release=function(){this.Ca(0)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.Q&&this.Ca(3)};
42
- _.r.Ca=function(a){if(a!==this.f)if(3===this.f&&0!==a)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;6===this.f?(this.A=b,this.player.trigger(new _.R(_.dd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):6===this.l&&this.player.trigger(new _.R(_.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&&_.Fq(this.j,this.f);this.player.trigger(new _.R(_.tf,
43
- {detail:a}))}};_.w(PV,OV);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,OV.prototype.destroy.call(a),0)})};PV.prototype.Ca=function(a){var b=this.player.o;b&&b.isPlayingBreak||OV.prototype.Ca.call(this,a)};
44
- PV.prototype.qc=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.Ca(11);break;case chrome.cast.media.IdleReason.ERROR:this.Ca(3);break;default:this.Ca(0)}break;case chrome.cast.media.PlayerState.PLAYING:this.Ca(8);break;case chrome.cast.media.PlayerState.PAUSED:this.Ca(10);break;case chrome.cast.media.PlayerState.BUFFERING:this.Ca(6)}};_.w(QV,_.Km);_.r=QV.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
45
- _.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=_.fm;break;case chrome.cast.media.TrackType.AUDIO:c=_.em;break;case chrome.cast.media.TrackType.TEXT:c=_.dm}c=new _.bm(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;
46
- 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 _.km(c.id,c));return c}):[],this.a.trigger(new _.R(_.vg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return SV(this,_.fm)};_.r.getAudioTracks=function(){return SV(this,_.em)};_.r.ra=function(){return SV(this,_.dm)};
47
- _.r.sa=function(){var a=this.Qa();return a?a.renditions[0]:null};_.r.Ya=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.gb=function(){var a=this.wa();return a?a.renditions[0]:null};_.r.Gb=function(){return this.f[_.fm]||null};_.r.Wb=function(){return this.f[_.em]||null};_.r.Xb=function(){return this.f[_.dm]||null};_.r.Qa=function(){return TV(this,_.fm)};_.r.qa=function(){return TV(this,_.em)};_.r.wa=function(){return TV(this,_.dm)};_.r.Pb=function(a){VV(this,_.fm,a)};
48
- _.r.La=function(a){VV(this,_.em,a)};_.r.jb=function(a){VV(this,_.dm,a)};_.r.Cb=function(a){this.Pb(a&&a.track)};_.r.Nb=function(a){this.La(a&&a.track)};_.r.Ob=function(a){this.jb(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.z(a)})};_.r.xa=function(){return!0};QV.prototype.isAbrEnabled=QV.prototype.xa;QV.prototype.addTextTrack=QV.prototype.addTextTrack;QV.prototype.setTextRendition=QV.prototype.Ob;QV.prototype.setAudioRendition=QV.prototype.Nb;QV.prototype.setVideoRendition=QV.prototype.Cb;
49
- QV.prototype.setTextTrack=QV.prototype.jb;QV.prototype.setAudioTrack=QV.prototype.La;QV.prototype.setVideoTrack=QV.prototype.Pb;QV.prototype.getTextTrack=QV.prototype.wa;QV.prototype.getAudioTrack=QV.prototype.qa;QV.prototype.getVideoTrack=QV.prototype.Qa;QV.prototype.getLoadingTextRendition=QV.prototype.Xb;QV.prototype.getLoadingAudioRendition=QV.prototype.Wb;QV.prototype.getLoadingVideoRendition=QV.prototype.Gb;QV.prototype.getTextRendition=QV.prototype.gb;QV.prototype.getAudioRendition=QV.prototype.Ya;
50
- 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,_.kn);_.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(_.lb)};_.r.appendLoad=function(){return Promise.reject(_.lb)};
51
- _.r.seekWith=function(){return Promise.reject(_.lb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.I(function(a){_.z(a)})};_.r.We=function(a){this.K=a};_.r.Pd=function(){return this.f};_.r.Da=function(){return this.A};_.r.Hg=function(){return this.Aa};
2
+ var f=function(window){var IV="Cannot seek during ads playout.",JV="Cannot switch track",KV="Media session does not exist.",LV="No receivers available",MV="QUEUE_ITEM_CHANGED",NV="Reset ABR functionality not available on cast.",OV="SDK not yet ready",PV="Sender is destroyed.",QV="clpp.cast.CastProxy",RV="clpp.cast.Player",SV="clpp.cast.Receiver",TV="urn:x-cast:castlabs",UV="urn:x-cast:castlabs:int",VV="urn:x-cast:com.google.cast.media",WV="volume control is not supported",XV=function(a){return _.I(function(b){return 1==
3
+ b.a?_.x(b,a.hd(_.Ze),2):_.x(b,a.hd(_.Ye),0)})},YV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.pe){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ue?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.h?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},ZV=function(a){if(typeof a!==_.hg)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:"Infinity"===c?Infinity:c})}catch(b){return a}},
4
+ $V=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},{})},aW=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=_.Mm(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.Wk(a.url);return _.x(q,c.fetch(l).U,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Wi(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,
5
+ mimeType:g});return q["return"](e)})},bW=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 _.Og:return d.FMP4;case _.Mg:return b===_.jm?d.MPEG2_TS:c.TS;case _.Sc:return c.AAC;case _.Tc:return c.AC3;case _.Uc:return c.E_AC3;
6
+ case "audio/mpeg":return c.MP3;case _.Vc:return c.FMP4}},dW=function(a){a=void 0===a?cW:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.O(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,k=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new k;case c.AUDIOBOOK_CHAPTER:return new b;
7
+ default:return new d}},eW=function(){return Math.round(1E3*Math.random())},fW=function(a,b){this.log=new _.L(b);this.player=a;this.j=null;this.l=this.f=0;this.h=2;this.B=Date.now();this.A=-1},gW=function(a){fW.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.rc.bind(this)},hW=function(){this.g=new _.L("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},iW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},kW=
8
+ function(a,b){var c=iW(a);return jW(a,b).find(function(d){return c.includes(d.id)})||null},jW=function(a,b){return a.h.filter(function(c){return c.type===b})},mW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.hm){var e=a.xa();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;lW(a,b)},function(f){a.f[b]=null;a.g.debug(JV,f)})}else b===_.hm&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,
9
+ function(){lW(a,b)},function(f){a.g.debug(JV,f)}))},lW=function(a,b){b===_.im?a.a.trigger(new _.R(_.Zc)):b===_.hm&&a.a.trigger(new _.R(_.pg))},qW=function(a,b,c,d){_.rn.call(this);this.g=new _.L(_.wd);this.X=a;this.w=new _.oi(b);this.W=c;this.na=d;this.j=this.H=_.yn();this.D=[];this.B=0;this.J=new _.Xl;this.a=null;this.f=!1;this.M=new _.pl;this.A=!1;this.Ba="";this.wb=1E6;this.h=new hW;this.h.initialize(this);this.l=new gW(this);this.G=new _.gi;this.I=null;this.L=new Set;this.P=this.In.bind(this);
10
+ this.Fa=this.ho.bind(this);this.ha=this.Wn.bind(this);this.T=this.Pn.bind(this);this.ba=this.On.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(){nW(!0)},0)}});oW(this);pW.add(this)},rW=function(a){var b,c;return _.I(function(d){if(1==d.a)return a.G.release(),pW["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.Fa)),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.na=null;_.z(d)})},tW=function(a){if(!a)return null;a:{var b=a.metadataType;var c=Object.entries(sW);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=dW(sW[b]);return Object.assign(b,
12
+ a)},uW=function(a){var b=void 0===b?cW:b;return Object.values(sW).includes(a)?a:b},vW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},oW=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.Jk.bind(a));a.G.on(b,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
13
+ a.Vn.bind(a));a.f=!0;a.M.resolve();a.w.sh();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.Fa);wW&&a.w.ia(.02)}},xW=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},zW=function(a,b){yW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(TV,a.T);b.addMessageListener(UV,a.ba)},yW=function(a,b){a.a=b;a.a&&(a.l&&a.l.init(),a.trigger(new _.R(_.Fe)))},AW=function(a){return _.I(function(b){return a.Ea()?b.C(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},BW=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,t,u,y,A,D,B,E,C;return _.I(function(K){switch(K.a){case 1:if(!a.f)return K["return"]();
15
+ c=chrome.cast.media.StreamType;d=_.uw;return _.x(K,AW(a),2);case 2:if(!b)return K["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.videoMimeType;m=k.audioMimeType;g.hlsVideoSegmentFormat=bW(l,d.VIDEO);g.hlsSegmentFormat=bW(m,d.AUDIO);if(!b.Ka){K.C(3);break}if(!a.K){K.C(4);break}return _.x(K,Promise.resolve(a.K(b.Ka)),5);case 5:if(n=K.f)b.Ka=n;case 4:a.j=b.Ka;
16
+ a.D=_.Kq(a.j);a.B=a.D.findIndex(function(P){return P.url===b.source.url});if(!b.Ka.remoteTextTracks){K.C(6);break}return _.x(K,Promise.all(b.Ka.remoteTextTracks.map(a.Vl.bind(a))),7);case 7:p=K.f,g.tracks=p.filter(function(P){return P}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:YV(b.Ka)};case 3:q=a.Vb()||{};t=uW(q.metadataType);typeof b.dh===_.h&&(u={metadataType:t,sectionStartAbsoluteTime:b.dh});b.source.name&&(y={metadataType:t,
17
+ title:b.source.name});A=vW(q);if(D=tW(Object.assign({},u,y,A)))g.metadata=D;B=new chrome.cast.media.LoadRequest(g);(E=b.queueData)&&E.items&&0<E.items.length&&(C=new chrome.cast.media.QueueData,C.items=E.items,C.startIndex=E.startIndex,B.queueData=C);typeof b.autoplay===_.bd&&(B.autoplay=b.autoplay);typeof b.currentTime===_.h&&(B.currentTime=b.currentTime);return _.x(K,f.loadMedia(B),8);case 8:null!=b.Ka.muted&&a.setMuted(b.Ka.muted),null!=b.Ka.volume&&a.setVolume(b.Ka.volume),_.z(K)}})},CW=function(a,
18
+ b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.h.xa())&&d.language&&(a.j.preferredTextLanguage=d.language);(e=a.h.qa())&&e.language&&(a.j.preferredAudioLanguage=e.language);return _.x(f,BW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),dh:a.getPresentationStartTime(),autoplay:b,Ka:a.j}),0)})},nW=function(a){if(a){a=_.v(pW);for(var b=a.next();!b.done;b=a.next())oW(b.value);DW=!0;a=_.v(EW);for(b=a.next();!b.done;b=a.next())b=b.value,b()}},GW=function(a,b,c){_.rn.call(this);
19
+ this.f=a;this.h=b;this.j=this.Qo;typeof c===_.pe&&(this.j=function(d,e){return c(_.zq(d),e)});this.a=FW(this);this.g=new _.L(QV);this.forwardEventsTo(this.f)},FW=function(a){return new qW(a.h,function(){a.trigger(new _.R(_.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.Kh&&(d.preferredAudioLanguage=c.Kh);c.Uj&&(d.preferredTextLanguage=c.Uj);_.Qt(a.f,
20
+ null);a.trigger(new _.R("castingended"));a.j(b,d)},function(){return HW(a)})},HW=function(a){var b,c,d;return _.I(function(e){if(1==e.a){a.trigger(new _.R(_.hd));b=a.f.a;if(b===a.a||!a.a)return e["return"]();c=null!=a.f.bb();return _.x(e,a.f.release(),2)}_.Qt(a.f,a.a);if(!c)return e.C(0);_.Zt(a.f);return(d=a.f.getAdsManager())?_.x(e,d.load(),0):e.C(0)})},IW=function(a){fW.call(this,a,"clpp.cast.StateManager");this.I=this.Qk.bind(this);this.H=this.Pk.bind(this);this.w=this.Rn.bind(this);this.o=this.Gn.bind(this);
21
+ this.K=this.Sk.bind(this);this.J=this.Rk.bind(this);this.L=this.ko.bind(this);this.G=this.Un.bind(this);this.D=this.Ok.bind(this);this.a=this.Nk.bind(this)},JW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.rn.call(this);this.a=a.slice();this.f=b},KW=function(a){a.trigger(new _.R(_.xf))},MW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.rn.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"]();
22
+ e=d.a.Wb();if(!e)return g["return"]();d.f=!0;_.F(g,2,3);return _.x(g,d.w(e),5);case 5:return _.x(g,d.m.open(Object.assign({},e.configuration,{autoplay:!0})),3);case 3:_.yh(g);d.f=!1;_.zh(g);break;case 2:throw f=_.H(g),f;}})};this.l=function(){LW(d)}},LW=function(a){QW(a);var b=Math.min(a.a.ze().length-1,a.a.getPosition()+1);a.a.setPosition(b)},QW=function(a){a.j||(a.a.on(_.wf,a.o),a.j=!0)},VW=function(a,b,c){var d=this;this.player=a;this.dc=new JW(c);this.Vd=new MW({open:this.player.open.bind(this.player),
23
+ off:this.player.off.bind(this.player),on:this.player.on.bind(this.player)},this.dc,function(){return _.I(function(e){_.z(e)})});this.a=new GW(this.player,b,function(e,f){var g;return _.I(function(k){if(1==k.a)return g=d.dc.getPosition(),d.Vd.Nd(g),f.autoplay=!0,delete f.license,_.x(k,d.player.open(f),2);if(3!=k.a)return typeof f.currentTime!==_.h?k.C(3):_.x(k,d.player.setPosition(Math.max(f.currentTime-1,0)),3);d.player.play();_.z(k)})});this.f=function(e){e&&e.type===MV&&typeof e.index===_.h&&d.dc.setPosition(e.index)};
24
+ this.a.addMessageListener(this.f)},$W=function(a){return a.map(function(b){var c={};c.media={contentId:b.configuration.source};c.customData={skippable:!1!==b.skippable};return c})},aX=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},bX=function(a){this.a=a},dX=function(a){this.m=a;this.a=null;this.j=this.Tk.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;cX().addEventListener(this.h,this.j)},hX=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);eX=!1;e=_.Wk(d);return _.x(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&
26
+ f.data)if(g=_.S.ga(f.data),k=new DOMParser,l=k.parseFromString(g,_.og),l.getElementsByTagName("vmap:VMAP").length)fX.warn("VMAP detected."),a.vmapAdsRequest=gX(g);else if(l.getElementsByTagName("VAST").length){fX.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=gX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else fX.warn("Unsupported schema."),eX=!0;return _.G(n,0)}m=_.H(n);fX.warn("Failed to fetch an ad",m);eX=!0;
27
+ _.z(n)})},gX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},cX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},jX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=iX(a,c))&&(d={ad:c});a.m.trigger(new _.R(b,d))}},kX=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},iX=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===_.hg&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.hg&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,k){return g.position-k.position}).findIndex(function(g){return g===e})));c=new aX(d,e,b.index,b.total,f)}return c},lX=function(a){this.a=a;this.f=this.h.bind(this)},mX=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]},nX=function(a){var b=a.dashTimedMetadata,c=_.Dg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Cg)?_.Bj:_.Ag,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},oX=function(){this.g=new _.L("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=
30
+ this.Ho.bind(this);this.a=this.f=null},pX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},rX=function(a){a.a=pX().getTextTracksManager();var b=a.a.getTracks();a.j=qX(_.hm,b)},sX=function(a,b,c,d){c=_.Fj(c).filter(function(k){return k});var e=!1,f=[];b===_.im?f=a.getAudioTracks():b===_.hm&&(f=a.ra());if(c=c.find(function(k){var l=_.Ik(k);return f.some(function(m){m=_.Ik(m.language||"");return _.Jk(l,m)})})){var g=_.Ik(c);c=f.filter(function(k){k=_.Ik(k.language||
31
+ "");return _.Jk(g,k)});f=c.length?c:f;e=e||!!c.length}_.S.Of(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===_.im?a.La(e):b===_.hm&&a.lb(e))},qX=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.fm(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 _.om(f.id,f));c.push(f)}return c},tX=function(){_.rn.call(this);this.g=new _.L(RV);this.h=this.w=_.yn();this.A=null;this.l=-1;this.G=new _.Xl;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},uX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},vX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},
33
+ a,{shakaConfig:c})},yX=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=_.gl(d);if(e){var f=[_.Hd];_.Kq(a)[0].type!==_.Pc&&f.unshift(_.Jd);d.preferredDrmSystem===_.Hd&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Wa[g];k?(d=g===_.Jd?cast.framework.ContentProtection.WIDEVINE:g===_.Hd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,
34
+ b.licenseUrl=k.licenseUrl,d={ldlDelay:0,customData:{}},wX(b,k,a,d),xX(b,k,a,d)):c()}else c()}else c()},wX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Wk({method:_.pb,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},xX=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=_.$k(Object.assign({},f.headers),e.buffer,200,""),_.x(k,b.modifiers.licenseResponse(c,g,d),2)):k["return"](_.Wi(g.data))})}:a.licenseHandler=void 0},zX=function(){this.a=!1;this.g=new _.L(SV);this.f=this.m=null;this.w=new Set;this.D=this.Tn.bind(this);this.B=this.Lk.bind(this);this.o=null;this.l=new _.gi;this.j=this.h=this.A=null},BX=function(){return AX||(AX=new zX)},CX=function(){return cast.framework.CastReceiverContext.getInstance()},
36
+ DX=function(){var a=CX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},EX=function(a,b){var c=CX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;CX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},GX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=CX();c=(CX().getPlayerManager().getMediaInformation()||
37
+ {}).hlsVideoSegmentFormat===c.FMP4?_.Og:_.Mg;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=FX(k,_.xa),m=FX(k,_.wb),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")},FX=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},HX=function(a){a=_.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)}},JX=function(a){this.h=a;this.a=null;this.j=new _.gi;this.f=null;IX(this)},IX=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.no.bind(a));_.z(b)})},KX=function(a,b,c){var d=null;c&&(d={ad:c});a.h.trigger(new _.R(b,d))},LX=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 aX(b,l,f,g,a)},MX=function(){},NX=function(){},OX,cW=0,sW={GENERIC:cW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},PX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),
41
+ QX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.r=fW.prototype;_.r.release=function(){this.Da(0)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.Q&&this.Da(3)};
42
+ _.r.Da=function(a){if(a!==this.f)if(3===this.f&&0!==a)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;6===this.f?(this.A=b,this.player.trigger(new _.R(_.dd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):6===this.l&&this.player.trigger(new _.R(_.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&&_.Bq(this.j,this.f);this.player.trigger(new _.R(_.uf,
43
+ {detail:a}))}};_.w(gW,fW);gW.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)};gW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,fW.prototype.destroy.call(a),0)})};gW.prototype.Da=function(a){var b=this.player.o;b&&b.isPlayingBreak||fW.prototype.Da.call(this,a)};
44
+ gW.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(11);break;case chrome.cast.media.IdleReason.ERROR:this.Da(3);break;default:this.Da(0)}break;case chrome.cast.media.PlayerState.PLAYING:this.Da(8);break;case chrome.cast.media.PlayerState.PAUSED:this.Da(10);break;case chrome.cast.media.PlayerState.BUFFERING:this.Da(6)}};_.w(hW,_.Om);_.r=hW.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
45
+ _.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=_.jm;break;case chrome.cast.media.TrackType.AUDIO:c=_.im;break;case chrome.cast.media.TrackType.TEXT:c=_.hm}c=new _.fm(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;
46
+ 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 _.om(c.id,c));return c}):[],this.a.trigger(new _.R(_.vg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return jW(this,_.jm)};_.r.getAudioTracks=function(){return jW(this,_.im)};_.r.ra=function(){return jW(this,_.hm)};
47
+ _.r.sa=function(){var a=this.Ra();return a?a.renditions[0]:null};_.r.$a=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.ib=function(){var a=this.xa();return a?a.renditions[0]:null};_.r.Gb=function(){return this.f[_.jm]||null};_.r.Xb=function(){return this.f[_.im]||null};_.r.Yb=function(){return this.f[_.hm]||null};_.r.Ra=function(){return kW(this,_.jm)};_.r.qa=function(){return kW(this,_.im)};_.r.xa=function(){return kW(this,_.hm)};_.r.Qb=function(a){mW(this,_.jm,a)};
48
+ _.r.La=function(a){mW(this,_.im,a)};_.r.lb=function(a){mW(this,_.hm,a)};_.r.Cb=function(a){this.Qb(a&&a.track)};_.r.Ob=function(a){this.La(a&&a.track)};_.r.Pb=function(a){this.lb(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.z(a)})};_.r.ya=function(){return!0};hW.prototype.isAbrEnabled=hW.prototype.ya;hW.prototype.addTextTrack=hW.prototype.addTextTrack;hW.prototype.setTextRendition=hW.prototype.Pb;hW.prototype.setAudioRendition=hW.prototype.Ob;hW.prototype.setVideoRendition=hW.prototype.Cb;
49
+ hW.prototype.setTextTrack=hW.prototype.lb;hW.prototype.setAudioTrack=hW.prototype.La;hW.prototype.setVideoTrack=hW.prototype.Qb;hW.prototype.getTextTrack=hW.prototype.xa;hW.prototype.getAudioTrack=hW.prototype.qa;hW.prototype.getVideoTrack=hW.prototype.Ra;hW.prototype.getLoadingTextRendition=hW.prototype.Yb;hW.prototype.getLoadingAudioRendition=hW.prototype.Xb;hW.prototype.getLoadingVideoRendition=hW.prototype.Gb;hW.prototype.getTextRendition=hW.prototype.ib;hW.prototype.getAudioRendition=hW.prototype.$a;
50
+ hW.prototype.getVideoRendition=hW.prototype.sa;hW.prototype.getTextTracks=hW.prototype.ra;hW.prototype.getAudioTracks=hW.prototype.getAudioTracks;hW.prototype.getVideoTracks=hW.prototype.getVideoTracks;_.w(qW,_.rn);_.r=qW.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(_.lb)};_.r.appendLoad=function(){return Promise.reject(_.lb)};
51
+ _.r.seekWith=function(){return Promise.reject(_.lb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.I(function(a){_.z(a)})};_.r.We=function(a){this.K=a};_.r.Pd=function(){return this.f};_.r.Ea=function(){return this.A};_.r.Ig=function(){return this.Ba};
52
52
  _.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);_.z(g)}})};
53
- _.r.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Pd())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.Da())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);})};
54
- _.r.Cf=function(){this.f&&this.Da()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.r.addMessageListener=function(a){typeof a===_.pe&&this.L.add(a)};_.r.removeMessageListener=function(a){typeof a===_.pe&&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()};
55
- _.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?11===this.getState():!1};
56
- _.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 _.R(_.Fg));b.a.seek(e,function(){b.trigger(new _.R(_.Eg));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};
53
+ _.r.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Pd())throw a.g.warn(OV),new _.O(1,8,8001,void 0);if(!wW)throw a.g.warn(LV),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,AW(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);})};
54
+ _.r.Cf=function(){this.f&&this.Ea()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.r.addMessageListener=function(a){typeof a===_.pe&&this.L.add(a)};_.r.removeMessageListener=function(a){typeof a===_.pe&&this.L["delete"](a)};_.r.play=function(){var a=this;return this.f?this.isEnded()?CW(this,!0):new Promise(function(b,c){if(!a.a)return c(KV);a.a.play(null,b,c)}):Promise.resolve()};
55
+ _.r.pause=function(){var a=this;return this.f?new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(KV);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?11===this.getState():!1};
56
+ _.r.seek=function(a){var b=this;return this.f?this.isEnded()?CW(this,!1,a):new Promise(function(c,d){b.a||d(KV);b.o.isPlayingBreak&&d(IV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.R(_.Fg));b.a.seek(e,function(){b.trigger(new _.R(_.Eg));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};
57
57
  _.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};
58
- _.r.setPlaybackRate=function(a){this.f&&this.a&&0<a&&this.sendMessage(DV,{type:"SET_PLAYBACK_RATE",requestId:NV(),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
+ _.r.setPlaybackRate=function(a){this.f&&this.a&&0<a&&this.sendMessage(VV,{type:"SET_PLAYBACK_RATE",requestId:eW(),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};
59
59
  _.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};
60
- _.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():0:0};_.r.getStats=function(){return this.f?this.a&&this.a.customData&&this.a.customData.stats?HV(this.a.customData.stats):_.Lq():_.Lq()};
61
- _.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.Pd())return b.g.warn(wV),e["return"]();if(!eW)return b.g.warn(tV),e["return"]();b.D=_.Oq(a);b.j=_.tn([b.H,a]);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.j.autoplay,Ka:b.j,videoMimeType:c.videoMimeType,audioMimeType:c.audioMimeType};return _.x(e,jW(b,d),0)})};_.r.getBufferInfo=function(){return new _.gn};_.r.getTrackManager=function(){return this.h};
60
+ _.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():0:0};_.r.getStats=function(){return this.f?this.a&&this.a.customData&&this.a.customData.stats?ZV(this.a.customData.stats):_.Hq():_.Hq()};
61
+ _.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.Pd())return b.g.warn(OV),e["return"]();if(!wW)return b.g.warn(LV),e["return"]();b.D=_.Kq(a);b.j=_.An([b.H,a]);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.j.autoplay,Ka:b.j,videoMimeType:c.videoMimeType,audioMimeType:c.audioMimeType};return _.x(e,BW(b,d),0)})};_.r.getBufferInfo=function(){return new _.on};_.r.getTrackManager=function(){return this.h};
62
62
  _.r.getConfiguration=function(){return this.j};_.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};
63
- _.r.resetAbr=function(){this.g.warn(vV)};_.r.onError=function(a){if(a&&(this.trigger(new _.R(_.le,{detail:a})),this.l))this.l.onError(a)};_.r.namespace=function(){return _.wd};_.r.canPlay=function(){return this.Pd()?2:0};_.r.Ub=function(){return this.I};_.r.sc=function(a){this.I=bW(a)};_.r.yg=function(){this.I=null};_.r.lh=function(a){if(this.f){var b=this.Ub()||{};a={metadataType:cW(b.metadataType),title:a};this.sc(Object.assign({},b,a))}};
64
- _.r.jh=function(a){if(this.f){var b=this.Ub()||{},c=cW(b.metadataType);a=new chrome.cast.Image(a);this.sc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.ih=function(a){if(this.f){var b=this.Ub()||{};this.sc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.kh=function(a){if(this.f){var b=this.Ub()||{};a={metadataType:cW(b.metadataType),releaseDate:a};this.sc(Object.assign({},b,a))}};
65
- _.r.Fn=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.rh()};
66
- _.r.co=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.Da()||(this.A=!0,hW(this,a.session),this.na());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Da()&&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,
67
- isLive:this.isLive()},currentTime:fW(this),Tj:d,Jh: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.Tn=function(a){this.g.debug("New media session",a.mediaSession);gW(this,a.mediaSession)};_.r.Sn=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.Mn=function(a,b){var c=HV(b);this.L.forEach(function(d){return d(c)})};
68
- _.r.Ln=function(a,b){var c=HV(b);"event"===c.type&&c.name===_.Sg&&this.trigger(new _.R(_.jd,{visible:!!c.visible}))};_.r.Ik=function(){this.trigger(new _.R(_.ug))};
69
- _.r.Ul=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.x(e,JV(a,[_.ng,_.Oc],b.J,b.j),2);if(d=e.f)c=new chrome.cast.media.Track(b.vb++,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,lW=!1,mW=[];window.__onGCastApiAvailable=WV;
70
- _.J("clpp.cast.onReady",function(a){lW?a():mW.push(a)});_.w(oW,_.kn);_.r=oW.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);_.z(b)})};_.r.No=function(a,b){11!==a&&0!==a&&(delete b.license,this.f.open(b))};_.r.zd=function(){return!!this.a&&this.a.Pd()&&eW};_.r.Da=function(){return!!this.a&&this.a.Da()};_.r.Hg=function(){return this.a?this.a.Hg():""};_.r.We=function(a){this.a&&this.a.We(a)};
71
- _.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.$a();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=
72
- 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),bh:c.f.getPresentationStartTime(),videoMimeType:n,audioMimeType:q,Ka:k}}d=k;b&&d&&(d.queueData={items:b.items,startIndex:b.startIndex});return _.x(g,pW(c),5);case 5:if(!c.a)return g["return"]();d&&(d.autoplay=!c.f.isPaused());if(a)return _.x(g,c.f.open(a),7);if(c.a.a){g.C(7);break}return _.x(g,jW(c.a,
73
- d),7);case 7:_.G(g,0);break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.R(_.le,{detail:e}),c.trigger(f),_.z(g)}})};_.r.Cf=function(){this.a&&this.a.Cf()};_.r.Ck=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=nW(b);_.z(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"]())})};
74
- _.r.Gj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(DV,{type:"QUEUE_NEXT",requestId:NV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Hj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(DV,{type:"QUEUE_PREV",requestId:NV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Fj=function(a){var b=this;return _.I(function(c){return _.x(c,b.a.sendMessage(DV,{type:"QUEUE_INSERT",requestId:NV(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
75
- _.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.Ub=function(){return this.a&&this.a.Ub()};_.r.sc=function(a){this.a&&this.a.sc(a)};_.r.yg=function(){this.a&&this.a.yg()};_.r.lh=function(a){this.a&&this.a.lh(a)};_.r.jh=function(a){this.a&&this.a.jh(a)};_.r.ih=function(a){this.a&&this.a.ih(a)};_.r.kh=function(a){this.a&&this.a.kh(a)};_.J(yV,oW);
76
- oW.prototype.setContentReleaseDate=oW.prototype.kh;oW.prototype.setContentArtist=oW.prototype.ih;oW.prototype.setContentImage=oW.prototype.jh;oW.prototype.setContentTitle=oW.prototype.lh;oW.prototype.clearContentMetadata=oW.prototype.yg;oW.prototype.setContentMetadata=oW.prototype.sc;oW.prototype.getContentMetadata=oW.prototype.Ub;oW.prototype.removeMessageListener=oW.prototype.removeMessageListener;oW.prototype.addMessageListener=oW.prototype.addMessageListener;oW.prototype.queueAddItems=oW.prototype.Fj;
77
- oW.prototype.queuePreviousItem=oW.prototype.Hj;oW.prototype.queueNextItem=oW.prototype.Gj;oW.prototype.sendMessage=oW.prototype.sendMessage;oW.prototype.changeReceiverId=oW.prototype.Ck;oW.prototype.forceDisconnect=oW.prototype.Cf;oW.prototype.cast=oW.prototype.cast;oW.prototype.setPlayerConfigInterceptor=oW.prototype.We;oW.prototype.getReceiverName=oW.prototype.Hg;oW.prototype.isCasting=oW.prototype.Da;oW.prototype.canCast=oW.prototype.zd;oW.prototype.destroy=oW.prototype.destroy;_.w(qW,OV);_.r=qW.prototype;
63
+ _.r.resetAbr=function(){this.g.warn(NV)};_.r.onError=function(a){if(a&&(this.trigger(new _.R(_.le,{detail:a})),this.l))this.l.onError(a)};_.r.namespace=function(){return _.wd};_.r.canPlay=function(){return this.Pd()?2:0};_.r.Vb=function(){return this.I};_.r.tc=function(a){this.I=tW(a)};_.r.zg=function(){this.I=null};_.r.mh=function(a){if(this.f){var b=this.Vb()||{};a={metadataType:uW(b.metadataType),title:a};this.tc(Object.assign({},b,a))}};
64
+ _.r.kh=function(a){if(this.f){var b=this.Vb()||{},c=uW(b.metadataType);a=new chrome.cast.Image(a);this.tc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.jh=function(a){if(this.f){var b=this.Vb()||{};this.tc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.lh=function(a){if(this.f){var b=this.Vb()||{};a={metadataType:uW(b.metadataType),releaseDate:a};this.tc(Object.assign({},b,a))}};
65
+ _.r.In=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;wW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.Ba=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.sh()};
66
+ _.r.ho=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;zW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Ea()||(this.A=!0,zW(this,a.session),this.na());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,
67
+ isLive:this.isLive()},currentTime:xW(this),Uj:d,Kh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(TV,this.T);a.session.removeMessageListener(UV,this.ba);this.A=!1;this.a=null}};_.r.Wn=function(a){this.g.debug("New media session",a.mediaSession);yW(this,a.mediaSession)};_.r.Vn=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.Pn=function(a,b){var c=ZV(b);this.L.forEach(function(d){return d(c)})};
68
+ _.r.On=function(a,b){var c=ZV(b);"event"===c.type&&c.name===_.Sg&&this.trigger(new _.R(_.jd,{visible:!!c.visible}))};_.r.Jk=function(){this.trigger(new _.R(_.ug))};
69
+ _.r.Vl=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.x(e,aW(a,[_.ng,_.Oc],b.J,b.j),2);if(d=e.f)c=new chrome.cast.media.Track(b.wb++,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 wW=!1,pW=new Set,DW=!1,EW=[];window.__onGCastApiAvailable=nW;
70
+ _.J("clpp.cast.onReady",function(a){DW?a():EW.push(a)});_.w(GW,_.rn);_.r=GW.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.x(b,rW(a.a),3):b.C(2);2!=b.a&&(a.a=null);a.stopForwardingEventsTo(a.f);_.z(b)})};_.r.Qo=function(a,b){11!==a&&0!==a&&(delete b.license,this.f.open(b))};_.r.zd=function(){return!!this.a&&this.a.Pd()&&wW};_.r.Ea=function(){return!!this.a&&this.a.Ea()};_.r.Ig=function(){return this.a?this.a.Ig():""};_.r.We=function(a){this.a&&this.a.We(a)};
71
+ _.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.bb();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&&(k.preferredTextLanguage=
72
+ 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),dh:c.f.getPresentationStartTime(),videoMimeType:n,audioMimeType:q,Ka:k}}d=k;b&&d&&(d.queueData={items:b.items,startIndex:b.startIndex});return _.x(g,HW(c),5);case 5:if(!c.a)return g["return"]();d&&(d.autoplay=!c.f.isPaused());if(a)return _.x(g,c.f.open(a),7);if(c.a.a){g.C(7);break}return _.x(g,BW(c.a,
73
+ d),7);case 7:_.G(g,0);break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.R(_.le,{detail:e}),c.trigger(f),_.z(g)}})};_.r.Cf=function(){this.a&&this.a.Cf()};_.r.Dk=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,rW(b.a),2):c.C(2)}b.a=FW(b);_.z(c)})};_.r.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.x(c,b.a.sendMessage(TV,a),0):(b.g.warn(PV),c["return"]())})};
74
+ _.r.Hj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(VV,{type:"QUEUE_NEXT",requestId:eW(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Ij=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(VV,{type:"QUEUE_PREV",requestId:eW(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Gj=function(a){var b=this;return _.I(function(c){return _.x(c,b.a.sendMessage(VV,{type:"QUEUE_INSERT",requestId:eW(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
75
+ _.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(PV)};_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(PV)};_.r.Vb=function(){return this.a&&this.a.Vb()};_.r.tc=function(a){this.a&&this.a.tc(a)};_.r.zg=function(){this.a&&this.a.zg()};_.r.mh=function(a){this.a&&this.a.mh(a)};_.r.kh=function(a){this.a&&this.a.kh(a)};_.r.jh=function(a){this.a&&this.a.jh(a)};_.r.lh=function(a){this.a&&this.a.lh(a)};_.J(QV,GW);
76
+ GW.prototype.setContentReleaseDate=GW.prototype.lh;GW.prototype.setContentArtist=GW.prototype.jh;GW.prototype.setContentImage=GW.prototype.kh;GW.prototype.setContentTitle=GW.prototype.mh;GW.prototype.clearContentMetadata=GW.prototype.zg;GW.prototype.setContentMetadata=GW.prototype.tc;GW.prototype.getContentMetadata=GW.prototype.Vb;GW.prototype.removeMessageListener=GW.prototype.removeMessageListener;GW.prototype.addMessageListener=GW.prototype.addMessageListener;GW.prototype.queueAddItems=GW.prototype.Gj;
77
+ GW.prototype.queuePreviousItem=GW.prototype.Ij;GW.prototype.queueNextItem=GW.prototype.Hj;GW.prototype.sendMessage=GW.prototype.sendMessage;GW.prototype.changeReceiverId=GW.prototype.Dk;GW.prototype.forceDisconnect=GW.prototype.Cf;GW.prototype.cast=GW.prototype.cast;GW.prototype.setPlayerConfigInterceptor=GW.prototype.We;GW.prototype.getReceiverName=GW.prototype.Ig;GW.prototype.isCasting=GW.prototype.Ea;GW.prototype.canCast=GW.prototype.zd;GW.prototype.destroy=GW.prototype.destroy;_.w(IW,fW);_.r=IW.prototype;
78
78
  _.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)};
79
79
  _.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,
80
- a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,OV.prototype.destroy.call(a),0)})};_.r.Pk=function(){this.player.trigger(new _.R(_.hf));this.Ca(8)};_.r.Ok=function(){this.Ca(10)};_.r.On=function(){this.Ca(11)};_.r.Dn=function(a){a.isBuffering?this.Ca(6):(a=this.player.isPaused()?10:8,this.Ca(a))};_.r.Rk=function(){this.h=1;this.player.trigger(new _.R(_.Fg))};_.r.Qk=function(){this.player.trigger(new _.R(_.Eg))};_.r.ho=function(){this.h=2};_.r.Rn=function(){this.Ca(2)};
81
- _.r.Mk=function(a){var b=this.player.getStats();this.player.trigger(new _.R(_.ad,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Nk=function(a){a=new _.O(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.R(_.le,{detail:a}));this.Ca(3)};_.w(rW,_.kn);_.r=rW.prototype;_.r.ze=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Vb=function(){return this.a[this.f]||null};_.r.Li=function(){return this.a[this.f+1]||null};_.r.setPosition=function(a){0>a||a>=this.a.length||(this.f=a,this.trigger(new _.R(_.vf,{item:this.Vb()})))};_.r.append=function(a){this.a.push(a);sW(this)};_.r.Qi=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),sW(this))};
82
- _.r.remove=function(a){0>a||a>=this.a.length||a===this.f||(this.a.splice(a,1),this.f>a&&this.f--,sW(this))};_.r.clear=function(){this.a=[];this.f=0;sW(this)};_.w(uW,_.kn);_.r=uW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.ke,this.l),yW(this),this.a.setPosition(this.a.getPosition()))};_.r.next=function(){var a=this.a.Vb();a&&!1===a.skippable||tW(this)};_.r.Te=function(){var a=this.a.Vb();a&&!1===a.skippable||(yW(this),a=Math.max(0,this.a.getPosition()-1),this.a.setPosition(a))};_.r.Nd=function(a){var b=this;return _.I(function(c){b.a.setPosition(a);_.z(c)})};
83
- _.r.stop=function(){this.h=!1;this.m.off(_.ke,this.l);this.a.off(_.vf,this.o);this.j=!1};_.r=DW.prototype;_.r.Yn=function(a){return this.cc.on(_.vf,a)};_.r.Zn=function(a){return this.cc.on(_.wf,a)};_.r.Gn=function(a){return this.player.on(_.id,a)};_.r.zd=function(){return this.a.zd()};_.r.Dm=function(){return this.cc.ze()};_.r.Da=function(){return this.a.Da()};_.r.append=function(a){var b=this;return _.I(function(c){b.cc.append(a);return b.a.Da()?_.x(c,b.a.Fj(IW([a])),0):c["return"]()})};_.r.sm=function(){return this.cc.getPosition()};_.r.start=function(){this.Vd.start()};_.r.play=function(){this.player.play()};
84
- _.r.pause=function(){this.player.pause()};_.r.destroy=function(){this.Vd.stop();this.a.removeMessageListener(this.f);this.a.destroy();this.player.release()};_.r.jp=function(){var a=this,b,c;return _.I(function(d){if(a.a.Da())return a.a.Cf(),d["return"]();a.Vd.stop();b=IW(a.cc.ze());c=a.cc.getPosition();return _.x(d,a.a.cast(void 0,{items:b,startIndex:c}),0)})};
85
- _.r.next=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Da()?_.x(b,a.a.Gj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Vd.next(),0)})};_.r.Te=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Da()?_.x(b,a.a.Hj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Vd.Te(),0)})};_.J("clpp.cast.playlist.CastPlaylist",DW);DW.prototype.previous=DW.prototype.Te;DW.prototype.next=DW.prototype.next;DW.prototype.toggleCast=DW.prototype.jp;DW.prototype.destroy=DW.prototype.destroy;
86
- DW.prototype.pause=DW.prototype.pause;DW.prototype.play=DW.prototype.play;DW.prototype.start=DW.prototype.start;DW.prototype.getCurrentIndex=DW.prototype.sm;DW.prototype.append=DW.prototype.append;DW.prototype.isCasting=DW.prototype.Da;DW.prototype.getPlaylistItems=DW.prototype.Dm;DW.prototype.canCast=DW.prototype.zd;DW.prototype.onCastStatusChanged=DW.prototype.Gn;DW.prototype.onPlaylistModified=DW.prototype.Zn;DW.prototype.onPlaylistItemChange=DW.prototype.Yn;_.r=JW.prototype;_.r.kb=function(){return"Google Cast Framework"};_.r.lb=function(){return cast.framework.VERSION};_.r.ob=function(){return 0};_.r.getId=function(){return this.a.id};_.r.getCreativeId=function(){return""};_.r.Ib=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};
87
- _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.Kb=function(){return!1};_.r.Za=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 _.Bk;default:return _.Ek}};_.r.getPodIndex=function(){return this.j};_.r.yb=function(){return this.f.position};_.r.nb=function(){return this.l};
88
- _.r.fb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Jb=function(){return null};JW.prototype.getVideoElement=JW.prototype.Jb;JW.prototype.getWrapperCreativeIds=JW.prototype.getWrapperCreativeIds;JW.prototype.getWrapperAdSystems=JW.prototype.getWrapperAdSystems;JW.prototype.canSeek=JW.prototype.canSeek;JW.prototype.getWrapperAdIds=JW.prototype.getWrapperAdIds;
89
- JW.prototype.getSequenceLength=JW.prototype.fb;JW.prototype.getPositionInSequence=JW.prototype.nb;JW.prototype.getPodTimeOffset=JW.prototype.yb;JW.prototype.getPodIndex=JW.prototype.getPodIndex;JW.prototype.getPodType=JW.prototype.Ha;JW.prototype.getMediaBitrate=JW.prototype.Ga;JW.prototype.getMediaHeight=JW.prototype.cb;JW.prototype.getMediaWidth=JW.prototype.eb;JW.prototype.getMediaUrl=JW.prototype.getMediaUrl;JW.prototype.getClickThroughUrl=JW.prototype.Za;JW.prototype.isBumper=JW.prototype.Kb;
90
- JW.prototype.getSkipTimeOffset=JW.prototype.getSkipTimeOffset;JW.prototype.getPosition=JW.prototype.getPosition;JW.prototype.getDuration=JW.prototype.getDuration;JW.prototype.getTitle=JW.prototype.getTitle;JW.prototype.getAdvertiserName=JW.prototype.getAdvertiserName;JW.prototype.getAdSystem=JW.prototype.getAdSystem;JW.prototype.getApiFramework=JW.prototype.getApiFramework;JW.prototype.getSourceId=JW.prototype.Ib;JW.prototype.getCreativeId=JW.prototype.getCreativeId;JW.prototype.getId=JW.prototype.getId;
91
- JW.prototype.getTechnology=JW.prototype.ob;JW.prototype.getAdManagerVersion=JW.prototype.lb;JW.prototype.getAdManagerName=JW.prototype.kb;KW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};KW.prototype.$b=function(){return!!this.a.find(function(a){return 0===a.position})};KW.prototype.Zb=function(){return!!this.a.find(function(a){return-1===a.position})};KW.prototype.hasPostroll=KW.prototype.Zb;KW.prototype.hasPreroll=KW.prototype.$b;KW.prototype.getCuePoints=KW.prototype.getCuePoints;_.r=MW.prototype;_.r.load=function(){var a=this;return _.I(function(b){NW&&(NW=!1,TW(a,0));_.z(b)})};_.r.Bb=function(){return!0};_.r.Sc=function(){};_.r.Ra=function(){-1!==this.getPosition()&&LW().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){OW.warn(EV);return 0};_.r.Oa=function(){OW.warn(EV)};_.r.setMuted=function(){};_.r.isMuted=function(){return!1};_.r.zb=function(){return-1!==this.getPosition()};_.r.isPaused=function(){return this.f};
92
- _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.h?a:-1};_.r.Pc=function(){return!0};_.r.Ac=function(){var a=this;return _.I(function(b){LW().removeEventListener(a.h,a.j);_.z(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.Ra()};_.r.resume=function(){this.Bb()};
93
- _.r.Sk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=LW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.R(_.Dc,{adsTimeline:new KW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:SW(this,_.qc,a);break;case cast.framework.events.EventType.BREAK_STARTED:SW(this,_.gc,a);break;case cast.framework.events.EventType.BREAK_ENDED:SW(this,_.hc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:SW(this,
94
- _.yc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(SW(this,_.wc,a),SW(this,_.Ac,a)):a.endedReason===b.STOPPED?SW(this,_.Ac,a):a.endedReason===b.END_OF_STREAM?(SW(this,_.kc,a),SW(this,_.Ac,a)):a.endedReason===b.ERROR&&TW(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;SW(this,_.vc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;SW(this,_.tc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?SW(this,_.ic,
95
- a):(this.f=!1,SW(this,_.vc,a))}};MW.prototype.resume=MW.prototype.resume;MW.prototype.pause=MW.prototype.pause;MW.prototype.getVolume=MW.prototype.getVolume;MW.prototype.setVolume=MW.prototype.setVolume;MW.prototype.getPosition=MW.prototype.getPosition;MW.prototype.skip=MW.prototype.skip;var NW=!1,OW=new _.L("clpp.cast.ads.AdsManager");UW.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(VW(),this.f)};UW.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(VW(),this.f)};UW.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return WW(a)})};
96
- UW.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=_.qg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.rg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.sg}b&&this.a(new _.R(b,{detail:WW(a.timedMetadataInfo)}))}else for(a=_.v(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.a(new _.R(_.qg,{detail:b.value}))};_.w(XW,_.Km);_.r=XW.prototype;_.r.initialize=function(a){this.m=a;YW().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;YW().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};
97
- _.r.Ya=function(){var a=this.qa();return a&&a.renditions[0]};_.r.gb=function(){var a=this.wa();return a&&a.renditions[0]};_.r.Gb=function(){return null};_.r.Wb=function(){return null};_.r.Xb=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};
98
- _.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.Pb=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.La=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.jb=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.Cb=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Nb=function(a){this.La(a&&a.track)};
99
- _.r.Ob=function(a){this.jb(a&&a.track)};
100
- _.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,JV(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]),$W(b)}catch(g){throw b.g.warn("failed on track",
101
- a),g;}}_.z(f)})};_.r.xa=function(){return!0};_.r.Eo=function(){this.f=YW().getAudioTracksManager();var a=this.f.getTracks();this.h=ZW(_.em,a);$W(this);a=this.m.getConfiguration();aX(this,_.em,a.preferredAudioLanguage,a.preferredAudioRole);aX(this,_.dm,a.preferredTextLanguage,a.preferredTextRole)};XW.prototype.isAbrEnabled=XW.prototype.xa;XW.prototype.addTextTrack=XW.prototype.addTextTrack;XW.prototype.setTextRendition=XW.prototype.Ob;XW.prototype.setAudioRendition=XW.prototype.Nb;
102
- XW.prototype.setVideoRendition=XW.prototype.Cb;XW.prototype.setTextTrack=XW.prototype.jb;XW.prototype.setAudioTrack=XW.prototype.La;XW.prototype.setVideoTrack=XW.prototype.Pb;XW.prototype.getTextTrack=XW.prototype.wa;XW.prototype.getAudioTrack=XW.prototype.qa;XW.prototype.getVideoTrack=XW.prototype.Qa;XW.prototype.getLoadingTextRendition=XW.prototype.Xb;XW.prototype.getLoadingAudioRendition=XW.prototype.Wb;XW.prototype.getLoadingVideoRendition=XW.prototype.Gb;XW.prototype.getTextRendition=XW.prototype.gb;
103
- XW.prototype.getAudioRendition=XW.prototype.Ya;XW.prototype.getVideoRendition=XW.prototype.sa;XW.prototype.getTextTracks=XW.prototype.ra;XW.prototype.getAudioTracks=XW.prototype.getAudioTracks;XW.prototype.getVideoTracks=XW.prototype.getVideoTracks;_.w(bX,_.kn);_.r=bX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=cX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Jk.bind(this));d.setMediaPlaybackInfoHandler(this.rk.bind(this));this.a=new qW(this);this.a.init();this.j=new XW;this.j.initialize(this);this.o=new UW(function(e){return c.trigger(e)});this.o.init()};
104
- _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=cX();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=_.rn(),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);_.z(b)})};
105
- _.r.play=function(){cX().play();return Promise.resolve()};_.r.pause=function(){cX().pause();return Promise.resolve()};_.r.isPaused=function(){return cX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return cX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=cX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(qV);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};
106
- _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return cX().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=cX().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return cX().getPlaybackRate()};
107
- _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;cX().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};
108
- _.r.getLoadedSource=function(){var a=cX().getMediaInformation();if(a){var b=cX().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,drmProtected:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return cX().getStartAbsoluteTime()};
109
- _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=cX().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():0};
110
- _.r.getStats=function(){var a=_.Lq();if(this.f){a=cX().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()};
111
- _.r.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.Kq;b.a.j=b.f.a;b.A=_.Oq(a);b.h=_.tn([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:GV(b.h),local:!0};return _.x(e,cX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.za);return new _.gn};
80
+ a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,fW.prototype.destroy.call(a),0)})};_.r.Qk=function(){this.player.trigger(new _.R(_.jf));this.Da(8)};_.r.Pk=function(){this.Da(10)};_.r.Rn=function(){this.Da(11)};_.r.Gn=function(a){a.isBuffering?this.Da(6):(a=this.player.isPaused()?10:8,this.Da(a))};_.r.Sk=function(){this.h=1;this.player.trigger(new _.R(_.Fg))};_.r.Rk=function(){this.player.trigger(new _.R(_.Eg))};_.r.ko=function(){this.h=2};_.r.Un=function(){this.Da(2)};
81
+ _.r.Nk=function(a){var b=this.player.getStats();this.player.trigger(new _.R(_.ad,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Ok=function(a){a=new _.O(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.R(_.le,{detail:a}));this.Da(3)};_.w(JW,_.rn);_.r=JW.prototype;_.r.ze=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Wb=function(){return this.a[this.f]||null};_.r.Mi=function(){return this.a[this.f+1]||null};_.r.setPosition=function(a){0>a||a>=this.a.length||(this.f=a,this.trigger(new _.R(_.wf,{item:this.Wb()})))};_.r.append=function(a){this.a.push(a);KW(this)};_.r.Ri=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),KW(this))};
82
+ _.r.remove=function(a){0>a||a>=this.a.length||a===this.f||(this.a.splice(a,1),this.f>a&&this.f--,KW(this))};_.r.clear=function(){this.a=[];this.f=0;KW(this)};_.w(MW,_.rn);_.r=MW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.ke,this.l),QW(this),this.a.setPosition(this.a.getPosition()))};_.r.next=function(){var a=this.a.Wb();a&&!1===a.skippable||LW(this)};_.r.Te=function(){var a=this.a.Wb();a&&!1===a.skippable||(QW(this),a=Math.max(0,this.a.getPosition()-1),this.a.setPosition(a))};_.r.Nd=function(a){var b=this;return _.I(function(c){b.a.setPosition(a);_.z(c)})};
83
+ _.r.stop=function(){this.h=!1;this.m.off(_.ke,this.l);this.a.off(_.wf,this.o);this.j=!1};_.r=VW.prototype;_.r.ao=function(a){return this.dc.on(_.wf,a)};_.r.bo=function(a){return this.dc.on(_.xf,a)};_.r.Jn=function(a){return this.player.on(_.id,a)};_.r.zd=function(){return this.a.zd()};_.r.Em=function(){return this.dc.ze()};_.r.Ea=function(){return this.a.Ea()};_.r.append=function(a){var b=this;return _.I(function(c){b.dc.append(a);return b.a.Ea()?_.x(c,b.a.Gj($W([a])),0):c["return"]()})};_.r.tm=function(){return this.dc.getPosition()};_.r.start=function(){this.Vd.start()};_.r.play=function(){this.player.play()};
84
+ _.r.pause=function(){this.player.pause()};_.r.destroy=function(){this.Vd.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.Cf(),d["return"]();a.Vd.stop();b=$W(a.dc.ze());c=a.dc.getPosition();return _.x(d,a.a.cast(void 0,{items:b,startIndex:c}),0)})};
85
+ _.r.next=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.x(b,a.a.Hj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Vd.next(),0)})};_.r.Te=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.x(b,a.a.Ij(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Vd.Te(),0)})};_.J("clpp.cast.playlist.CastPlaylist",VW);VW.prototype.previous=VW.prototype.Te;VW.prototype.next=VW.prototype.next;VW.prototype.toggleCast=VW.prototype.mp;VW.prototype.destroy=VW.prototype.destroy;
86
+ VW.prototype.pause=VW.prototype.pause;VW.prototype.play=VW.prototype.play;VW.prototype.start=VW.prototype.start;VW.prototype.getCurrentIndex=VW.prototype.tm;VW.prototype.append=VW.prototype.append;VW.prototype.isCasting=VW.prototype.Ea;VW.prototype.getPlaylistItems=VW.prototype.Em;VW.prototype.canCast=VW.prototype.zd;VW.prototype.onCastStatusChanged=VW.prototype.Jn;VW.prototype.onPlaylistModified=VW.prototype.bo;VW.prototype.onPlaylistItemChange=VW.prototype.ao;_.r=aX.prototype;_.r.nb=function(){return"Google Cast Framework"};_.r.ob=function(){return cast.framework.VERSION};_.r.qb=function(){return 0};_.r.getId=function(){return this.a.id};_.r.getCreativeId=function(){return""};_.r.Ib=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};
87
+ _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.Lb=function(){return!1};_.r.ab=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.gb=function(){return 0};_.r.fb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){switch(this.zb()){case 0:return 0;case -1:return _.Ck;default:return _.Fk}};_.r.getPodIndex=function(){return this.j};_.r.zb=function(){return this.f.position};_.r.pb=function(){return this.l};
88
+ _.r.hb=function(){return this.h};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Jb=function(){return null};aX.prototype.getVideoElement=aX.prototype.Jb;aX.prototype.getWrapperCreativeIds=aX.prototype.getWrapperCreativeIds;aX.prototype.getWrapperAdSystems=aX.prototype.getWrapperAdSystems;aX.prototype.canSeek=aX.prototype.canSeek;aX.prototype.getWrapperAdIds=aX.prototype.getWrapperAdIds;
89
+ aX.prototype.getSequenceLength=aX.prototype.hb;aX.prototype.getPositionInSequence=aX.prototype.pb;aX.prototype.getPodTimeOffset=aX.prototype.zb;aX.prototype.getPodIndex=aX.prototype.getPodIndex;aX.prototype.getPodType=aX.prototype.Ha;aX.prototype.getMediaBitrate=aX.prototype.Ga;aX.prototype.getMediaHeight=aX.prototype.fb;aX.prototype.getMediaWidth=aX.prototype.gb;aX.prototype.getMediaUrl=aX.prototype.getMediaUrl;aX.prototype.getClickThroughUrl=aX.prototype.ab;aX.prototype.isBumper=aX.prototype.Lb;
90
+ aX.prototype.getSkipTimeOffset=aX.prototype.getSkipTimeOffset;aX.prototype.getPosition=aX.prototype.getPosition;aX.prototype.getDuration=aX.prototype.getDuration;aX.prototype.getTitle=aX.prototype.getTitle;aX.prototype.getAdvertiserName=aX.prototype.getAdvertiserName;aX.prototype.getAdSystem=aX.prototype.getAdSystem;aX.prototype.getApiFramework=aX.prototype.getApiFramework;aX.prototype.getSourceId=aX.prototype.Ib;aX.prototype.getCreativeId=aX.prototype.getCreativeId;aX.prototype.getId=aX.prototype.getId;
91
+ aX.prototype.getTechnology=aX.prototype.qb;aX.prototype.getAdManagerVersion=aX.prototype.ob;aX.prototype.getAdManagerName=aX.prototype.nb;bX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};bX.prototype.$b=function(){return!!this.a.find(function(a){return 0===a.position})};bX.prototype.Kb=function(){return!!this.a.find(function(a){return-1===a.position})};bX.prototype.hasPostroll=bX.prototype.Kb;bX.prototype.hasPreroll=bX.prototype.$b;bX.prototype.getCuePoints=bX.prototype.getCuePoints;_.r=dX.prototype;_.r.load=function(){var a=this;return _.I(function(b){eX&&(eX=!1,kX(a,0));_.z(b)})};_.r.Bb=function(){return!0};_.r.Tc=function(){};_.r.Ta=function(){-1!==this.getPosition()&&cX().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){fX.warn(WV);return 0};_.r.Pa=function(){fX.warn(WV)};_.r.setMuted=function(){};_.r.isMuted=function(){return!1};_.r.Sa=function(){return-1!==this.getPosition()};_.r.isPaused=function(){return this.f};
92
+ _.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.h?a:-1};_.r.Qc=function(){return!0};_.r.Bc=function(){var a=this;return _.I(function(b){cX().removeEventListener(a.h,a.j);_.z(b)})};_.r.setVolume=function(a){this.Pa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.Ta()};_.r.resume=function(){this.Bb()};
93
+ _.r.Tk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=cX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.R(_.Dc,{adsTimeline:new bX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:jX(this,_.qc,a);break;case cast.framework.events.EventType.BREAK_STARTED:jX(this,_.gc,a);break;case cast.framework.events.EventType.BREAK_ENDED:jX(this,_.hc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:jX(this,
94
+ _.xc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(jX(this,_.wc,a),jX(this,_.yc,a)):a.endedReason===b.STOPPED?jX(this,_.yc,a):a.endedReason===b.END_OF_STREAM?(jX(this,_.kc,a),jX(this,_.yc,a)):a.endedReason===b.ERROR&&kX(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;jX(this,_.vc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;jX(this,_.sc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?jX(this,_.ic,
95
+ a):(this.f=!1,jX(this,_.vc,a))}};dX.prototype.resume=dX.prototype.resume;dX.prototype.pause=dX.prototype.pause;dX.prototype.getVolume=dX.prototype.getVolume;dX.prototype.setVolume=dX.prototype.setVolume;dX.prototype.getPosition=dX.prototype.getPosition;dX.prototype.skip=dX.prototype.skip;var eX=!1,fX=new _.L("clpp.cast.ads.AdsManager");lX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(mX(),this.f)};lX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(mX(),this.f)};lX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return nX(a)})};
96
+ lX.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=_.qg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.rg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.sg}b&&this.a(new _.R(b,{detail:nX(a.timedMetadataInfo)}))}else for(a=_.v(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.a(new _.R(_.qg,{detail:b.value}))};_.w(oX,_.Om);_.r=oX.prototype;_.r.initialize=function(a){this.m=a;pX().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;pX().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};
97
+ _.r.$a=function(){var a=this.qa();return a&&a.renditions[0]};_.r.ib=function(){var a=this.xa();return a&&a.renditions[0]};_.r.Gb=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};
98
+ _.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.Qb=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.La=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.lb=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.Cb=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Ob=function(a){this.La(a&&a.track)};
99
+ _.r.Pb=function(a){this.lb(a&&a.track)};
100
+ _.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,aW(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),rX(b)}catch(g){throw b.g.warn("failed on track",
101
+ a),g;}}_.z(f)})};_.r.ya=function(){return!0};_.r.Ho=function(){this.f=pX().getAudioTracksManager();var a=this.f.getTracks();this.h=qX(_.im,a);rX(this);a=this.m.getConfiguration();sX(this,_.im,a.preferredAudioLanguage,a.preferredAudioRole);sX(this,_.hm,a.preferredTextLanguage,a.preferredTextRole)};oX.prototype.isAbrEnabled=oX.prototype.ya;oX.prototype.addTextTrack=oX.prototype.addTextTrack;oX.prototype.setTextRendition=oX.prototype.Pb;oX.prototype.setAudioRendition=oX.prototype.Ob;
102
+ oX.prototype.setVideoRendition=oX.prototype.Cb;oX.prototype.setTextTrack=oX.prototype.lb;oX.prototype.setAudioTrack=oX.prototype.La;oX.prototype.setVideoTrack=oX.prototype.Qb;oX.prototype.getTextTrack=oX.prototype.xa;oX.prototype.getAudioTrack=oX.prototype.qa;oX.prototype.getVideoTrack=oX.prototype.Ra;oX.prototype.getLoadingTextRendition=oX.prototype.Yb;oX.prototype.getLoadingAudioRendition=oX.prototype.Xb;oX.prototype.getLoadingVideoRendition=oX.prototype.Gb;oX.prototype.getTextRendition=oX.prototype.ib;
103
+ oX.prototype.getAudioRendition=oX.prototype.$a;oX.prototype.getVideoRendition=oX.prototype.sa;oX.prototype.getTextTracks=oX.prototype.ra;oX.prototype.getAudioTracks=oX.prototype.getAudioTracks;oX.prototype.getVideoTracks=oX.prototype.getVideoTracks;_.w(tX,_.rn);_.r=tX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=uX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Kk.bind(this));d.setMediaPlaybackInfoHandler(this.sk.bind(this));this.a=new IW(this);this.a.init();this.j=new oX;this.j.initialize(this);this.o=new lX(function(e){return c.trigger(e)});this.o.init()};
104
+ _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=uX();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=_.yn(),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);_.z(b)})};
105
+ _.r.play=function(){uX().play();return Promise.resolve()};_.r.pause=function(){uX().pause();return Promise.resolve()};_.r.isPaused=function(){return uX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return uX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=uX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(IV);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return this.getMediaPosition()};
106
+ _.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return uX().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=uX().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return uX().getPlaybackRate()};
107
+ _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;uX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){this.g.warn(WV);return null};_.r.setVolume=function(){this.g.warn(WV)};_.r.setMuted=function(){this.g.warn(WV)};_.r.isMuted=function(){this.g.warn(WV);return!1};
108
+ _.r.getLoadedSource=function(){var a=uX().getMediaInformation();if(a){var b=uX().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,drmProtected:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return uX().getStartAbsoluteTime()};
109
+ _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=uX().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():0};
110
+ _.r.getStats=function(){var a=_.Hq();if(this.f){a=uX().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()};
111
+ _.r.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.Gq;b.a.j=b.f.a;b.A=_.Kq(a);b.h=_.An([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:YV(b.h),local:!0};return _.x(e,uX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.za);return new _.on};
112
112
  _.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(_.lb)};_.r.appendLoad=function(){return Promise.reject(_.lb)};_.r.seekWith=function(){return Promise.reject(_.lb)};_.r.setNetworkEngine=function(a){this.G=a};_.r.setCmsdManager=function(){};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};
113
- _.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 _.R(_.le,{detail:a}))};_.r.canPlay=function(){return _.ui()?2:0};
114
- _.r.Jk=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=GV(this.getStats());var b=cX(),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&&
115
- (!e||e&&f)){d=cX().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};
116
- _.r.rk=function(a,b){var c=null,d=b;a.media.customData&&(c=HV(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=HV(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=HV(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?dX(d,{streaming:{lowLatencyMode:!0}}):d;if(!c)return d;f=c.chromecast||null;e=c.abr||null;g=d;e&&typeof e.defaultBandwidthEstimate===
117
- _.h?g.initialBandwidth=e.defaultBandwidthEstimate:g.initialBandwidth=void 0;gX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=IV(g,xX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=IV(c,yX));_.N.Yb(e)&&(d=dX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=hX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new bX,_.It(a,this.f),this.m=a,this.l.on(window,"unload",function(){return _.I(function(c){return b.m&&0!==b.m.getPlayerState()?_.x(c,FV(b.m),0):c.C(0)})}))};
118
- _.r.start=function(a){var b=this;if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var c=kX(),d=kX().getPlayerManager(),e=new cast.framework.CastReceiverOptions;a&&null!=a.useShakaForHls&&(e.useShakaForHls=a.useShakaForHls);e.customNamespaces={};e.customNamespaces[BV]=cast.framework.system.MessageType.JSON;e.customNamespaces[CV]=cast.framework.system.MessageType.JSON;a=new cast.framework.PlaybackConfig;a.manifestHandler=this.fn.bind(this);a.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};
119
- 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.en.bind(this));
120
- d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.hn.bind(this));d.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);d.addEventListener(cast.framework.events.EventType.MEDIA_STATUS,this.Lk.bind(this));c.start(e);c.addCustomMessageListener(BV,this.B);this.l.on(document,_.Sg,function(){var f={type:"event",name:_.Sg,visible:!document.hidden};kX().sendCustomMessage(CV,void 0,f)})}};
121
- _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=kX();kX().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.We=function(a){this.o=a};_.r.Vo=function(a){this.A=a};_.r.on=function(a,b){kX().addEventListener(a,b)};_.r.off=function(a,b){kX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.pe&&this.w.add(a)};
122
- _.r.removeMessageListener=function(a){typeof a===_.pe&&this.w["delete"](a)};_.r.sendMessage=function(a,b){kX().sendCustomMessage(BV,b,a)};_.r.Pd=function(){return this.a};_.r.Ng=function(){return this.a};_.r.Ub=function(){return lX()};_.r.sc=function(a){mX(this,a)};_.r.rp=function(a){var b=lX(),c=null;a?c=Object.assign({},b,a):c=b;mX(this,c)};_.r.Xo=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return kX().getPlayerManager().getQueueManager()};
123
- _.r.Lk=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,kX().sendCustomMessage(BV,void 0,{type:uV,index:a})))};
124
- _.r.fn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return oX(this,a);try{var b=(new DOMParser).parseFromString(a,_.og)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=kX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ma),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Lg||g===_.Rc){g=e[f].getAttribute(_.Me);for(var k=e[f].getElementsByTagName(_.xb),l=
125
- k.length-1;0<=l;--l){var m=k[l].getAttribute(_.Me)||g,n=k[l].getAttribute(_.Cd),p=k[l].getAttribute(_.ah)||void 0,q=k[l].getAttribute(_.qe)||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(_.xb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ma).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Hb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=kX();c=a.getElementsByTagName("StreamIndex");
126
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Lg){e=c[d].getElementsByTagName(_.vb);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(_.Og,void 0,g,k)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.vb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
127
- _.r.en=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=HV(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,QW(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);
128
- break}b.f.D=!0;return _.x(l,_.St(b.m,d),8);case 8:return _.x(l,_.Tt(b.m),9);case 9:f=b.m.$a(),c.media.contentId=f.url,c.media.contentType=f.type,f.videoMimeType&&(c.media.hlsVideoSegmentFormat=KV(f.videoMimeType,_.fm)),f.audioMimeType&&(c.media.hlsSegmentFormat=KV(f.audioMimeType,_.em));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);
129
- break}return _.x(l,Promise.resolve(b.A(c)),11);case 11:(k=l.f)&&(c=k);case 10:return l["return"](c)}})};_.r.hn=function(a){var b=a.media;b&&b.tracks&&b.tracks.length&&pX(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&&pX(c.tracks)}return a};
130
- _.r.Qn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.Sm;var b=kX().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))}_.Nt(this.m)}};_.r.Kk=function(a){this.w.forEach(function(b){return b(a.data)})};_.J(AV,hX);hX.prototype.getQueueManager=hX.prototype.getQueueManager;
131
- hX.prototype.setQueue=hX.prototype.Xo;hX.prototype.updateContentMetadata=hX.prototype.rp;hX.prototype.setContentMetadata=hX.prototype.sc;hX.prototype.getContentMetadata=hX.prototype.Ub;hX.prototype.isApiReady=hX.prototype.Pd;hX.prototype.sendMessage=hX.prototype.sendMessage;hX.prototype.removeMessageListener=hX.prototype.removeMessageListener;hX.prototype.addMessageListener=hX.prototype.addMessageListener;hX.prototype.off=hX.prototype.off;hX.prototype.on=hX.prototype.on;
132
- hX.prototype.setLoadRequestDataInterceptor=hX.prototype.Vo;hX.prototype.setPlayerConfigInterceptor=hX.prototype.We;hX.prototype.stop=hX.prototype.stop;hX.prototype.start=hX.prototype.start;hX.prototype.init=hX.prototype.init;hX.getInstance=jX;var iX=null;_.r=rX.prototype;_.r.load=function(){return _.I(function(a){_.z(a)})};_.r.Bb=function(){return!0};_.r.Sc=function(){};_.r.Ra=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:NV(),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()};
133
- _.r.zb=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.Pc=function(){return!0};_.r.Ac=function(){var a=this;return _.I(function(b){a.j.release();_.z(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.Ra()};_.r.resume=function(){this.Bb()};
134
- _.r.ko=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.R(_.Dc,{adsTimeline:new KW(a.breaks)})));break;case "isPlayingBreak":a.value?sX(this,_.gc):(sX(this,_.kc,this.f),sX(this,_.Ac,this.f),this.f=null,sX(this,_.hc));break;case "isPaused":this.f&&(a.value?sX(this,_.tc):sX(this,_.vc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(sX(this,_.kc,this.f),sX(this,_.Ac,this.f),this.f=tX(this),sX(this,_.yc,this.f)));break;
135
- default:this.f||(this.f=tX(this))&&sX(this,_.yc,this.f)}};rX.prototype.resume=rX.prototype.resume;rX.prototype.pause=rX.prototype.pause;rX.prototype.getVolume=rX.prototype.getVolume;rX.prototype.setVolume=rX.prototype.setVolume;rX.prototype.getPosition=rX.prototype.getPosition;rX.prototype.skip=rX.prototype.skip;uX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};uX.prototype.a=function(a,b){return a.namespace()!==_.wd?!1:!(!b||!b.ima)};uX.prototype.create=function(a){return new rX(a.a)};vX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};vX.prototype.a=function(a,b){return jX().Ng()?!(!b||!b.ima):!1};vX.prototype.create=function(a){return new MW(a)};_.J("clpp.cast.createCastQueue",function(){wX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(wX,cast.framework.QueueBase);wX.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 wX});_.cr(new uX);_.cr(new vX);};
113
+ _.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return RV};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(NV)};_.r.onError=function(a){this.trigger(new _.R(_.le,{detail:a}))};_.r.canPlay=function(){return _.vi()?2:0};
114
+ _.r.Kk=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=YV(this.getStats());var b=uX(),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&&
115
+ (!e||e&&f)){d=uX().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};
116
+ _.r.sk=function(a,b){var c=null,d=b;a.media.customData&&(c=ZV(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=ZV(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=ZV(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?vX(d,{streaming:{lowLatencyMode:!0}}):d;if(!c)return d;f=c.chromecast||null;e=c.abr||null;g=d;e&&typeof e.defaultBandwidthEstimate===
117
+ _.h?g.initialBandwidth=e.defaultBandwidthEstimate:g.initialBandwidth=void 0;yX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=$V(g,PX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=$V(c,QX));_.N.Zb(e)&&(d=vX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=zX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new tX,_.Qt(a,this.f),this.m=a,this.l.on(window,"unload",function(){return _.I(function(c){return b.m&&0!==b.m.getPlayerState()?_.x(c,XV(b.m),0):c.C(0)})}))};
118
+ _.r.start=function(a){var b=this;if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var c=CX(),d=CX().getPlayerManager(),e=new cast.framework.CastReceiverOptions;a&&null!=a.useShakaForHls&&(e.useShakaForHls=a.useShakaForHls);e.customNamespaces={};e.customNamespaces[TV]=cast.framework.system.MessageType.JSON;e.customNamespaces[UV]=cast.framework.system.MessageType.JSON;a=new cast.framework.PlaybackConfig;a.manifestHandler=this.gn.bind(this);a.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};
119
+ 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.fn.bind(this));
120
+ d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.jn.bind(this));d.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);d.addEventListener(cast.framework.events.EventType.MEDIA_STATUS,this.Mk.bind(this));c.start(e);c.addCustomMessageListener(TV,this.B);this.l.on(document,_.Sg,function(){var f={type:"event",name:_.Sg,visible:!document.hidden};CX().sendCustomMessage(UV,void 0,f)})}};
121
+ _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=CX();CX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);a.removeCustomMessageListener(TV,this.B);a.stop();this.j=this.h=this.m=this.f=null}};_.r.We=function(a){this.o=a};_.r.Yo=function(a){this.A=a};_.r.on=function(a,b){CX().addEventListener(a,b)};_.r.off=function(a,b){CX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.pe&&this.w.add(a)};
122
+ _.r.removeMessageListener=function(a){typeof a===_.pe&&this.w["delete"](a)};_.r.sendMessage=function(a,b){CX().sendCustomMessage(TV,b,a)};_.r.Pd=function(){return this.a};_.r.Og=function(){return this.a};_.r.Vb=function(){return DX()};_.r.tc=function(a){EX(this,a)};_.r.up=function(a){var b=DX(),c=null;a?c=Object.assign({},b,a):c=b;EX(this,c)};_.r.$o=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return CX().getPlayerManager().getQueueManager()};
123
+ _.r.Mk=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,CX().sendCustomMessage(TV,void 0,{type:MV,index:a})))};
124
+ _.r.gn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return GX(this,a);try{var b=(new DOMParser).parseFromString(a,_.og)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=CX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ma),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Kg||g===_.Rc){g=e[f].getAttribute(_.Me);for(var k=e[f].getElementsByTagName(_.xb),l=
125
+ k.length-1;0<=l;--l){var m=k[l].getAttribute(_.Me)||g,n=k[l].getAttribute(_.Cd),p=k[l].getAttribute(_.ah)||void 0,q=k[l].getAttribute(_.qe)||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(_.xb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ma).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Hb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=CX();c=a.getElementsByTagName("StreamIndex");
126
+ for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Kg){e=c[d].getElementsByTagName(_.vb);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(_.Og,void 0,g,k)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.vb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
127
+ _.r.fn=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=ZV(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,hX(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);
128
+ break}b.f.D=!0;return _.x(l,_.$t(b.m,d),8);case 8:return _.x(l,_.au(b.m),9);case 9:f=b.m.bb(),c.media.contentId=f.url,c.media.contentType=f.type,f.videoMimeType&&(c.media.hlsVideoSegmentFormat=bW(f.videoMimeType,_.jm)),f.audioMimeType&&(c.media.hlsSegmentFormat=bW(f.audioMimeType,_.im));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);
129
+ break}return _.x(l,Promise.resolve(b.A(c)),11);case 11:(k=l.f)&&(c=k);case 10:return l["return"](c)}})};_.r.jn=function(a){var b=a.media;b&&b.tracks&&b.tracks.length&&HX(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&&HX(c.tracks)}return a};
130
+ _.r.Tn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.Tm;var b=CX().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))}_.Vt(this.m)}};_.r.Lk=function(a){this.w.forEach(function(b){return b(a.data)})};_.J(SV,zX);zX.prototype.getQueueManager=zX.prototype.getQueueManager;
131
+ zX.prototype.setQueue=zX.prototype.$o;zX.prototype.updateContentMetadata=zX.prototype.up;zX.prototype.setContentMetadata=zX.prototype.tc;zX.prototype.getContentMetadata=zX.prototype.Vb;zX.prototype.isApiReady=zX.prototype.Pd;zX.prototype.sendMessage=zX.prototype.sendMessage;zX.prototype.removeMessageListener=zX.prototype.removeMessageListener;zX.prototype.addMessageListener=zX.prototype.addMessageListener;zX.prototype.off=zX.prototype.off;zX.prototype.on=zX.prototype.on;
132
+ zX.prototype.setLoadRequestDataInterceptor=zX.prototype.Yo;zX.prototype.setPlayerConfigInterceptor=zX.prototype.We;zX.prototype.stop=zX.prototype.stop;zX.prototype.start=zX.prototype.start;zX.prototype.init=zX.prototype.init;zX.getInstance=BX;var AX=null;_.r=JX.prototype;_.r.load=function(){return _.I(function(a){_.z(a)})};_.r.Bb=function(){return!0};_.r.Tc=function(){};_.r.Ta=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(VV,{type:"SKIP_AD",requestId:eW(),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()};
133
+ _.r.Sa=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.Qc=function(){return!0};_.r.Bc=function(){var a=this;return _.I(function(b){a.j.release();_.z(b)})};_.r.setVolume=function(a){this.Pa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.Ta()};_.r.resume=function(){this.Bb()};
134
+ _.r.no=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.R(_.Dc,{adsTimeline:new bX(a.breaks)})));break;case "isPlayingBreak":a.value?KX(this,_.gc):(KX(this,_.kc,this.f),KX(this,_.yc,this.f),this.f=null,KX(this,_.hc));break;case "isPaused":this.f&&(a.value?KX(this,_.sc):KX(this,_.vc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(KX(this,_.kc,this.f),KX(this,_.yc,this.f),this.f=LX(this),KX(this,_.xc,this.f)));break;
135
+ default:this.f||(this.f=LX(this))&&KX(this,_.xc,this.f)}};JX.prototype.resume=JX.prototype.resume;JX.prototype.pause=JX.prototype.pause;JX.prototype.getVolume=JX.prototype.getVolume;JX.prototype.setVolume=JX.prototype.setVolume;JX.prototype.getPosition=JX.prototype.getPosition;JX.prototype.skip=JX.prototype.skip;MX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};MX.prototype.a=function(a,b){return a.namespace()!==_.wd?!1:!(!b||!b.ima)};MX.prototype.create=function(a){return new JX(a.a)};NX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};NX.prototype.a=function(a,b){return BX().Og()?!(!b||!b.ima):!1};NX.prototype.create=function(a){return new dX(a)};_.J("clpp.cast.createCastQueue",function(){OX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(OX,cast.framework.QueueBase);OX.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 OX});_.Zq(new MX);_.Zq(new NX);};
136
136
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
137
137
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
138
138
  else{_=this.clpp._;(f.call(g,this));}