@castlabs/prestoplay 6.31.0 → 6.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 6.31.1
2
+
3
+ ## Changes
4
+
5
+ * Patch issue with peer dependencies in `package.json`.
6
+
1
7
  # 6.31.0
2
8
 
3
9
  Please update dependencies if you are using them:
package/cjs/cl.core.js CHANGED
@@ -2,7 +2,7 @@
2
2
  (function(window){var ba,ca,ea,fa,ha,ra,va,Aa,Ba,Ea,Ga,Ha,Ja,Ma,Na,Ra,Sa,Ta,Ua,Va,Wa,Xa,Za,ab,bb,fb,hb,ib,jb,kb,lb,mb,ob,pb,tb,xb,Eb,Fb,Gb,Hb,Ib,Lb,Nb,Qb,Rb,Sb,Vb,Wb,Zb,$b,ac,bc,cc,dc,gc,hc,ic,pc,qc,rc,Rc,Xc,ed,fd,nd,od,pd,td,ud,vd,wd,yd,zd,Ad,Bd,Cd,Dd,Ed,Jd,Ld,Sd,Yd,Zd,$d,ae,be,ce,ee,fe,ge,je,ke,ne,te,Ce,Ee,Fe,Me,gf,of,qf,rf,sf,tf,uf,vf,wf,xf,yf,zf,Df,Ff,Gf,Hf,If,Jf,Lf,Pf,Rf,gg,jg,qg,Fg,Jg,Pg,bh,ch,dh,eh,fh,hh,ih,jh,oh,uh,vh,xh,zh,yh,Ah,Bh,Ch,Dh,Gh,Jh,Hh,Ih,Kh,Lh,Ph,Sh,Xh,ai,fi,li,mi,ni,oi,pi,qi,ri,si,ti,xi,Ai,yi,
3
3
  Bi,Ci,Ei,Fi,Gi,Hi,Ji,Li,Ki,Ni,Oi,Ri,Ti,Ui,Xi,Si,Pi,bj,cj,dj,fj,hj,ij,tj,vj,wj,xj,Hj,yj,Pj,Oj,Uj,Yj,ak,bk,ek,ck,hk,ik,gk,Wj,yk,Vj,kk,Xj,zk,jk,Sj,wk,Qj,fk,Bk,vk,qk,rk,pk,uk,ok,Ak,Dk,xk,Gk,Tj,Rj,lk,Hk,Ik,Fk,Zj,Jk,Kk,Lk,Ok,Pk,Qk,Rk,Tk,Sk,Wk,Xk,$k,al,bl,el,fl,gl,hl,il,sl,tl,vl,kl,ll,jl,ql,ol,pl,ul,Fl,Al,zl,yl,Gl,El,Dl,Kl,rl,Ml,Cl,Bl,Ll,ml,nl,Hl,Pl,Tl,Vl,Wl,Il,Jl,Ol,Nl,Yl,Ql,Ul,am,bm,dm,cm,fm,gm,hm,im,em,om,rm,sm,tm,qm,um,wm,vm,xm,ym,zm,Cm,Bm,Dm,Em,Am,Gm,Fm,Hm,Im,Rm,lm,Um,Vm,Tm,Wm,Ym,Zm,$l,jm,$m,an,dn,
4
4
  mn,rn,tn,un,yn,Dn,Hn,Jn,Mn,On,Pn,Qn,Tn,Yn,$n,ao,bo,co,eo,fo,go,ho,jo,ko,lo,mo,io,qo,vo,uo,wo,xo,S,Do,No,Lo,Oo,Qo,Po,So,To,Yo,$o,Zo,ap,Co,Uo,cp,dp,fp,gp,ep,hp,jp,ip,np,qp,pp,op,sp,vp,up,tp,lp,kp,rp,mp,wp,xp,yp,Jp,Kp,Vp,Wp,Xp,mq,sq,vq,wq,yq,zq,Cq,Iq,Mq,Nq,Sq,Yq,Zq,ar,br,dr,er,fr,gr,hr,ir,jr,kr,lr,mr,nr,or,pr,sr,qr,tr,vr,wr,rr,ur,xr,yr,zr,Ar,Dr,Fr,Gr,Mr,Nr,Rr,Xr,fs,cs,ds,js,ls,os,ss,ts,xs,hs,bs,Es,vs,Fs,Hs,Gs,Ps,Ls,Ks,Ns,Qs,Os,Ss,Ms,Rs,Tr,ms,Is,Ur,Ds,as,zs,As,Vs,Cs,gs,es,Wr,dt,et,ft,ht,kt,mt,lt,jt,nt,
5
- it,qt,ot,pt,rt,st,xt,zt,Bt,Ct,At,Dt,Et,yt,Ft,Gt,Ht,It,Jt,Lt,Mt,Nt,Ot,Kt,Qt,Wt,Yt,Zt,$t,au,fu,gu,hu,lu,ju,mu,eu,nu,pu,qu,su,tu,ou,uu,vu,wu,xu,yu,zu,Au,Du,Eu,Cu,Bu,Hu,Ju,Iu,Mu,Ku,Pu,Qu,Ou,Su,Tu,Uu,Ru,Gu,Vu,Fu,Yu,Zu,$u,bv,cv,dv,ev,fv,gv,hv,iv,jv,lv,Pv,Qv,Tv,Xv,qh,Zv;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";ea="': 'output-restricted'";fa="() is ongoing!";ha=".start";_.ia="6.31.0";_.ja="AUDIO";_.ka="AdaptationSet";_.la="Already destroyed. No-op";
5
+ it,qt,ot,pt,rt,st,xt,zt,Bt,Ct,At,Dt,Et,yt,Ft,Gt,Ht,It,Jt,Lt,Mt,Nt,Ot,Kt,Qt,Wt,Yt,Zt,$t,au,fu,gu,hu,lu,ju,mu,eu,nu,pu,qu,su,tu,ou,uu,vu,wu,xu,yu,zu,Au,Du,Eu,Cu,Bu,Hu,Ju,Iu,Mu,Ku,Pu,Qu,Ou,Su,Tu,Uu,Ru,Gu,Vu,Fu,Yu,Zu,$u,bv,cv,dv,ev,fv,gv,hv,iv,jv,lv,Pv,Qv,Tv,Xv,qh,Zv;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";ea="': 'output-restricted'";fa="() is ongoing!";ha=".start";_.ia="6.31.1";_.ja="AUDIO";_.ka="AdaptationSet";_.la="Already destroyed. No-op";
6
6
  _.ma="Already released. No-op";_.na="Autoplay is not allowed due to browser policy.";_.oa="BANDWIDTH";_.pa="BASIC";ra="CHECKSUM";_.sa="CLOSED-CAPTIONS";_.ua="CODECS";va="Can not set volume to ";_.xa="Cannot retrieve buffer information due to platform limitations";_.ya="CastlabsPlayer";Aa="Content-Length";Ba="Content-Type";_.Ca="Could not find configured DRM environment.";_.Da="DRM environment '";Ea="DRM licenses loaded";Ga="DRMtoday";Ha="DRMtodayOnboard";_.Ia="DURATION";Ja="Destroying player";
7
7
  _.Ka="EXT-X-MEDIA";_.La="EXT-X-STREAM-INF";Ma="Error while decoding string!";Na="Error while fetching certificate!";_.Oa="FairPlay Certificate URL is not defined";_.Pa="FairPlay License URL is not defined";_.Qa="GROUP-ID";Ra="HW_SECURE_ALL";Sa="HW_SECURE_CRYPTO";Ta="HW_SECURE_DECODE";Ua="HeaderDrm";Va="Hide video element .";Wa="Invalid track type: ";Xa="InvalidStateError";Za="Key status for Key ID '";_.$a="LANGUAGE";ab="License verification failed: ";bb="Load interrupted while a player release is pending";
8
8
  _.cb="Loading player with configuration";_.db="MaxHeight";_.eb="MaxWidth";fb="Missing media element";_.gb="NAME";hb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";ib="No event provided!";jb="No items in the playlist";kb="No sources provided!";lb="No track data attached to the event, unable to add track!";mb="Not a persistent session.";_.nb="Not supported";ob="NotAllowedError";pb="NotSupportedError";_.qb="PLAYLIST";_.rb="POST";_.sb="PlayReady License URL is not defined";
@@ -199,7 +199,7 @@ _.so=function(a,b){a=_.ro(a);b=_.ro(b);return a.split("-")[0]===b.split("-")[0]}
199
199
  uo=function(a){return function(b){var c=b.headers,d=b=null,e=_.N.Ei(c,"cmsd-dynamic");c=_.N.Ei(c,"cmsd-static");e&&(b=wo(e),a.a=b);if(c)try{e={};var f=c.split(",");for(c=0;c<f.length;c++){var g=xo(f[c]),k=g.key,l=g.value;Object.keys(yo).includes(k)&&(e[yo[k]]=l)}d=_.N.Wb(e)?e:null}catch(m){zo.error("CmsdManager parseCmsdStaticHeader_ failed:",m),d=null}(b||d)&&a.m.trigger(new _.Q("cmsd-event",{Pp:b,cq:d}))}};
200
200
  wo=function(a){try{var b=a.split(",").map(function(c){var d={};c=c.split(";");for(var e=0;e<c.length;e++){var f=xo(c[e]),g=f.key;f=f.value;Object.keys(Ao).includes(g)&&(d[Ao[g]]=f)}return d}).filter(function(c){return _.N.Wb(c)});return 0<b.length?b:null}catch(c){return zo.error("CmsdManager parseCmsdDynamicHeader_ failed:",c),null}};
201
201
  xo=function(a){var b=a.split("\x3d"),c=b[0];b=b[1];if(!c)throw new _.ui("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};var d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.ui("Parsing CMSD, not recognized value type of "+a);};
202
- S=function(a,b,c){_.Di.call(this);var d=this;dn();this.g=new _.M("clpp.Player");this.g.info("SDK version: 6.31.0");if(!a)throw new _.O(_.P,7,7102);this.Aa=new _.wi;this.f=this.D=b||_.Ln();this.l=null;void 0===this.f.license&&(this.f.license=In,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.O(_.P,7,7101,"No license provided in configuration!");this.j=
202
+ S=function(a,b,c){_.Di.call(this);var d=this;dn();this.g=new _.M("clpp.Player");this.g.info("SDK version: 6.31.1");if(!a)throw new _.O(_.P,7,7102);this.Aa=new _.wi;this.f=this.D=b||_.Ln();this.l=null;void 0===this.f.license&&(this.f.license=In,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.O(_.P,7,7101,"No license provided in configuration!");this.j=
203
203
  new Pj(a,c);this.G=this.A=this.a=this.I=null;this.J=new _.Xm;this.h=null;this.ha=[];this.ma=!0;this.L={};this.Ba=null;this.W=!0;this.X=this.T=!1;this.M=this.wd=null;this.Fg=!1;this.Va=new dm(this);this.B=null;this.on(_.ig,function(){d.getState()===_.Bo&&(d.a?d.a.unload():Promise.resolve())});this.on(_.Hc,function(){d.Fg=!0});this.on(_.Gc,function(){d.Fg=!1});this.on(_.yg,function(){return Co(d)});Do(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
204
204
  this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];b=_.v(Ko);for(c=b.next();!c.done;c=b.next()){c=c.value;try{var e=c.create(this.f);e&&a.push(e)}catch(f){this.g.error("Error while creating player plugin",f)}}Lo(this,a);this.P=_.pa;ni(this)};
205
205
  _.Mo=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.D),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};Do=function(a,b){a.I=new ao(b);co(a.I)["catch"](function(c){setTimeout(function(){a.g.error(ab+c);a.trigger(new _.Q(_.qe,{detail:new _.O(_.P,7,7101)}));a.destroy()},1E3)})};
package/cjs/cl.youbora.js CHANGED
@@ -3,7 +3,7 @@ var f=function(window){var Gw='" event to NPAW',Hw='" event to Youbora',Iw='Repo
3
3
  "PlayReady":a.startsWith(_.jf)?"ClearKey":a.startsWith(_.Hd)?"Primetime":a},Xw=function(a){return(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:function(b){return{code:""+b.code,message:b.message,severity:b.severity}}},Yw=function(a,b,c,d){b=Xw(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.qe;b.severity===_.P?(d.fireFatalError(b.code,b.message,b.metadata),c.debug('Reporting "fatal '+a+'" to Youbora',b.code,b)):(d.fireError(b.code,
4
4
  b.message,b.metadata),c.debug(Iw+a+'" to Youbora',b.code,b));return b},Zw=function(a){function b(c){var d=youbora.Adapter.call(this,c)||this;d.m=c;d.a=new _.wi;d.g=new _.M("clpp.npaw.YouboraAdapter");d.o=!1;d.h=!1;d.B=!1;d.registerListeners();return d}_.w(b,youbora.Adapter);b.prototype.getPlayhead=function(){return this.getIsLive()?-1:this.m.getPosition()};b.prototype.getDuration=function(){return this.m.getDuration()};b.prototype.getRendition=function(){var c=this.m.getTrackManager();if(c&&(c=c.sa())){var d=
5
5
  c.width;var e=c.height;var f=c.bandwidth}d&&e&&f||(c=this.j(),d=d||c.width,e=e||c.height,f=f||c.streamBandwidth);return youbora.Util.buildRenditionString(d,e,f)};b.prototype.getIsLive=function(){return this.m.isLive()};b.prototype.getResource=function(){var c=this.m.getLoadedSource();return c&&c.url};b.prototype.getBitrate=function(){return this.j().streamBandwidth};b.prototype.getThroughput=function(){return this.j().estimatedBandwidth};b.prototype.getPlayrate=function(){return this.m.getPlaybackRate()};
6
- b.prototype.getFramesPerSecond=function(){var c=this.m.getTrackManager();return c&&(c=c.Qa())?c.frameRate:null};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.31.0-castlabsadapter-js"};b.prototype.getPlayerVersion=function(){return _.ia};b.prototype.registerListeners=function(){this.m&&this.a&&(this.g.debug("registering listeners"),youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.ig,this.K.bind(this)),this.a.on(this.m,_.qe,this.H.bind(this)),this.a.on(this.m,
6
+ b.prototype.getFramesPerSecond=function(){var c=this.m.getTrackManager();return c&&(c=c.Qa())?c.frameRate:null};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.31.1-castlabsadapter-js"};b.prototype.getPlayerVersion=function(){return _.ia};b.prototype.registerListeners=function(){this.m&&this.a&&(this.g.debug("registering listeners"),youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.ig,this.K.bind(this)),this.a.on(this.m,_.qe,this.H.bind(this)),this.a.on(this.m,
7
7
  _.Ng,this.J.bind(this)),this.a.on(this.m,_.Mg,this.I.bind(this)),this.a.on(this.m,_.Fc,this.D.bind(this)),this.a.on(this.m,_.hd,this.G.bind(this)))};b.prototype.unregisterListeners=function(){this.g.debug(_.Pb);_.zi(this.a)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);this.B=!0};b.prototype.j=function(){return this.m.getStats()||_.cu()};b.prototype.w=function(){return!!this.m.getConfiguration().autoplay};b.prototype.K=function(c){c=c.detail;this.l("state change",c);
8
8
  if(c)switch(c.currentState){case 1:this.w()&&this.f();break;case 3:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case 4:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.du: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(Jw,c)}};b.prototype.f=function(){this.plugin.isInitiated||(this.h=!1,this.fireInit())};
9
9
  b.prototype.A=function(){var c=this.m.getDrmInfo();c&&(c=Ww(c.keySystem))&&this.plugin.setOptions({"content.drm":c});this.fireJoin()};b.prototype.H=function(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=Yw(c,this.m,this.g,this))&&c.severity===_.P&&(this.h=!0)};b.prototype.J=function(){this.m.isEnded()||(this.l(_.ag),this.f(),this.fireSeekBegin())};b.prototype.I=function(){this.l(_.$f);this.fireSeekEnd()};b.prototype.D=function(c){this.g.debug("adsTimeline",c);this.o=(c=
@@ -11,13 +11,13 @@ c.adsTimeline)&&c.Xb()};b.prototype.G=function(c){this.g.debug("Casting",c);this
11
11
  this.a.getDuration()};b.prototype.getRendition=function(){var c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.eb(),this.a.cb(),this.a.Ga()));return c};b.prototype.getBitrate=function(){return this.a&&this.a.Ga()};b.prototype.getPlayhead=function(){var c=this.m.getAdsManager();return c&&c.getPosition()};b.prototype.getResource=function(){return this.a&&this.a.getMediaUrl()};b.prototype.getTitle=function(){return this.a&&this.a.getTitle()};b.prototype.getProvider=function(){return this.a&&
12
12
  this.a.getAdvertiserName()};b.prototype.getCreativeId=function(){return this.a&&this.a.getCreativeId()};b.prototype.getPosition=function(){var c=youbora.Constants.AdPosition,d=null;if(this.a)switch(this.a.Ha()){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};b.prototype.getIsSkippable=function(){return this.a&&-1!==this.a.getSkipTimeOffset()};b.prototype.getAudioEnabled=function(){var c=this.m.getAdsManager();return c&&0<c.getAdVolume()};
13
13
  b.prototype.getExpectedBreaks=function(){return this.j&&this.j.getCuePoints().length};b.prototype.getGivenBreaks=function(){return this.getExpectedBreaks()};b.prototype.getExpectedAds=function(){return this.a&&this.a.fb()};b.prototype.getGivenAds=function(){return this.getExpectedAds()};b.prototype.getBreaksTime=function(){var c=this;return this.j&&this.j.getCuePoints().map(function(d){return-1===d?c.m.getDuration():d})};b.prototype.getIsFullscreen=function(){return this.m.getSurface().isFullscreen()};
14
- b.prototype.getIsVisible=function(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.g.debug(Uw,c);return c};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.31.0-castlabsadsadapter-js"};b.prototype.getPlayerVersion=function(){return _.ia};b.prototype.registerListeners=function(){this.m&&this.f&&(this.f.on(this.m,_.Fc,this.T.bind(this)),this.f.on(this.m,_.Bc,this.P.bind(this)),this.f.on(this.m,_.xc,this.K.bind(this)),
14
+ b.prototype.getIsVisible=function(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.g.debug(Uw,c);return c};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.31.1-castlabsadsadapter-js"};b.prototype.getPlayerVersion=function(){return _.ia};b.prototype.registerListeners=function(){this.m&&this.f&&(this.f.on(this.m,_.Fc,this.T.bind(this)),this.f.on(this.m,_.Bc,this.P.bind(this)),this.f.on(this.m,_.xc,this.K.bind(this)),
15
15
  this.f.on(this.m,_.zc,this.L.bind(this)),this.f.on(this.m,_.nc,this.I.bind(this)),this.f.on(this.m,_.oc,this.o.bind(this,1)),this.f.on(this.m,_.wc,this.o.bind(this,2)),this.f.on(this.m,_.Dc,this.o.bind(this,3)),this.f.on(this.m,_.mc,this.H.bind(this)),this.f.on(this.m,_.Ac,this.M.bind(this)),this.f.on(this.m,_.qe,this.J.bind(this)),this.f.on(this.m,_.jc,this.B.bind(this)),this.f.on(this.m,_.kc,this.D.bind(this)),this.f.on(this.m,_.lc,this.G.bind(this)),this.f.on(this.m,_.yc,this.w.bind(this)))};b.prototype.unregisterListeners=
