@castlabs/prestoplay 6.34.0-beta.1 → 6.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +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 +31 -31
  7. package/cjs/cl.core.js +541 -539
  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 +25 -25
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +348 -349
  18. package/cjs/cl.muxdata.js +13 -13
  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 +37 -37
  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 +26 -26
  38. package/cl.core.js +435 -432
  39. package/cl.crypto.js +7 -7
  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 +297 -299
  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 +30 -30
  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 GV="Cannot seek during ads playout.",HV="Cannot switch track",IV="Media session does not exist.",JV="No receivers available",KV="QUEUE_ITEM_CHANGED",LV="Reset ABR functionality not available on cast.",MV="SDK not yet ready",NV="Sender is destroyed.",OV="clpp.cast.CastProxy",PV="clpp.cast.Player",QV="clpp.cast.Receiver",RV="urn:x-cast:castlabs",SV="urn:x-cast:castlabs:int",TV="urn:x-cast:com.google.cast.media",UV="volume control is not supported",VV=function(a){return _.I(function(b){return 1==
3
+ b.a?_.x(b,a.hd(_.Ze),2):_.x(b,a.hd(_.Ye),0)})},WV=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}})},XV=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
+ YV=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},{})},ZV=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=_.Lm(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.Vk(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)})},$V=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===_.im?d.MPEG2_TS:c.TS;case _.Sc:return c.AAC;case _.Tc:return c.AC3;case _.Vc:return c.E_AC3;
6
+ case "audio/mpeg":return c.MP3;case _.Wc:return c.FMP4}},bW=function(a){a=void 0===a?aW: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}},cW=function(){return Math.round(1E3*Math.random())},dW=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},eW=function(a){dW.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.qc.bind(this)},fW=function(){this.g=new _.L("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},gW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},iW=
8
+ function(a,b){var c=gW(a);return hW(a,b).find(function(d){return c.includes(d.id)})||null},hW=function(a,b){return a.h.filter(function(c){return c.type===b})},kW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.gm){var e=a.wa();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;jW(a,b)},function(f){a.f[b]=null;a.g.debug(HV,f)})}else b===_.gm&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,
9
+ function(){jW(a,b)},function(f){a.g.debug(HV,f)}))},jW=function(a,b){b===_.hm?a.a.trigger(new _.R(_.Zc)):b===_.gm&&a.a.trigger(new _.R(_.pg))},oW=function(a,b,c,d){_.qn.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=_.xn();this.D=[];this.B=0;this.J=new _.Wl;this.a=null;this.f=!1;this.M=new _.ol;this.A=!1;this.Aa="";this.vb=1E6;this.h=new fW;this.h.initialize(this);this.l=new eW(this);this.G=new _.ki;this.I=null;this.L=new Set;this.P=this.Gn.bind(this);
10
+ this.Fa=this.eo.bind(this);this.ha=this.Un.bind(this);this.T=this.Nn.bind(this);this.ba=this.Mn.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(){lW(!0)},0)}});mW(this);nW.add(this)},pW=function(a){var b,c;return _.I(function(d){if(1==d.a)return a.G.release(),nW["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)})},rW=function(a){if(!a)return null;a:{var b=a.metadataType;var c=Object.entries(qW);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=bW(qW[b]);return Object.assign(b,
12
+ a)},sW=function(a){var b=void 0===b?aW:b;return Object.values(qW).includes(a)?a:b},tW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},mW=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.Tn.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);uW&&a.w.ia(.02)}},vW=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},xW=function(a,b){wW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(RV,a.T);b.addMessageListener(SV,a.ba)},wW=function(a,b){a.a=b;a.a&&(a.l&&a.l.init(),a.trigger(new _.R(_.Fe)))},yW=function(a){return _.I(function(b){return a.Da()?b.C(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},zW=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=_.tw;return _.x(K,yW(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=$V(l,d.VIDEO);g.hlsSegmentFormat=$V(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=_.Jq(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:WV(b.Ka)};case 3:q=a.Ub()||{};t=sW(q.metadataType);typeof b.dh===_.h&&(u={metadataType:t,sectionStartAbsoluteTime:b.dh});b.source.name&&(y={metadataType:t,
17
+ title:b.source.name});A=tW(q);if(D=rW(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)}})},AW=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,zW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),dh:a.getPresentationStartTime(),autoplay:b,Ka:a.j}),0)})},lW=function(a){if(a){a=_.v(nW);for(var b=a.next();!b.done;b=a.next())mW(b.value);BW=!0;a=_.v(CW);for(b=a.next();!b.done;b=a.next())b=b.value,b()}},EW=function(a,b,c){_.qn.call(this);
19
+ this.f=a;this.h=b;this.j=this.Oo;typeof c===_.pe&&(this.j=function(d,e){return c(_.yq(d),e)});this.a=DW(this);this.g=new _.L(OV);this.forwardEventsTo(this.f)},DW=function(a){return new oW(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);_.Pt(a.f,
20
+ null);a.trigger(new _.R("castingended"));a.j(b,d)},function(){return FW(a)})},FW=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.ab();return _.x(e,a.f.release(),2)}_.Pt(a.f,a.a);if(!c)return e.C(0);_.Yt(a.f);return(d=a.f.getAdsManager())?_.x(e,d.load(),0):e.C(0)})},GW=function(a){dW.call(this,a,"clpp.cast.StateManager");this.I=this.Qk.bind(this);this.H=this.Pk.bind(this);this.w=this.Pn.bind(this);this.o=this.En.bind(this);
21
+ this.K=this.Sk.bind(this);this.J=this.Rk.bind(this);this.L=this.io.bind(this);this.G=this.Sn.bind(this);this.D=this.Ok.bind(this);this.a=this.Nk.bind(this)},HW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.qn.call(this);this.a=a.slice();this.f=b},IW=function(a){a.trigger(new _.R(_.xf))},KW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.qn.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(){JW(d)}},JW=function(a){OW(a);var b=Math.min(a.a.ze().length-1,a.a.getPosition()+1);a.a.setPosition(b)},OW=function(a){a.j||(a.a.on(_.wf,a.o),a.j=!0)},TW=function(a,b,c){var d=this;this.player=a;this.cc=new HW(c);this.Vd=new KW({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 EW(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===KV&&typeof e.index===_.h&&d.cc.setPosition(e.index)};
24
+ this.a.addMessageListener(this.f)},YW=function(a){return a.map(function(b){var c={};c.media={contentId:b.configuration.source};c.customData={skippable:!1!==b.skippable};return c})},ZW=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},$W=function(a){this.a=a},bX=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;aX().addEventListener(this.h,this.j)},fX=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);cX=!1;e=_.Vk(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)dX.warn("VMAP detected."),a.vmapAdsRequest=eX(g);else if(l.getElementsByTagName("VAST").length){dX.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=eX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else dX.warn("Unsupported schema."),cX=!0;return _.G(n,0)}m=_.H(n);dX.warn("Failed to fetch an ad",m);cX=!0;
27
+ _.z(n)})},eX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},aX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},hX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=gX(a,c))&&(d={ad:c});a.m.trigger(new _.R(b,d))}},iX=function(a,b){var c=new _.O(1,10,10003,{errorType:b});a.m.onError(c)},gX=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 ZW(d,e,b.index,b.total,f)}return c},jX=function(a){this.a=a;this.f=this.h.bind(this)},kX=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]},lX=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}},mX=function(){this.g=new _.L("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=
30
+ this.Fo.bind(this);this.a=this.f=null},nX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},pX=function(a){a.a=nX().getTextTracksManager();var b=a.a.getTracks();a.j=oX(_.gm,b)},qX=function(a,b,c,d){c=_.Ej(c).filter(function(k){return k});var e=!1,f=[];b===_.hm?f=a.getAudioTracks():b===_.gm&&(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===_.hm?a.La(e):b===_.gm&&a.kb(e))},oX=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.em(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 _.nm(f.id,f));c.push(f)}return c},rX=function(){_.qn.call(this);this.g=new _.L(PV);this.h=this.w=_.xn();this.A=null;this.l=-1;this.G=new _.Wl;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},sX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},tX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},
33
+ a,{shakaConfig:c})},wX=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=_.fl(d);if(e){var f=[_.Hd];_.Jq(a)[0].type!==_.Pc&&f.unshift(_.Jd);d.preferredDrmSystem===_.Hd&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Va[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:{}},uX(b,k,a,d),vX(b,k,a,d)):c()}else c()}else c()},uX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Vk({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},vX=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=_.Zk(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},xX=function(){this.a=!1;this.g=new _.L(QV);this.f=this.m=null;this.w=new Set;this.D=this.Rn.bind(this);this.B=this.Lk.bind(this);this.o=null;this.l=new _.ki;this.j=this.h=this.A=null},zX=function(){return yX||(yX=new xX)},AX=function(){return cast.framework.CastReceiverContext.getInstance()},
36
+ BX=function(){var a=AX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},CX=function(a,b){var c=AX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;AX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},EX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=AX();c=(AX().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=DX(k,_.xa),m=DX(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")},DX=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},FX=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)}},HX=function(a){this.h=a;this.a=null;this.j=new _.ki;this.f=null;GX(this)},GX=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.lo.bind(a));_.z(b)})},IX=function(a,b,c){var d=null;c&&(d={ad:c});a.h.trigger(new _.R(b,d))},JX=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 ZW(b,l,f,g,a)},KX=function(){},LX=function(){},MX,aW=0,qW={GENERIC:aW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},NX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),
41
+ OX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.r=dW.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&&_.Aq(this.j,this.f);this.player.trigger(new _.R(_.uf,
43
+ {detail:a}))}};_.w(eW,dW);eW.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)};eW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,dW.prototype.destroy.call(a),0)})};eW.prototype.Ca=function(a){var b=this.player.o;b&&b.isPlayingBreak||dW.prototype.Ca.call(this,a)};
44
+ eW.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(fW,_.Nm);_.r=fW.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=_.im;break;case chrome.cast.media.TrackType.AUDIO:c=_.hm;break;case chrome.cast.media.TrackType.TEXT:c=_.gm}c=new _.em(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 _.nm(c.id,c));return c}):[],this.a.trigger(new _.R(_.vg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return hW(this,_.im)};_.r.getAudioTracks=function(){return hW(this,_.hm)};_.r.ra=function(){return hW(this,_.gm)};
47
+ _.r.sa=function(){var a=this.Ra();return a?a.renditions[0]:null};_.r.Za=function(){var a=this.qa();return a?a.renditions[0]:null};_.r.hb=function(){var a=this.wa();return a?a.renditions[0]:null};_.r.Gb=function(){return this.f[_.im]||null};_.r.Wb=function(){return this.f[_.hm]||null};_.r.Xb=function(){return this.f[_.gm]||null};_.r.Ra=function(){return iW(this,_.im)};_.r.qa=function(){return iW(this,_.hm)};_.r.wa=function(){return iW(this,_.gm)};_.r.Pb=function(a){kW(this,_.im,a)};
48
+ _.r.La=function(a){kW(this,_.hm,a)};_.r.kb=function(a){kW(this,_.gm,a)};_.r.Cb=function(a){this.Pb(a&&a.track)};_.r.Nb=function(a){this.La(a&&a.track)};_.r.Ob=function(a){this.kb(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.z(a)})};_.r.xa=function(){return!0};fW.prototype.isAbrEnabled=fW.prototype.xa;fW.prototype.addTextTrack=fW.prototype.addTextTrack;fW.prototype.setTextRendition=fW.prototype.Ob;fW.prototype.setAudioRendition=fW.prototype.Nb;fW.prototype.setVideoRendition=fW.prototype.Cb;
49
+ fW.prototype.setTextTrack=fW.prototype.kb;fW.prototype.setAudioTrack=fW.prototype.La;fW.prototype.setVideoTrack=fW.prototype.Pb;fW.prototype.getTextTrack=fW.prototype.wa;fW.prototype.getAudioTrack=fW.prototype.qa;fW.prototype.getVideoTrack=fW.prototype.Ra;fW.prototype.getLoadingTextRendition=fW.prototype.Xb;fW.prototype.getLoadingAudioRendition=fW.prototype.Wb;fW.prototype.getLoadingVideoRendition=fW.prototype.Gb;fW.prototype.getTextRendition=fW.prototype.hb;fW.prototype.getAudioRendition=fW.prototype.Za;
50
+ fW.prototype.getVideoRendition=fW.prototype.sa;fW.prototype.getTextTracks=fW.prototype.ra;fW.prototype.getAudioTracks=fW.prototype.getAudioTracks;fW.prototype.getVideoTracks=fW.prototype.getVideoTracks;_.w(oW,_.qn);_.r=oW.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.Ig=function(){return this.Aa};
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(MV),new _.O(1,8,8001,void 0);if(!uW)throw a.g.warn(JV),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,yW(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()?AW(this,!0):new Promise(function(b,c){if(!a.a)return c(IV);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(IV);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()?AW(this,!1,a):new Promise(function(c,d){b.a||d(IV);b.o.isPlayingBreak&&d(GV);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(TV,{type:"SET_PLAYBACK_RATE",requestId:cW(),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?XV(this.a.customData.stats):_.Gq():_.Gq()};
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(MV),e["return"]();if(!uW)return b.g.warn(JV),e["return"]();b.D=_.Jq(a);b.j=_.zn([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,zW(b,d),0)})};_.r.getBufferInfo=function(){return new _.nn};_.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(LV)};_.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=rW(a)};_.r.zg=function(){this.I=null};_.r.mh=function(a){if(this.f){var b=this.Ub()||{};a={metadataType:sW(b.metadataType),title:a};this.sc(Object.assign({},b,a))}};
64
+ _.r.kh=function(a){if(this.f){var b=this.Ub()||{},c=sW(b.metadataType);a=new chrome.cast.Image(a);this.sc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.jh=function(a){if(this.f){var b=this.Ub()||{};this.sc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.lh=function(a){if(this.f){var b=this.Ub()||{};a={metadataType:sW(b.metadataType),releaseDate:a};this.sc(Object.assign({},b,a))}};
65
+ _.r.Gn=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;uW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.Aa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.sh()};
66
+ _.r.eo=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;xW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Da()||(this.A=!0,xW(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:vW(this),Uj:d,Kh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(RV,this.T);a.session.removeMessageListener(SV,this.ba);this.A=!1;this.a=null}};_.r.Un=function(a){this.g.debug("New media session",a.mediaSession);wW(this,a.mediaSession)};_.r.Tn=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.Nn=function(a,b){var c=XV(b);this.L.forEach(function(d){return d(c)})};
68
+ _.r.Mn=function(a,b){var c=XV(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,ZV(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 uW=!1,nW=new Set,BW=!1,CW=[];window.__onGCastApiAvailable=lW;
70
+ _.J("clpp.cast.onReady",function(a){BW?a():CW.push(a)});_.w(EW,_.qn);_.r=EW.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.x(b,pW(a.a),3):b.C(2);2!=b.a&&(a.a=null);a.stopForwardingEventsTo(a.f);_.z(b)})};_.r.Oo=function(a,b){11!==a&&0!==a&&(delete b.license,this.f.open(b))};_.r.zd=function(){return!!this.a&&this.a.Pd()&&uW};_.r.Da=function(){return!!this.a&&this.a.Da()};_.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.ab();if(l){var m=c.f.getTrackManager();k=m.getVideoTracks()[0];if(k&&k.mimeType)var n=k.mimeType;k=c.f.getConfiguration();var p=m.qa();if(p){if(p.mimeType)var q=p.mimeType;p.language&&(k.preferredAudioLanguage=p.language);p.roles.length&&(k.preferredAudioRole=p.roles[0])}if(m=m.wa())m.language&&(k.preferredTextLanguage=
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,FW(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,zW(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,pW(b.a),2):c.C(2)}b.a=DW(b);_.z(c)})};_.r.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.x(c,b.a.sendMessage(RV,a),0):(b.g.warn(NV),c["return"]())})};
74
+ _.r.Hj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(TV,{type:"QUEUE_NEXT",requestId:cW(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Ij=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(TV,{type:"QUEUE_PREV",requestId:cW(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Gj=function(a){var b=this;return _.I(function(c){return _.x(c,b.a.sendMessage(TV,{type:"QUEUE_INSERT",requestId:cW(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
75
+ _.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(NV)};_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(NV)};_.r.Ub=function(){return this.a&&this.a.Ub()};_.r.sc=function(a){this.a&&this.a.sc(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(OV,EW);
76
+ EW.prototype.setContentReleaseDate=EW.prototype.lh;EW.prototype.setContentArtist=EW.prototype.jh;EW.prototype.setContentImage=EW.prototype.kh;EW.prototype.setContentTitle=EW.prototype.mh;EW.prototype.clearContentMetadata=EW.prototype.zg;EW.prototype.setContentMetadata=EW.prototype.sc;EW.prototype.getContentMetadata=EW.prototype.Ub;EW.prototype.removeMessageListener=EW.prototype.removeMessageListener;EW.prototype.addMessageListener=EW.prototype.addMessageListener;EW.prototype.queueAddItems=EW.prototype.Gj;
77
+ EW.prototype.queuePreviousItem=EW.prototype.Ij;EW.prototype.queueNextItem=EW.prototype.Hj;EW.prototype.sendMessage=EW.prototype.sendMessage;EW.prototype.changeReceiverId=EW.prototype.Dk;EW.prototype.forceDisconnect=EW.prototype.Cf;EW.prototype.cast=EW.prototype.cast;EW.prototype.setPlayerConfigInterceptor=EW.prototype.We;EW.prototype.getReceiverName=EW.prototype.Ig;EW.prototype.isCasting=EW.prototype.Da;EW.prototype.canCast=EW.prototype.zd;EW.prototype.destroy=EW.prototype.destroy;_.w(GW,dW);_.r=GW.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,dW.prototype.destroy.call(a),0)})};_.r.Qk=function(){this.player.trigger(new _.R(_.jf));this.Ca(8)};_.r.Pk=function(){this.Ca(10)};_.r.Pn=function(){this.Ca(11)};_.r.En=function(a){a.isBuffering?this.Ca(6):(a=this.player.isPaused()?10:8,this.Ca(a))};_.r.Sk=function(){this.h=1;this.player.trigger(new _.R(_.Fg))};_.r.Rk=function(){this.player.trigger(new _.R(_.Eg))};_.r.io=function(){this.h=2};_.r.Sn=function(){this.Ca(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.Ca(3)};_.w(HW,_.qn);_.r=HW.prototype;_.r.ze=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Vb=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.Vb()})))};_.r.append=function(a){this.a.push(a);IW(this)};_.r.Ri=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),IW(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--,IW(this))};_.r.clear=function(){this.a=[];this.f=0;IW(this)};_.w(KW,_.qn);_.r=KW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.ke,this.l),OW(this),this.a.setPosition(this.a.getPosition()))};_.r.next=function(){var a=this.a.Vb();a&&!1===a.skippable||JW(this)};_.r.Te=function(){var a=this.a.Vb();a&&!1===a.skippable||(OW(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=TW.prototype;_.r.Zn=function(a){return this.cc.on(_.wf,a)};_.r.$n=function(a){return this.cc.on(_.xf,a)};_.r.Hn=function(a){return this.player.on(_.id,a)};_.r.zd=function(){return this.a.zd()};_.r.Em=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.Gj(YW([a])),0):c["return"]()})};_.r.tm=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.kp=function(){var a=this,b,c;return _.I(function(d){if(a.a.Da())return a.a.Cf(),d["return"]();a.Vd.stop();b=YW(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.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.Da()?_.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",TW);TW.prototype.previous=TW.prototype.Te;TW.prototype.next=TW.prototype.next;TW.prototype.toggleCast=TW.prototype.kp;TW.prototype.destroy=TW.prototype.destroy;
86
+ TW.prototype.pause=TW.prototype.pause;TW.prototype.play=TW.prototype.play;TW.prototype.start=TW.prototype.start;TW.prototype.getCurrentIndex=TW.prototype.tm;TW.prototype.append=TW.prototype.append;TW.prototype.isCasting=TW.prototype.Da;TW.prototype.getPlaylistItems=TW.prototype.Em;TW.prototype.canCast=TW.prototype.zd;TW.prototype.onCastStatusChanged=TW.prototype.Hn;TW.prototype.onPlaylistModified=TW.prototype.$n;TW.prototype.onPlaylistItemChange=TW.prototype.Zn;_.r=ZW.prototype;_.r.lb=function(){return"Google Cast Framework"};_.r.nb=function(){return cast.framework.VERSION};_.r.pb=function(){return 0};_.r.getId=function(){return this.a.id};_.r.getCreativeId=function(){return""};_.r.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.$a=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.fb=function(){return 0};_.r.eb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){switch(this.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.ob=function(){return this.l};
88
+ _.r.gb=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};ZW.prototype.getVideoElement=ZW.prototype.Jb;ZW.prototype.getWrapperCreativeIds=ZW.prototype.getWrapperCreativeIds;ZW.prototype.getWrapperAdSystems=ZW.prototype.getWrapperAdSystems;ZW.prototype.canSeek=ZW.prototype.canSeek;ZW.prototype.getWrapperAdIds=ZW.prototype.getWrapperAdIds;
89
+ ZW.prototype.getSequenceLength=ZW.prototype.gb;ZW.prototype.getPositionInSequence=ZW.prototype.ob;ZW.prototype.getPodTimeOffset=ZW.prototype.yb;ZW.prototype.getPodIndex=ZW.prototype.getPodIndex;ZW.prototype.getPodType=ZW.prototype.Ha;ZW.prototype.getMediaBitrate=ZW.prototype.Ga;ZW.prototype.getMediaHeight=ZW.prototype.eb;ZW.prototype.getMediaWidth=ZW.prototype.fb;ZW.prototype.getMediaUrl=ZW.prototype.getMediaUrl;ZW.prototype.getClickThroughUrl=ZW.prototype.$a;ZW.prototype.isBumper=ZW.prototype.Kb;
90
+ ZW.prototype.getSkipTimeOffset=ZW.prototype.getSkipTimeOffset;ZW.prototype.getPosition=ZW.prototype.getPosition;ZW.prototype.getDuration=ZW.prototype.getDuration;ZW.prototype.getTitle=ZW.prototype.getTitle;ZW.prototype.getAdvertiserName=ZW.prototype.getAdvertiserName;ZW.prototype.getAdSystem=ZW.prototype.getAdSystem;ZW.prototype.getApiFramework=ZW.prototype.getApiFramework;ZW.prototype.getSourceId=ZW.prototype.Ib;ZW.prototype.getCreativeId=ZW.prototype.getCreativeId;ZW.prototype.getId=ZW.prototype.getId;
91
+ ZW.prototype.getTechnology=ZW.prototype.pb;ZW.prototype.getAdManagerVersion=ZW.prototype.nb;ZW.prototype.getAdManagerName=ZW.prototype.lb;$W.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};$W.prototype.$b=function(){return!!this.a.find(function(a){return 0===a.position})};$W.prototype.Zb=function(){return!!this.a.find(function(a){return-1===a.position})};$W.prototype.hasPostroll=$W.prototype.Zb;$W.prototype.hasPreroll=$W.prototype.$b;$W.prototype.getCuePoints=$W.prototype.getCuePoints;_.r=bX.prototype;_.r.load=function(){var a=this;return _.I(function(b){cX&&(cX=!1,iX(a,0));_.z(b)})};_.r.Bb=function(){return!0};_.r.Sc=function(){};_.r.Sa=function(){-1!==this.getPosition()&&aX().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){dX.warn(UV);return 0};_.r.Pa=function(){dX.warn(UV)};_.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){aX().removeEventListener(a.h,a.j);_.z(b)})};_.r.setVolume=function(a){this.Pa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.Sa()};_.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=aX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.R(_.Dc,{adsTimeline:new $W(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:hX(this,_.qc,a);break;case cast.framework.events.EventType.BREAK_STARTED:hX(this,_.gc,a);break;case cast.framework.events.EventType.BREAK_ENDED:hX(this,_.hc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:hX(this,
94
+ _.xc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(hX(this,_.wc,a),hX(this,_.zc,a)):a.endedReason===b.STOPPED?hX(this,_.zc,a):a.endedReason===b.END_OF_STREAM?(hX(this,_.kc,a),hX(this,_.zc,a)):a.endedReason===b.ERROR&&iX(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;hX(this,_.vc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;hX(this,_.tc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?hX(this,_.ic,
95
+ a):(this.f=!1,hX(this,_.vc,a))}};bX.prototype.resume=bX.prototype.resume;bX.prototype.pause=bX.prototype.pause;bX.prototype.getVolume=bX.prototype.getVolume;bX.prototype.setVolume=bX.prototype.setVolume;bX.prototype.getPosition=bX.prototype.getPosition;bX.prototype.skip=bX.prototype.skip;var cX=!1,dX=new _.L("clpp.cast.ads.AdsManager");jX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(kX(),this.f)};jX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(kX(),this.f)};jX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return lX(a)})};
96
+ jX.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:lX(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(mX,_.Nm);_.r=mX.prototype;_.r.initialize=function(a){this.m=a;nX().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;nX().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.Za=function(){var a=this.qa();return a&&a.renditions[0]};_.r.hb=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.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.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.kb=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.kb(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,ZV(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]),pX(b)}catch(g){throw b.g.warn("failed on track",
101
+ a),g;}}_.z(f)})};_.r.xa=function(){return!0};_.r.Fo=function(){this.f=nX().getAudioTracksManager();var a=this.f.getTracks();this.h=oX(_.hm,a);pX(this);a=this.m.getConfiguration();qX(this,_.hm,a.preferredAudioLanguage,a.preferredAudioRole);qX(this,_.gm,a.preferredTextLanguage,a.preferredTextRole)};mX.prototype.isAbrEnabled=mX.prototype.xa;mX.prototype.addTextTrack=mX.prototype.addTextTrack;mX.prototype.setTextRendition=mX.prototype.Ob;mX.prototype.setAudioRendition=mX.prototype.Nb;
102
+ mX.prototype.setVideoRendition=mX.prototype.Cb;mX.prototype.setTextTrack=mX.prototype.kb;mX.prototype.setAudioTrack=mX.prototype.La;mX.prototype.setVideoTrack=mX.prototype.Pb;mX.prototype.getTextTrack=mX.prototype.wa;mX.prototype.getAudioTrack=mX.prototype.qa;mX.prototype.getVideoTrack=mX.prototype.Ra;mX.prototype.getLoadingTextRendition=mX.prototype.Xb;mX.prototype.getLoadingAudioRendition=mX.prototype.Wb;mX.prototype.getLoadingVideoRendition=mX.prototype.Gb;mX.prototype.getTextRendition=mX.prototype.hb;
103
+ mX.prototype.getAudioRendition=mX.prototype.Za;mX.prototype.getVideoRendition=mX.prototype.sa;mX.prototype.getTextTracks=mX.prototype.ra;mX.prototype.getAudioTracks=mX.prototype.getAudioTracks;mX.prototype.getVideoTracks=mX.prototype.getVideoTracks;_.w(rX,_.qn);_.r=rX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=sX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Kk.bind(this));d.setMediaPlaybackInfoHandler(this.sk.bind(this));this.a=new GW(this);this.a.init();this.j=new mX;this.j.initialize(this);this.o=new jX(function(e){return c.trigger(e)});this.o.init()};
104
+ _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=sX();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=_.xn(),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(){sX().play();return Promise.resolve()};_.r.pause=function(){sX().pause();return Promise.resolve()};_.r.isPaused=function(){return sX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return sX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=sX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(GV);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 sX().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=sX().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return sX().getPlaybackRate()};
107
+ _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;sX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){this.g.warn(UV);return null};_.r.setVolume=function(){this.g.warn(UV)};_.r.setMuted=function(){this.g.warn(UV)};_.r.isMuted=function(){this.g.warn(UV);return!1};
108
+ _.r.getLoadedSource=function(){var a=sX().getMediaInformation();if(a){var b=sX().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 sX().getStartAbsoluteTime()};
109
+ _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=sX().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=_.Gq();if(this.f){a=sX().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 _.Fq;b.a.j=b.f.a;b.A=_.Jq(a);b.h=_.zn([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:WV(b.h),local:!0};return _.x(e,sX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.za);return new _.nn};
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 PV};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(LV)};_.r.onError=function(a){this.trigger(new _.R(_.le,{detail:a}))};_.r.canPlay=function(){return _.ui()?2:0};
114
+ _.r.Kk=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=WV(this.getStats());var b=sX(),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=sX().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=XV(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=XV(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=XV(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?tX(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;wX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=YV(g,NX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=YV(c,OX));_.N.Yb(e)&&(d=tX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=xX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new rX,_.Pt(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,VV(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=AX(),d=AX().getPlayerManager(),e=new cast.framework.CastReceiverOptions;a&&null!=a.useShakaForHls&&(e.useShakaForHls=a.useShakaForHls);e.customNamespaces={};e.customNamespaces[RV]=cast.framework.system.MessageType.JSON;e.customNamespaces[SV]=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(RV,this.B);this.l.on(document,_.Sg,function(){var f={type:"event",name:_.Sg,visible:!document.hidden};AX().sendCustomMessage(SV,void 0,f)})}};
121
+ _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=AX();AX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);a.removeCustomMessageListener(RV,this.B);a.stop();this.j=this.h=this.m=this.f=null}};_.r.We=function(a){this.o=a};_.r.Wo=function(a){this.A=a};_.r.on=function(a,b){AX().addEventListener(a,b)};_.r.off=function(a,b){AX().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){AX().sendCustomMessage(RV,b,a)};_.r.Pd=function(){return this.a};_.r.Og=function(){return this.a};_.r.Ub=function(){return BX()};_.r.sc=function(a){CX(this,a)};_.r.sp=function(a){var b=BX(),c=null;a?c=Object.assign({},b,a):c=b;CX(this,c)};_.r.Yo=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return AX().getPlayerManager().getQueueManager()};
123
+ _.r.Mk=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,AX().sendCustomMessage(RV,void 0,{type:KV,index:a})))};
124
+ _.r.gn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return EX(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=AX();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=AX();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=XV(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,fX(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,_.Zt(b.m,d),8);case 8:return _.x(l,_.$t(b.m),9);case 9:f=b.m.ab(),c.media.contentId=f.url,c.media.contentType=f.type,f.videoMimeType&&(c.media.hlsVideoSegmentFormat=$V(f.videoMimeType,_.im)),f.audioMimeType&&(c.media.hlsSegmentFormat=$V(f.audioMimeType,_.hm));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&&FX(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&&FX(c.tracks)}return a};
130
+ _.r.Rn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.Tm;var b=AX().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))}_.Ut(this.m)}};_.r.Lk=function(a){this.w.forEach(function(b){return b(a.data)})};_.J(QV,xX);xX.prototype.getQueueManager=xX.prototype.getQueueManager;
131
+ xX.prototype.setQueue=xX.prototype.Yo;xX.prototype.updateContentMetadata=xX.prototype.sp;xX.prototype.setContentMetadata=xX.prototype.sc;xX.prototype.getContentMetadata=xX.prototype.Ub;xX.prototype.isApiReady=xX.prototype.Pd;xX.prototype.sendMessage=xX.prototype.sendMessage;xX.prototype.removeMessageListener=xX.prototype.removeMessageListener;xX.prototype.addMessageListener=xX.prototype.addMessageListener;xX.prototype.off=xX.prototype.off;xX.prototype.on=xX.prototype.on;
132
+ xX.prototype.setLoadRequestDataInterceptor=xX.prototype.Wo;xX.prototype.setPlayerConfigInterceptor=xX.prototype.We;xX.prototype.stop=xX.prototype.stop;xX.prototype.start=xX.prototype.start;xX.prototype.init=xX.prototype.init;xX.getInstance=zX;var yX=null;_.r=HX.prototype;_.r.load=function(){return _.I(function(a){_.z(a)})};_.r.Bb=function(){return!0};_.r.Sc=function(){};_.r.Sa=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(TV,{type:"SKIP_AD",requestId:cW(),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.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.Pa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.Sa()};_.r.resume=function(){this.Bb()};
134
+ _.r.lo=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.R(_.Dc,{adsTimeline:new $W(a.breaks)})));break;case "isPlayingBreak":a.value?IX(this,_.gc):(IX(this,_.kc,this.f),IX(this,_.zc,this.f),this.f=null,IX(this,_.hc));break;case "isPaused":this.f&&(a.value?IX(this,_.tc):IX(this,_.vc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(IX(this,_.kc,this.f),IX(this,_.zc,this.f),this.f=JX(this),IX(this,_.xc,this.f)));break;
135
+ default:this.f||(this.f=JX(this))&&IX(this,_.xc,this.f)}};HX.prototype.resume=HX.prototype.resume;HX.prototype.pause=HX.prototype.pause;HX.prototype.getVolume=HX.prototype.getVolume;HX.prototype.setVolume=HX.prototype.setVolume;HX.prototype.getPosition=HX.prototype.getPosition;HX.prototype.skip=HX.prototype.skip;KX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};KX.prototype.a=function(a,b){return a.namespace()!==_.wd?!1:!(!b||!b.ima)};KX.prototype.create=function(a){return new HX(a.a)};LX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};LX.prototype.a=function(a,b){return zX().Og()?!(!b||!b.ima):!1};LX.prototype.create=function(a){return new bX(a)};_.J("clpp.cast.createCastQueue",function(){MX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(MX,cast.framework.QueueBase);MX.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 MX});_.Yq(new KX);_.Yq(new LX);};
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));}