@castlabs/prestoplay 6.32.0-beta.2 → 6.32.0-beta.5
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 +7 -7
- package/cjs/cl.cast.js +56 -56
- package/cjs/cl.cdn.js +5 -5
- package/cjs/cl.conviva.js +18 -18
- package/cjs/cl.core.js +191 -191
- package/cjs/cl.dash.js +51 -51
- package/cjs/cl.freewheel.js +9 -9
- package/cjs/cl.hls.js +54 -54
- package/cjs/cl.hlssmpte.js +1 -1
- package/cjs/cl.htmlcue.js +3 -3
- package/cjs/cl.ima.js +11 -11
- package/cjs/cl.mediatailor.js +2 -2
- package/cjs/cl.mse.js +125 -125
- package/cjs/cl.muxdata.js +8 -8
- package/cjs/cl.persistent.js +2 -2
- package/cjs/cl.playlist.js +5 -5
- package/cjs/cl.simid.js +3 -3
- package/cjs/cl.smooth.js +28 -28
- package/cjs/cl.thumbnails.js +3 -3
- package/cjs/cl.tizen.js +34 -34
- package/cjs/cl.ttml.js +3 -3
- 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 +1 -1
- package/cjs/cl.yospace.js +2 -2
- package/cjs/cl.youbora.js +11 -11
- package/cl.airplay.js +1 -1
- package/cl.cast.js +29 -29
- package/cl.cdn.js +5 -5
- package/cl.conviva.js +3 -3
- package/cl.core.js +116 -116
- package/cl.dash.js +48 -48
- package/cl.freewheel.js +3 -3
- package/cl.hls.js +35 -35
- package/cl.htmlcue.js +1 -1
- package/cl.ima.js +1 -1
- package/cl.mediatailor.js +2 -2
- package/cl.mse.js +78 -78
- package/cl.muxdata.js +2 -2
- package/cl.persistent.js +1 -1
- package/cl.playlist.js +4 -4
- package/cl.simid.js +1 -1
- package/cl.smooth.js +22 -22
- package/cl.thumbnails.js +4 -4
- package/cl.tizen.js +15 -15
- package/cl.ttml.js +2 -2
- package/cl.verimatrix.js +1 -1
- package/cl.vimond.js +2 -2
- package/cl.vr.js +2 -2
- package/cl.vtt.js +2 -2
- package/cl.yospace.js +2 -2
- package/cl.youbora.js +8 -8
- package/package.json +1 -1
package/cl.youbora.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Vv="Unhandled state",Wv="ad break start",Xv="ad buffering ended",Yv="ad buffering started",Zv="ad click through url: ",$v="ad timeline changed",aw="clpp.npaw.NpawPlugin",bw="clpp.npaw.YouboraPlugin",cw="content.isLive",dw="content.title",ew="is container visible",fw=function(a){return a.startsWith(_.wd)?"Widevine":a.startsWith(_.sd)?"FairPlay":a.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":a.startsWith(_.Re)?"ClearKey":a.startsWith(_.rd)?"Primetime":a},hw=function(a){class b extends youbora.Adapter{constructor(c){super(c);
|
|
2
2
|
this.m=c;this.a=new _.Vt;this.g=new _.T("clpp.npaw.YouboraAdapter");this.h=this.o=!1;this.registerListeners()}getPlayhead(){return this.getIsLive()?-1:this.m.getPosition()}getDuration(){return this.m.getDuration()}getRendition(){let c,d,e;var f=this.m.getTrackManager();f&&(f=f.ta())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.j(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,d,e)}getIsLive(){return this.m.isLive()}getResource(){const c=this.m.Sa();
|
|
3
|
-
return c&&c.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.m.nc()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.Ia())?c.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"6.32.0-beta.
|
|
3
|
+
return c&&c.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.m.nc()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.Ia())?c.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"6.32.0-beta.5-castlabsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&this.a&&(this.g.debug("registering listeners"),youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Rf,this.I.bind(this)),this.a.on(this.m,
|
|
4
4
|
_.Xd,this.F.bind(this)),this.a.on(this.m,_.ug,this.H.bind(this)),this.a.on(this.m,_.qg,this.G.bind(this)),this.a.on(this.m,_.qc,this.B.bind(this)),this.a.on(this.m,_.Sc,this.C.bind(this)))}unregisterListeners(){this.g.debug(_.Ab);_.ai(this.a)}dispose(){super.dispose()}j(){return this.m.getStats()||_.xs()}w(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;this.l("state change",c);if(c)switch(c.currentState){case 1:this.w()&&this.f();break;case 3:this.f();this.A();this.fireResume();this.fireBufferEnd();
|
|
5
5
|
break;case 4:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.Hs:this.fireBufferEnd();this.fireStop();break;case 5:this.fireBufferEnd();this.o&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case 2:this.fireBufferBegin();break;default:this.g.debug(Vv,c)}}f(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.m.getDrmInfo();c&&(c=fw(c.keySystem))&&this.plugin.setOptions({"content.drm":c});this.fireJoin()}F(c){!(c=c.detail)||this.h||
|
|
6
6
|
10003===c.code&&this.plugin.getAdsAdapter()||(c=gw(c,this.m.getConfiguration().youbora,this.g,this))&&c.severity===_.D&&(this.h=!0)}H(){this.m.isEnded()||(this.l(_.Jf),this.f(),this.fireSeekBegin())}G(){this.l(_.If);this.fireSeekEnd()}B(c){this.g.debug("adsTimeline",c);this.o=(c=c.adsTimeline)&&c.Pb()}C(c){this.g.debug("Casting",c);this.fireCasted()}l(c,...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)},iw=function(a){class b extends youbora.Adapter{constructor(c){super(c);
|
|
7
7
|
this.m=c;this.j=this.a=null;this.f=new _.Vt;this.g=new _.T("clpp.npaw.YouboraAdsAdapter");this.registerListeners();this.l=!1}getDuration(){return this.a&&this.a.getDuration()}getRendition(){let c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.Va(),this.a.Ua(),this.a.Ba()));return c}getBitrate(){return this.a&&this.a.Ba()}getPlayhead(){const c=this.m.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&this.a.getTitle()}getProvider(){return this.a&&
|
|
8
8
|
this.a.getAdvertiserName()}getCreativeId(){return this.a&&this.a.getCreativeId()}getPosition(){const c=youbora.Constants.AdPosition;let d=null;if(this.a)switch(this.a.Ca()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.g.debug("Ad position",d);return d}getIsSkippable(){return this.a&&-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const c=this.m.getAdsManager();return c&&0<c.getAdVolume()}getExpectedBreaks(){return this.j&&this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&
|
|
9
|
-
this.a.Wa()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.j&&this.j.getCuePoints().map(c=>-1===c?this.m.getDuration():c)}getIsFullscreen(){return this.m.getSurface().isFullscreen()}getIsVisible(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.g.debug(ew,c);return c}getPlayerName(){return _.ra}getVersion(){return"6.32.0-beta.
|
|
9
|
+
this.a.Wa()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.j&&this.j.getCuePoints().map(c=>-1===c?this.m.getDuration():c)}getIsFullscreen(){return this.m.getSurface().isFullscreen()}getIsVisible(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.g.debug(ew,c);return c}getPlayerName(){return _.ra}getVersion(){return"6.32.0-beta.5-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&this.f&&(this.f.on(this.m,
|
|
10
10
|
_.qc,this.M.bind(this)),this.f.on(this.m,_.mc,this.L.bind(this)),this.f.on(this.m,_.hc,this.I.bind(this)),this.f.on(this.m,_.kc,this.J.bind(this)),this.f.on(this.m,_.Yb,this.G.bind(this)),this.f.on(this.m,_.Zb,this.o.bind(this,1)),this.f.on(this.m,_.ec,this.o.bind(this,2)),this.f.on(this.m,_.oc,this.o.bind(this,3)),this.f.on(this.m,_.Xb,this.F.bind(this)),this.f.on(this.m,_.lc,this.K.bind(this)),this.f.on(this.m,_.Xd,this.H.bind(this)),this.f.on(this.m,_.Ub,this.A.bind(this)),this.f.on(this.m,_.Vb,
|
|
11
11
|
this.B.bind(this)),this.f.on(this.m,_.Wb,this.C.bind(this)),this.f.on(this.m,_.jc,this.w.bind(this)))}unregisterListeners(){_.ai(this.f)}dispose(){super.dispose()}M(c){this.g.debug($v,c);this.j=c.adsTimeline}L(c){this.a=c.ad;this.h("ad start",this.a);this.fireStart();this.fireJoin()}G(){this.h("ad ended");this.fireStop()}I(){this.h("ad pause");this.w();this.firePause()}J(){this.h("ad resume");this.w();this.fireResume()}C(){this.l=!0;this.h(Yv);this.fireBufferBegin()}w(){this.l&&(this.h(Xv),this.l=
|
|
12
12
|
!1,this.fireBufferEnd())}o(c){this.h("ad quartile",c);this.fireQuartile(c)}F(){this.h("ad clicked");const c=this.a&&this.a.Ra();this.g.debug(Zv,c);this.fireClick(c)}K(){this.h("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.h(Wv,this.a);this.fireBreakStart()}B(){this.h("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){const c=this.plugin.getAdapter();c&&c.fireStop()}}H(c){(c=c.detail)&&10003===c.code&&gw(c,this.m.getConfiguration().youbora,this.g,
|
|
13
13
|
this)}h(c,...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)},kw=function(){class a extends NpawPluginAdapters.video.Shaka{constructor(){super();this.f=this.h=!1;this.a=null}getPlayhead(){return this.getIsLive()?-1:this.player.getPosition()}getDuration(){return this.player.getDuration()}getRendition(){let b=null,c=null,d=null;var e=this.player.getTrackManager();e&&(e=e.ta())&&(b=e.width,c=e.height,d=e.bandwidth);b&&c&&d||(e=this.j(),b=b||e.width,c=c||e.height,d=d||e.streamBandwidth);
|
|
14
|
-
return this.getNpawUtils().buildRenditionString(b,c,d)}getIsLive(){return this.player.isLive()}getResource(){const b=this.player.Sa();return b&&b.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.player.nc()}getFramesPerSecond(){var b=this.player.getTrackManager();return b&&(b=b.Ia())?b.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"castlabs-adapter-6.32.0-beta.
|
|
14
|
+
return this.getNpawUtils().buildRenditionString(b,c,d)}getIsLive(){return this.player.isLive()}getResource(){const b=this.player.Sa();return b&&b.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.player.nc()}getFramesPerSecond(){var b=this.player.getTrackManager();return b&&(b=b.Ia())?b.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"castlabs-adapter-6.32.0-beta.5-js"}getPlayerVersion(){return _.ea}registerListeners(){const b=
|
|
15
15
|
this.w();this.player&&b&&(b.on(this.player,_.Rf,this.K.bind(this)),b.on(this.player,_.Xd,this.H.bind(this)),b.on(this.player,_.Jf,this.J.bind(this)),b.on(this.player,_.If,this.I.bind(this)),b.on(this.player,_.qc,this.F.bind(this)),b.on(this.player,_.Sc,this.G.bind(this)),b.on(this.player,_.Kc,this.L.bind(this)),b.on(this.player,_.bg,this.M.bind(this)))}unregisterListeners(){jw.debug(_.Ab);_.ai(this.w())}dispose(){this.unregisterListeners();this.f=this.h=!1;this.a=null}j(){return this.player.getStats()||
|
|
16
16
|
_.xs()}o(){return!!this.player.getConfiguration().autoplay}K(b){b=b.detail;this.l("state change",b);if(b)switch(b.currentState){case 1:this.plugin.setVideoOptions({"content.subtitles":this.C()});this.o()&&this.fireStart();break;case 3:this.fireStart();this.A();this.fireResume();this.fireBufferEnd();break;case 4:this.o()&&this.fireStart();this.A();this.fireBufferEnd();this.firePause();break;case _.Hs:this.fireBufferEnd();this.fireStop();break;case 5:this.fireBufferEnd();this.h&&this.plugin.getAdsAdapter()?
|
|
17
17
|
this.firePause():this.fireStop();break;case 2:this.fireBufferBegin();break;default:jw.debug(Vv,b)}}A(){this.fireJoin()}H(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=gw(b,this.player.getConfiguration().npaw,jw,this))&&b.severity===_.D&&(this.f=!0)}J(){this.player.isEnded()||(this.l(_.Jf),this.fireSeekBegin())}B(b){const c=this.player.getTrackManager();if(!c)return null;let d=null;b===_.Zf&&(d=c.ua());b===_.q&&(d=c.ra());return d?d.language:null}L(){const b=this.B(_.q);this.plugin.setVideoOptions({"content.language":b})}M(){const b=
|
|
@@ -19,13 +19,13 @@ this.B(_.Zf),c=this.C();this.plugin.setVideoOptions({"content.subtitles":b||c})}
|
|
|
19
19
|
this.j=this.h=this.l=this.a=null;this.o=!1}getDuration(){return this.a?this.a.getDuration():null}getRendition(){let b=null;this.a&&(b=this.getNpawUtils().buildRenditionString(this.a.Va(),this.a.Ua(),this.a.Ba()));return b}getBitrate(){let b=null;this.a&&(b=this.a.Ba());return b}getPlayhead(){let b=null;const c=this.player.getAdsManager();c&&(b=c.getPosition());return b}getResource(){let b=null;this.a&&(b=this.a.getMediaUrl());return b}getTitle(){let b=null;this.a&&(b=this.a.getTitle());return b}getProvider(){let b=
|
|
20
20
|
null;this.a&&(b=this.a.getAdvertiserName());return b}getCreativeId(){let b=null;this.a&&(b=this.a.getCreativeId());return b}dispose(){this.unregisterListeners();this.j=this.h=this.a=null}getPosition(){const b=this.getNpawReference().Constants.AdPosition;let c=null;if(this.a)switch(this.a.Ca()){case 0:c=b.Preroll;break;case 2:c=b.Postroll;break;case 1:c=b.Midroll}lw.debug("Ad position",c);return c}getIsSkippable(){return this.a&&-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const b=this.player.getAdsManager();
|
|
21
21
|
return b&&0<b.getAdVolume()}getExpectedBreaks(){return this.h&&this.h.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.Wa()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.h&&this.h.getCuePoints().map(b=>-1===b?this.player.getDuration():b)}getIsFullscreen(){return this.player.getSurface().isFullscreen()}getIsVisible(){var b=this.player.getSurface().getContainer();b=this.getNpawUtils().calculateAdViewability(b);lw.debug(ew,
|
|
22
|
-
b);return b}getPlayerName(){return _.ra}getVersion(){return"castlabs-ads-adapter-6.32.0-beta.
|
|
22
|
+
b);return b}getPlayerName(){return _.ra}getVersion(){return"castlabs-ads-adapter-6.32.0-beta.5-js"}getPlayerVersion(){return _.ea}B(){this.j||(this.j=new _.Vt);return this.j}registerListeners(){const b=this.B();this.player&&b&&(b.on(this.player,_.qc,this.R.bind(this)),b.on(this.player,_.mc,this.P.bind(this)),b.on(this.player,_.hc,this.K.bind(this)),b.on(this.player,_.kc,this.L.bind(this)),b.on(this.player,_.Yb,this.I.bind(this)),b.on(this.player,_.Zb,this.w.bind(this,1)),b.on(this.player,_.ec,this.w.bind(this,
|
|
23
23
|
2)),b.on(this.player,_.oc,this.w.bind(this,3)),b.on(this.player,_.Xb,this.H.bind(this)),b.on(this.player,_.lc,this.M.bind(this)),b.on(this.player,_.Xd,this.J.bind(this)),b.on(this.player,_.Ub,this.C.bind(this)),b.on(this.player,_.Vb,this.F.bind(this)),b.on(this.player,_.Wb,this.G.bind(this)),b.on(this.player,_.jc,this.S.bind(this)))}unregisterListeners(){_.ai(this.B())}R(b){lw.debug($v,b);this.h=b.adsTimeline}P(b){this.a=b.ad;this.f("ad start",this.a);this.fireStart();this.fireJoin()}I(){this.f("ad ended");
|
|
24
24
|
this.fireStop({adPlayhead:this.l})}K(){this.f("ad pause");this.A();this.firePause()}L(){this.f("ad resume");this.A();this.fireResume()}G(){this.o=!0;this.f(Yv);this.fireBufferBegin()}S(){this.l=this.getPlayhead();this.A()}A(){this.o&&(this.f(Xv),this.o=!1,this.fireBufferEnd())}w(b){this.f("ad quartile",b);this.fireQuartile(b)}H(){this.f("ad clicked");const b=this.a&&this.a.Ra();lw.debug(Zv,b);this.fireClick(b)}M(){this.f("ad skipped");this.fireSkip()}C(b){this.a=b.ad;this.f(Wv,this.a);this.fireBreakStart()}F(){this.f("ad break stop");
|
|
25
25
|
this.fireBreakStop({adPlayhead:this.l});this.getPosition()===this.getNpawReference().Constants.AdPosition.Postroll&&this.fireStop({adPlayhead:this.l})}J(b){(b=b.detail)&&10003===b.code&&gw(b,this.player.getConfiguration().npaw,lw,this)}f(b,...c){lw.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},nw=function(a){a.a&&(a.g.info("Removing NPAW Plugins",a.a),a.a.removeAdsAdapter(),a.a.removeAdapter())},ow=function(a,b){if(b.namespace()===_.hd)return a.g.info("NPAW does not report when casting."),
|
|
26
26
|
!1;const c=b.getConfiguration().npaw;return _.nh(c)?c.accountCode?_.z(window.NpawPlugin)||_.z(window.NpawPluginAdapters)?(a.g.warn("NPAW SDK not found."),b.onError(new _.I(1,9,9100)),!1):!0:(a.g.warn("accountCode key is missing in NPAW config"),b.onError(new _.I(1,9,9101)),!1):(a.g.warn("NPAW plugin is loaded but not configured. Will do nothing."),!1)},pw=function(a,b){if(b.namespace()===_.hd)return a.g.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.nh(c))return a.g.debug("Youbora plugin is loaded but not configured. Will do nothing."),
|
|
27
27
|
!1;if(!c.accountCode)return a.g.warn("accountCode key is missing in Youbora config"),b.onError(new _.I(1,9,9101)),!1;if(_.z(window.youbora))return a.g.warn("Youbora SDK not found."),b.onError(new _.I(1,9,9100)),!1;"6.8.59"!==youbora.VERSION&&(a.g.warn("Youbora SDK version is not supported. The supported version is 6.8.59, found "+`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.I(1,9,9102)));return!0},qw=a=>a&&a.errorFilter?a.errorFilter:
|
|
28
|
-
b=>({code:`${b.code}`,message:b.message,severity:b.severity}),gw=(a,b,c,d)=>{b=qw(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.Xd;b.severity===_.D?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var jw=new _.T("clpp.npaw.NpawAdapter");var lw=new _.T("clpp.npaw.NpawAdsAdapter");var rw=class extends _.Uv{constructor(){super();this.a=null;this.g=new _.T(aw);this.m=null}
|
|
29
|
-
var c=a.npaw;void 0===c[cw]&&(c[cw]=b.isLive);void 0===c[dw]&&(c[dw]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.
|
|
30
|
-
rw.prototype.getAdapter=rw.prototype.getAdapter;rw.prototype.getNpawPlugin=rw.prototype.
|
|
31
|
-
a.youbora;void 0===c[cw]&&(c[cw]=b.isLive);void 0===c[dw]&&(c[dw]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.
|
|
28
|
+
b=>({code:`${b.code}`,message:b.message,severity:b.severity}),gw=(a,b,c,d)=>{b=qw(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.Xd;b.severity===_.D?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var jw=new _.T("clpp.npaw.NpawAdapter");var lw=new _.T("clpp.npaw.NpawAdsAdapter");var rw=class extends _.Uv{constructor(){super();this.a=null;this.g=new _.T(aw);this.m=null}Kf(a){nw(this);if(this.a=a)this.a.registerAdapterFromClass(this.m,kw()),this.a.registerAdsAdapterFromClass(this.m,mw())}ii(){return this.a}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;ow(this,a)&&(a=a.getConfiguration().npaw,this.Kf(new NpawPlugin(a.accountCode)))}onContentWillLoad(a,b){if(ow(this,a)){a=a.getConfiguration();
|
|
29
|
+
var c=a.npaw;void 0===c[cw]&&(c[cw]=b.isLive);void 0===c[dw]&&(c[dw]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Kf(new NpawPlugin(c.accountCode));this.a.setAnalyticsOptions(c)}}onContentLoaded(a){const b={};(a=a.getDrmInfo())&&(a=fw(a.keySystem))&&(b["content.drm"]=a);this.g.info(_.Ke,b);this.a.setAnalyticsOptions(b)}onPlayerWillRelease(){}onPlayerWillDestroy(){nw(this);this.a&&this.a.destroy()}id(){return"npaw"}};_.x(aw,rw);rw.prototype.getAdsAdapter=rw.prototype.getAdsAdapter;
|
|
30
|
+
rw.prototype.getAdapter=rw.prototype.getAdapter;rw.prototype.getNpawPlugin=rw.prototype.ii;rw.prototype.setNpawPlugin=rw.prototype.Kf;rw.Id="npaw";new _.T(aw);var sw=class extends _.Uv{constructor(){super();this.a=null;this.g=new _.T(bw);this.m=null}Lf(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(hw(this.m)),this.a.setAdsAdapter(iw(this.m))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;pw(this,a)&&(a=a.getConfiguration().youbora,this.Lf(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(pw(this,a)){a=a.getConfiguration();var c=
|
|
31
|
+
a.youbora;void 0===c[cw]&&(c[cw]=b.isLive);void 0===c[dw]&&(c[dw]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Lf(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return"youbora"}};_.x(bw,sw);sw.prototype.getAdsAdapter=sw.prototype.getAdsAdapter;sw.prototype.getAdapter=sw.prototype.getAdapter;sw.prototype.setYouboraPlugin=sw.prototype.Lf;sw.Id="youbora";_.Tn(new class{create(a){return a.npaw?new rw:a.youbora?new sw:null}});};f.call(g, window);
|