16
16
  function(){_.zi(this.f)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);this.A=!0};b.prototype.T=function(c){this.g.debug(Pw,c);this.j=c.adsTimeline};b.prototype.P=function(c){this.a=c.ad;this.h("ad start",this.a);this.fireStart();this.fireJoin()};b.prototype.I=function(){this.h("ad ended");this.fireStop()};b.prototype.K=function(){this.h("ad pause");this.w();this.firePause()};b.prototype.L=function(){this.h("ad resume");this.w();this.fireResume()};b.prototype.G=function(){this.l=
17
17
  !0;this.h(Nw);this.fireBufferBegin()};b.prototype.w=function(){this.l&&(this.h(Mw),this.l=!1,this.fireBufferEnd())};b.prototype.o=function(c){this.h("ad quartile",c);this.fireQuartile(c)};b.prototype.H=function(){this.h("ad clicked");var c=this.a&&this.a.$a();this.g.debug(Ow,c);this.fireClick(c)};b.prototype.M=function(){this.h("ad skipped");this.fireSkip()};b.prototype.B=function(c){this.a=c.ad;this.h(Lw,this.a);this.fireBreakStart()};b.prototype.D=function(){this.h("ad break stop");this.fireBreakStop();
18
18
  if(this.getPosition()===youbora.Constants.AdPosition.Postroll){var c=this.plugin.getAdapter();c&&c.fireStop()}};b.prototype.J=function(c){(c=c.detail)&&10003===c.code&&Yw(c,this.m,this.g,this)};b.prototype.h=function(c,d){for(var e=[],f=1;f<arguments.length;++f)e[f-1]=arguments[f];this.g.debug.apply(this.g,[Iw+c+Hw].concat(_.ph(e)))};return new b(a)},bx=function(){function a(){var b=NpawPluginAdapters.video.Shaka.call(this)||this;b.h=!1;b.f=!1;b.a=null;b.G=!1;return b}_.w(a,NpawPluginAdapters.video.Shaka);
19
19
  a.prototype.getPlayhead=function(){return this.getIsLive()?-1:this.player.getPosition()};a.prototype.getDuration=function(){return this.player.getDuration()};a.prototype.getRendition=function(){var b=null,c=null,d=null,e=this.player.getTrackManager();e&&(e=e.sa())&&(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);return this.getNpawUtils().buildRenditionString(b,c,d)};a.prototype.getIsLive=function(){return this.player.isLive()};a.prototype.getResource=
20
- function(){var b=this.player.getLoadedSource();return b&&b.url};a.prototype.getBitrate=function(){return this.j().streamBandwidth};a.prototype.getThroughput=function(){return this.j().estimatedBandwidth};a.prototype.getPlayrate=function(){return this.player.getPlaybackRate()};a.prototype.getFramesPerSecond=function(){var b=this.player.getTrackManager();return b&&(b=b.Qa())?b.frameRate:null};a.prototype.getPlayerName=function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-adapter-6.31.0-js"};
20
+ function(){var b=this.player.getLoadedSource();return b&&b.url};a.prototype.getBitrate=function(){return this.j().streamBandwidth};a.prototype.getThroughput=function(){return this.j().estimatedBandwidth};a.prototype.getPlayrate=function(){return this.player.getPlaybackRate()};a.prototype.getFramesPerSecond=function(){var b=this.player.getTrackManager();return b&&(b=b.Qa())?b.frameRate:null};a.prototype.getPlayerName=function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-adapter-6.31.1-js"};
21
21
  a.prototype.getPlayerVersion=function(){return _.ia};a.prototype.registerListeners=function(){var b=this.w();this.player&&b&&(b.on(this.player,_.ig,this.M.bind(this)),b.on(this.player,_.qe,this.J.bind(this)),b.on(this.player,_.ag,this.L.bind(this)),b.on(this.player,_.$f,this.K.bind(this)),b.on(this.player,_.Fc,this.H.bind(this)),b.on(this.player,_.hd,this.I.bind(this)),b.on(this.player,_.Zc,this.P.bind(this)),b.on(this.player,_.ug,this.T.bind(this)))};a.prototype.unregisterListeners=function(){ax.debug(_.Pb);
22
22
  _.zi(this.w())};a.prototype.dispose=function(){this.unregisterListeners();this.G=!0;this.f=this.h=!1;this.a=null};a.prototype.j=function(){return this.player.getStats()||_.cu()};a.prototype.o=function(){return!!this.player.getConfiguration().autoplay};a.prototype.M=function(b){b=b.detail;this.l("state change",b);if(b)switch(b.currentState){case 1:this.plugin.setVideoOptions({"content.subtitles":this.D()});this.o()&&this.fireStart();break;case 3:this.fireStart();this.A();this.fireResume();this.fireBufferEnd();
23
23
  break;case 4:this.o()&&this.fireStart();this.A();this.fireBufferEnd();this.firePause();break;case _.du:this.fireBufferEnd();this.fireStop();break;case 5:this.fireBufferEnd();this.h&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case 2:this.fireBufferBegin();break;default:ax.debug(Jw,b)}};a.prototype.A=function(){this.fireJoin()};a.prototype.J=function(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=Yw(b,this.player,ax,this))&&b.severity===_.P&&(this.f=!0)};a.prototype.L=
