@castlabs/prestoplay 6.33.0 → 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 +22 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +19 -19
  5. package/cjs/cl.cast.js +129 -129
  6. package/cjs/cl.conviva.js +31 -31
  7. package/cjs/cl.core.js +635 -624
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +101 -101
  10. package/cjs/cl.externs.js +49 -74
  11. package/cjs/cl.freewheel.js +26 -26
  12. package/cjs/cl.hls.js +76 -76
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +26 -26
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +356 -353
  18. package/cjs/cl.muxdata.js +14 -14
  19. package/cjs/cl.onboard.js +4 -5
  20. package/cjs/cl.persistent.js +14 -14
  21. package/cjs/cl.playlist.js +6 -6
  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 +72 -72
  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 +4 -4
  32. package/cjs/cl.youbora.js +39 -39
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +14 -14
  36. package/cl.cast.js +100 -100
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +513 -502
  39. package/cl.crypto.js +9 -9
  40. package/cl.dash.js +90 -90
  41. package/cl.externs.js +52 -65
  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 +20 -20
  47. package/cl.mediatailor.js +2 -2
  48. package/cl.mse.js +306 -306
  49. package/cl.muxdata.js +13 -13
  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 +61 -61
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +31 -31
  64. package/package.json +1 -1
  65. package/typings.d.ts +57 -171
