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