@@ -27,7 +27,7 @@ dx=function(){function a(){var b=NpawPluginAdapters.ads.Ima.call(this)||this;b.a
27
27
  null,c=this.player.getAdsManager();c&&(b=c.getPosition());return b};a.prototype.getResource=function(){var b=null;this.a&&(b=this.a.getMediaUrl());return b};a.prototype.getTitle=function(){var b=null;this.a&&(b=this.a.getTitle());return b};a.prototype.getProvider=function(){var b=null;this.a&&(b=this.a.getAdvertiserName());return b};a.prototype.getCreativeId=function(){var b=null;this.a&&(b=this.a.getCreativeId());return b};a.prototype.dispose=function(){this.unregisterListeners();this.D=!0;this.j=
28
28
  this.h=this.a=null};a.prototype.getPosition=function(){var b=this.getNpawReference().Constants.AdPosition,c=null;if(this.a)switch(this.a.Ha()){case 0:c=b.Preroll;break;case 2:c=b.Postroll;break;case 1:c=b.Midroll}cx.debug("Ad position",c);return c};a.prototype.getIsSkippable=function(){return this.a&&-1!==this.a.getSkipTimeOffset()};a.prototype.getAudioEnabled=function(){var b=this.player.getAdsManager();return b&&0<b.getAdVolume()};a.prototype.getExpectedBreaks=function(){return this.h&&this.h.getCuePoints().length};
29
29
  a.prototype.getGivenBreaks=function(){return this.getExpectedBreaks()};a.prototype.getExpectedAds=function(){return this.a&&this.a.fb()};a.prototype.getGivenAds=function(){return this.getExpectedAds()};a.prototype.getBreaksTime=function(){var b=this;return this.h&&this.h.getCuePoints().map(function(c){return-1===c?b.player.getDuration():c})};a.prototype.getIsFullscreen=function(){return this.player.getSurface().isFullscreen()};a.prototype.getIsVisible=function(){var b=this.player.getSurface().getContainer();
30
- b=this.getNpawUtils().calculateAdViewability(b);cx.debug(Uw,b);return b};a.prototype.getPlayerName=function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-ads-adapter-6.31.0-js"};a.prototype.getPlayerVersion=function(){return _.ia};a.prototype.B=function(){this.j||(this.j=new _.wi);return this.j};a.prototype.registerListeners=function(){var b=this.B();this.player&&b&&(b.on(this.player,_.Fc,this.X.bind(this)),b.on(this.player,_.Bc,this.W.bind(this)),b.on(this.player,_.xc,this.M.bind(this)),
30
+ b=this.getNpawUtils().calculateAdViewability(b);cx.debug(Uw,b);return b};a.prototype.getPlayerName=function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-ads-adapter-6.31.1-js"};a.prototype.getPlayerVersion=function(){return _.ia};a.prototype.B=function(){this.j||(this.j=new _.wi);return this.j};a.prototype.registerListeners=function(){var b=this.B();this.player&&b&&(b.on(this.player,_.Fc,this.X.bind(this)),b.on(this.player,_.Bc,this.W.bind(this)),b.on(this.player,_.xc,this.M.bind(this)),
31
31
  b.on(this.player,_.zc,this.P.bind(this)),b.on(this.player,_.nc,this.K.bind(this)),b.on(this.player,_.oc,this.w.bind(this,1)),b.on(this.player,_.wc,this.w.bind(this,2)),b.on(this.player,_.Dc,this.w.bind(this,3)),b.on(this.player,_.mc,this.J.bind(this)),b.on(this.player,_.Ac,this.T.bind(this)),b.on(this.player,_.qe,this.L.bind(this)),b.on(this.player,_.jc,this.G.bind(this)),b.on(this.player,_.kc,this.H.bind(this)),b.on(this.player,_.lc,this.I.bind(this)),b.on(this.player,_.yc,this.ba.bind(this)))};