package/cjs/cl.cast.js CHANGED
@@ -1,138 +1,138 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var yV="Cannot seek during ads playout.",zV="Cannot switch track",AV="Media session does not exist.",BV="No receivers available",CV="QUEUE_ITEM_CHANGED",DV="Reset ABR functionality not available on cast.",EV="SDK not yet ready",FV="Sender is destroyed.",GV="clpp.cast.CastProxy",HV="clpp.cast.Player",IV="clpp.cast.Receiver",JV="urn:x-cast:castlabs",KV="urn:x-cast:castlabs:int",LV="urn:x-cast:com.google.cast.media",MV="volume control is not supported",NV=function(a){return _.I(function(b){return 1==
3
- b.a?_.x(b,a.jd(_.af),2):_.x(b,a.jd(_.$e),0)})},OV=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.re){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.We?"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}})},PV=function(a){if(typeof a!==_.jg)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
- QV=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},{})},RV=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=_.pt(d,a.mimeType,g);if(!f||!g)return q.C(2);l=_.Wk(a.url);return _.x(q,c.fetch(l).U,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Ni(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)})},SV=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 _.Rg:return d.FMP4;case _.Qg:return b===_.Xs?d.MPEG2_TS:c.TS;case _.Rc:return c.AAC;case _.Tc:return c.AC3;case _.Uc:return c.E_AC3;
6
- case "audio/mpeg":return c.MP3;case _.Vc:return c.FMP4}},UV=function(a){a=void 0===a?TV:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.N(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,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}},VV=function(){return Math.round(1E3*Math.random())},WV=function(a,b){this.log=new _.L(b);this.player=a;this.j=null;this.l=this.f=_.dp;this.h=2;this.B=Date.now();this.A=-1},XV=function(a){WV.call(this,a,"clpp.cast.SenderStateManager");this.o=this.a=null;this.w=this.qc.bind(this)},YV=function(){this.g=new _.L("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},ZV=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},
8
- aW=function(a,b){var c=ZV(a);return $V(a,b).find(function(d){return c.includes(d.id)})||null},$V=function(a,b){return a.h.filter(function(c){return c.type===b})},cW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.Ws){var e=a.wa();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;bW(a,b)},function(f){a.f[b]=null;a.g.debug(zV,f)})}else b===_.Ws&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,
9
- function(){bW(a,b)},function(f){a.g.debug(zV,f)}))},bW=function(a,b){b===_.X?a.a.trigger(new _.Q(_.Yc)):b===_.Ws&&a.a.trigger(new _.Q(_.sg))},gW=function(a,b,c,d){_.Ai.call(this);this.g=new _.L(_.vd);this.X=a;this.w=new _.dj(b);this.W=c;this.ma=d;this.j=this.H=_.Hn();this.D=[];this.B=0;this.J=new _.Sm;this.a=null;this.f=!1;this.M=new _.jm;this.A=!1;this.Aa="";this.Ua=1E6;this.h=new YV;this.h.initialize(this);this.l=new XV(this);this.G=new _.ti;this.I=null;this.L=new Set;this.P=this.Gn.bind(this);
10
- this.Ba=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(){dW(!0)},0)}});eW(this);fW.add(this)},hW=function(a){var b,c;return _.I(function(d){if(1==d.a)return a.G.release(),fW["delete"](a),a.f&&(a.f=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,
11
- a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ba)),c=[],a.h&&(c.push(a.h.destroy()),a.h=null),a.l&&(c.push(a.l.destroy()),a.l=null),_.x(d,Promise.all(c),2);a.A=!1;a.w&&(a.w.stop(),a.w=null);a.W=null;a.ma=null;_.z(d)})},jW=function(a){if(!a)return null;a:{var b=a.metadataType;var c=Object.entries(iW);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=UV(iW[b]);return Object.assign(b,
12
- a)},kW=function(a){var b=void 0===b?TV:b;return Object.values(iW).includes(a)?a:b},lW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},eW=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.th();b=cast.framework.CastContext.getInstance();var c=new cast.framework.CastOptions;c.receiverApplicationId=a.X;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ba);mW&&a.w.ia(.02)}},nW=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},pW=function(a,b){oW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(JV,a.T);b.addMessageListener(KV,a.ba)},oW=function(a,b){a.a=b;a.a&&(a.l&&a.l.init(),a.trigger(new _.Q(_.Ie)))},qW=function(a){return _.I(function(b){return a.Ea()?b.C(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},rW=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,t,u,y,A,D,C,E,B;return _.I(function(J){switch(J.a){case 1:if(!a.f)return J["return"]();
15
- c=chrome.cast.media.StreamType;d=_.tw;return _.x(J,qW(a),2);case 2:if(!b)return J["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;k=b;l=k.wc;m=k.wb;g.hlsVideoSegmentFormat=SV(l,d.VIDEO);g.hlsSegmentFormat=SV(m,d.AUDIO);if(!b.Ka){J.C(3);break}if(!a.K){J.C(4);break}return _.x(J,Promise.resolve(a.K(b.Ka)),5);case 5:if(n=J.f)b.Ka=n;case 4:a.j=b.Ka;a.D=_.Nn(a.j);a.B=a.D.findIndex(function(O){return O.url===
16
- b.source.url});if(!b.Ka.remoteTextTracks){J.C(6);break}return _.x(J,Promise.all(b.Ka.remoteTextTracks.map(a.Vl.bind(a))),7);case 7:p=J.f,g.tracks=p.filter(function(O){return O}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:OV(b.Ka)};case 3:q=a.Vb()||{};t=kW(q.metadataType);typeof b.eh===_.h&&(u={metadataType:t,sectionStartAbsoluteTime:b.eh});b.source.name&&(y={metadataType:t,title:b.source.name});A=lW(q);if(D=jW(Object.assign({},u,
17
- y,A)))g.metadata=D;C=new chrome.cast.media.LoadRequest(g);(E=b.queueData)&&E.items&&0<E.items.length&&(B=new chrome.cast.media.QueueData,B.items=E.items,B.startIndex=E.startIndex,C.queueData=B);typeof b.autoplay===_.ad&&(C.autoplay=b.autoplay);typeof b.currentTime===_.h&&(C.currentTime=b.currentTime);return _.x(J,f.loadMedia(C),8);case 8:null!=b.Ka.muted&&a.setMuted(b.Ka.muted),null!=b.Ka.volume&&a.setVolume(b.Ka.volume),_.z(J)}})},sW=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=
18
- a.h.wa())&&d.language&&(a.j.preferredTextLanguage=d.language);(e=a.h.qa())&&e.language&&(a.j.preferredAudioLanguage=e.language);return _.x(f,rW(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),eh:a.getPresentationStartTime(),autoplay:b,Ka:a.j}),0)})},dW=function(a){if(a){a=_.v(fW);for(var b=a.next();!b.done;b=a.next())eW(b.value);tW=!0;a=_.v(uW);for(b=a.next();!b.done;b=a.next())b=b.value,b()}},wW=function(a,b,c){_.Ai.call(this);this.f=a;this.h=b;this.j=typeof c===_.re?c:this.Oo;this.a=
19
- vW(this);this.g=new _.L(GV);this.forwardEventsTo(this.f)},vW=function(a){return new gW(a.h,function(){a.trigger(new _.Q(_.hd))},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);_.Co(a.f,null);a.trigger(new _.Q("castingended"));a.j(b,d)},function(){return xW(a)})},xW=function(a){var b,
20
- c,d;return _.I(function(e){if(1==e.a){a.trigger(new _.Q(_.gd));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)}_.Co(a.f,a.a);if(!c)return e.C(0);_.Ro(a.f);return(d=a.f.getAdsManager())?_.x(e,d.load(),0):e.C(0)})},yW=function(a){WV.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);this.K=this.Sk.bind(this);this.J=this.Rk.bind(this);this.L=this.io.bind(this);this.G=
21
- this.Sn.bind(this);this.D=this.Ok.bind(this);this.a=this.Nk.bind(this)},zW=function(a,b){a=void 0===a?[]:a;b=void 0===b?0:b;_.Ai.call(this);this.a=a.slice();this.f=b},AW=function(a){a.trigger(new _.Q(_.yf))},CW=function(a,b,c){c=void 0===c?function(){return Promise.resolve()}:c;_.Ai.call(this);var d=this;this.m=a;this.a=b;this.w=c;this.j=this.f=this.h=!1;this.o=function(){var e,f;return _.I(function(g){switch(g.a){case 1:if(d.f)return g["return"]();e=d.a.Wb();if(!e)return g["return"]();d.f=!0;_.F(g,
22
- 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:_.Bh(g);d.f=!1;_.Ch(g);break;case 2:throw f=_.H(g),f;}})};this.l=function(){BW(d)}},BW=function(a){GW(a);var b=Math.min(a.a.Be().length-1,a.a.getPosition()+1);a.a.setPosition(b)},GW=function(a){a.j||(a.a.on(_.xf,a.o),a.j=!0)},LW=function(a,b,c){var d=this;this.player=a;this.cc=new zW(c);this.Wd=new CW({open:this.player.open.bind(this.player),off:this.player.off.bind(this.player),on:this.player.on.bind(this.player)},
23
- this.cc,function(){return _.I(function(e){_.z(e)})});this.a=new wW(this.player,b,function(e,f){var g;return _.I(function(k){if(1==k.a)return g=d.cc.getPosition(),d.Wd.Od(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===CV&&typeof e.index===_.h&&d.cc.setPosition(e.index)};this.a.addMessageListener(this.f)},QW=function(a){return a.map(function(b){var c=
24
- {};c.media={contentId:b.configuration.source};c.customData={skippable:!1!==b.skippable};return c})},RW=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},SW=function(a){this.a=a},UW=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,cast.framework.events.EventType.BREAK_ENDED,
25
- 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;TW().addEventListener(this.h,this.j)},YW=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);VW=!1;e=_.Wk(d);return _.x(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.R.ga(f.data),k=new DOMParser,l=
26
- k.parseFromString(g,_.rg),l.getElementsByTagName("vmap:VMAP").length)WW.warn("VMAP detected."),a.vmapAdsRequest=XW(g);else if(l.getElementsByTagName("VAST").length){WW.warn("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=XW(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else WW.warn("Unsupported schema."),VW=!0;return _.G(n,0)}m=_.H(n);WW.warn("Failed to fetch an ad",m);VW=!0;_.z(n)})},XW=function(a){var b=new cast.framework.messages.VastAdsRequest;
27
- b.adsResponse=a;return b},TW=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},$W=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;(c=ZW(a,c))&&(d={ad:c});a.m.trigger(new _.Q(b,d))}},aX=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},ZW=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.jg&&(d=a.a.getBreakClipById(b.breakClipId));
28
- typeof b.breakId===_.jg&&(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 RW(d,e,b.index,b.total,f)}return c},bX=function(a){this.a=a;this.f=this.h.bind(this)},cX=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,
29
- cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},dX=function(a){var b=a.dashTimedMetadata,c=_.Gg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Fg)?_.Xf:_.Dg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},eX=function(){this.g=new _.L("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Fo.bind(this);this.a=this.f=null},fX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},
30
- hX=function(a){a.a=fX().getTextTracksManager();var b=a.a.getTracks();a.j=gX(_.Ws,b)},iX=function(a,b,c,d){c=_.Fi(c).filter(function(k){return k});var e=!1,f=[];b===_.X?f=a.getAudioTracks():b===_.Ws&&(f=a.ra());if(c=c.find(function(k){var l=_.no(k);return f.some(function(m){m=_.no(m.language||"");return _.oo(l,m)})})){var g=_.no(c);c=f.filter(function(k){k=_.no(k.language||"");return _.oo(g,k)});f=c.length?c:f;e=e||!!c.length}_.R.Rf(d)&&(c=f.filter(function(k){return k.roles.includes(d)}),f=c.length?
31
- c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.X?a.La(e):b===_.Ws&&a.jb(e))},gX=function(a,b){for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Us(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||
32
- f.src);f.renditions.push(new _.bt(f.id,f));c.push(f)}return c},jX=function(){_.Ai.call(this);this.g=new _.L(HV);this.h=this.w=_.Hn();this.A=null;this.l=-1;this.G=new _.Sm;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},kX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},lX=function(a,b){var c=Object.assign({},a.shakaConfig,b);return Object.assign({},a,{shakaConfig:c})},oX=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=
33
- void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.Tn(d);if(e){var f=[_.Hd];_.Nn(a)[0].type!==_.Oc&&f.unshift(_.Jd);d.preferredDrmSystem===_.Hd&&f.reverse();for(var g,k;f.length&&!k;)g=f.shift(),k=e.Ta[g];k?(d=g===_.Jd?cast.framework.ContentProtection.WIDEVINE:g===_.Hd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=k.licenseUrl,d={ldlDelay:0,customData:{}},mX(b,k,a,d),nX(b,k,a,d)):c()}else c()}else c()},mX=function(a,b,c,
34
- d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Wk({method:_.ob,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},nX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(k){return 1==k.a?(g=_.$k(Object.assign({},
35
- f.headers),e.buffer,200,""),_.x(k,b.modifiers.licenseResponse(c,g,d),2)):k["return"](_.Ni(g.data))})}:a.licenseHandler=void 0},pX=function(){this.a=!1;this.g=new _.L(IV);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 _.ti;this.j=this.h=this.A=null},rX=function(){return qX||(qX=new pX)},sX=function(){return cast.framework.CastReceiverContext.getInstance()},tX=function(){var a=sX().getPlayerManager().getMediaInformation();return a&&a.metadata?
36
- a.metadata:null},uX=function(a,b){var c=sX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;sX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},wX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=sX();c=(sX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Rg:_.Qg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,
37
- "\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=vX(k,_.wa),m=vX(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")},vX=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):
38
- (c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},xX=function(a){a=_.v(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c={};b.customData&&_.M.Zb(b.customData)&&(c=b.customData);b.roles&&(c.roles=b.roles);b.audioTrackInfo&&(c.audioTrackInfo=b.audioTrackInfo);_.M.Zb(c)&&(b.customData=c)}},zX=function(a){this.h=a;this.a=null;this.j=new _.ti;this.f=null;yX(this)},yX=function(a){_.I(function(b){if(1==b.a)return _.x(b,a.h.M,2);a.a=a.h.o;a.j.on(a.a.controller,cast.framework.RemotePlayerEventType.ANY_CHANGE,
39
- a.lo.bind(a));_.z(b)})},AX=function(a,b,c){var d=null;c&&(d={ad:c});a.h.trigger(new _.Q(b,d))},BX=function(a){if(!a.a||!a.a.mediaInfo)return null;var b=a.a.mediaInfo.breaks,c=a.a.mediaInfo.breakClips,d=a.a.isPlayingBreak,e=a.a.breakId,f=a.a.currentBreakClipNumber,g=a.a.numberBreakClips,k=a.a.breakClipId;if(!(b&&c&&null!=e&&null!=f&&null!=g&&null!=k&&d))return null;var l=b.find(function(m){return m.id===e})||null;a=0;l&&(a=0>=l.position?l.position:b.filter(function(m){return 0<=m.position}).sort(function(m,
40
- n){return m.position-n.position}).findIndex(function(m){return m===l}));b=c.find(function(m){return m.id===k})||null;return new RW(b,l,f,g,a)},CX=function(){},DX=function(){},EX;_.K("clpp.cast.CastUtils",function(){});
41
- var TV=0,iW={GENERIC:TV,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5},FX="addMissingTimelineCues alwaysStreamText bufferBehind bufferingGoal durationBackoff gapDetectionThreshold ignoreTextStreamFailures lowLatencyMode rebufferingGoal retryParameters safeSeekOffset stallEnabled stallSkip stallThreshold startAtSegmentBoundary".split(" "),GX="bandwidthDowngradeTarget bandwidthUpgradeTarget defaultBandwidthEstimate enabled initialRestrictions restrictions switchInterval".split(" ");_.r=WV.prototype;_.r.release=function(){this.Da(_.dp)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};_.r.onError=function(a){a.severity===_.P&&this.Da(_.xo)};
42
- _.r.Da=function(a){if(a!==this.f)if(this.f===_.xo&&a!==_.dp)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;2===this.f?(this.A=b,this.player.trigger(new _.Q(_.cd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):2===this.l&&this.player.trigger(new _.Q(_.bd,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.Vt(this.j,this.f);this.player.trigger(new _.Q(_.gg,
43
- {detail:a}))}};_.w(XV,WV);XV.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)};XV.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,WV.prototype.destroy.call(a),0)})};XV.prototype.Da=function(a){var b=this.player.o;b&&b.isPlayingBreak||WV.prototype.Da.call(this,a)};
44
- XV.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.Da(5);break;case chrome.cast.media.IdleReason.ERROR:this.Da(_.xo);break;default:this.Da(_.dp)}break;case chrome.cast.media.PlayerState.PLAYING:this.Da(3);break;case chrome.cast.media.PlayerState.PAUSED:this.Da(4);break;case chrome.cast.media.PlayerState.BUFFERING:this.Da(2)}};_.w(YV,_.rt);_.r=YV.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=_.Xs;break;case chrome.cast.media.TrackType.AUDIO:c=_.X;break;case chrome.cast.media.TrackType.TEXT:c=_.Ws}c=new _.Us(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 _.bt(c.id,c));return c}):[],this.a.trigger(new _.Q(_.yg)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return $V(this,_.Xs)};_.r.getAudioTracks=function(){return $V(this,_.X)};_.r.ra=function(){return $V(this,_.Ws)};
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.Hb=function(){return this.f[_.Xs]||null};_.r.Xb=function(){return this.f[_.X]||null};_.r.Yb=function(){return this.f[_.Ws]||null};_.r.Qa=function(){return aW(this,_.Xs)};_.r.qa=function(){return aW(this,_.X)};_.r.wa=function(){return aW(this,_.Ws)};_.r.Qb=function(a){cW(this,_.Xs,a)};
48
- _.r.La=function(a){cW(this,_.X,a)};_.r.jb=function(a){cW(this,_.Ws,a)};_.r.Db=function(a){this.Qb(a&&a.track)};_.r.Ob=function(a){this.La(a&&a.track)};_.r.Pb=function(a){this.jb(a&&a.track)};_.r.addTextTrack=function(){return _.I(function(a){_.z(a)})};_.r.xa=function(){return!0};YV.prototype.isAbrEnabled=YV.prototype.xa;YV.prototype.addTextTrack=YV.prototype.addTextTrack;YV.prototype.setTextRendition=YV.prototype.Pb;YV.prototype.setAudioRendition=YV.prototype.Ob;YV.prototype.setVideoRendition=YV.prototype.Db;
49
- YV.prototype.setTextTrack=YV.prototype.jb;YV.prototype.setAudioTrack=YV.prototype.La;YV.prototype.setVideoTrack=YV.prototype.Qb;YV.prototype.getTextTrack=YV.prototype.wa;YV.prototype.getAudioTrack=YV.prototype.qa;YV.prototype.getVideoTrack=YV.prototype.Qa;YV.prototype.getLoadingTextRendition=YV.prototype.Yb;YV.prototype.getLoadingAudioRendition=YV.prototype.Xb;YV.prototype.getLoadingVideoRendition=YV.prototype.Hb;YV.prototype.getTextRendition=YV.prototype.gb;YV.prototype.getAudioRendition=YV.prototype.Ya;
50
- YV.prototype.getVideoRendition=YV.prototype.sa;YV.prototype.getTextTracks=YV.prototype.ra;YV.prototype.getAudioTracks=YV.prototype.getAudioTracks;YV.prototype.getVideoTracks=YV.prototype.getVideoTracks;_.w(gW,_.Ai);_.r=gW.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(_.kb)};_.r.appendLoad=function(){return Promise.reject(_.kb)};
51
- _.r.seekWith=function(){return Promise.reject(_.kb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.destroy=function(){return _.I(function(a){_.z(a)})};_.r.Ye=function(a){this.K=a};_.r.Qd=function(){return this.f};_.r.Ea=function(){return this.A};_.r.Jg=function(){return this.Aa};
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 _.N(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 _.N(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.Qd())throw a.g.warn(EV),new _.N(1,8,8001,void 0);if(!mW)throw a.g.warn(BV),new _.N(1,8,8002,void 0);if(a.Ea())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.F(d,2);return _.x(d,qW(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 _.N(1,8,8E3,c);})};
54
- _.r.Ff=function(){this.f&&this.Ea()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.r.addMessageListener=function(a){typeof a===_.re&&this.L.add(a)};_.r.removeMessageListener=function(a){typeof a===_.re&&this.L["delete"](a)};_.r.play=function(){var a=this;return this.f?this.isEnded()?sW(this,!0):new Promise(function(b,c){if(!a.a)return c(AV);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(AV);a.a.pause(null,b,c)}):Promise.resolve()};_.r.isPaused=function(){return this.f?!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED:!1};_.r.isEnded=function(){return this.f?5===this.getState():!1};
56
- _.r.seek=function(a){var b=this;return this.f?this.isEnded()?sW(this,!1,a):new Promise(function(c,d){b.a||d(AV);b.o.isPlayingBreak&&d(yV);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.Q(_.Ig));b.a.seek(e,function(){b.trigger(new _.Q(_.Hg));c()},d)}):Promise.resolve()};_.r.getPosition=function(){return this.f?this.getMediaPosition():0};_.r.getMediaPosition=function(){return this.f?this.a&&this.a.getEstimatedTime()||0:0};
2
+ var f=function(window){var 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
+ _.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(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(LV,{type:"SET_PLAYBACK_RATE",requestId:VV(),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():_.dp:_.dp};_.r.getStats=function(){return this.f?this.a&&this.a.customData&&this.a.customData.stats?PV(this.a.customData.stats):_.au():_.au()};
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.Qd())return b.g.warn(EV),e["return"]();if(!mW)return b.g.warn(BV),e["return"]();b.D=_.Nn(a);b.j=_.Jn([b.H,a]);c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.j.autoplay,Ka:b.j,wc:c.wc,wb:c.wb};return _.x(e,rW(b,d),0)})};_.r.getBufferInfo=function(){return new _.ci};_.r.getTrackManager=function(){return this.h};_.r.getConfiguration=function(){return this.j};
62
- _.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.J=a};_.r.getNetworkEngine=function(){return this.J};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.setCmsdManager=function(){};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(DV)};
63
- _.r.onError=function(a){if(a&&(this.trigger(new _.Q(_.ne,{detail:a})),this.l))this.l.onError(a)};_.r.namespace=function(){return _.vd};_.r.canPlay=function(){return this.Qd()?2:0};_.r.Vb=function(){return this.I};_.r.tc=function(a){this.I=jW(a)};_.r.Ag=function(){this.I=null};_.r.nh=function(a){if(this.f){var b=this.Vb()||{};a={metadataType:kW(b.metadataType),title:a};this.tc(Object.assign({},b,a))}};
64
- _.r.lh=function(a){if(this.f){var b=this.Vb()||{},c=kW(b.metadataType);a=new chrome.cast.Image(a);this.tc(Object.assign({},b,{metadataType:c,images:[a]}))}};_.r.kh=function(a){if(this.f){var b=this.Vb()||{};this.tc(Object.assign({},b,{metadataType:3,artist:a}))}};_.r.mh=function(a){if(this.f){var b=this.Vb()||{};a={metadataType:kW(b.metadataType),releaseDate:a};this.tc(Object.assign({},b,a))}};
65
- _.r.Gn=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;mW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.Aa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.th()};
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;pW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Ea()||(this.A=!0,pW(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Ea()&&this.a){var b=this.a.media,c=this.h.qa(),d=this.h.wa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.W(this.getState(),{source:{url:b.contentId,type:b.contentType,
67
- isLive:this.isLive()},currentTime:nW(this),Uj:d,Kh:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(JV,this.T);a.session.removeMessageListener(KV,this.ba);this.A=!1;this.a=null}};_.r.Un=function(a){this.g.debug("New media session",a.mediaSession);oW(this,a.mediaSession)};_.r.Tn=function(a){a.value&&a.value.tracks&&this.h&&this.h.load()};_.r.Nn=function(a,b){var c=PV(b);this.L.forEach(function(d){return d(c)})};
68
- _.r.Mn=function(a,b){var c=PV(b);"event"===c.type&&c.name===_.Vg&&this.trigger(new _.Q(_.id,{visible:!!c.visible}))};_.r.Jk=function(){this.trigger(new _.Q(_.xg))};
69
- _.r.Vl=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.x(e,RV(a,[_.qg,_.Nc],b.J,b.j),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ua++,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 mW=!1,fW=new Set,tW=!1,uW=[];window.__onGCastApiAvailable=dW;
70
- _.K("clpp.cast.onReady",function(a){tW?a():uW.push(a)});_.w(wW,_.Ai);_.r=wW.prototype;_.r.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.x(b,hW(a.a),3):b.C(2);2!=b.a&&(a.a=null);a.stopForwardingEventsTo(a.f);_.z(b)})};_.r.Oo=function(a,b){5!==a&&a!==_.dp&&(delete b.license,this.f.open(b))};_.r.Bd=function(){return!!this.a&&this.a.Qd()&&mW};_.r.Ea=function(){return!!this.a&&this.a.Ea()};_.r.Jg=function(){return this.a?this.a.Jg():""};_.r.Ye=function(a){this.a&&this.a.Ye(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===_.ad?l.isLive:c.f.isLive();k={source:l,isLive:m,autoplay:!c.f.isPaused(),currentTime:Math.max(c.f.getPosition()-1,0),eh:c.f.getPresentationStartTime(),wc:n,wb:q,Ka:k}}d=k;b&&d&&(d.queueData={items:b.items,startIndex:b.startIndex});return _.x(g,xW(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,rW(c.a,d),7);case 7:_.G(g,0);
73
- break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.Q(_.ne,{detail:e}),c.trigger(f),_.z(g)}})};_.r.Ff=function(){this.a&&this.a.Ff()};_.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,hW(b.a),2):c.C(2)}b.a=vW(b);_.z(c)})};_.r.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.x(c,b.a.sendMessage(JV,a),0):(b.g.warn(FV),c["return"]())})};
74
- _.r.Hj=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(LV,{type:"QUEUE_NEXT",requestId:VV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Ij=function(){var a=this;return _.I(function(b){return _.x(b,a.a.sendMessage(LV,{type:"QUEUE_PREV",requestId:VV(),mediaSessionId:a.a.a.mediaSessionId}),0)})};_.r.Gj=function(a){var b=this;return _.I(function(c){return _.x(c,b.a.sendMessage(LV,{type:"QUEUE_INSERT",requestId:VV(),mediaSessionId:b.a.a.mediaSessionId,items:a}),0)})};
75
- _.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(FV)};_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(FV)};_.r.Vb=function(){return this.a&&this.a.Vb()};_.r.tc=function(a){this.a&&this.a.tc(a)};_.r.Ag=function(){this.a&&this.a.Ag()};_.r.nh=function(a){this.a&&this.a.nh(a)};_.r.lh=function(a){this.a&&this.a.lh(a)};_.r.kh=function(a){this.a&&this.a.kh(a)};_.r.mh=function(a){this.a&&this.a.mh(a)};_.K(GV,wW);
76
- wW.prototype.setContentReleaseDate=wW.prototype.mh;wW.prototype.setContentArtist=wW.prototype.kh;wW.prototype.setContentImage=wW.prototype.lh;wW.prototype.setContentTitle=wW.prototype.nh;wW.prototype.clearContentMetadata=wW.prototype.Ag;wW.prototype.setContentMetadata=wW.prototype.tc;wW.prototype.getContentMetadata=wW.prototype.Vb;wW.prototype.removeMessageListener=wW.prototype.removeMessageListener;wW.prototype.addMessageListener=wW.prototype.addMessageListener;wW.prototype.queueAddItems=wW.prototype.Gj;
77
- wW.prototype.queuePreviousItem=wW.prototype.Ij;wW.prototype.queueNextItem=wW.prototype.Hj;wW.prototype.sendMessage=wW.prototype.sendMessage;wW.prototype.changeReceiverId=wW.prototype.Dk;wW.prototype.forceDisconnect=wW.prototype.Ff;wW.prototype.cast=wW.prototype.cast;wW.prototype.setPlayerConfigInterceptor=wW.prototype.Ye;wW.prototype.getReceiverName=wW.prototype.Jg;wW.prototype.isCasting=wW.prototype.Ea;wW.prototype.canCast=wW.prototype.Bd;wW.prototype.destroy=wW.prototype.destroy;_.w(yW,WV);_.r=yW.prototype;
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
+ _.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(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,WV.prototype.destroy.call(a),0)})};_.r.Qk=function(){this.player.trigger(new _.Q(_.lf));this.Da(3)};_.r.Pk=function(){this.Da(4)};_.r.Pn=function(){this.Da(5)};_.r.En=function(a){a.isBuffering?this.Da(2):(a=this.player.isPaused()?4:3,this.Da(a))};_.r.Sk=function(){this.h=1;this.player.trigger(new _.Q(_.Ig))};_.r.Rk=function(){this.player.trigger(new _.Q(_.Hg))};_.r.io=function(){this.h=2};_.r.Sn=function(){this.Da(1)};
81
- _.r.Nk=function(a){var b=this.player.getStats();this.player.trigger(new _.Q(_.$c,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.Ok=function(a){a=new _.N(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.Q(_.ne,{detail:a}));this.Da(_.xo)};_.w(zW,_.Ai);_.r=zW.prototype;_.r.Be=function(){return this.a};_.r.getPosition=function(){return this.f};_.r.Wb=function(){return this.a[this.f]||null};_.r.Ni=function(){return this.a[this.f+1]||null};_.r.setPosition=function(a){0>a||a>=this.a.length||(this.f=a,this.trigger(new _.Q(_.xf,{item:this.Wb()})))};_.r.append=function(a){this.a.push(a);AW(this)};_.r.Si=function(a,b){0>b||b>this.a.length||(this.a.splice(b,0,a),AW(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--,AW(this))};_.r.clear=function(){this.a=[];this.f=0;AW(this)};_.w(CW,_.Ai);_.r=CW.prototype;_.r.start=function(){this.h||this.f||(this.h=!0,this.m.on(_.me,this.l),GW(this),this.a.setPosition(this.a.getPosition()))};_.r.next=function(){var a=this.a.Wb();a&&!1===a.skippable||BW(this)};_.r.Ve=function(){var a=this.a.Wb();a&&!1===a.skippable||(GW(this),a=Math.max(0,this.a.getPosition()-1),this.a.setPosition(a))};_.r.Od=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(_.me,this.l);this.a.off(_.xf,this.o);this.j=!1};_.r=LW.prototype;_.r.Zn=function(a){return this.cc.on(_.xf,a)};_.r.$n=function(a){return this.cc.on(_.yf,a)};_.r.Hn=function(a){return this.player.on(_.hd,a)};_.r.Bd=function(){return this.a.Bd()};_.r.Em=function(){return this.cc.Be()};_.r.Ea=function(){return this.a.Ea()};_.r.append=function(a){var b=this;return _.I(function(c){b.cc.append(a);return b.a.Ea()?_.x(c,b.a.Gj(QW([a])),0):c["return"]()})};_.r.tm=function(){return this.cc.getPosition()};_.r.start=function(){this.Wd.start()};_.r.play=function(){this.player.play()};
84
- _.r.pause=function(){this.player.pause()};_.r.destroy=function(){this.Wd.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.Ea())return a.a.Ff(),d["return"]();a.Wd.stop();b=QW(a.cc.Be());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.Ea()?_.x(b,a.a.Hj(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Wd.next(),0)})};_.r.Ve=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.x(b,a.a.Ij(),3):b.C(2):2!=b.a?b["return"]():_.x(b,a.Wd.Ve(),0)})};_.K("clpp.cast.playlist.CastPlaylist",LW);LW.prototype.previous=LW.prototype.Ve;LW.prototype.next=LW.prototype.next;LW.prototype.toggleCast=LW.prototype.jp;LW.prototype.destroy=LW.prototype.destroy;
86
- LW.prototype.pause=LW.prototype.pause;LW.prototype.play=LW.prototype.play;LW.prototype.start=LW.prototype.start;LW.prototype.getCurrentIndex=LW.prototype.tm;LW.prototype.append=LW.prototype.append;LW.prototype.isCasting=LW.prototype.Ea;LW.prototype.getPlaylistItems=LW.prototype.Em;LW.prototype.canCast=LW.prototype.Bd;LW.prototype.onCastStatusChanged=LW.prototype.Hn;LW.prototype.onPlaylistModified=LW.prototype.$n;LW.prototype.onPlaylistItemChange=LW.prototype.Zn;_.r=RW.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.Jb=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};_.r.getPosition=function(){return 0};
87
- _.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.Lb=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.zb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.j};_.r.zb=function(){return this.f.position};_.r.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.Kb=function(){return null};RW.prototype.getVideoElement=RW.prototype.Kb;RW.prototype.getWrapperCreativeIds=RW.prototype.getWrapperCreativeIds;RW.prototype.getWrapperAdSystems=RW.prototype.getWrapperAdSystems;RW.prototype.canSeek=RW.prototype.canSeek;RW.prototype.getWrapperAdIds=RW.prototype.getWrapperAdIds;
89
- RW.prototype.getSequenceLength=RW.prototype.fb;RW.prototype.getPositionInSequence=RW.prototype.nb;RW.prototype.getPodTimeOffset=RW.prototype.zb;RW.prototype.getPodIndex=RW.prototype.getPodIndex;RW.prototype.getPodType=RW.prototype.Ha;RW.prototype.getMediaBitrate=RW.prototype.Ga;RW.prototype.getMediaHeight=RW.prototype.cb;RW.prototype.getMediaWidth=RW.prototype.eb;RW.prototype.getMediaUrl=RW.prototype.getMediaUrl;RW.prototype.getClickThroughUrl=RW.prototype.Za;RW.prototype.isBumper=RW.prototype.Lb;
90
- RW.prototype.getSkipTimeOffset=RW.prototype.getSkipTimeOffset;RW.prototype.getPosition=RW.prototype.getPosition;RW.prototype.getDuration=RW.prototype.getDuration;RW.prototype.getTitle=RW.prototype.getTitle;RW.prototype.getAdvertiserName=RW.prototype.getAdvertiserName;RW.prototype.getAdSystem=RW.prototype.getAdSystem;RW.prototype.getApiFramework=RW.prototype.getApiFramework;RW.prototype.getSourceId=RW.prototype.Jb;RW.prototype.getCreativeId=RW.prototype.getCreativeId;RW.prototype.getId=RW.prototype.getId;
91
- RW.prototype.getTechnology=RW.prototype.ob;RW.prototype.getAdManagerVersion=RW.prototype.lb;RW.prototype.getAdManagerName=RW.prototype.kb;SW.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};SW.prototype.ac=function(){return!!this.a.find(function(a){return 0===a.position})};SW.prototype.$b=function(){return!!this.a.find(function(a){return-1===a.position})};SW.prototype.hasPostroll=SW.prototype.$b;SW.prototype.hasPreroll=SW.prototype.ac;SW.prototype.getCuePoints=SW.prototype.getCuePoints;_.r=UW.prototype;_.r.load=function(){var a=this;return _.I(function(b){VW&&(VW=!1,aX(a,0));_.z(b)})};_.r.Cb=function(){return!0};_.r.Uc=function(){};_.r.qb=function(){-1!==this.getPosition()&&TW().pause()};_.r.skip=function(){};_.r.getAdVolume=function(){WW.warn(MV);return 0};_.r.Oa=function(){WW.warn(MV)};_.r.setMuted=function(){};_.r.isMuted=function(){return!1};_.r.Ab=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.Rc=function(){return!0};_.r.Cc=function(){var a=this;return _.I(function(b){TW().removeEventListener(a.h,a.j);_.z(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.qb()};_.r.resume=function(){this.Cb()};
93
- _.r.Tk=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=TW().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.Q(_.Cc,{adsTimeline:new SW(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:$W(this,_.pc,a);break;case cast.framework.events.EventType.BREAK_STARTED:$W(this,_.fc,a);break;case cast.framework.events.EventType.BREAK_ENDED:$W(this,_.gc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:$W(this,
94
- _.yc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?($W(this,_.xc,a),$W(this,_.zc,a)):a.endedReason===b.STOPPED?$W(this,_.zc,a):a.endedReason===b.END_OF_STREAM?($W(this,_.jc,a),$W(this,_.zc,a)):a.endedReason===b.ERROR&&aX(this,1);break;case cast.framework.events.EventType.PLAYING:this.f=!1;$W(this,_.wc,a);break;case cast.framework.events.EventType.PAUSE:this.f=!0;$W(this,_.rc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?$W(this,_.hc,
95
- a):(this.f=!1,$W(this,_.wc,a))}};UW.prototype.resume=UW.prototype.resume;UW.prototype.pause=UW.prototype.pause;UW.prototype.getVolume=UW.prototype.getVolume;UW.prototype.setVolume=UW.prototype.setVolume;UW.prototype.getPosition=UW.prototype.getPosition;UW.prototype.skip=UW.prototype.skip;var VW=!1,WW=new _.L("clpp.cast.ads.AdsManager");bX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(cX(),this.f)};bX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(cX(),this.f)};bX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return dX(a)})};
96
- bX.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=_.tg;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.ug;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.vg}b&&this.a(new _.Q(b,{detail:dX(a.timedMetadataInfo)}))}else for(a=_.v(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.a(new _.Q(_.tg,{detail:b.value}))};_.w(eX,_.rt);_.r=eX.prototype;_.r.initialize=function(a){this.m=a;fX().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;fX().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.Hb=function(){return null};_.r.Xb=function(){return null};_.r.Yb=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.Qb=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.Db=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.Ob=function(a){this.La(a&&a.track)};
99
- _.r.Pb=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,RV(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]),hX(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=fX().getAudioTracksManager();var a=this.f.getTracks();this.h=gX(_.X,a);hX(this);a=this.m.getConfiguration();iX(this,_.X,a.preferredAudioLanguage,a.preferredAudioRole);iX(this,_.Ws,a.preferredTextLanguage,a.preferredTextRole)};eX.prototype.isAbrEnabled=eX.prototype.xa;eX.prototype.addTextTrack=eX.prototype.addTextTrack;eX.prototype.setTextRendition=eX.prototype.Pb;eX.prototype.setAudioRendition=eX.prototype.Ob;
102
- eX.prototype.setVideoRendition=eX.prototype.Db;eX.prototype.setTextTrack=eX.prototype.jb;eX.prototype.setAudioTrack=eX.prototype.La;eX.prototype.setVideoTrack=eX.prototype.Qb;eX.prototype.getTextTrack=eX.prototype.wa;eX.prototype.getAudioTrack=eX.prototype.qa;eX.prototype.getVideoTrack=eX.prototype.Qa;eX.prototype.getLoadingTextRendition=eX.prototype.Yb;eX.prototype.getLoadingAudioRendition=eX.prototype.Xb;eX.prototype.getLoadingVideoRendition=eX.prototype.Hb;eX.prototype.getTextRendition=eX.prototype.gb;
103
- eX.prototype.getAudioRendition=eX.prototype.Ya;eX.prototype.getVideoRendition=eX.prototype.sa;eX.prototype.getTextTracks=eX.prototype.ra;eX.prototype.getAudioTracks=eX.prototype.getAudioTracks;eX.prototype.getVideoTracks=eX.prototype.getVideoTracks;_.w(jX,_.Ai);_.r=jX.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=kX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Kk.bind(this));d.setMediaPlaybackInfoHandler(this.sk.bind(this));this.a=new yW(this);this.a.init();this.j=new eX;this.j.initialize(this);this.o=new bX(function(e){return c.trigger(e)});this.o.init()};
104
- _.r.unload=function(){var a=cast.framework.messages.PlayerState,b=kX();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=_.Hn(),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(){kX().play();return Promise.resolve()};_.r.pause=function(){kX().pause();return Promise.resolve()};_.r.isPaused=function(){return kX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};_.r.isEnded=function(){return kX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=kX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(yV);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 kX().getCurrentTimeSec()};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){var a=kX().getDurationSec();return typeof a===_.h?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return kX().getPlaybackRate()};
107
- _.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;kX().sendLocalMediaRequest(b)}};_.r.getVolume=function(){this.g.warn(MV);return null};_.r.setVolume=function(){this.g.warn(MV)};_.r.setMuted=function(){this.g.warn(MV)};_.r.isMuted=function(){this.g.warn(MV);return!1};
108
- _.r.getLoadedSource=function(){var a=kX().getMediaInformation();if(a){var b=kX().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,Up:b,name:c}}return null};_.r.getDrmInfo=function(){return null};_.r.getPresentationStartTime=function(){return kX().getStartAbsoluteTime()};
109
- _.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=kX().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():_.dp};
110
- _.r.getStats=function(){var a=_.au();if(this.f){a=kX().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 _.$t;b.a.j=b.f.a;b.A=_.Nn(a);b.h=_.Jn([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:OV(b.h),local:!0};return _.x(e,kX().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.ya);return new _.ci};
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(_.kb)};_.r.appendLoad=function(){return Promise.reject(_.kb)};_.r.seekWith=function(){return Promise.reject(_.kb)};_.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 HV};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.getCueTimeline=function(){return null};_.r.resetAbr=function(){this.g.warn(DV)};_.r.onError=function(a){this.trigger(new _.Q(_.ne,{detail:a}))};_.r.canPlay=function(){return _.kj()?2:0};
114
- _.r.Kk=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=OV(this.getStats());var b=kX(),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=kX().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=PV(a.media.customData.playerConfiguration));var e=null,f=null;a.media.customData&&(e=PV(a.media.customData["com.castlabs.reactnative.PlayerConfiguration"]),f=PV(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?lX(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;oX(c,d);e={};g=c.streaming||null;f&&f.useSenderStreamingConfig&&g&&(e.streaming=QV(g,FX));c=c.abr||null;f&&f.useSenderAbrConfig&&c&&(e.abr=QV(c,GX));_.M.Zb(e)&&(d=lX(d,e));return d};_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r=pX.prototype;_.r.init=function(a){var b=this;a&&(this.f=new jX,_.Co(a,this.f),this.m=a,this.l.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.dp?_.x(c,NV(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=sX(),d=sX().getPlayerManager(),e=new cast.framework.CastReceiverOptions;a&&null!=a.useShakaForHls&&(e.useShakaForHls=a.useShakaForHls);e.customNamespaces={};e.customNamespaces[JV]=cast.framework.system.MessageType.JSON;e.customNamespaces[KV]=cast.framework.system.MessageType.JSON;a=new cast.framework.PlaybackConfig;a.manifestHandler=this.gn.bind(this);a.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};
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
+ _.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 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
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(JV,this.B);this.l.on(document,_.Vg,function(){var f={type:"event",name:_.Vg,visible:!document.hidden};sX().sendCustomMessage(KV,void 0,f)})}};
121
- _.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=sX();sX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.D);a.removeCustomMessageListener(JV,this.B);a.stop();this.j=this.h=this.m=this.f=null}};_.r.Ye=function(a){this.o=a};_.r.Wo=function(a){this.A=a};_.r.on=function(a,b){sX().addEventListener(a,b)};_.r.off=function(a,b){sX().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.re&&this.w.add(a)};
122
- _.r.removeMessageListener=function(a){typeof a===_.re&&this.w["delete"](a)};_.r.sendMessage=function(a,b){sX().sendCustomMessage(JV,b,a)};_.r.Qd=function(){return this.a};_.r.Pg=function(){return this.a};_.r.Vb=function(){return tX()};_.r.tc=function(a){uX(this,a)};_.r.rp=function(a){var b=tX(),c=null;a?c=Object.assign({},b,a):c=b;uX(this,c)};_.r.Yo=function(a){this.h=a;this.j=null};_.r.getQueueManager=function(){return sX().getPlayerManager().getQueueManager()};
123
- _.r.Mk=function(){var a=this.getQueueManager();a&&(a=a.getCurrentItemIndex(),this.j!==a&&(this.j=a,sX().sendCustomMessage(JV,void 0,{type:CV,index:a})))};
124
- _.r.gn=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return wX(this,a);try{var b=(new DOMParser).parseFromString(a,_.rg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=sX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.la),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Pg||g===_.Qc){g=e[f].getAttribute(_.Pe);for(var k=e[f].getElementsByTagName(_.xb),l=
125
- k.length-1;0<=l;--l){var m=k[l].getAttribute(_.Pe)||g,n=k[l].getAttribute(_.Cd),p=k[l].getAttribute(_.dh)||void 0,q=k[l].getAttribute(_.se)||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(_.la).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Gb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=sX();c=a.getElementsByTagName("StreamIndex");
126
- for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Pg){e=c[d].getElementsByTagName(_.vb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.db)||void 0,k=e[f].getAttribute(_.cb)||void 0,void 0!==g&&(g=+g),void 0!==k&&(k=+k),b.canDisplayType(_.Rg,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=PV(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,YW(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,_.So(b.m,d),8);case 8:return _.x(l,_.To(b.m),9);case 9:f=b.m.$a(),c.media.contentId=f.url,c.media.contentType=f.type,f.wc&&(c.media.hlsVideoSegmentFormat=SV(f.wc,_.Xs)),f.wb&&(c.media.hlsSegmentFormat=SV(f.wb,_.X));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.h){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.A){l.C(10);break}return _.x(l,Promise.resolve(b.A(c)),
129
- 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&&xX(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&&xX(c.tracks)}return a};
130
- _.r.Rn=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.Tm;var b=sX().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))}_.No(this.m)}};_.r.Lk=function(a){this.w.forEach(function(b){return b(a.data)})};_.K(IV,pX);pX.prototype.getQueueManager=pX.prototype.getQueueManager;
131
- pX.prototype.setQueue=pX.prototype.Yo;pX.prototype.updateContentMetadata=pX.prototype.rp;pX.prototype.setContentMetadata=pX.prototype.tc;pX.prototype.getContentMetadata=pX.prototype.Vb;pX.prototype.isApiReady=pX.prototype.Qd;pX.prototype.sendMessage=pX.prototype.sendMessage;pX.prototype.removeMessageListener=pX.prototype.removeMessageListener;pX.prototype.addMessageListener=pX.prototype.addMessageListener;pX.prototype.off=pX.prototype.off;pX.prototype.on=pX.prototype.on;
132
- pX.prototype.setLoadRequestDataInterceptor=pX.prototype.Wo;pX.prototype.setPlayerConfigInterceptor=pX.prototype.Ye;pX.prototype.stop=pX.prototype.stop;pX.prototype.start=pX.prototype.start;pX.prototype.init=pX.prototype.init;pX.getInstance=rX;var qX=null;_.r=zX.prototype;_.r.load=function(){return _.I(function(a){_.z(a)})};_.r.Cb=function(){return!0};_.r.Uc=function(){};_.r.qb=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(LV,{type:"SKIP_AD",requestId:VV(),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.Ab=function(){return this.a?this.a.isPlayingBreak:!1};_.r.isPaused=function(){return this.a&&this.a.isPlayingBreak?this.a.isPaused:!1};_.r.getPosition=function(){var a=-1,b=this.h.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.h&&(a=b));return a};_.r.Rc=function(){return!0};_.r.Cc=function(){var a=this;return _.I(function(b){a.j.release();_.z(b)})};_.r.setVolume=function(a){this.Oa(a)};_.r.getVolume=function(){return this.getAdVolume()};_.r.pause=function(){this.qb()};_.r.resume=function(){this.Cb()};
134
- _.r.lo=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.h.trigger(new _.Q(_.Cc,{adsTimeline:new SW(a.breaks)})));break;case "isPlayingBreak":a.value?AX(this,_.fc):(AX(this,_.jc,this.f),AX(this,_.zc,this.f),this.f=null,AX(this,_.gc));break;case "isPaused":this.f&&(a.value?AX(this,_.rc):AX(this,_.wc));break;case "breakClipId":this.f&&(a=this.a.breakClipId,this.f.getId()!==a&&null!=a&&(AX(this,_.jc,this.f),AX(this,_.zc,this.f),this.f=BX(this),AX(this,_.yc,this.f)));break;
135
- default:this.f||(this.f=BX(this))&&AX(this,_.yc,this.f)}};zX.prototype.resume=zX.prototype.resume;zX.prototype.pause=zX.prototype.pause;zX.prototype.getVolume=zX.prototype.getVolume;zX.prototype.setVolume=zX.prototype.setVolume;zX.prototype.getPosition=zX.prototype.getPosition;zX.prototype.skip=zX.prototype.skip;CX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};CX.prototype.a=function(a,b){return a.namespace()!==_.vd?!1:!(!b||!b.ima)};CX.prototype.create=function(a){return new zX(a.a)};DX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};DX.prototype.a=function(a,b){return rX().Pg()?!(!b||!b.ima):!1};DX.prototype.create=function(a){return new UW(a)};_.K("clpp.cast.createCastQueue",function(){EX=function(){return cast.framework.QueueBase.apply(this,arguments)||this};_.w(EX,cast.framework.QueueBase);EX.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 EX});_.ai(new CX);_.ai(new DX);};
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));}