@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.
- package/CHANGELOG.md +5 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +18 -18
- package/cjs/cl.cast.js +126 -126
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +604 -604
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +101 -101
- package/cjs/cl.externs.js +1 -29
- package/cjs/cl.freewheel.js +26 -26
- package/cjs/cl.hls.js +77 -77
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +26 -26
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +352 -352
- package/cjs/cl.muxdata.js +14 -14
- package/cjs/cl.onboard.js +4 -4
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +16 -16
- package/cjs/cl.smooth.js +71 -71
- package/cjs/cl.thumbnails.js +25 -25
- package/cjs/cl.tizen.js +71 -71
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- package/cjs/cl.vr.js +18 -18
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +38 -38
- package/cjs/polyfill.min.js +2 -2
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +14 -14
- package/cl.cast.js +100 -100
- package/cl.conviva.js +27 -27
- package/cl.core.js +488 -487
- package/cl.crypto.js +8 -8
- package/cl.dash.js +75 -75
- package/cl.externs.js +1 -25
- package/cl.freewheel.js +20 -20
- package/cl.hls.js +65 -65
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +19 -19
- package/cl.mediatailor.js +2 -2
- package/cl.mse.js +200 -200
- package/cl.muxdata.js +12 -12
- package/cl.onboard.js +3 -3
- package/cl.persistent.js +8 -8
- package/cl.playlist.js +4 -4
- package/cl.simid.js +2 -2
- package/cl.smooth.js +47 -47
- package/cl.thumbnails.js +12 -12
- package/cl.tizen.js +41 -41
- package/cl.ttml.js +10 -10
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +3 -3
- package/cl.vtt.js +11 -11
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +27 -27
- package/package.json +1 -1
- package/typings.d.ts +6 -22
- package/cjs/cl.cdn.js +0 -13
- 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
|
|
3
|
-
b.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}},
|
|
5
|
-
q.a&&(m=q.f)&&m.data&&(n=f.a(_.
|
|
6
|
-
case _.Ug:return b===_.
|
|
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}},
|
|
8
|
-
|
|
9
|
-
function(f){a.g.debug(
|
|
10
|
-
this.ha=this.
|
|
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),_.
|
|
12
|
-
a)},
|
|
13
|
-
a.
|
|
14
|
-
_.h?null:a):a=null;a=null===a?null:a+b;return null===a?b:a},
|
|
15
|
-
c=chrome.cast.media.StreamType;d=_.
|
|
16
|
-
b.source.url});if(!b.Ka.remoteTextTracks){
|
|
17
|
-
|
|
18
|
-
a.h.wa())&&d.language&&(a.j.preferredTextLanguage=d.language);(e=a.h.qa())&&e.language&&(a.j.preferredAudioLanguage=e.language);return _.
|
|
19
|
-
function(a){return new
|
|
20
|
-
b=a.f.a;if(b===a.a||!a.a)return e["return"]();c=null!=a.f
|
|
21
|
-
|
|
22
|
-
e.configuration,{autoplay:!0})),3);case 3:_.
|
|
23
|
-
this.a=new
|
|
24
|
-
c.customData={skippable:!1!==b.skippable};return c})},
|
|
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;
|
|
26
|
-
a.vmapAdsRequest=
|
|
27
|
-
|
|
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
|
|
29
|
-
a.dashTimedMetadata,c=_.Mg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Lg)?_.ag:_.
|
|
30
|
-
a.j=
|
|
31
|
-
e),b===_.X?a.La(e):b===_.
|
|
32
|
-
function(){_.
|
|
33
|
-
void 0}if(a&&a.drm){var d=a.drm,e=_.
|
|
34
|
-
function(e){var f=_.
|
|
35
|
-
g,d),2)):k["return"](_.
|
|
36
|
-
if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;
|
|
37
|
-
if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=
|
|
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)}},
|
|
39
|
-
(d={ad:c});a.h.trigger(new _.Q(b,d))},
|
|
40
|
-
l}));b=c.find(function(m){return m.id===k})||null;return new
|
|
41
|
-
_.r.Da=function(a){if(a!==this.f)if(this.f===_.
|
|
42
|
-
{detail:a}))}};var
|
|
43
|
-
|
|
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=_.
|
|
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 _.
|
|
46
|
-
_.r.sa=function(){var a=this.
|
|
47
|
-
_.r.La=function(a){
|
|
48
|
-
|
|
49
|
-
|
|
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.
|
|
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 _.
|
|
52
|
-
_.r.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Od())throw a.g.warn(
|
|
53
|
-
_.r.
|
|
54
|
-
_.r.pause=function(){var a=this;return this.f?new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(
|
|
55
|
-
_.r.seek=function(a){var b=this;return this.f?this.isEnded()?
|
|
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(
|
|
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?
|
|
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(
|
|
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(
|
|
62
|
-
_.r.onError=function(a){if(a&&(this.trigger(new _.Q(_.
|
|
63
|
-
_.r.
|
|
64
|
-
_.r.
|
|
65
|
-
_.r.
|
|
66
|
-
isLive:this.isLive()},currentTime:
|
|
67
|
-
_.r.
|
|
68
|
-
_.r.
|
|
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 _.
|
|
70
|
-
m.language),m.roles.length&&(k.preferredTextRole=m.roles[0]);m=l&&typeof l.isLive===_.
|
|
71
|
-
break;case 2:e=_.H(g),c.g.error("Error while trying to cast",e),f=new _.Q(_.
|
|
72
|
-
_.r.
|
|
73
|
-
_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(
|
|
74
|
-
|
|
75
|
-
|
|
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 _.
|
|
79
|
-
_.r.
|
|
80
|
-
_.r.remove=function(a){0>a||a>=this.a.length||a===this.f||(this.a.splice(a,1),this.f>a&&this.f--,
|
|
81
|
-
_.r.stop=function(){this.h=!1;this.m.off(_.
|
|
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.
|
|
83
|
-
_.r.next=function(){var a=this;return _.I(function(b){return 1==b.a?a.a.Ea()?_.
|
|
84
|
-
|
|
85
|
-
_.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.Lb=function(){return!1};_.r
|
|
86
|
-
_.r.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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){
|
|
91
|
-
_.r.
|
|
92
|
-
_.Bc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(
|
|
93
|
-
a):(this.f=!1
|
|
94
|
-
|
|
95
|
-
_.r.
|
|
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.
|
|
97
|
-
_.r.Pb=function(a){this.
|
|
98
|
-
_.r.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.
|
|
99
|
-
a),g;}}_.A(f)})};_.r.xa=function(){return!0};_.r.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
_.r.unload=function(){var a=cast.framework.messages.PlayerState,b=
|
|
103
|
-
_.r.play=function(){
|
|
104
|
-
_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};_.r.getMediaPosition=function(){return
|
|
105
|
-
_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;
|
|
106
|
-
_.r.getLoadedSource=function(){var a=
|
|
107
|
-
_.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=
|
|
108
|
-
_.r.getStats=function(){var a=_.
|
|
109
|
-
_.r.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.
|
|
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
|
|
112
|
-
_.r.
|
|
113
|
-
(!e||e&&f)){d=
|
|
114
|
-
_.r.
|
|
115
|
-
_.h?g.initialBandwidth=e.defaultBandwidthEstimate:g.initialBandwidth=void 0;
|
|
116
|
-
_.r.start=function(a){var b=this;if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var c=
|
|
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.
|
|
118
|
-
d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.
|
|
119
|
-
_.r.stop=function(){if(this.a){this.a=!1;this.l.release();var a=
|
|
120
|
-
_.r.removeMessageListener=function(a){typeof a===_.
|
|
121
|
-
_.r.
|
|
122
|
-
_.r.
|
|
123
|
-
k.length-1;0<=l;--l){var m=k[l].getAttribute(_.Ue)||g,n=k[l].getAttribute(_.
|
|
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.
|
|
126
|
-
break}b.f.D=!0;return _.
|
|
127
|
-
11);case 11:(k=l.f)&&(c=k);case 10:return l["return"](c)}})};_.r.
|
|
128
|
-
_.r.
|
|
129
|
-
|
|
130
|
-
|
|
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.
|
|
132
|
-
_.r.
|
|
133
|
-
default:this.f||(this.f=
|
|
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));}
|