@castlabs/prestoplay 6.21.1-beta.13 → 6.21.1-beta.14
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/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +2 -2
- package/cjs/cl.cast.js +60 -60
- package/cjs/cl.conviva.js +22 -22
- package/cjs/cl.core.js +196 -196
- package/cjs/cl.crypto.js +1 -1
- package/cjs/cl.dash.js +27 -27
- package/cjs/cl.externs.js +30 -30
- package/cjs/cl.freewheel.js +16 -16
- package/cjs/cl.hls.js +44 -44
- package/cjs/cl.hlssmpte.js +2 -2
- package/cjs/cl.htmlcue.js +5 -5
- package/cjs/cl.ima.js +16 -16
- package/cjs/cl.mse.js +101 -101
- package/cjs/cl.muxdata.js +8 -8
- package/cjs/cl.persistent.js +3 -3
- package/cjs/cl.playlist.js +5 -5
- package/cjs/cl.sessions.js +6 -6
- package/cjs/cl.simid.js +3 -3
- package/cjs/cl.smooth.js +24 -24
- package/cjs/cl.thumbnails.js +5 -5
- package/cjs/cl.tizen.js +28 -28
- package/cjs/cl.ttml.js +4 -4
- package/cjs/cl.verimatrix.js +1 -1
- package/cjs/cl.vimond.js +8 -8
- package/cjs/cl.vr.js +7 -7
- package/cjs/cl.vtt.js +4 -4
- package/cjs/cl.yospace.js +2 -2
- package/cjs/cl.youbora.js +18 -18
- package/cl.airplay.js +1 -1
- package/cl.cast.js +30 -30
- package/cl.conviva.js +4 -4
- package/cl.core.js +143 -142
- package/cl.crypto.js +3 -3
- package/cl.dash.js +28 -28
- package/cl.externs.js +30 -30
- package/cl.freewheel.js +1 -1
- package/cl.hls.js +31 -31
- package/cl.hlssmpte.js +2 -2
- package/cl.htmlcue.js +1 -1
- package/cl.ima.js +6 -6
- package/cl.mse.js +71 -71
- package/cl.muxdata.js +1 -1
- package/cl.playlist.js +4 -4
- package/cl.sessions.js +1 -1
- package/cl.simid.js +1 -1
- package/cl.smooth.js +22 -22
- package/cl.thumbnails.js +8 -8
- package/cl.tizen.js +13 -13
- package/cl.verimatrix.js +1 -1
- package/cl.vimond.js +5 -5
- package/cl.vr.js +5 -5
- package/cl.vtt.js +2 -2
- package/cl.yospace.js +2 -2
- package/cl.youbora.js +7 -7
- package/package.json +1 -1
package/cjs/cl.airplay.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var YX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.tl(function(){a.m.play()["catch"](function(){})});this.h=new _.Vh},ZX=function(){};_.x(YX,_.Hv);_.u=YX.prototype;_.u.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.u.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.
|
|
3
|
-
_.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.
|
|
4
|
-
_.u.Ff=function(){return this.f};_.u.
|
|
2
|
+
var f=function(window){var YX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.tl(function(){a.m.play()["catch"](function(){})});this.h=new _.Vh},ZX=function(){};_.x(YX,_.Hv);_.u=YX.prototype;_.u.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.u.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Bm.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.dn.bind(this)))};
|
|
3
|
+
_.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.Bm=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Qc,{canCast:this.f}))};_.u.dn=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Pc:_.Oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.cq)this.l?this.m.play()["catch"](function(){}):this.o.ba(.01);this.m.trigger(new _.L(a))};_.u.Kb=function(){return this.j};
|
|
4
|
+
_.u.Ff=function(){return this.f};_.u.Un=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",YX);YX.prototype.showCastMenu=YX.prototype.Un;YX.prototype.canCast=YX.prototype.Ff;YX.prototype.isCasting=YX.prototype.Kb;YX.Id="airplay";ZX.prototype.create=function(){return new YX};_.gt(new ZX);};
|
|
5
5
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
6
6
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
7
7
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.broadpeak.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var f=function(window){var QX=function(a,b){this.m=a;this.f=b;this.a=new _.Vh;this.h=!1},RX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.vk();return d}_.x(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.ua};b.prototype.getVersion=function(){return _.ha};b.prototype.getOSName=function(){return this.a.os};b.prototype.getDeviceVersion=function(){return this.a.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?
|
|
3
3
|
0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},SX=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Vh;this.j=!1},TX=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===_.ig&&a.h.setUUID(f))},UX=
|
|
4
4
|
function(a,b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var d in c)a.a.setCustomParameter(d,c[d]);a.o.on(a.m,_.qe,a.S.bind(a));a.l=RX(a.m);a.a.attachPlayer(a.l)},VX=function(a,b){_.Yh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},WX=function(){return!window.SmartLib||!window.GenericPlayerApi},XX=function(){};_.u=QX.prototype;
|
|
5
|
-
_.u.init=function(){var a=this.m,b=this.a;b.on(a,_.fg,this.
|
|
6
|
-
_.u.
|
|
5
|
+
_.u.init=function(){var a=this.m,b=this.a;b.on(a,_.fg,this.Oj.bind(this));b.on(a,_.hd,this.Mj.bind(this));b.on(a,"seek",this.Nj.bind(this))};_.u.Mj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.Oj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Up&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Up:c.notifyStallStart();break;case _.cq:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.bq:c.notifyPause()}};
|
|
6
|
+
_.u.Nj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.Yh(this.a),this.a=null)};_.x(SX,_.Hv);_.u=SX.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(WX())return a.onError(new _.N(1,9,11E3));this.j=!0;TX(this,d);UX(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.N(1,9,11001,{bpkErrorCode:f,message:e}));VX(c,void 0)}else b.url=e.getURL(),c.f=new QX(c.m,c.l),c.f.init()})}};
|
|
7
7
|
_.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.S=function(a){a=a.detail;if(7003===a.code)VX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:VX(this,SmartLib.BPDecodingError);break;case 1:VX(this,SmartLib.BPNetworkingError);break;case 6:VX(this,SmartLib.BPAccessRightError);break;default:VX(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){WX()||VX(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
|
|
8
8
|
_.J("clpp.broadpeak.BroadpeakPlugin",SX);SX.isSdkMissing=WX;SX.Id="broadpeak";XX.prototype.create=function(){return new SX};_.gt(new XX);};
|
|
9
9
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
package/cjs/cl.cast.js
CHANGED
|
@@ -5,30 +5,30 @@ a;this.j=null;this.f=_.Pp;this.l=_.Qp;this.h=2;this.B=Date.now();this.A=-1},nW=f
|
|
|
5
5
|
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 _.Ig:return d.FMP4;case _.Hg:return b===_.Hk?d.MPEG2_TS:c.TS;case _.ad:return c.AAC;case _.bd:return c.AC3;case _.cd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.dd:return c.FMP4}},sW=function(a){a=
|
|
6
6
|
void 0===a?rW:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.N(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},tW=function(a){mW.call(this,a,"clpp.cast.SenderStateManager");
|
|
7
7
|
this.o=this.a=null;this.w=this.Zb.bind(this)},uW=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},vW=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},xW=function(a,b){var c=vW(a);return wW(a,b).find(function(d){return c.includes(d.id)})||null},wW=function(a,b){return a.h.filter(function(c){return c.type===b})},zW=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.T){var e=a.za();
|
|
8
|
-
e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;yW(a,b)},function(f){a.f[b]=null;a.g.debug(aW,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){yW(a,b)},function(f){a.g.debug(aW,f)}))},yW=function(a,b){b===_.Gk?a.a.trigger(new _.L(_.mm)):b===_.T&&a.a.trigger(new _.L(_.nm))},DW=function(a,b,c,d){_.tm.call(this);this.g=new _.K(_.Ad);this.ca=a;this.o=new _.vl(b);this.
|
|
9
|
-
_.zm();this.C=[];this.B=0;this.L=new _.yk;this.G=this.l=this.a=null;this.A=this.w=!1;this.ha="";this.Ba=1E6;this.f=new uW;this.f.initialize(this);this.j=new tW(this);this.H=new _.Vh;this.K=null;this.I=new Set;this.P=this.
|
|
10
|
-
EW=function(a){var b,c;return _.I(function(d){if(1==d.a)return CW["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.wa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.
|
|
8
|
+
e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;yW(a,b)},function(f){a.f[b]=null;a.g.debug(aW,f)})}else b===_.T&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){yW(a,b)},function(f){a.g.debug(aW,f)}))},yW=function(a,b){b===_.Gk?a.a.trigger(new _.L(_.mm)):b===_.T&&a.a.trigger(new _.L(_.nm))},DW=function(a,b,c,d){_.tm.call(this);this.g=new _.K(_.Ad);this.ca=a;this.o=new _.vl(b);this.Y=c;this.fa=d;this.h=this.J=
|
|
9
|
+
_.zm();this.C=[];this.B=0;this.L=new _.yk;this.G=this.l=this.a=null;this.A=this.w=!1;this.ha="";this.Ba=1E6;this.f=new uW;this.f.initialize(this);this.j=new tW(this);this.H=new _.Vh;this.K=null;this.I=new Set;this.P=this.Dm.bind(this);this.wa=this.Ym.bind(this);this.da=this.Qm.bind(this);this.V=this.Hm.bind(this);this.N=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){AW(!0)},0)}});BW(this);CW.add(this)},
|
|
10
|
+
EW=function(a){var b,c;return _.I(function(d){if(1==d.a)return CW["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.P),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.wa)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.y(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.Y=null;a.fa=null;_.C(d)})},GW=function(a){if(!a)return null;
|
|
11
11
|
a:{var b=a.metadataType;var c=Object.entries(FW);c=_.w(c);for(var d=c.next();!d.done;d=c.next()){d=_.w(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=sW(FW[b]);return Object.assign(b,a)},HW=function(a){var b=void 0===b?rW:b;return Object.values(FW).includes(a)?a:b},NW=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},BW=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
|
|
12
|
-
a.ca.length){a.w=!0;a.o.
|
|
13
|
-
null;a=null===a?null:a+b;return null===a?b:a},ZW=function(a,b){YW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.da);b.addMessageListener(jW,a.V)},YW=function(a,b){a.a=b;a.a&&(a.H.release(),a.G=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.l),a.H.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.
|
|
14
|
-
a.j&&a.j.init(),a.trigger(new _.L(_.Je)))},$W=function(a){return _.I(function(b){return a.
|
|
15
|
-
b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.cc;m=h.audioMimeType;g.hlsVideoSegmentFormat=qW(l,d.VIDEO);g.hlsSegmentFormat=qW(m,d.AUDIO);if(!b.
|
|
16
|
-
void 0;case 6:delete b.
|
|
17
|
-
bX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.za())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.pa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,aX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),sg:a.getPresentationStartTime(),autoplay:b,
|
|
18
|
-
this.a=cX(this);this.g=new _.K(gW);this.f&&this.forwardEventsTo(this.f)},cX=function(a){return new DW(a.h,function(){a.trigger(new _.L(_.pd))},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
|
|
19
|
-
return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.od)),b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Ss(a.f,a.a);_.C(c)})},fX=function(a){mW.call(this,a,"clpp.cast.StateManager");this.I=this.
|
|
20
|
-
b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},hX=function(a){this.a=a},jX=function(a){this.m=a;this.a=null;this.h=this.
|
|
12
|
+
a.ca.length){a.w=!0;a.o.Kg();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ca;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.wa);SW&&a.o.ba(.02)}},XW=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
|
|
13
|
+
null;a=null===a?null:a+b;return null===a?b:a},ZW=function(a,b){YW(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.da);b.addMessageListener(jW,a.V)},YW=function(a,b){a.a=b;a.a&&(a.H.release(),a.G=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.G=new cast.framework.RemotePlayerController(a.l),a.H.on(a.G,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Pj.bind(a)),a.H.on(a.G,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,a.Pm.bind(a)),
|
|
14
|
+
a.j&&a.j.init(),a.trigger(new _.L(_.Je)))},$W=function(a){return _.I(function(b){return a.Kb()?b.F(0):_.y(b,cast.framework.CastContext.getInstance().requestSession(),0)})},aX=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,A,F,G;return _.I(function(B){switch(B.a){case 1:return c=chrome.cast.media.StreamType,d=_.Zv,_.y(B,$W(a),2);case 2:if(!b)return B["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=
|
|
15
|
+
b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.cc;m=h.audioMimeType;g.hlsVideoSegmentFormat=qW(l,d.VIDEO);g.hlsSegmentFormat=qW(m,d.AUDIO);if(!b.jb){B.F(3);break}if(!a.N){B.F(4);break}return _.y(B,Promise.resolve(a.N(b.jb)),5);case 5:if(n=B.f)b.jb=n;case 4:a.h=b.jb;a.C=_.gq(a.h);a.B=a.C.findIndex(function(H){return H.url===b.source.url});if(!b.jb.remoteTextTracks){B.F(6);break}return _.y(B,Promise.all(b.jb.remoteTextTracks.map(a.al.bind(a))),7);case 7:p=B.f,g.tracks=p.filter(function(H){return H}),b.jb.remoteTextTracks=
|
|
16
|
+
void 0;case 6:delete b.jb.autoplay,b.jb.startTime=null,g.customData={playerConfiguration:nW(b.jb)};case 3:q=a.Cb()||{};t=HW(q.metadataType);typeof b.sg===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.sg});b.source.name&&(z={metadataType:t,title:b.source.name});A=NW(q);if(F=GW(Object.assign({},v,z,A)))g.metadata=F;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.id&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.y(B,f.loadMedia(G),0)}})},
|
|
17
|
+
bX=function(a,b,c){c=void 0===c?0:c;var d,e;return _.I(function(f){(d=a.f.za())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.f.pa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.y(f,aX(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),sg:a.getPresentationStartTime(),autoplay:b,jb:a.h}),0)})},AW=function(a){if(a){a=_.w(CW);for(var b=a.next();!b.done;b=a.next())BW(b.value)}},dX=function(a,b,c){_.tm.call(this);this.f=a;this.h=b;this.j=typeof c===_.ue?c:this.Jn;
|
|
18
|
+
this.a=cX(this);this.g=new _.K(gW);this.f&&this.forwardEventsTo(this.f)},cX=function(a){return new DW(a.h,function(){a.trigger(new _.L(_.pd))},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.$g&&(d.preferredAudioLanguage=c.$g);c.fj&&(d.preferredTextLanguage=c.fj);_.Ss(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return eX(a)})},eX=function(a){var b;
|
|
19
|
+
return _.I(function(c){if(1==c.a)return a.trigger(new _.L(_.od)),b=a.f.a,b!==a.a&&a.f&&a.a?_.y(c,a.f.release(),2):c["return"]();_.Ss(a.f,a.a);_.C(c)})},fX=function(a){mW.call(this,a,"clpp.cast.StateManager");this.I=this.Tj.bind(this);this.H=this.Sj.bind(this);this.w=this.Lm.bind(this);this.o=this.Cm.bind(this);this.K=this.Vj.bind(this);this.J=this.Uj.bind(this);this.L=this.an.bind(this);this.G=this.Om.bind(this);this.C=this.S.bind(this);this.a=this.Rj.bind(this)},gX=function(a,b,c,d,e){this.a=a;this.f=
|
|
20
|
+
b;this.l=typeof c===_.k?c:1;this.h=typeof d===_.k?d:1;this.j=typeof e===_.k?e:0},hX=function(a){this.a=a},jX=function(a){this.m=a;this.a=null;this.h=this.Wj.bind(this);this.f=[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,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,
|
|
21
21
|
cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];iX().addEventListener(this.f,this.h)},mX=function(a,b,c){var d,e,f,g,h,l,m;return _.I(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.D(n,2);kX=!1;e=_.dk(d);return _.y(n,c.fetch(e).U,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.S.aa(f.data),h=new DOMParser,l=h.parseFromString(g,_.pg),l.getElementsByTagName("vmap:VMAP").length)_.Gh("VMAP detected."),a.vmapAdsRequest=lX(g);else if(l.getElementsByTagName("VAST").length){_.Gh("VAST detected.");
|
|
22
22
|
var p=new cast.framework.messages.BreakClip("bc1");p.vastAdsRequest=lX(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.Gh("Unsupported schema."),kX=!0;return _.rh(n,0)}m=_.E(n);_.Gh("Failed to fetch an ad",m);kX=!0;_.C(n)})},lX=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},iX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},oX=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||
|
|
23
23
|
-1!==a.getPosition()){var d=null;(c=nX(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},pX=function(a,b){var c=new _.N(1,10,10003,{errorType:b});a.m.onError(c)},nX=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.ig&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.ig&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=
|
|
24
24
|
g.position}).sort(function(g,h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new gX(d,e,b.index,b.total,f)}return c},qX=function(a){this.Wa=a;this.a=this.f.bind(this)},rX=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]},sX=function(a){var b=a.dashTimedMetadata,c=_.yg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.xg)?
|
|
25
|
-
_.ui:_.vg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},tX=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.
|
|
25
|
+
_.ui:_.vg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b?b.eventElement:null}},tX=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.xn.bind(this);this.a=this.f=null},uX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},wX=function(a){a.a=uX().getTextTracksManager();var b=a.a.getTracks();a.j=vX(_.T,b)},xX=function(a,b,c,d){c=_.yi(c).filter(function(h){return h});
|
|
26
26
|
var e=!1,f=[];b===_.Gk?f=a.getAudioTracks():b===_.T&&(f=a.ka());if(c=c.find(function(h){var l=_.vj(h);return f.some(function(m){m=_.vj(m.language||"");return _.wj(l,m)})})){var g=_.vj(c);c=f.filter(function(h){h=_.vj(h.language||"");return _.wj(g,h)});f=c.length?c:f;e=e||!!c.length}_.S.Ye(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.Gk?a.Ha(e):b===_.T&&a.Va(e))},vX=function(a,b){for(var c=[],d=_.w(b),
|
|
27
27
|
e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Ek(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 _.Nk(f.id,f));c.push(f)}return c},yX=function(){_.tm.call(this);this.g=new _.K(hW);this.h=this.w=_.zm();this.A=null;
|
|
28
28
|
this.l=-1;this.G=new _.yk;this.f=this.o=this.j=this.a=this.B=null;this.C=!1},zX=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},CX=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.Xm(d);if(e){var f=[_.Nd];_.gq(a)[0].type!==_.Yc&&f.unshift(_.Pd);d.preferredDrmSystem===_.Nd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
|
|
29
29
|
h=e.Na[g];h?(d=g===_.Pd?cast.framework.ContentProtection.WIDEVINE:g===_.Nd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},AX(b,h,a,d),BX(b,h,a,d)):c()}else c()}else c()},AX=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.dk({method:_.Eb,uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);
|
|
30
|
-
e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},BX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.hk(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Ej(g.data))})}:a.licenseHandler=void 0},DX=function(){this.a=!1;this.g=new _.K(iW);this.f=this.m=null;this.h=new Set;this.A=this.
|
|
31
|
-
this.w=this.
|
|
30
|
+
e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},BX=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.I(function(h){return 1==h.a?(g=_.hk(Object.assign({},f.headers),e.buffer,200,""),_.y(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Ej(g.data))})}:a.licenseHandler=void 0},DX=function(){this.a=!1;this.g=new _.K(iW);this.f=this.m=null;this.h=new Set;this.A=this.Nm.bind(this);
|
|
31
|
+
this.w=this.Qj.bind(this);this.j=null;this.o=new _.Vh;this.l=null},FX=function(){return EX||(EX=new DX)},GX=function(){return cast.framework.CastReceiverContext.getInstance()},HX=function(){var a=GX().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null},IX=function(a,b){var c=GX().getPlayerManager().getMediaInformation();if(c){b?c.metadata=b:delete c.metadata;var d=!0;d=void 0===d?!1:d;GX().getPlayerManager().setMediaInformation(c,d)}else a.g.warn("No mediaInformation is present. Skipping metadata update.")},
|
|
32
32
|
KX=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=GX();c=(GX().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Ig:_.Hg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=JX(h,_.ra),m=JX(h,_.Nb),n=_.w([]),p=n.next().value;n=n.next().value;m&&(m=_.w(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);
|
|
33
33
|
if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},JX=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},LX=function(a){this.f=a;this.a=null;this.h=new _.Vh;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,
|
|
34
34
|
cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},NX=function(a,b){var c=null,d=MX(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},MX=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===
|
|
@@ -37,82 +37,82 @@ _.u.ya=function(a){if(a!==this.f)if(this.f===_.$p&&a!==_.Pp)this.log.debug("Play
|
|
|
37
37
|
{detail:a}))}};_.J("clpp.cast.CastUtils",function(){});var rW=0,FW={GENERIC:rW,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.x(tW,mW);tW.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.l)};tW.prototype.destroy=function(){var a=this;return _.I(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.y(b,mW.prototype.destroy.call(a),0)})};tW.prototype.ya=function(a){var b=this.player.l;b&&b.isPlayingBreak||mW.prototype.ya.call(this,a)};
|
|
38
38
|
tW.prototype.Zb=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.ya(_.Wp);break;case chrome.cast.media.IdleReason.ERROR:this.ya(_.$p);break;default:this.ya(_.Pp)}break;case chrome.cast.media.PlayerState.PLAYING:this.ya(_.cq);break;case chrome.cast.media.PlayerState.PAUSED:this.ya(_.bq);break;case chrome.cast.media.PlayerState.BUFFERING:this.ya(_.Up)}};_.x(uW,_.il);_.u=uW.prototype;_.u.initialize=function(a){this.a=a};_.u.release=function(){this.h=[];this.f={}};
|
|
39
39
|
_.u.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=_.Hk;break;case chrome.cast.media.TrackType.AUDIO:c=_.Gk;break;case chrome.cast.media.TrackType.TEXT:c=_.T}c=new _.Ek(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
|
|
40
|
-
c.renditions.push(new _.Nk(c.id,c));return c}):[],this.a.trigger(new _.L(_.aw)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return wW(this,_.Hk)};_.u.getAudioTracks=function(){return wW(this,_.Gk)};_.u.ka=function(){return wW(this,_.T)};_.u.la=function(){var a=this.Ja();return a?a.renditions[0]:null};_.u.Xa=function(){var a=this.pa();return a?a.renditions[0]:null};_.u.Ta=function(){var a=this.za();return a?a.renditions[0]:null};_.u.
|
|
41
|
-
_.u.
|
|
42
|
-
_.u.ua=function(){return!0};uW.prototype.isAbrEnabled=uW.prototype.ua;uW.prototype.addTextTrack=uW.prototype.addTextTrack;uW.prototype.setTextRendition=uW.prototype.
|
|
43
|
-
uW.prototype.getVideoTrack=uW.prototype.Ja;uW.prototype.getLoadingTextRendition=uW.prototype.
|
|
44
|
-
_.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.destroy=function(){return _.I(function(a){_.C(a)})};_.u.qe=function(a){this.N=a};_.u.Cc=function(){return this.w};_.u.
|
|
40
|
+
c.renditions.push(new _.Nk(c.id,c));return c}):[],this.a.trigger(new _.L(_.aw)))};_.u.destroy=function(){this.a=null};_.u.getVideoTracks=function(){return wW(this,_.Hk)};_.u.getAudioTracks=function(){return wW(this,_.Gk)};_.u.ka=function(){return wW(this,_.T)};_.u.la=function(){var a=this.Ja();return a?a.renditions[0]:null};_.u.Xa=function(){var a=this.pa();return a?a.renditions[0]:null};_.u.Ta=function(){var a=this.za();return a?a.renditions[0]:null};_.u.sb=function(){return this.f[_.Hk]||null};
|
|
41
|
+
_.u.Db=function(){return this.f[_.Gk]||null};_.u.Eb=function(){return this.f[_.T]||null};_.u.Ja=function(){return xW(this,_.Hk)};_.u.pa=function(){return xW(this,_.Gk)};_.u.za=function(){return xW(this,_.T)};_.u.Ab=function(a){zW(this,_.Hk,a)};_.u.Ha=function(a){zW(this,_.Gk,a)};_.u.Va=function(a){zW(this,_.T,a)};_.u.kb=function(a){this.Ab(a&&a.track)};_.u.yb=function(a){this.Ha(a&&a.track)};_.u.zb=function(a){this.Va(a&&a.track)};_.u.addTextTrack=function(){return _.I(function(a){_.C(a)})};
|
|
42
|
+
_.u.ua=function(){return!0};uW.prototype.isAbrEnabled=uW.prototype.ua;uW.prototype.addTextTrack=uW.prototype.addTextTrack;uW.prototype.setTextRendition=uW.prototype.zb;uW.prototype.setAudioRendition=uW.prototype.yb;uW.prototype.setVideoRendition=uW.prototype.kb;uW.prototype.setTextTrack=uW.prototype.Va;uW.prototype.setAudioTrack=uW.prototype.Ha;uW.prototype.setVideoTrack=uW.prototype.Ab;uW.prototype.getTextTrack=uW.prototype.za;uW.prototype.getAudioTrack=uW.prototype.pa;
|
|
43
|
+
uW.prototype.getVideoTrack=uW.prototype.Ja;uW.prototype.getLoadingTextRendition=uW.prototype.Eb;uW.prototype.getLoadingAudioRendition=uW.prototype.Db;uW.prototype.getLoadingVideoRendition=uW.prototype.sb;uW.prototype.getTextRendition=uW.prototype.Ta;uW.prototype.getAudioRendition=uW.prototype.Xa;uW.prototype.getVideoRendition=uW.prototype.la;uW.prototype.getTextTracks=uW.prototype.ka;uW.prototype.getAudioTracks=uW.prototype.getAudioTracks;uW.prototype.getVideoTracks=uW.prototype.getVideoTracks;_.x(DW,_.tm);_.u=DW.prototype;_.u.init=function(a,b){this.h=this.J=b};_.u.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.u.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Ab)};_.u.appendLoad=function(){return Promise.reject(_.Ab)};_.u.seekWith=function(){return Promise.reject(_.Ab)};
|
|
44
|
+
_.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.destroy=function(){return _.I(function(a){_.C(a)})};_.u.qe=function(a){this.N=a};_.u.Cc=function(){return this.w};_.u.Kb=function(){return this.A};_.u.Xf=function(){return this.ha};
|
|
45
45
|
_.u.sendMessage=function(a,b){var c=this,d,e,f;return _.I(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.N(1,8,8004,void 0);g.F(2);break}_.D(g,3);return _.y(g,e.sendMessage(a,nW(b)),5);case 5:_.rh(g,2);break;case 3:f=_.E(g),d=new _.N(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.C(g)}})};
|
|
46
|
-
_.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Cc())throw a.g.warn(eW),new _.N(1,8,8001,void 0);if(!SW)throw a.g.warn(cW),new _.N(1,8,8002,void 0);if(a.
|
|
46
|
+
_.u.cast=function(){var a=this,b,c;return _.I(function(d){if(1==d.a){if(!a.Cc())throw a.g.warn(eW),new _.N(1,8,8001,void 0);if(!SW)throw a.g.warn(cW),new _.N(1,8,8002,void 0);if(a.Kb())throw a.g.warn("Already casting"),new _.N(1,8,8003,void 0);_.D(d,2);return _.y(d,$W(a),4)}if(2!=d.a)return _.rh(d,0);b=_.E(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.N(1,8,8E3,c);})};_.u.Uf=function(){this.Kb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
|
|
47
47
|
_.u.addMessageListener=function(a){typeof a===_.ue&&this.I.add(a)};_.u.removeMessageListener=function(a){typeof a===_.ue&&this.I["delete"](a)};_.u.play=function(){var a=this;return this.isEnded()?bX(this,!0):new Promise(function(b,c){if(!a.a)return c(bW);a.a.play(null,b,c)})};_.u.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(bW);a.a.pause(null,b,c)})};_.u.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
|
|
48
48
|
_.u.isEnded=function(){return this.getState()===_.Wp};_.u.seek=function(a){var b=this;return this.isEnded()?bX(this,!1,a):new Promise(function(c,d){b.a||d(bW);b.l.isPlayingBreak&&d($V);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.Ag));b.a.seek(e,function(){b.trigger(new _.L(_.zg));c()},d)})};_.u.getPosition=function(){return this.getMediaPosition()};_.u.getMediaPosition=function(){return this.a&&this.a.getEstimatedTime()||0};_.u.getDuration=function(){return this.getMediaDuration()};
|
|
49
49
|
_.u.getMediaDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.u.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(kW,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
|
|
50
50
|
_.u.getVolume=function(){return this.a&&this.a.volume.level};_.u.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.u.isMuted=function(){return this.a&&this.a.volume.muted};_.u.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
|
|
51
51
|
_.u.getPresentationStartTime=function(){if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};_.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.j?this.j.getState():_.Qp};
|
|
52
|
-
_.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?oW(this.a.customData.stats):_.Lp()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Cc())return b.g.warn(eW),e["return"]();if(!SW)return b.g.warn(cW),e["return"]();b.C=_.gq(a);b.h=_.Bm(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,
|
|
52
|
+
_.u.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?oW(this.a.customData.stats):_.Lp()};_.u.isLive=function(){return Infinity===this.getDuration()};_.u.load=function(a){var b=this,c,d;return _.I(function(e){if(!b.Cc())return b.g.warn(eW),e["return"]();if(!SW)return b.g.warn(cW),e["return"]();b.C=_.gq(a);b.h=_.Bm(b.J,a);c=b.C[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,jb:b.h,cc:c.cc,audioMimeType:c.audioMimeType};return _.y(e,aX(b,d),0)})};
|
|
53
53
|
_.u.getBufferInfo=function(){return new _.sm};_.u.getTrackManager=function(){return this.f};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return null};_.u.setNetworkEngine=function(a){this.L=a};_.u.getNetworkEngine=function(){return this.L};_.u.getSourceIndex=function(){return this.B};_.u.setSourceIndex=function(a){this.B=a};_.u.setCmsdManager=function(){};_.u.getLoadedSource=function(){return this.C[this.B]};_.u.getPeriods=function(){return[]};_.u.getDrmInfo=function(){return null};
|
|
54
|
-
_.u.getTimelineCues=function(){return[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(dW)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.qe,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Ad};_.u.canPlay=function(){return this.Cc()?2:0};_.u.
|
|
55
|
-
_.u.
|
|
56
|
-
_.u.
|
|
57
|
-
_.u.
|
|
58
|
-
isLive:this.isLive()},currentTime:XW(this),
|
|
59
|
-
_.u.
|
|
60
|
-
window.__onGCastApiAvailable=AW;_.x(dX,_.tm);_.u=dX.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,EW(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.C(b)})};_.u.
|
|
54
|
+
_.u.getTimelineCues=function(){return[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(dW)};_.u.onError=function(a){if(a&&(this.trigger(new _.L(_.qe,{detail:a})),this.j))this.j.onError(a)};_.u.namespace=function(){return _.Ad};_.u.canPlay=function(){return this.Cc()?2:0};_.u.Cb=function(){return this.K};_.u.bc=function(a){this.K=GW(a)};_.u.If=function(){this.K=null};
|
|
55
|
+
_.u.Dg=function(a){var b=this.Cb()||{};a={metadataType:HW(b.metadataType),title:a};this.bc(Object.assign({},b,a))};_.u.Bg=function(a){var b=this.Cb()||{},c=HW(b.metadataType);a=new chrome.cast.Image(a);this.bc(Object.assign({},b,{metadataType:c,images:[a]}))};_.u.Ag=function(a){var b=this.Cb()||{};this.bc(Object.assign({},b,{metadataType:3,artist:a}))};_.u.Cg=function(a){var b=this.Cb()||{};a={metadataType:HW(b.metadataType),releaseDate:a};this.bc(Object.assign({},b,a))};
|
|
56
|
+
_.u.Dm=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;SW=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.ha=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Kg()};
|
|
57
|
+
_.u.Ym=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;ZW(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.Kb()||(this.A=!0,ZW(this,a.session),this.fa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.Kb()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.za();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Y(this.getState(),{source:{url:b.contentId,type:b.contentType,
|
|
58
|
+
isLive:this.isLive()},currentTime:XW(this),fj:d,$g:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.da);a.session.removeMessageListener(jW,this.V);this.A=!1;this.a=null;this.H.release();this.l=this.G=null}};_.u.Qm=function(a){this.g.debug("New media session",a.mediaSession);YW(this,a.mediaSession)};_.u.Pm=function(a){a.value&&a.value.tracks&&this.f&&this.f.load()};_.u.Hm=function(a,b){if(a===jW&&0<this.I.size){var c=oW(b);this.I.forEach(function(d){return d(c)})}};
|
|
59
|
+
_.u.Pj=function(){this.trigger(new _.L(_.qg))};_.u.al=function(a){var b=this,c,d;return _.I(function(e){if(1==e.a)return c=null,_.y(e,pW(a,[_.og,_.Xc],b.L,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ba++,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)})};_.u.getTextDisplayer=function(){return null};var SW=!1,CW=new Set;
|
|
60
|
+
window.__onGCastApiAvailable=AW;_.x(dX,_.tm);_.u=dX.prototype;_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.a?_.y(b,EW(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.f&&a.stopForwardingEventsTo(a.f);_.C(b)})};_.u.Jn=function(a,b){this.f&&a!==_.Wp&&a!==_.Pp&&(delete b.license,this.f.load(b))};_.u.Ff=function(){return!!this.a&&this.a.Cc()&&SW};_.u.Kb=function(){return!!this.a&&this.a.Kb()};_.u.Xf=function(){return this.a?this.a.Xf():""};_.u.qe=function(a){this.a&&this.a.qe(a)};
|
|
61
61
|
_.u.cast=function(a){var b=this,c,d,e;return _.I(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.D(f,2);return _.y(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.pa();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.za())l.language&&
|
|
62
|
-
(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.id?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),sg:b.f.getPresentationStartTime(),cc:m,audioMimeType:p,
|
|
63
|
-
b.g.error("Error while trying to cast",d),e=new _.L(_.qe,{detail:d}),b.trigger(e),_.C(f)}})};_.u.Uf=function(){this.a&&this.a.Uf()};_.u.
|
|
64
|
-
_.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(fW)};_.u.
|
|
65
|
-
dX.prototype.setContentImage=dX.prototype.
|
|
66
|
-
dX.prototype.cast=dX.prototype.cast;dX.prototype.setPlayerConfigInterceptor=dX.prototype.qe;dX.prototype.getReceiverName=dX.prototype.Xf;dX.prototype.isCasting=dX.prototype.
|
|
62
|
+
(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.id?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),sg:b.f.getPresentationStartTime(),cc:m,audioMimeType:p,jb:g}}c=g;return _.y(f,eX(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.y(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.y(f,aX(b.a,c),7);case 7:_.rh(f,0);break;case 2:d=_.E(f),
|
|
63
|
+
b.g.error("Error while trying to cast",d),e=new _.L(_.qe,{detail:d}),b.trigger(e),_.C(f)}})};_.u.Uf=function(){this.a&&this.a.Uf()};_.u.Lj=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,EW(b.a),2):c.F(2)}b.a=cX(b);_.C(c)})};_.u.sendMessage=function(a){var b=this;return _.I(function(c){return b.a?_.y(c,b.a.sendMessage(jW,a),0):(b.g.warn(fW),c["return"]())})};_.u.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(fW)};
|
|
64
|
+
_.u.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(fW)};_.u.Cb=function(){return this.a&&this.a.Cb()};_.u.bc=function(a){this.a&&this.a.bc(a)};_.u.If=function(){this.a&&this.a.If()};_.u.Dg=function(a){this.a&&this.a.Dg(a)};_.u.Bg=function(a){this.a&&this.a.Bg(a)};_.u.Ag=function(a){this.a&&this.a.Ag(a)};_.u.Cg=function(a){this.a&&this.a.Cg(a)};_.J(gW,dX);dX.prototype.setContentReleaseDate=dX.prototype.Cg;dX.prototype.setContentArtist=dX.prototype.Ag;
|
|
65
|
+
dX.prototype.setContentImage=dX.prototype.Bg;dX.prototype.setContentTitle=dX.prototype.Dg;dX.prototype.clearContentMetadata=dX.prototype.If;dX.prototype.setContentMetadata=dX.prototype.bc;dX.prototype.getContentMetadata=dX.prototype.Cb;dX.prototype.removeMessageListener=dX.prototype.removeMessageListener;dX.prototype.addMessageListener=dX.prototype.addMessageListener;dX.prototype.sendMessage=dX.prototype.sendMessage;dX.prototype.changeReceiverId=dX.prototype.Lj;dX.prototype.forceDisconnect=dX.prototype.Uf;
|
|
66
|
+
dX.prototype.cast=dX.prototype.cast;dX.prototype.setPlayerConfigInterceptor=dX.prototype.qe;dX.prototype.getReceiverName=dX.prototype.Xf;dX.prototype.isCasting=dX.prototype.Kb;dX.prototype.canCast=dX.prototype.Ff;dX.prototype.destroy=dX.prototype.destroy;_.x(fX,mW);_.u=fX.prototype;
|
|
67
67
|
_.u.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.C);b.addEventListener(a.BITRATE_CHANGED,this.a)};
|
|
68
68
|
_.u.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,
|
|
69
|
-
a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,mW.prototype.destroy.call(a),0)})};_.u.
|
|
70
|
-
_.u.
|
|
71
|
-
_.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Xb=function(){return!1};_.u.
|
|
72
|
-
_.u.
|
|
73
|
-
gX.prototype.getSequenceLength=gX.prototype.
|
|
69
|
+
a.C);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.y(d,mW.prototype.destroy.call(a),0)})};_.u.Tj=function(){this.player.trigger(new _.L(_.lf));this.ya(_.cq)};_.u.Sj=function(){this.ya(_.bq)};_.u.Lm=function(){this.ya(_.Wp)};_.u.Cm=function(a){a.isBuffering?this.ya(_.Up):(a=this.player.isPaused()?_.bq:_.cq,this.ya(a))};_.u.Vj=function(){this.h=1;this.player.trigger(new _.L(_.Ag))};_.u.Uj=function(){this.player.trigger(new _.L(_.zg))};_.u.an=function(){this.h=2};_.u.Om=function(){this.ya(_.aq)};
|
|
70
|
+
_.u.Rj=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.hd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.u.S=function(a){a=new _.N(_.P,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.qe,{detail:a}));this.ya(_.$p)};_.u=gX.prototype;_.u.pb=function(){return"Google Cast Framework"};_.u.qb=function(){return cast.framework.VERSION};_.u.tb=function(){return 0};_.u.getId=function(){return""};_.u.getCreativeId=function(){return""};_.u.Tb=function(){return""};_.u.getApiFramework=function(){return null};_.u.getAdSystem=function(){return""};_.u.getAdvertiserName=function(){return""};_.u.getTitle=function(){return this.a.title||""};_.u.getDuration=function(){return this.a.duration||0};_.u.getPosition=function(){return 0};
|
|
71
|
+
_.u.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.u.Xb=function(){return!1};_.u.rb=function(){return this.a.clickThroughUrl||null};_.u.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.u.hb=function(){return 0};_.u.gb=function(){return 0};_.u.Ra=function(){return 0};_.u.Sa=function(){switch(this.Fb()){case 0:return 0;case -1:return 2;default:return 1}};_.u.getPodIndex=function(){return this.j};_.u.Fb=function(){return this.f.position};_.u.Gb=function(){return this.l};
|
|
72
|
+
_.u.ib=function(){return this.h};_.u.getWrapperAdIds=function(){return[]};_.u.canSeek=function(){return!1};_.u.getWrapperAdSystems=function(){return[]};_.u.getWrapperCreativeIds=function(){return[]};_.u.Wb=function(){return null};gX.prototype.getVideoElement=gX.prototype.Wb;gX.prototype.getWrapperCreativeIds=gX.prototype.getWrapperCreativeIds;gX.prototype.getWrapperAdSystems=gX.prototype.getWrapperAdSystems;gX.prototype.canSeek=gX.prototype.canSeek;gX.prototype.getWrapperAdIds=gX.prototype.getWrapperAdIds;
|
|
73
|
+
gX.prototype.getSequenceLength=gX.prototype.ib;gX.prototype.getPositionInSequence=gX.prototype.Gb;gX.prototype.getPodTimeOffset=gX.prototype.Fb;gX.prototype.getPodIndex=gX.prototype.getPodIndex;gX.prototype.getPodType=gX.prototype.Sa;gX.prototype.getMediaBitrate=gX.prototype.Ra;gX.prototype.getMediaHeight=gX.prototype.gb;gX.prototype.getMediaWidth=gX.prototype.hb;gX.prototype.getMediaUrl=gX.prototype.getMediaUrl;gX.prototype.getClickThroughUrl=gX.prototype.rb;gX.prototype.isBumper=gX.prototype.Xb;
|
|
74
74
|
gX.prototype.getSkipTimeOffset=gX.prototype.getSkipTimeOffset;gX.prototype.getPosition=gX.prototype.getPosition;gX.prototype.getDuration=gX.prototype.getDuration;gX.prototype.getTitle=gX.prototype.getTitle;gX.prototype.getAdvertiserName=gX.prototype.getAdvertiserName;gX.prototype.getAdSystem=gX.prototype.getAdSystem;gX.prototype.getApiFramework=gX.prototype.getApiFramework;gX.prototype.getSourceId=gX.prototype.Tb;gX.prototype.getCreativeId=gX.prototype.getCreativeId;gX.prototype.getId=gX.prototype.getId;
|
|
75
|
-
gX.prototype.getTechnology=gX.prototype.
|
|
75
|
+
gX.prototype.getTechnology=gX.prototype.tb;gX.prototype.getAdManagerVersion=gX.prototype.qb;gX.prototype.getAdManagerName=gX.prototype.pb;hX.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};hX.prototype.Ib=function(){return!!this.a.find(function(a){return 0===a.position})};hX.prototype.Hb=function(){return!!this.a.find(function(a){return-1===a.position})};hX.prototype.hasPostroll=hX.prototype.Hb;hX.prototype.hasPreroll=hX.prototype.Ib;hX.prototype.getCuePoints=hX.prototype.getCuePoints;_.u=jX.prototype;_.u.load=function(){var a=this;return _.I(function(b){kX&&(kX=!1,pX(a,0));_.C(b)})};_.u.start=function(){return _.I(function(a){iX().play();_.C(a)})};_.u.Yc=function(){};_.u.resume=function(){-1!==this.getPosition()&&iX().play()};_.u.pause=function(){-1!==this.getPosition()&&iX().pause()};_.u.skip=function(){};_.u.getVolume=function(){return this.m.getVolume()||0};_.u.setVolume=function(a){this.m.setVolume(a)};
|
|
76
76
|
_.u.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.u.Tc=function(){return!0};_.u.uc=function(){var a=this;return _.I(function(b){iX().removeEventListener(a.f,a.h);_.C(b)})};
|
|
77
|
-
_.u.
|
|
77
|
+
_.u.Wj=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=iX().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Nc,{adsTimeline:new hX(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:oX(this,_.Dc,a);break;case cast.framework.events.EventType.BREAK_STARTED:oX(this,_.tc,a);break;case cast.framework.events.EventType.BREAK_ENDED:oX(this,_.uc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:oX(this,
|
|
78
78
|
_.Jc,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(oX(this,_.Ic,a),oX(this,_.Kc,a)):a.endedReason===b.STOPPED?oX(this,_.Kc,a):a.endedReason===b.END_OF_STREAM?(oX(this,_.xc,a),oX(this,_.Kc,a)):a.endedReason===b.ERROR&&pX(this,1);break;case cast.framework.events.EventType.PLAYING:oX(this,_.Hc,a);break;case cast.framework.events.EventType.PAUSE:oX(this,_.Fc,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?oX(this,_.vc,a):oX(this,_.Hc,a)}};
|
|
79
79
|
jX.prototype.getPosition=jX.prototype.getPosition;jX.prototype.setVolume=jX.prototype.setVolume;jX.prototype.getVolume=jX.prototype.getVolume;jX.prototype.skip=jX.prototype.skip;jX.prototype.pause=jX.prototype.pause;jX.prototype.resume=jX.prototype.resume;var kX=!1;qX.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(rX(),this.a)};qX.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(rX(),this.a)};qX.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return sX(a)})};
|
|
80
80
|
qX.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.ni;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.ii;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.ji}b&&this.Wa(new _.L(b,{detail:sX(a.timedMetadataInfo)}))}else for(a=_.w(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Wa(new _.L(_.ni,{detail:b.value}))};_.x(tX,_.il);_.u=tX.prototype;_.u.initialize=function(a){this.m=a;uX().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.u.load=function(){};_.u.destroy=function(){this.m=null;uX().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.u.getVideoTracks=function(){return[]};_.u.getAudioTracks=function(){return this.h};_.u.ka=function(){return this.j};_.u.la=function(){return null};
|
|
81
|
-
_.u.Xa=function(){var a=this.pa();return a&&a.renditions[0]};_.u.Ta=function(){var a=this.za();return a&&a.renditions[0]};_.u.
|
|
82
|
-
_.u.za=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ka().find(function(c){return c.id===b})||null)}return a};_.u.
|
|
83
|
-
_.u.
|
|
81
|
+
_.u.Xa=function(){var a=this.pa();return a&&a.renditions[0]};_.u.Ta=function(){var a=this.za();return a&&a.renditions[0]};_.u.sb=function(){return null};_.u.Db=function(){return null};_.u.Eb=function(){return null};_.u.Ja=function(){return null};_.u.pa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
|
|
82
|
+
_.u.za=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ka().find(function(c){return c.id===b})||null)}return a};_.u.Ab=function(){this.g.warn("Video tracks unavailable on Cast")};_.u.Ha=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.u.Va=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.u.kb=function(){this.g.warn("Video renditions unavailable on Cast")};_.u.yb=function(a){this.Ha(a&&a.track)};
|
|
83
|
+
_.u.zb=function(a){this.Va(a&&a.track)};
|
|
84
84
|
_.u.addTextTrack=function(a){var b=this,c,d,e;return _.I(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.y(f,pW(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]),wX(b)}catch(g){throw b.g.warn("failed on track",
|
|
85
|
-
a),g;}}_.C(f)})};_.u.ua=function(){return!0};_.u.
|
|
86
|
-
tX.prototype.setVideoRendition=tX.prototype.
|
|
87
|
-
tX.prototype.getAudioRendition=tX.prototype.Xa;tX.prototype.getVideoRendition=tX.prototype.la;tX.prototype.getTextTracks=tX.prototype.ka;tX.prototype.getAudioTracks=tX.prototype.getAudioTracks;tX.prototype.getVideoTracks=tX.prototype.getVideoTracks;_.x(yX,_.tm);_.u=yX.prototype;_.u.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=zX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.
|
|
85
|
+
a),g;}}_.C(f)})};_.u.ua=function(){return!0};_.u.xn=function(){this.f=uX().getAudioTracksManager();var a=this.f.getTracks();this.h=vX(_.Gk,a);wX(this);a=this.m.getConfiguration();xX(this,_.Gk,a.preferredAudioLanguage,a.preferredAudioRole);xX(this,_.T,a.preferredTextLanguage,a.preferredTextRole)};tX.prototype.isAbrEnabled=tX.prototype.ua;tX.prototype.addTextTrack=tX.prototype.addTextTrack;tX.prototype.setTextRendition=tX.prototype.zb;tX.prototype.setAudioRendition=tX.prototype.yb;
|
|
86
|
+
tX.prototype.setVideoRendition=tX.prototype.kb;tX.prototype.setTextTrack=tX.prototype.Va;tX.prototype.setAudioTrack=tX.prototype.Ha;tX.prototype.setVideoTrack=tX.prototype.Ab;tX.prototype.getTextTrack=tX.prototype.za;tX.prototype.getAudioTrack=tX.prototype.pa;tX.prototype.getVideoTrack=tX.prototype.Ja;tX.prototype.getLoadingTextRendition=tX.prototype.Eb;tX.prototype.getLoadingAudioRendition=tX.prototype.Db;tX.prototype.getLoadingVideoRendition=tX.prototype.sb;tX.prototype.getTextRendition=tX.prototype.Ta;
|
|
87
|
+
tX.prototype.getAudioRendition=tX.prototype.Xa;tX.prototype.getVideoRendition=tX.prototype.la;tX.prototype.getTextTracks=tX.prototype.ka;tX.prototype.getAudioTracks=tX.prototype.getAudioTracks;tX.prototype.getVideoTracks=tX.prototype.getVideoTracks;_.x(yX,_.tm);_.u=yX.prototype;_.u.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=zX();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.Rm.bind(this));d.setMediaPlaybackInfoHandler(this.yj.bind(this));this.a=new fX(this);this.a.init();this.j=new tX;this.j.initialize(this);this.o=new qX(function(e){return c.trigger(e)});this.o.init()};
|
|
88
88
|
_.u.unload=function(){var a=cast.framework.messages.PlayerState,b=zX();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.u.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.u.destroy=function(){var a=this;return _.I(function(b){if(1==b.a)return a.B=null,a.w=_.zm(),a.h=a.w,a.l=-1,a.A=null,a.a?_.y(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.C(b)})};
|
|
89
89
|
_.u.play=function(){var a=zX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.u.pause=function(){var a=zX();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.u.isPaused=function(){return zX().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
|
|
90
90
|
_.u.isEnded=function(){return zX().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.u.seek=function(a){var b=zX();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject($V);b.seek(a);return Promise.resolve()};_.u.getPosition=function(){return this.getMediaPosition()};_.u.setSeekInterceptor=function(){};_.u.setPlaybackSessionId=function(){};_.u.getMediaPosition=function(){return zX().getCurrentTimeSec()};_.u.getDuration=function(){return this.getMediaDuration()};
|
|
91
91
|
_.u.getMediaDuration=function(){var a=zX().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.u.getPlaybackRate=function(){return zX().getPlaybackRate()};_.u.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;zX().sendLocalMediaRequest(b)}};_.u.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.u.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};
|
|
92
92
|
_.u.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};_.u.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};
|
|
93
|
-
_.u.getLoadedSource=function(){var a=zX().getMediaInformation();if(a){var b=zX().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,
|
|
93
|
+
_.u.getLoadedSource=function(){var a=zX().getMediaInformation();if(a){var b=zX().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,Lo:b,name:c}}return null};_.u.getDrmInfo=function(){return null};_.u.getPresentationStartTime=function(){return zX().getStartAbsoluteTime()};
|
|
94
94
|
_.u.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=zX().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.u.getState=function(){return this.a?this.a.getState():_.Qp};
|
|
95
95
|
_.u.getStats=function(){var a=_.Lp();if(this.f){a=zX().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.u.isLive=function(){return Infinity===this.getDuration()};
|
|
96
96
|
_.u.load=function(a){var b=this,c,d;return _.I(function(e){b.f=new _.Kp;b.a.j=b.f.a;b.A=_.gq(a);b.h=_.Bm(b.w,a);if(b.C)return b.C=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:nW(b.h),local:!0};return _.y(e,zX().load(d),0)})};_.u.getBufferInfo=function(){this.g.warn(_.ta);return new _.sm};
|
|
97
97
|
_.u.getTrackManager=function(){return this.j};_.u.getConfiguration=function(){return this.h};_.u.getSurface=function(){return this.B};_.u.getTimeline=function(){return null};_.u.setupPlaylist=function(){return Promise.reject(_.Ab)};_.u.appendLoad=function(){return Promise.reject(_.Ab)};_.u.seekWith=function(){return Promise.reject(_.Ab)};_.u.setNetworkEngine=function(a){this.G=a};_.u.setCmsdManager=function(){};_.u.getNetworkEngine=function(){return this.G};_.u.getSourceIndex=function(){return this.l};
|
|
98
98
|
_.u.setSourceIndex=function(a){this.l=a};_.u.getPeriods=function(){return[]};_.u.namespace=function(){return hW};_.u.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.u.getCueTimeline=function(){return null};_.u.resetAbr=function(){this.g.warn(dW)};_.u.onError=function(a){this.trigger(new _.L(_.qe,{detail:a}))};_.u.canPlay=function(){return _.Bl()?2:0};
|
|
99
|
-
_.u.
|
|
99
|
+
_.u.Rm=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=nW(this.getStats());var b=zX(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&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&&
|
|
100
100
|
(!e||e&&f)){d=zX().getStartAbsoluteTime();if(typeof d===_.k){b.startAbsoluteTime=d;var h;f?h=new cast.framework.messages.GenericMediaMetadata:h=b.metadata;h.sectionStartAbsoluteTime=d;b.metadata=h}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};
|
|
101
|
-
_.u.
|
|
102
|
-
_.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=GX(),b=GX().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[jW]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.
|
|
103
|
-
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.
|
|
104
|
-
_.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=GX();GX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(jW,this.w);a.stop();this.m=this.f=null}};_.u.qe=function(a){this.j=a};_.u.
|
|
105
|
-
_.u.removeMessageListener=function(a){typeof a===_.ue&&this.h["delete"](a)};_.u.sendMessage=function(a,b){GX().sendCustomMessage(jW,b,nW(a))};_.u.Cc=function(){return this.a};_.u.
|
|
106
|
-
_.u.
|
|
101
|
+
_.u.yj=function(a,b){var c=null;a.media.customData&&(c=oW(a.media.customData.playerConfiguration));var d=c?c.abr||null:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;CX(c,b);return b};_.u.getTextDisplayer=function(){return null};_.u.setDrmCustomDataModifier=function(){};_.u.setCdnErrorCallback=function(){};_.u.detach=function(){};_.u=DX.prototype;_.u.init=function(a){var b=this;a&&(this.f=new yX,_.Ss(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.I(function(c){return b.m&&b.m.getState()!==_.Pp?_.y(c,lW(b.m),0):c.F(0)})}))};
|
|
102
|
+
_.u.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=GX(),b=GX().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[jW]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.jm.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
|
|
103
|
+
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.im.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(jW,this.w)}};
|
|
104
|
+
_.u.stop=function(){if(this.a){this.a=!1;this.o.release();var a=GX();GX().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(jW,this.w);a.stop();this.m=this.f=null}};_.u.qe=function(a){this.j=a};_.u.Rn=function(a){this.l=a};_.u.on=function(a,b){GX().addEventListener(a,b)};_.u.off=function(a,b){GX().removeEventListener(a,b)};_.u.addMessageListener=function(a){typeof a===_.ue&&this.h.add(a)};
|
|
105
|
+
_.u.removeMessageListener=function(a){typeof a===_.ue&&this.h["delete"](a)};_.u.sendMessage=function(a,b){GX().sendCustomMessage(jW,b,nW(a))};_.u.Cc=function(){return this.a};_.u.Cb=function(){return HX()};_.u.bc=function(a){IX(this,a)};_.u.jo=function(a){var b=HX(),c=null;a?c=Object.assign({},b,a):c=b;IX(this,c)};
|
|
106
|
+
_.u.jm=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return KX(this,a);try{var b=(new DOMParser).parseFromString(a,_.pg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=GX();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ia),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.r||g===_.$c){g=e[f].getAttribute(_.Re);for(var h=e[f].getElementsByTagName(_.Ob),l=h.length-
|
|
107
107
|
1;0<=l;--l){var m=h[l].getAttribute(_.Re)||g,n=h[l].getAttribute(_.Gd),p=h[l].getAttribute(_.Vg)||void 0,q=h[l].getAttribute(_.ve)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.Ob).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ia).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.Xb)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=GX();c=a.getElementsByTagName("StreamIndex");
|
|
108
108
|
for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.r){e=c[d].getElementsByTagName(_.Mb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.rb)||void 0,h=e[f].getAttribute(_.qb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Ig,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Mb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
|
|
109
|
-
_.u.
|
|
109
|
+
_.u.im=function(a){var b=this,c,d,e,f,g,h;return _.I(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=oW(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.y(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.y(l,mX(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.F(7);
|
|
110
110
|
break}b.f.C=!0;return _.y(l,_.bt(b.m,d),8);case 8:return _.y(l,_.ct(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.cc&&(c.media.hlsVideoSegmentFormat=qW(f.cc,_.Hk)),f.audioMimeType&&(c.media.hlsSegmentFormat=qW(f.audioMimeType,_.Gk));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){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.l){l.F(10);
|
|
111
|
-
break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.
|
|
112
|
-
_.u.
|
|
113
|
-
DX.prototype.on=DX.prototype.on;DX.prototype.setLoadRequestDataInterceptor=DX.prototype.
|
|
111
|
+
break}return _.y(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.u.Nm=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.M.Yl;var b=GX().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.m.seek(b))}_.Xs(this.m)}};
|
|
112
|
+
_.u.Qj=function(a){if(0<this.h.size){var b=oW(a.data);this.h.forEach(function(c){return c(b)})}};_.J(iW,DX);DX.prototype.updateContentMetadata=DX.prototype.jo;DX.prototype.setContentMetadata=DX.prototype.bc;DX.prototype.getContentMetadata=DX.prototype.Cb;DX.prototype.isApiReady=DX.prototype.Cc;DX.prototype.sendMessage=DX.prototype.sendMessage;DX.prototype.removeMessageListener=DX.prototype.removeMessageListener;DX.prototype.addMessageListener=DX.prototype.addMessageListener;DX.prototype.off=DX.prototype.off;
|
|
113
|
+
DX.prototype.on=DX.prototype.on;DX.prototype.setLoadRequestDataInterceptor=DX.prototype.Rn;DX.prototype.setPlayerConfigInterceptor=DX.prototype.qe;DX.prototype.stop=DX.prototype.stop;DX.prototype.start=DX.prototype.start;DX.prototype.init=DX.prototype.init;DX.getInstance=FX;var EX=null;_.u=LX.prototype;_.u.load=function(){var a=this,b,c,d,e,f;return _.I(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.cn.bind(a),d=_.w(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.C(g)})};_.u.start=function(){return _.I(function(a){_.C(a)})};_.u.Yc=function(){};_.u.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.u.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
|
|
114
114
|
_.u.skip=function(){var a=this.f.a;a&&this.f.sendMessage(kW,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.u.getVolume=function(){return this.f.getVolume()||0};_.u.setVolume=function(a){this.f.setVolume(a)};_.u.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.u.Tc=function(){return!0};_.u.uc=function(){var a=this;return _.I(function(b){a.h.release();_.C(b)})};
|
|
115
|
-
_.u.
|
|
115
|
+
_.u.cn=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Nc,{adsTimeline:new hX(a.breaks)})));break;case "isPlayingBreak":a.value?NX(this,_.tc):(NX(this,_.xc),NX(this,_.Kc),NX(this,_.uc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(NX(this,_.xc),NX(this,_.Kc)),NX(this,_.Jc));break;case "isPaused":this.a.isPlayingBreak&&(a.value?NX(this,_.Fc):NX(this,_.Hc))}};LX.prototype.getPosition=LX.prototype.getPosition;
|
|
116
116
|
LX.prototype.setVolume=LX.prototype.setVolume;LX.prototype.getVolume=LX.prototype.getVolume;LX.prototype.skip=LX.prototype.skip;LX.prototype.pause=LX.prototype.pause;LX.prototype.resume=LX.prototype.resume;OX.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};OX.prototype.a=function(a,b){return a.namespace()!==_.Ad?!1:!(!b||!b.ima)};OX.prototype.create=function(a){return new LX(a.a)};_.wq(new OX);PX.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};PX.prototype.a=function(a,b){return FX().Cc()?!(!b||!b.ima):!1};PX.prototype.create=function(a){return new jX(a)};_.wq(new PX);};
|
|
117
117
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
118
118
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
package/cjs/cl.conviva.js
CHANGED
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
var f=function(window){var AV="Ad Error",BV="onAdBreakStarted()",CV="onAdBreakStopped()",DV=function(a){function b(l,m){l in h||!m||(h[l]=m)}var c=_.vk(),d=Conviva.Constants.DeviceType.DESKTOP,e=Conviva.Constants.DeviceCategory.WEB,f=c.os;c=c.osVersion.name;var g="";_.Cl()&&(g="Apple");_.Bl()?(g="Google",d=Conviva.Constants.DeviceType.SETTOP,e=Conviva.Constants.DeviceCategory.CHROMECAST):_.Dl()?(d=Conviva.Constants.DeviceType.MOBILE,/(android)/i.test(navigator.userAgent)?e=Conviva.Constants.DeviceCategory.ANDROID_DEVICE:
|
|
3
3
|
_.Cl()&&(e=Conviva.Constants.DeviceCategory.APPLE_DEVICE)):_.uk()||_.tk()||_.yl("Hisense")?(d=Conviva.Constants.DeviceType.SMARTTV,e=Conviva.Constants.DeviceCategory.SMART_TV,_.uk()?(c="",g="LG",e=Conviva.Constants.DeviceCategory.LG_TV):_.tk()?(g="Samsung",e=Conviva.Constants.DeviceCategory.SAMSUNG_TV):_.yl("Hisense")&&(c="",g="Hisense")):_.yl("Xbox One")&&(g="Microsoft",d=Conviva.Constants.DeviceType.CONSOLE,e=Conviva.Constants.DeviceCategory.XBOX);var h=a.deviceMetadata||{};b(Conviva.Constants.DeviceMetadata.TYPE,
|
|
4
4
|
a.deviceType||d);b(Conviva.Constants.DeviceMetadata.OS_NAME,f);b(Conviva.Constants.DeviceMetadata.OS_VERSION,c);b(Conviva.Constants.DeviceMetadata.CATEGORY,a.deviceCategory||e);b(Conviva.Constants.DeviceMetadata.BRAND,a.deviceBrand||g);return h},EV=function(a){return a?Conviva.Constants.StreamType.LIVE:Conviva.Constants.StreamType.VOD},FV=function(a){return 0===a?"Pre-roll":-1===a?"Post-roll":"Mid-roll"},HV=function(a,b,c,d){var e={};e[Conviva.Constants.PLAYER_NAME]=c;e[Conviva.Constants.VIEWER_ID]=
|
|
5
|
-
b;e[Conviva.Constants.IS_LIVE]=EV(!!d);e[Conviva.Constants.ASSET_NAME]=AV;a&&(e[Conviva.Constants.ASSET_NAME]=a.getTitle(),e[Conviva.Constants.STREAM_URL]=a.getMediaUrl(),e[Conviva.Constants.DURATION]=a.getDuration(),e["c3.ad.id"]=GV(a.getId()),e["c3.ad.creativeId"]=GV(a.getCreativeId()),e["c3.ad.system"]=GV(a.getAdSystem()),e["c3.ad.mediaFileApiFramework"]=GV(a.getApiFramework()),e["c3.ad.advertiser"]=GV(a.getAdvertiserName()),e["c3.ad.position"]=FV(a.getPodIndex()),e["c3.ad.technology"]=0===a.
|
|
6
|
-
Conviva.Constants.AdType.CLIENT_SIDE:Conviva.Constants.AdType.SERVER_SIDE,e["c3.ad.adManagerName"]=GV(a.
|
|
5
|
+
b;e[Conviva.Constants.IS_LIVE]=EV(!!d);e[Conviva.Constants.ASSET_NAME]=AV;a&&(e[Conviva.Constants.ASSET_NAME]=a.getTitle(),e[Conviva.Constants.STREAM_URL]=a.getMediaUrl(),e[Conviva.Constants.DURATION]=a.getDuration(),e["c3.ad.id"]=GV(a.getId()),e["c3.ad.creativeId"]=GV(a.getCreativeId()),e["c3.ad.system"]=GV(a.getAdSystem()),e["c3.ad.mediaFileApiFramework"]=GV(a.getApiFramework()),e["c3.ad.advertiser"]=GV(a.getAdvertiserName()),e["c3.ad.position"]=FV(a.getPodIndex()),e["c3.ad.technology"]=0===a.tb()?
|
|
6
|
+
Conviva.Constants.AdType.CLIENT_SIDE:Conviva.Constants.AdType.SERVER_SIDE,e["c3.ad.adManagerName"]=GV(a.pb()),e["c3.ad.adManagerVersion"]=GV(a.qb()),e["c3.ad.advertiserCategory"]=GV(null),e["c3.ad.advertiserId"]=GV(null),e["c3.ad.breakId"]=GV(null),e["c3.ad.campaignName"]=GV(null),e["c3.ad.category"]=GV(null),e["c3.ad.classification"]=GV(null),e["c3.ad.creativeName"]=GV(null),e["c3.ad.sequence"]=GV(a.Gb()),e["c3.ad.sessionStartEvent"]=GV(null),e["c3.ad.unitName"]=GV(null),e["c3.ad.dayPart"]=GV(null),
|
|
7
7
|
b=a.getWrapperAdIds().slice(-1)[0]||a.getId(),c=a.getWrapperAdSystems().slice(-1)[0]||a.getAdSystem(),a=a.getWrapperCreativeIds().slice(-1)[0]||a.getCreativeId(),e["c3.ad.firstAdId"]=GV(b),e["c3.ad.firstAdSystem"]=GV(c),e["c3.ad.firstCreativeId"]=GV(a));return e},GV=function(a){return a?""+a:"NA"},IV=function(a,b){this.m=a;this.B=b;this.A="";this.w=_.ua;this.g=new _.K("clpp.conviva.ad");this.f=new _.Vh;this.a=null;this.j=this.l=this.o=this.h=!1},JV=function(a,b){if(!a.l){a.j=!1;try{if(a.a=Conviva.Analytics.buildAdAnalytics(a.B()),
|
|
8
|
-
b){var c=HV(b,a.A,a.w,a.m.isLive()),d=String(b.
|
|
9
|
-
a.a=null;a.h=!1}},NV=function(a){a.f.on(a.m,_.tc,a.
|
|
8
|
+
b){var c=HV(b,a.A,a.w,a.m.isLive()),d=String(b.qb()),e={};e[Conviva.Constants.FRAMEWORK_NAME]=b.pb();e[Conviva.Constants.FRAMEWORK_VERSION]=d;a.a.setAdPlayerInfo(e);a.a.reportAdStarted(c)}}catch(f){a.g.error("Could not create ad analytics session",f)}}},MV=function(a,b,c){c=void 0===c?AV:c;if(a.a){a.a.reportAdMetric(Conviva.Constants.Playback.PLAYER_STATE,Conviva.Constants.PlayerState.STOPPED);switch(b){case KV:a.a.reportAdFailed(c,HV(null,a.A,a.w));break;case LV:a.a.reportAdSkipped();break;default:a.a.reportAdEnded()}a.a.release();
|
|
9
|
+
a.a=null;a.h=!1}},NV=function(a){a.f.on(a.m,_.tc,a.Xj.bind(a));a.f.on(a.m,_.uc,a.Yj.bind(a));a.f.on(a.m,_.Jc,a.dk.bind(a));a.f.on(a.m,_.Gc,a.$e.bind(a));a.f.on(a.m,_.Fc,a.$e.bind(a));a.f.on(a.m,_.Hc,a.$e.bind(a));a.f.on(a.m,_.vc,a.$e.bind(a));a.f.on(a.m,_.Kc,a.ek.bind(a));a.f.on(a.m,_.Ic,a.ck.bind(a));a.f.on(a.m,_.wc,a.Zj.bind(a));a.f.on(a.m,_.Cc,a.ak.bind(a));a.f.on(a.m,_.Dc,a.bk.bind(a));a.f.on(a.m,_.yc,a.$j.bind(a));a.f.on(a.m,_.Ec,a.tm.bind(a));a.f.on(a.m,_.Lc,a.fk.bind(a));a.f.on(a.m,_.qe,function(b){var c=
|
|
10
10
|
b.detail;if(10003===c.code&&(a.g.debug("onAdError()"),!a.j)){b=Conviva.Constants.ErrorSeverity;switch(c.data.errorType){case 0:c="Ad Load Error";break;case 1:c="Ad Play Error";break;default:c=AV}null===a.a&&JV(a,null);a.a.reportAdError(c,b.FATAL);a.j=!0;a.g.debug("Ad Playback Failure");MV(a,KV,c)}})},OV=function(a,b){this.m=a;this.f=new _.Vh;this.a=null;this.o=!1;this.H=!0;this.B=this.h=this.A=this.C=this.l=!1;this.N=0;this.K=!1;this.w=null;this.J=!1;this.g=b;this.L=this.G=null;this.j=[];this.I=0},
|
|
11
11
|
PV=function(a){if(!a.l&&a.a){var b=EV(a.m.isLive()),c={};c[Conviva.Constants.IS_LIVE]=b;c[Conviva.Constants.DURATION]=a.m.getDuration();a.a.setContentInfo(c)}},QV=function(a){return null!==a.a&&a.C},RV=function(a){return a.m.getConfiguration().autoplay||!1},SV=function(a,b){var c={};c[Conviva.Constants.LOG_LEVEL]=Conviva.Constants.LogLevel.DEBUG;b.serviceUrl&&(a.g.warn("Touchstone URL is set. Do not set this in production!"),c[Conviva.Constants.GATEWAY_URL]=b.serviceUrl.replace(/\/$/,""));Conviva.Analytics.init(b.customerKey,
|
|
12
12
|
null,c);Conviva.Analytics.setDeviceMetadata(DV(b));b.connectionType&&Conviva.Analytics.reportDeviceMetric(Conviva.Constants.Network.CONNECTION_TYPE,b.connectionType);a.a=Conviva.Analytics.buildVideoAnalytics();a.o=!1;c={};c[Conviva.Constants.FRAMEWORK_NAME]=_.ua;c[Conviva.Constants.FRAMEWORK_VERSION]=_.ha;a.a.setPlayerInfo(c)},TV=function(a){if(!a.l)if(a.C)a.g.warn("Current session still active. No-op.");else{var b=a.m.getLoadedSource()||a.L,c=a.m.getConfiguration().conviva||null,d=c&&c.viewerId||
|
|
13
13
|
"N/A",e=c&&c.defaultResource||"N/A";a.g.debug(a.m.getConfiguration().source);var f={},g=new _.Ok(b.url);b&&(f[Conviva.Constants.ASSET_NAME]=b.name||"N/A",f[Conviva.Constants.STREAM_URL]=_.Pk(g));f[Conviva.Constants.PLAYER_NAME]=c.playerName||_.ua;f[Conviva.Constants.VIEWER_ID]=d;f[Conviva.Constants.DEFAULT_RESOURCE]=e;if(c&&!_.M.R(c.customTags))for(var h in c.customTags)f[h]=c.customTags[h];a.a.reportPlaybackRequested(f);a.a.setCallback(function(){a.g.debug("reportMiscellaneousMetrics()");if(QV(a)){var l=
|
|
14
|
-
1E3*a.m.getPosition();a.a.reportPlaybackMetric(Conviva.Constants.Playback.PLAY_HEAD_TIME,l);if(l=a.m.getStats()){l=l.decodedFrames;var m=l-a.I;a.I=l;isFinite(m)&&(a.g.debug("Current FPS",m),a.a.reportPlaybackMetric(Conviva.Constants.Playback.RENDERED_FRAMERATE,m))}}});a.C=!0;a.h=!0;a.J=!1;0<a.j.length&&(a.g.debug("Report deferred events"),a.j.forEach(function(l){l.
|
|
14
|
+
1E3*a.m.getPosition();a.a.reportPlaybackMetric(Conviva.Constants.Playback.PLAY_HEAD_TIME,l);if(l=a.m.getStats()){l=l.decodedFrames;var m=l-a.I;a.I=l;isFinite(m)&&(a.g.debug("Current FPS",m),a.a.reportPlaybackMetric(Conviva.Constants.Playback.RENDERED_FRAMERATE,m))}}});a.C=!0;a.h=!0;a.J=!1;0<a.j.length&&(a.g.debug("Report deferred events"),a.j.forEach(function(l){l.Rh(l.args)}));a.j=[]}},UV=function(a){a.g.debug("terminateSession()");a.a&&(a.a.reportPlaybackMetric(Conviva.Constants.Playback.PLAYER_STATE,
|
|
15
15
|
Conviva.Constants.PlayerState.STOPPED),a.a.reportPlaybackEnded(),a.a.release(),Conviva.Analytics.release(),a.o=!0,a.C=!1,a.A=!1,a.h=!1,a.w=null,a.B=!1,a.N=0,a.K=!1,a.j=[],a.I=0)},VV=function(){this.h=this.f=null;this.a=!1;this.g=new _.K("clpp.conviva")},WV=function(a){var b=[];typeof a===_.Xe&&(a.customerKey||b.push("customerKey"),a.viewerId||b.push("viewerId"));if(0<b.length)throw new _.N(1,9,9001,{missingKeys:b});},XV=function(a,b){var c=b.getConfiguration();a.a=!_.M.R(c.conviva)&&typeof c.conviva===
|
|
16
|
-
_.Xe;a.a?"undefined"===typeof window.Conviva?(a.g.warn("Conviva SDK is not loaded. Will do nothing."),a.a=!1,c=new _.N(1,9,9E3),a.S(b,c)):b.namespace()===_.Ad&&(a.a=!1,a.g.debug("Conviva does not report when casting.")):a.g.debug("Conviva plugin is loaded but not configured. Will do nothing.")},YV=function(){};_.u=IV.prototype;_.u.initialize=function(a){this.g.debug("Initialize Ad Insights");this.j=this.o=!1;this.A=a.viewerId;this.w=a.playerName||_.ua;NV(this)};_.u.release=function(){this.g.debug("Release Ad Insights");this.o?this.g.debug(_.ka):(_.Yh(this.f),this.a&&MV(this,ZV),this.f.release(),this.o=!0,this.h=this.j=!1)};_.u.destroy=function(){this.g.debug(_.Wd);this.l?this.g.debug(_.ja):this.l=!0};_.u.
|
|
17
|
-
_.u.
|
|
18
|
-
_.u.$e=function(a){var b=this;this.g.debug("onAdStateChanged()");if(this.a){var c=function(d){b.a.reportAdMetric(Conviva.Constants.Playback.PLAYER_STATE,d)};switch(a.type){case _.Gc:case _.Hc:c(Conviva.Constants.PlayerState.PLAYING);break;case _.Fc:c(Conviva.Constants.PlayerState.PAUSED);break;case _.vc:c(Conviva.Constants.PlayerState.BUFFERING)}}};_.u.
|
|
19
|
-
_.u.
|
|
20
|
-
_.u.
|
|
21
|
-
_.u.
|
|
22
|
-
_.u.initialize=function(a,b,c){this.l||(this.g.debug("Initialize conviva"),this.H=!1,this.G=_.M.
|
|
23
|
-
this.f.on(this.m,_.qe,this.
|
|
24
|
-
_.u.reportAppEvent=function(a,b){var c=!1;try{Conviva.Analytics.reportAppEvent(a,b),c=!0}catch(d){this.g.debug("Report app event error",d),c=!1}return c};_.u.
|
|
25
|
-
_.u.
|
|
26
|
-
break;case _.bq:b(Conviva.Constants.PlayerState.PAUSED);break;case _.Up:b(Conviva.Constants.PlayerState.BUFFERING);break;case _.Wp:this.g.debug("onVideoEnded()"),QV(this)&&(this.w&&this.w.
|
|
27
|
-
_.u.
|
|
28
|
-
_.u.
|
|
29
|
-
_.u.
|
|
30
|
-
b,e);this.B=!0}else this.g.debug("Bug: should already have a valid session")};_.u.
|
|
31
|
-
_.u.
|
|
32
|
-
args:a})}};_.u.
|
|
16
|
+
_.Xe;a.a?"undefined"===typeof window.Conviva?(a.g.warn("Conviva SDK is not loaded. Will do nothing."),a.a=!1,c=new _.N(1,9,9E3),a.S(b,c)):b.namespace()===_.Ad&&(a.a=!1,a.g.debug("Conviva does not report when casting.")):a.g.debug("Conviva plugin is loaded but not configured. Will do nothing.")},YV=function(){};_.u=IV.prototype;_.u.initialize=function(a){this.g.debug("Initialize Ad Insights");this.j=this.o=!1;this.A=a.viewerId;this.w=a.playerName||_.ua;NV(this)};_.u.release=function(){this.g.debug("Release Ad Insights");this.o?this.g.debug(_.ka):(_.Yh(this.f),this.a&&MV(this,ZV),this.f.release(),this.o=!0,this.h=this.j=!1)};_.u.destroy=function(){this.g.debug(_.Wd);this.l?this.g.debug(_.ja):this.l=!0};_.u.Xj=function(){this.g.debug(BV)};_.u.Yj=function(){this.g.debug(CV)};
|
|
17
|
+
_.u.dk=function(a){this.g.debug("onAdStarted()");a=a.ad;this.h||(this.g.warn("Ad load event was not triggered. This will have incidence on VSF"),JV(this,a));this.h=!1;this.a.reportAdMetric(Conviva.Constants.Playback.PLAYER_STATE,Conviva.Constants.PlayerState.PLAYING);this.a.reportAdMetric(Conviva.Constants.Playback.RESOLUTION,a.hb(),a.gb());this.a.reportAdMetric(Conviva.Constants.Playback.BITRATE,a.Ra())};
|
|
18
|
+
_.u.$e=function(a){var b=this;this.g.debug("onAdStateChanged()");if(this.a){var c=function(d){b.a.reportAdMetric(Conviva.Constants.Playback.PLAYER_STATE,d)};switch(a.type){case _.Gc:case _.Hc:c(Conviva.Constants.PlayerState.PLAYING);break;case _.Fc:c(Conviva.Constants.PlayerState.PAUSED);break;case _.vc:c(Conviva.Constants.PlayerState.BUFFERING)}}};_.u.ek=function(){this.g.debug("onAdStopped()");this.a&&!this.j&&MV(this,ZV)};_.u.ck=function(){this.g.debug("onAdSkipped()");this.a&&MV(this,LV)};
|
|
19
|
+
_.u.Zj=function(){this.g.debug("onAdClicked()");this.a&&this.a.reportAdPlayerEvent("AdClicked")};_.u.ak=function(){this.g.debug("onAdImpression()");if(this.a){var a=Conviva.Constants.Events;this.a.reportAdPlayerEvent(a.AD_IMPRESSION_START);this.a.reportAdPlayerEvent(a.AD_IMPRESSION_END)}};
|
|
20
|
+
_.u.bk=function(a){var b=this;this.g.debug("onAdLoaded()");var c=a.ad;if(-1!==c.getPodIndex()||this.m.getPosition()>=this.m.getDuration()-5)b.h=!0,JV(b,c);else this.f.on(this.m,_.qg,function(){b.m.getPosition()>=b.m.getDuration()-5&&(b.f.off(b.m,_.qg),b.h=!0,JV(b,c))})};_.u.$j=function(){this.g.debug("onAdFirstQuartile()");this.a&&this.a.reportAdPlayerEvent(Conviva.Constants.Events.AD_FIRST_QUARTILE)};_.u.tm=function(){this.g.debug("onAdMidPoint()");this.a&&this.a.reportAdPlayerEvent(Conviva.Constants.Events.AD_MID_QUARTILE)};
|
|
21
|
+
_.u.fk=function(){this.g.debug("onAdThirdQuartile()");this.a&&this.a.reportAdPlayerEvent(Conviva.Constants.Events.AD_THIRD_QUARTILE)};var LV=0,ZV=1,KV=2;_.u=OV.prototype;
|
|
22
|
+
_.u.initialize=function(a,b,c){this.l||(this.g.debug("Initialize conviva"),this.H=!1,this.G=_.M.fb(b),this.L=c,this.m=a,SV(this,this.G),this.f.on(this.m,_.lf,this.Vm.bind(this)),this.f.on(this.m,_.fg,this.kk.bind(this)),this.f.on(this.m,_.hd,this.kh.bind(this)),this.f.on(this.m,_.Ag,this.jk.bind(this)),this.f.on(this.m,_.zg,this.ik.bind(this)),this.f.on(this.m,_.tc,this.gk.bind(this)),this.f.on(this.m,_.uc,this.hk.bind(this)),this.f.on(this.m,_.Nc,this.zm.bind(this)),this.f.on(this.m,_.gd,this.Am.bind(this)),
|
|
23
|
+
this.f.on(this.m,_.qe,this.lh.bind(this)),RV(this)&&(this.g.debug("Start a new session: A new video starts in autoplay."),TV(this)))};_.u.release=function(){this.g.debug("Release conviva");this.H?this.g.debug(_.ka):(_.Yh(this.f),QV(this)||this.o||!RV(this)||this.a&&this.a.reportPlaybackFailed("Exit Before Video Start"),QV(this)&&UV(this),this.a=null,this.H=!0)};_.u.destroy=function(){this.g.debug(_.Wd);this.l?this.g.debug(_.ja):this.l=!0};
|
|
24
|
+
_.u.reportAppEvent=function(a,b){var c=!1;try{Conviva.Analytics.reportAppEvent(a,b),c=!0}catch(d){this.g.debug("Report app event error",d),c=!1}return c};_.u.Vm=function(){this.g.debug("onPlayRequest()");QV(this)||RV(this)?QV(this)&&this.A&&!this.h&&(this.g.debug("Resuming VST monitoring ..."),QV(this)&&!this.h&&(this.a.reportPlaybackEvent(Conviva.Constants.Events.USER_WAIT_ENDED),this.h=!0),this.A=!1):(this.g.debug("Creating conviva session. On Play Requested / No autoplay"),TV(this))};
|
|
25
|
+
_.u.kk=function(a){function b(d){if(c.o&&(c.g.debug("Creating conviva session (On Seek / Replay)"),SV(c,c.G),TV(c),PV(c),QV(c))){var e=c.m.getTrackManager();e=e.la()||e.sb();e.width&&e.height&&c.a.reportPlaybackMetric(Conviva.Constants.Playback.RESOLUTION,e.width,e.height);e.bandwidth&&c.a.reportPlaybackMetric(Conviva.Constants.Playback.BITRATE,e.bandwidth/1E3)}QV(c)&&c.a.reportPlaybackMetric(Conviva.Constants.Playback.PLAYER_STATE,d)}var c=this;this.g.debug(_.bf);switch(a.detail.currentState){case _.cq:b(Conviva.Constants.PlayerState.PLAYING);
|
|
26
|
+
break;case _.bq:b(Conviva.Constants.PlayerState.PAUSED);break;case _.Up:b(Conviva.Constants.PlayerState.BUFFERING);break;case _.Wp:this.g.debug("onVideoEnded()"),QV(this)&&(this.w&&this.w.Hb()?(this.g.debug("Waiting for postroll Ad before terminating session"),this.K=!0):UV(this))}};
|
|
27
|
+
_.u.kh=function(a){this.g.debug(_.Ye);if(QV(this)){if(a=a.detail,typeof a.width===_.k&&typeof a.height===_.k&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.RESOLUTION,a.width,a.height),a.bandwidth&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.BITRATE,a.bandwidth/1E3),(a=a.rendition)&&a.track&&(a=a.track)&&a.frameRate){var b={};b[Conviva.Constants.ENCODED_FRAMERATE]=a.frameRate;this.a.setContentInfo(b)}}else this.j.push({Rh:this.kh.bind(this),args:a})};
|
|
28
|
+
_.u.jk=function(){this.g.debug("onSeeking()");QV(this)&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.SEEK_STARTED)};_.u.ik=function(){this.g.debug("onSeeked()");QV(this)&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.SEEK_ENDED)};_.u.zm=function(a){this.g.debug("onAdsTimelineChanged()");if(a=a.adsTimeline)this.w=a};
|
|
29
|
+
_.u.gk=function(a){this.g.debug(BV);var b=a.ad;a=0===b.Sa();var c=FV(b.getPodIndex());QV(this)||RV(this)||!a||TV(this);if(QV(this)){a=0===b.tb()?Conviva.Constants.AdType.CLIENT_SIDE:Conviva.Constants.AdType.SERVER_SIDE;var d=0,e={};1===b.ib()&&(d=b.getDuration());e[Conviva.Constants.POD_DURATION]=d;e[Conviva.Constants.POD_INDEX]=++this.N;e[Conviva.Constants.POD_POSITION]=c;b=Conviva.Constants.AdPlayer;b=a!==Conviva.Constants.AdType.CLIENT_SIDE||_.Bl()?b.CONTENT:b.SEPARATE;this.a.reportAdBreakStarted(a,
|
|
30
|
+
b,e);this.B=!0}else this.g.debug("Bug: should already have a valid session")};_.u.hk=function(){this.g.debug(CV);QV(this)&&this.B&&(this.a.reportAdBreakEnded(),this.B=!1,this.K&&UV(this))};
|
|
31
|
+
_.u.lh=function(a){this.g.debug(_.Ze);if(this.o&&this.J)this.g.debug("Session ended in VPF; ignoring subsequent errors");else{var b=a.detail||null,c=b&&b.message||"Player error",d=Conviva.Constants.ErrorSeverity.WARNING;b&&b.severity&&b.severity===_.P&&(d=Conviva.Constants.ErrorSeverity.FATAL,QV(this)||TV(this));QV(this)?(this.g.debug("Report error",c,d),this.a.reportPlaybackError(c,d),d===Conviva.Constants.ErrorSeverity.FATAL&&(this.g.debug("Video Playback Failure"),this.J=!0,UV(this))):this.j.push({Rh:this.lh.bind(this),
|
|
32
|
+
args:a})}};_.u.Am=function(){this.g.debug("onAutoPlayBlocked()");QV(this)&&(this.g.debug("Auto-play blocked. Pausing VST monitoring."),this.A=!0,QV(this)&&this.h&&(this.a.reportPlaybackEvent(Conviva.Constants.Events.USER_WAIT_STARTED),this.h=!1))};_.u=VV.prototype;_.u.onPlayerCreated=function(a){this.f=new OV(a,this.g)};_.u.onContentWillLoad=function(a,b){var c=this;XV(this,a);if(this.a){var d=a.getConfiguration();d=_.M.fb(d.conviva||{});try{WV(d);var e=d.enableAdInsights||!1;this.f.initialize(a,d,b);e&&(this.h=new IV(a,function(){return c.f.a}),this.h.initialize(d))}catch(f){f instanceof _.N?this.S(a,f):this.S(a,new _.N(1,9,9002,f,f))}}};_.u.onContentLoaded=function(a,b){for(var c=1;c<arguments.length;++c);this.a&&PV(this.f)};
|
|
33
33
|
_.u.onPlayerWillDestroy=function(){this.a&&(this.a=!1,this.f.destroy(),this.f=null,this.h&&(this.h.destroy(),this.h=null))};_.u.onPlayerWillRelease=function(){this.a&&(this.f.release(),this.h&&this.h.release())};_.u.id=function(){return"conviva"};_.u.S=function(a,b){a.trigger(new _.L(_.qe,{detail:b}))};_.u.reportAppEvent=function(a,b){return this.f?this.f.reportAppEvent(a,b):!1};_.J("clpp.conviva.ConvivaPlugin",VV);VV.prototype.reportAppEvent=VV.prototype.reportAppEvent;VV.Id="conviva";
|
|
34
34
|
YV.prototype.create=function(){return new VV};_.gt(new YV);};
|
|
35
35
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|