32
32
  a.prototype.unregisterListeners=function(){_.zi(this.B())};a.prototype.X=function(b){cx.debug(Pw,b);this.h=b.adsTimeline};a.prototype.W=function(b){this.a=b.ad;this.f("ad start",this.a);this.fireStart();this.fireJoin()};a.prototype.K=function(){this.f("ad ended");this.fireStop({adPlayhead:this.l})};a.prototype.M=function(){this.f("ad pause");this.A();this.firePause()};a.prototype.P=function(){this.f("ad resume");this.A();this.fireResume()};a.prototype.I=function(){this.o=!0;this.f(Nw);this.fireBufferBegin()};
33
33
  a.prototype.ba=function(){this.l=this.getPlayhead();this.A()};a.prototype.A=function(){this.o&&(this.f(Mw),this.o=!1,this.fireBufferEnd())};a.prototype.w=function(b){this.f("ad quartile",b);this.fireQuartile(b)};a.prototype.J=function(){this.f("ad clicked");var b=this.a&&this.a.$a();cx.debug(Ow,b);this.fireClick(b)};a.prototype.T=function(){this.f("ad skipped");this.fireSkip()};a.prototype.G=function(b){this.a=b.ad;this.f(Lw,this.a);this.fireBreakStart()};a.prototype.H=function(){this.f("ad break stop");
package/cl.core.js CHANGED
@@ -1,7 +1,7 @@
1
1
  let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,sa,ta,va,wa,ya,za,Aa,Ba,Fa,Ga,Ha,Ia,Ja,La,Ma,Ra,Ta,Ua,Va,Wa,Xa,Za,ab,bb,gb,kb,qb,rb,ub,xb,Ab,Bb,Cb,Fb,Gb,Jb,Kb,Nb,Sb,Zb,$b,ac,Dc,Ic,Qc,Rc,Yc,Zc,$c,bd,cd,fd,gd,id,jd,kd,ld,md,nd,od,td,vd,Ad,Gd,Hd,Id,Jd,Ld,Md,Nd,Rd,Sd,Ud,$d,ie,ke,le,se,Oe,Ve,Xe,Ye,Ze,$e,af,bf,cf,df,ef,ff,kf,mf,nf,of,pf,qf,sf,wf,yf,Of,Rf,Xf,jg,mg,vg,Hg,Ig,Jg,Kg,Lg,Ng,Og,Pg,Vg,Wg,Zg,$g,eh,bh,mh,nh,ph,sh,uh,Ch,Ih,Nh,Oh,Ph,Qh,Rh,Sh,Th,Uh,Vh,Yh,Wh,$h,bi,ai,di,fi,ei,gi,hi,ii,li,mi,pi,Fi,Gi,Hi,Ii,Mi,Ri,Qi,bj,Ui,
2
2
  Ti,mj,nj,oj,sj,tj,uj,vj,Jj,Ej,Lj,Mj,Nj,Pj,Qj,Oj,Tj,Uj,Vj,Sj,wj,xj,Aj,Bj,Cj,Dj,Fj,Gj,Hj,Ij,ck,dk,Kj,Rj,ek,Zj,Yj,bk,Wj,hk,kk,lk,mk,nk,pk,ok,sk,tk,wk,xk,yk,Ak,Bk,Ck,Dk,Fk,Gk,Ik,Jk,Kk,Nk,Ok,Lk,Wk,Xk,Yk,Vk,gl,Mk,Zk,$k,al,bl,dl,el,fl,il,Qk,hl,Rk,Pk,Sk,jl,kl,ol,ql,ll,rl,Tk,Uk,ul,wl,Al,Bl,zl,Dl,yl,xl,Hl,Il,Jl,Ll,Ml,Nl,Ol,Pl,Rl,Sl,Ql,Tl,Vl,Ul,Yl,gm,El,jm,im,hm,sl,Cl,lm,km,nm,om,sm,Am,Im,Km,Lm,Om,Sm,Xm,$m,bn,cn,dn,gn,nn,pn,qn,rn,sn,tn,un,vn,wn,xn,yn,zn,En,Ln,In,Nn,Sn,Un,Wn,Yn,Zn,$n,ao,co,mo,eo,fo,ho,oo,ko,
3
3
  Rn,ro,so,qo,po,uo,vo,zo,to,Ao,yo,Bo,Co,wo,xo,Do,Io,Jo,Eo,Ho,Go,Fo,Ko,Lo,Mo,Yo,$o,fp,jp,lp,sp,Cp,op,xp,Ip,Jp,Kp,Mp,Np,Op,Rp,Pp,Qp,Sp,Tp,Up,Xp,dq,eq,iq,lq,mq,oq,qq,rq,tq,jq,pq,uq,vq,wq,xq,Gq,zq,Hq,yq,Aq,Bq,Iq,Nq,Pq,Rq,Qq,Tq,Lq,ar,Yq,$q,Zq,Oq,br,cr,dr,er,fr,gr,hr,ir,or,rr,tr,ur,yr,Ar,vr,xr,zr,Br,Cr,Dr,Fr,Gr,Mr,Nr,Or,Qr,Rr,Sr,Tr,Ur,Vr,Xr,Wr,Yr,Zr,$r,as,bs,Pr,cs,es,ks,ls,ms,rs,ss,ts,us,ps,os,Cs,Es,Fs,Gs,ys,Is,Js,Ks,Ls,Os,Ps,Qs,Ms,Ns,Rs,Ss,Vs,Zs,$s,ct,et,ft,dt,at,Us,Ys,Ws,Xs,it,jt,kt,lt,mt,nt,ot,pt,rt,
4
- Ct,Gt,Xg,Yg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.31.0";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";la="Autoplay should not be used for preloaded streams. ";_.ma="BANDWIDTH";_.na="BASIC";oa="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";sa="Content-Length";
4
+ Ct,Gt,Xg,Yg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.31.1";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";la="Autoplay should not be used for preloaded streams. ";_.ma="BANDWIDTH";_.na="BASIC";oa="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";sa="Content-Length";
5
5
  ta="Content-Type";_.ua="Could not find configured DRM environment.";va="DRM licenses loaded";wa="DRMtoday";ya="DRMtodayOnboard";za="Destroying player";Aa="Error while decoding string!";Ba="Error while fetching certificate!";_.Ca="FairPlay Certificate URL is not defined";_.Da="FairPlay License URL is not defined";_.Ea="GROUP-ID";Fa="HW_SECURE_ALL";Ga="HW_SECURE_CRYPTO";Ha="HW_SECURE_DECODE";Ia="HeaderDrm";Ja="InvalidStateError";_.Ka="LANGUAGE";La="License verification failed: ";Ma="Load interrupted while a player release is pending";
6
6
  _.Oa="Loading player with configuration";_.Pa="MaxHeight";_.Qa="MaxWidth";Ra="Missing media element";_.Sa="NAME";Ta="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ua="No event provided!";Va="No items in the playlist";Wa="No sources provided!";Xa="No track data attached to the event, unable to add track!";Za="Not a persistent session.";_.$a="Not supported";ab="NotAllowedError";bb="NotSupportedError";_.cb="PLAYLIST";_.eb="POST";_.fb="PlayReady License URL is not defined";
7
7
  gb="Player not ready yet.";_.hb="Player sources";_.ib="Please make sure ";kb="Preloading is not supported by this player.";_.lb="QualityLevel";_.mb="RESOLUTION";_.nb="Representation";_.ob="SW_SECURE_CRYPTO";_.pb="SW_SECURE_DECODE";qb="Session is closed";rb="Skipping Session creation. License for init data was already requested in ";_.sb="SmoothStreamingMedia";_.tb="TYPE";ub="The index is not in the allowed range.";_.vb="URI";xb="Unable to translate ";_.yb="Unhandled/ignored event";_.zb="Unregistering listeners";
@@ -397,7 +397,7 @@ _.ui(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_
397
397
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
398
398
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
399
399
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var no,Jn,Mn,Kn;no=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Nn(this);this.f.md(this.h);this.a=null}release(){this.a=null;this.f.ze(this.h)}};_.gu="maxSuggestedBitrateKbps";Jn={du:"duress",etp:_.Yd,mb:_.gu,rd:"responseDelay",rtt:"roundTripTime"};Mn={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:vg};
400
- Kn=new _.T("clpp.net.CmsdManager");var S=class extends _.Ot{constructor(a,b,c){super();sm();this.g=new _.T("clpp.Player");this.g.info("SDK version: 6.31.0");if(!a)throw new _.I(_.D,7,7102);this.$=new _.Lt;this.f=this.C=b||_.Zm();this.l=null;void 0===this.f.license&&(this.f.license=Wm,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.I(_.D,7,7101,"No license provided in configuration!");this.j=
400
+ Kn=new _.T("clpp.net.CmsdManager");var S=class extends _.Ot{constructor(a,b,c){super();sm();this.g=new _.T("clpp.Player");this.g.info("SDK version: 6.31.1");if(!a)throw new _.I(_.D,7,7102);this.$=new _.Lt;this.f=this.C=b||_.Zm();this.l=null;void 0===this.f.license&&(this.f.license=Wm,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.I(_.D,7,7101,"No license provided in configuration!");this.j=
401
401
  new rj(a,c);this.F=this.A=this.a=this.H=null;this.I=new _.Dn;this.h=null;this.W=[];this.X=!0;this.K={};this.da=null;this.R=!0;this.S=this.N=!1;this.L=this.Qc=null;this.Ve=!1;this.ia=new Zt(this);this.B=null;this.on(_.Qf,()=>{this.getState()===_.qs&&(this.a?this.a.unload():Promise.resolve())});this.on(_.rc,()=>{this.Ve=!0});this.on(_.qc,()=>{this.Ve=!1});this.on(_.eg,()=>Sn(this));Un(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
402
402
  this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of On)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Wn(this,a);this.M=_.na;Ph(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,
403
403
  b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.H(_.Xd,{detail:a}),this.trigger(a)}wd(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.dh(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Zn(this);return this.l.finally(()=>{$n(this);this.g.debug("Player released");
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 Qv="Unhandled state",Rv="accountCode key is missing in Youbora config",Sv="ad break start",Tv="ad buffering ended",Uv="ad buffering started",Vv="ad click through url: ",Wv="ad timeline changed",Xv="clpp.npaw.NpawPlugin",Yv="clpp.npaw.YouboraPlugin",Zv="content.isLive",$v="content.title",aw="is container visible",bw="youbora",cw=function(a){return a.startsWith(_.wd)?"Widevine":a.startsWith(_.sd)?"FairPlay":a.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":a.startsWith(_.Qe)?
2
2
  "ClearKey":a.startsWith(_.rd)?"Primetime":a},ew=function(a){class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.a=new _.Lt;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);
3
- return youbora.Util.buildRenditionString(c,d,e)}getIsLive(){return this.m.isLive()}getResource(){const c=this.m.getLoadedSource();return c&&c.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.m.getPlaybackRate()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.Ha())?c.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"6.31.0-castlabsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
3
+ return youbora.Util.buildRenditionString(c,d,e)}getIsLive(){return this.m.isLive()}getResource(){const c=this.m.getLoadedSource();return c&&c.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.m.getPlaybackRate()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.Ha())?c.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"6.31.1-castlabsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
4
4
  this.a&&(this.g.debug("registering listeners"),youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Qf,this.I.bind(this)),this.a.on(this.m,_.Xd,this.F.bind(this)),this.a.on(this.m,_.tg,this.H.bind(this)),this.a.on(this.m,_.sg,this.G.bind(this)),this.a.on(this.m,_.pc,this.B.bind(this)),this.a.on(this.m,_.Sc,this.C.bind(this)))}unregisterListeners(){this.g.debug(_.zb);_.Xh(this.a)}dispose(){super.dispose()}j(){return this.m.getStats()||_.ns()}w(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;
5
5
  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();break;case 4:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.xs: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(Qv,c)}}f(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=
6
6
  this.m.getDrmInfo();c&&(c=cw(c.keySystem))&&this.plugin.setOptions({"content.drm":c});this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=dw(c,this.m,this.g,this))&&c.severity===_.D&&(this.h=!0)}H(){this.m.isEnded()||(this.l(_.If),this.f(),this.fireSeekBegin())}G(){this.l(_.Hf);this.fireSeekEnd()}B(c){this.g.debug("adsTimeline",c);this.o=(c=c.adsTimeline)&&c.Mb()}C(c){this.g.debug("Casting",c);this.fireCasted()}l(c,...d){this.g.debug(`Reporting "${c}" event to Youbora`,
7
7
  ...d)}}return new b(a)},fw=function(a){class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.j=this.a=null;this.f=new _.Lt;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.Ua(),this.a.Ta(),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&&
8
8
  this.a.getMediaUrl()}getTitle(){return this.a&&this.a.getTitle()}getProvider(){return this.a&&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<
9
- c.getAdVolume()}getExpectedBreaks(){return this.j&&this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.Va()}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(aw,c);return c}getPlayerName(){return _.ra}getVersion(){return"6.31.0-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
9
+ c.getAdVolume()}getExpectedBreaks(){return this.j&&this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.Va()}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(aw,c);return c}getPlayerName(){return _.ra}getVersion(){return"6.31.1-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
10
10
  this.f&&(this.f.on(this.m,_.pc,this.M.bind(this)),this.f.on(this.m,_.lc,this.L.bind(this)),this.f.on(this.m,_.gc,this.I.bind(this)),this.f.on(this.m,_.jc,this.J.bind(this)),this.f.on(this.m,_.Xb,this.G.bind(this)),this.f.on(this.m,_.Yb,this.o.bind(this,1)),this.f.on(this.m,_.dc,this.o.bind(this,2)),this.f.on(this.m,_.nc,this.o.bind(this,3)),this.f.on(this.m,_.Wb,this.F.bind(this)),this.f.on(this.m,_.kc,this.K.bind(this)),this.f.on(this.m,_.Xd,this.H.bind(this)),this.f.on(this.m,_.Tb,this.A.bind(this)),
11
11
  this.f.on(this.m,_.Ub,this.B.bind(this)),this.f.on(this.m,_.Vb,this.C.bind(this)),this.f.on(this.m,_.ic,this.w.bind(this)))}unregisterListeners(){_.Xh(this.f)}dispose(){super.dispose()}M(c){this.g.debug(Wv,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(Uv);this.fireBufferBegin()}w(){this.l&&
12
12
  (this.h(Tv),this.l=!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(Vv,c);this.fireClick(c)}K(){this.h("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.h(Sv,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&&dw(c,this.m,this.g,this)}h(c,
13
13
  ...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)},hw=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.getLoadedSource();return b&&b.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.player.getPlaybackRate()}getFramesPerSecond(){var b=this.player.getTrackManager();return b&&(b=b.Ha())?b.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"castlabs-adapter-6.31.0-js"}getPlayerVersion(){return _.ea}registerListeners(){const b=
14
+ return this.getNpawUtils().buildRenditionString(b,c,d)}getIsLive(){return this.player.isLive()}getResource(){const b=this.player.getLoadedSource();return b&&b.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.player.getPlaybackRate()}getFramesPerSecond(){var b=this.player.getTrackManager();return b&&(b=b.Ha())?b.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"castlabs-adapter-6.31.1-js"}getPlayerVersion(){return _.ea}registerListeners(){const b=
15
15
  this.w();this.player&&b&&(b.on(this.player,_.Qf,this.K.bind(this)),b.on(this.player,_.Xd,this.H.bind(this)),b.on(this.player,_.If,this.J.bind(this)),b.on(this.player,_.Hf,this.I.bind(this)),b.on(this.player,_.pc,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,_.ag,this.M.bind(this)))}unregisterListeners(){gw.debug(_.zb);_.Xh(this.w())}dispose(){this.unregisterListeners();this.f=this.h=!1;this.a=null}j(){return this.player.getStats()||
16
16
  _.ns()}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 _.xs: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:gw.debug(Qv,b)}}A(){this.fireJoin()}H(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=dw(b,this.player,gw,this))&&b.severity===_.D&&(this.f=!0)}J(){this.player.isEnded()||(this.l(_.If),this.fireSeekBegin())}B(b){const c=this.player.getTrackManager();if(!c)return null;let d=null;b===_.Yf&&(d=c.va());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,7 +19,7 @@ this.B(_.Yf),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.Ua(),this.a.Ta(),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}iw.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.Va()}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);iw.debug(aw,
22
- b);return b}getPlayerName(){return _.ra}getVersion(){return"castlabs-ads-adapter-6.31.0-js"}getPlayerVersion(){return _.ea}B(){this.j||(this.j=new _.Lt);return this.j}registerListeners(){const b=this.B();this.player&&b&&(b.on(this.player,_.pc,this.R.bind(this)),b.on(this.player,_.lc,this.N.bind(this)),b.on(this.player,_.gc,this.K.bind(this)),b.on(this.player,_.jc,this.L.bind(this)),b.on(this.player,_.Xb,this.I.bind(this)),b.on(this.player,_.Yb,this.w.bind(this,1)),b.on(this.player,_.dc,this.w.bind(this,
22
+ b);return b}getPlayerName(){return _.ra}getVersion(){return"castlabs-ads-adapter-6.31.1-js"}getPlayerVersion(){return _.ea}B(){this.j||(this.j=new _.Lt);return this.j}registerListeners(){const b=this.B();this.player&&b&&(b.on(this.player,_.pc,this.R.bind(this)),b.on(this.player,_.lc,this.N.bind(this)),b.on(this.player,_.gc,this.K.bind(this)),b.on(this.player,_.jc,this.L.bind(this)),b.on(this.player,_.Xb,this.I.bind(this)),b.on(this.player,_.Yb,this.w.bind(this,1)),b.on(this.player,_.dc,this.w.bind(this,
23
23
  2)),b.on(this.player,_.nc,this.w.bind(this,3)),b.on(this.player,_.Wb,this.H.bind(this)),b.on(this.player,_.kc,this.M.bind(this)),b.on(this.player,_.Xd,this.J.bind(this)),b.on(this.player,_.Tb,this.C.bind(this)),b.on(this.player,_.Ub,this.F.bind(this)),b.on(this.player,_.Vb,this.G.bind(this)),b.on(this.player,_.ic,this.S.bind(this)))}unregisterListeners(){_.Xh(this.B())}R(b){iw.debug(Wv,b);this.h=b.adsTimeline}N(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(Uv);this.fireBufferBegin()}S(){this.l=this.getPlayhead();this.A()}A(){this.o&&(this.f(Tv),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();iw.debug(Vv,b);this.fireClick(b)}M(){this.f("ad skipped");this.fireSkip()}C(b){this.a=b.ad;this.f(Sv,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&&dw(b,this.player,iw,this)}f(b,...c){iw.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},kw=function(a){a.a&&(a.g.info("Removing NPAW Plugins",a.a),a.a.removeAdsAdapter(),a.a.removeAdapter())},lw=function(a,b){if(b.namespace()===_.hd)return a.g.info("NPAW does not report when casting."),!1;const c=b.getConfiguration().youbora;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@castlabs/prestoplay",
3
3
  "description": "PRESTOplay Video Player",
4
- "version": "6.31.0",
4
+ "version": "6.31.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/castlabs/prestoplay-web.git"
@@ -41,6 +41,9 @@
41
41
  "@broadpeak/smartlib": {
42
42
  "optional": true
43
43
  },
44
+ "@broadpeak/smartlib-ad": {
45
+ "optional": true
46
+ },
44
47
  "@broadpeak/smartlib-analytics": {
45
48
  "optional": true
46
49
  },