@castlabs/prestoplay 6.32.0-beta.2 → 6.32.0-beta.3

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.core.js CHANGED
@@ -2,7 +2,7 @@
2
2
  (function(window){var ba,ca,ea,fa,ha,ra,wa,Aa,Ba,Ea,Ga,Ha,Ja,Ma,Na,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,$a,bb,fb,hb,ib,jb,kb,lb,mb,ob,pb,tb,xb,Eb,Fb,Gb,Hb,Ib,Lb,Ob,Rb,Sb,Tb,Wb,Xb,Zb,$b,ac,bc,cc,dc,ec,gc,hc,oc,pc,qc,Rc,Yc,fd,gd,od,pd,qd,sd,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,De,Fe,Ge,Ne,gf,of,qf,rf,sf,tf,uf,vf,wf,xf,yf,zf,Df,Ef,Gf,If,Kf,Lf,Nf,Rf,Tf,ig,lg,Fg,Jg,Qg,ch,dh,eh,fh,gh,ih,jh,kh,lh,mh,th,zh,Ah,Ch,Eh,Dh,Fh,Gh,Hh,Ih,Lh,Oh,Mh,Nh,Ph,Qh,Uh,Xh,bi,gi,li,ri,si,ti,ui,vi,wi,xi,yi,Ci,Fi,Di,
3
3
  Gi,Hi,Ji,Ki,Li,Mi,Oi,Qi,Pi,Si,Ti,Wi,Yi,Zi,bj,Xi,Ui,gj,hj,ij,kj,mj,nj,yj,Aj,Bj,Cj,Mj,Dj,Uj,Tj,Zj,dk,fk,gk,ik,hk,lk,mk,kk,bk,Ck,ak,ok,ck,Dk,nk,Xj,Ak,Vj,jk,Fk,zk,uk,vk,tk,yk,sk,Ek,Hk,Bk,Kk,Yj,Wj,pk,Lk,Mk,Jk,ek,Nk,Ok,Pk,Sk,Tk,Uk,Vk,Xk,Wk,$k,al,el,fl,gl,il,jl,kl,ll,ml,wl,xl,zl,ol,pl,nl,ul,sl,tl,yl,Jl,El,Dl,Cl,Kl,Il,Hl,Ol,vl,Ql,Gl,Fl,Pl,ql,rl,Ll,Tl,Xl,Zl,$l,Ml,Nl,Sl,Rl,bm,Ul,Yl,em,fm,hm,gm,jm,km,lm,mm,im,sm,vm,wm,xm,um,ym,Am,zm,Bm,Cm,Dm,Gm,Fm,Hm,Im,Em,Km,Jm,Lm,Mm,Vm,pm,Ym,Zm,Xm,$m,bn,cn,dm,nm,dn,en,hn,
4
4
  qn,vn,xn,yn,Cn,Hn,Ln,Nn,Qn,Sn,Tn,Un,Xn,bo,eo,fo,go,ho,io,jo,ko,lo,no,oo,po,qo,mo,uo,zo,yo,Ao,Bo,S,Ho,Ro,Po,So,Uo,To,Wo,Xo,bp,dp,cp,ep,Go,Yo,gp,hp,jp,kp,ip,lp,np,mp,rp,up,tp,sp,wp,zp,yp,xp,pp,op,vp,qp,Ap,Bp,Cp,Np,Op,Zp,$p,bq,aq,rq,xq,Aq,Bq,Dq,Eq,Hq,Nq,Rq,br,Sq,Tq,cr,ar,gr,hr,jr,kr,mr,nr,or,pr,qr,rr,sr,tr,ur,vr,wr,xr,yr,Br,zr,Cr,Er,Fr,Ar,Dr,Gr,Hr,Ir,Jr,Mr,Or,Pr,Vr,Wr,$r,fs,os,ls,ms,ss,us,xs,Bs,Cs,Gs,qs,ks,Ns,Es,Os,Qs,Ps,Ys,Us,Ts,Ws,Zs,Xs,at,Vs,$s,bs,vs,Rs,cs,Ms,js,Is,Js,dt,Ls,ps,ns,es,mt,nt,ot,qt,tt,
5
- vt,ut,st,wt,rt,zt,xt,yt,At,Bt,Gt,It,Kt,Lt,Jt,Mt,Nt,Ht,Ot,Pt,Qt,Rt,St,Ut,Vt,Wt,Xt,Tt,Zt,eu,gu,hu,iu,ju,ou,pu,qu,uu,su,vu,nu,wu,yu,zu,Bu,Cu,xu,Du,Eu,Fu,Gu,Hu,Iu,Ju,Mu,Nu,Lu,Ku,Qu,Su,Ru,Vu,Tu,Yu,Zu,Xu,av,bv,cv,$u,Pu,dv,Ou,gv,hv,iv,kv,lv,mv,nv,ov,pv,qv,rv,sv,vv,Rv,Zv,bw,fw,vh,hw;_.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.32.0-beta.2";_.ja="AUDIO";_.ka="AdaptationSet";
5
+ vt,ut,st,wt,rt,zt,xt,yt,At,Bt,Gt,It,Kt,Lt,Jt,Mt,Nt,Ht,Ot,Pt,Qt,Rt,St,Ut,Vt,Wt,Xt,Tt,Zt,eu,gu,hu,iu,ju,ou,pu,qu,uu,su,vu,nu,wu,yu,zu,Bu,Cu,xu,Du,Eu,Fu,Gu,Hu,Iu,Ju,Mu,Nu,Lu,Ku,Qu,Su,Ru,Vu,Tu,Yu,Zu,Xu,av,bv,cv,$u,Pu,dv,Ou,gv,hv,iv,kv,lv,mv,nv,ov,pv,qv,rv,sv,vv,Rv,Zv,bw,fw,vh,hw;_.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.32.0-beta.3";_.ja="AUDIO";_.ka="AdaptationSet";
6
6
  _.la="Already destroyed. No-op";_.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";wa="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";
7
7
  Ja="Destroying player";_.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";Ya="Key status for Key ID '";_.Za="LANGUAGE";$a="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";
@@ -200,7 +200,7 @@ _.wo=function(a,b){a=_.vo(a);b=_.vo(b);return a.split("-")[0]===b.split("-")[0]}
200
200
  yo=function(a){return function(b){var c=b.headers,d=b=null,e=_.N.Oi(c,"cmsd-dynamic");c=_.N.Oi(c,"cmsd-static");e&&(b=Ao(e),a.a=b);if(c)try{e={};var f=c.split(",");for(c=0;c<f.length;c++){var g=Bo(f[c]),k=g.key,l=g.value;Object.keys(Co).includes(k)&&(e[Co[k]]=l)}d=_.N.Zb(e)?e:null}catch(m){Do.error("CmsdManager parseCmsdStaticHeader_ failed:",m),d=null}(b||d)&&a.m.trigger(new _.Q("cmsd-event",{Xp:b,nq:d}))}};
201
201
  Ao=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=Bo(c[e]),g=f.key;f=f.value;Object.keys(Eo).includes(g)&&(d[Eo[g]]=f)}return d}).filter(function(c){return _.N.Zb(c)});return 0<b.length?b:null}catch(c){return Do.error("CmsdManager parseCmsdDynamicHeader_ failed:",c),null}};
202
202
  Bo=function(a){var b=a.split("\x3d"),c=b[0];b=b[1];if(!c)throw new _.zi("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 _.zi("Parsing CMSD, not recognized value type of "+a);};
203
- S=function(a,b,c){_.Ii.call(this);var d=this;hn();this.g=new _.M("clpp.Player");this.g.info("SDK version: 6.32.0-beta.2");if(!a)throw new _.O(_.P,7,7102);this.Aa=new _.Bi;this.f=this.D=b||_.Pn();this.l=null;void 0===this.f.license&&(this.f.license=Mn,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!");
203
+ S=function(a,b,c){_.Ii.call(this);var d=this;hn();this.g=new _.M("clpp.Player");this.g.info("SDK version: 6.32.0-beta.3");if(!a)throw new _.O(_.P,7,7102);this.Aa=new _.Bi;this.f=this.D=b||_.Pn();this.l=null;void 0===this.f.license&&(this.f.license=Mn,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!");
204
204
  this.j=new Uj(a,c);this.G=this.A=this.a=this.I=null;this.J=new _.an;this.h=null;this.ha=[];this.ma=!0;this.L={};this.Ba=null;this.W=!0;this.X=this.T=!1;this.M=this.Fd=null;this.Pg=!1;this.Va=new hm(this);this.B=null;this.on(_.kg,function(){d.getState()===_.Fo&&(d.a?d.a.unload():Promise.resolve())});this.on(_.Hc,function(){d.Pg=!0});this.on(_.Gc,function(){d.Pg=!1});this.on(_.Ag,function(){return Go(d)});Ho(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
205
205
  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(Io);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)}}Po(this,a);this.P=_.pa;ti(this)};
206
206
  _.Qo=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))};Ho=function(a,b){a.I=new fo(b);ho(a.I)["catch"](function(c){setTimeout(function(){a.g.error($a+c);a.trigger(new _.Q(_.qe,{detail:new _.O(_.P,7,7101)}));a.destroy()},1E3)})};
package/cjs/cl.mse.js CHANGED
@@ -249,10 +249,10 @@ fJ=function(a,b,c,d){var e=a.getTrackManager();if(e){var f=a.G.f;jF(a.l,b).video
249
249
  dJ=function(a,b,c,d){jF(a.l,b).text=c;if(b=a.getTrackManager())lF(b,c.id,_.jt,d),c=b.hb(),a=a.G.f,a.h!==c&&(a.h=c,a.a.push({timestamp:Date.now()/1E3,id:c.id,trackId:c.track.id,type:c.track.type,fromAdaptation:d,width:null,height:null,bandwidth:null}))};mJ=function(a){return a.X===_.qb&&"flat"===a.configuration.playlist.timeline};
250
250
  PI=function(a,b){for(var c=0;c<b.length;c++){for(var d=b[c],e=new Map,f=_.v(RI(a)),g=f.next();!g.done;g=f.next())if(g=g.value,g.video&&g.video.closedCaptions){g=g.video;for(var k=_.v(g.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!e.has(l)){var m={id:a.Hh++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,Ta:0,mimeType:_.Kc,codecs:"",kind:_.hd,encrypted:!1,
251
251
  keyId:null,language:g.closedCaptions.get(l),label:null,type:_.Gn,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:g.roles,channelsCount:null,spatialAudio:!1,closedCaptions:null};e.set(l,m)}}e=_.v(e.values());for(f=e.next();!f.done;f=e.next())d.textStreams.push(f.value)}};
252
- NI=function(a,b){for(var c=a.a?NG(a.a):null,d=a.a?OG(a.a):null,e=!WI(a),f=_.v(b),g=f.next();!g.done;g=f.next())XF(a.A,c,d,g.value,e);c=zC(b,function(k){return k.variants.some($F)});if(a.configuration.streaming.disableAudioTracks)for(d=_.v(b),e=d.next();!e.done;e=d.next())for(f=_.v(e.value.variants),e=f.next();!e.done;e=f.next())delete e.value.audio;if(a.configuration.streaming.disableVideoTracks)for(d=_.v(b),e=d.next();!e.done;e=d.next())for(f=_.v(e.value.variants),e=f.next();!e.done;e=f.next())e=
253
- e.value,(g=e.video)&&!AC(g.type,_.In(g.mimeType,g.codecs))&&delete e.video;if(0===c)throw new _.O(_.P,4,4032);if(c<b.length)throw new _.O(_.P,4,4011);c=_.v(b);for(e=c.next();!e.done;e=c.next())d=e.value,UF(d.variants,a.configuration.restrictions)&&a.a&&iF(a)===d&&LI(a),nJ(a,d.variants)};
254
- ZI=function(a,b){var c=a.a?NG(a.a):null,d=a.a?OG(a.a):null,e=!WI(a);XF(a.A,c,d,b,e);d=b.variants;if(a.configuration.streaming.disableAudioTracks)for(c=_.v(d),e=c.next();!e.done;e=c.next())delete e.value.audio;if(!d.some($F))throw new _.O(_.P,4,4011);nJ(a,b.variants);UF(d,a.configuration.restrictions)&&a.a&&iF(a)===b&&LI(a);if(!_.qj(2)&&(c=a.A?a.A.getDrmInfo():null))for(d=_.v(d),e=d.next();!e.done;e=d.next()){e=_.v(e.value.drmInfos);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem===
255
- c.keySystem){f=_.v(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,_.Ds(a.A,g.keyId,g.initData)||_.ts(a.A,g.initDataType,g.initData,g.keyId)}}};hJ=function(a,b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;return _.I(function(e){return QI(a)?_.y(e,$G(a.a,b,c,d),0):(a.Ba=b,a.dk=c,a.ck=d,e.C(0))})};eJ=function(a,b){return _.I(function(c){return QI(a)?_.y(c,_.fH(a.a,b),0):(a.ha=b,c.C(0))})};
252
+ NI=function(a,b){if(a.configuration.streaming.disableAudioTracks)for(var c=_.v(b),d=c.next();!d.done;d=c.next()){var e=_.v(d.value.variants);for(d=e.next();!d.done;d=e.next())delete d.value.audio}if(a.configuration.streaming.disableVideoTracks)for(c=_.v(b),d=c.next();!d.done;d=c.next())for(e=_.v(d.value.variants),d=e.next();!d.done;d=e.next()){d=d.value;var f=d.video;f&&!AC(f.type,_.In(f.mimeType,f.codecs))&&delete d.video}c=a.a?NG(a.a):null;d=a.a?OG(a.a):null;e=!WI(a);f=_.v(b);for(var g=f.next();!g.done;g=
253
+ f.next())XF(a.A,c,d,g.value,e);c=zC(b,function(k){return k.variants.some($F)});if(0===c)throw new _.O(_.P,4,4032);if(c<b.length)throw new _.O(_.P,4,4011);c=_.v(b);for(d=c.next();!d.done;d=c.next())d=d.value,UF(d.variants,a.configuration.restrictions)&&a.a&&iF(a)===d&&LI(a),nJ(a,d.variants)};
254
+ ZI=function(a,b){var c=b.variants;if(a.configuration.streaming.disableAudioTracks)for(var d=_.v(c),e=d.next();!e.done;e=d.next())delete e.value.audio;d=a.a?NG(a.a):null;e=a.a?OG(a.a):null;var f=!WI(a);XF(a.A,d,e,b,f);if(!c.some($F))throw new _.O(_.P,4,4011);nJ(a,b.variants);UF(c,a.configuration.restrictions)&&a.a&&iF(a)===b&&LI(a);if(!_.qj(2)&&(d=a.A?a.A.getDrmInfo():null))for(c=_.v(c),e=c.next();!e.done;e=c.next())for(e=_.v(e.value.drmInfos),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem===
255
+ d.keySystem){f=_.v(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,_.Ds(a.A,g.keyId,g.initData)||_.ts(a.A,g.initDataType,g.initData,g.keyId)}};hJ=function(a,b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;return _.I(function(e){return QI(a)?_.y(e,$G(a.a,b,c,d),0):(a.Ba=b,a.dk=c,a.ck=d,e.C(0))})};eJ=function(a,b){return _.I(function(c){return QI(a)?_.y(c,_.fH(a.a,b),0):(a.ha=b,c.C(0))})};
256
256
  oJ=function(a){if(a.a&&a.f){var b=LG(a.a),c=iF(a);null!=b&&b===c&&(NG(a.a),OG(a.a),_.MG(a.a,_.Gn),jF(a.l,c),jF(a.l,c),jF(a.l,c),jF(a.l,c))}};YI=function(a,b){function c(g,k){if(!g)return null;var l=g.findSegmentPosition(k-f.startTime);return null==l?null:(l=g.getSegmentReference(l))?l.startTime+f.startTime:null}var d=NG(a.a),e=OG(a.a),f=iF(a);d=c(d,b);e=c(e,b);return null!=e&&null!=d?Math.max(e,d):null!=e?e:null!=d?d:b};bJ=function(a){return a.A&&a.A.G?!0:a.J?a.J.getState()===tG:!1};
257
257
  HI=function(a){if(a.G&&a.J&&a.B){var b=2===pJ(a),c=a.I;c.l=b;DG(c,c.o?"seek":void 0);a.B.j.o=b;aJ(a);a.bg&&(c=1>Math.abs(a.getMediaDuration()-a.getMediaPosition()),a=a.bg,b&&c&&(b=a.a,b.a[b.a.length-1]&&a.f(new _.Q(_.Xf))))}};aJ=function(a){cI(a,pJ(a))};pJ=function(a){if(a.Me)var b=!1;else if(a.j&&a.j.ended)b=!0;else{b=a.getMediaDuration();var c=a.getMediaPosition();b=a.Ke&&0<=c&&b<=c?!0:!1}return b?5:bJ(a)||a.Me?2:a.j&&a.j.paused?4:3};
258
258
  MI=function(a,b){var c=qJ(a,b);if(!c)return{variant:null,qb:null};var d=rJ(a,c);return{variant:c,qb:d}};rJ=function(a,b){if(!b||!b.video)return null;var c=(a.f.muxedAudioTracks||[]).find(function(d){return d.groupId===b.video.muxedAudioId});return c&&c.primary?c:null};
package/cjs/cl.youbora.js CHANGED
@@ -3,7 +3,7 @@ var f=function(window){var Pw='" event to NPAW',Qw='" event to Youbora',Rw='Repo
3
3
  a.startsWith(_.Hd)?"Primetime":a},dx=function(a){return a&&a.errorFilter?a.errorFilter:function(b){return{code:""+b.code,message:b.message,severity:b.severity}}},ex=function(a,b,c,d){b=dx(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,b.message,b.metadata),c.debug(Rw+a+'" to Youbora',b.code,b));return b},
4
4
  fx=function(a){function b(c){var d=youbora.Adapter.call(this,c)||this;d.m=c;d.a=new _.Bi;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=c.width;var e=c.height;var f=c.bandwidth}d&&e&&f||(c=this.j(),
5
5
  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.ab();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.Ec()};b.prototype.getFramesPerSecond=function(){var c=this.m.getTrackManager();return c&&
6
- (c=c.Ra())?c.frameRate:null};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.32.0-beta.2-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,_.kg,this.K.bind(this)),this.a.on(this.m,_.qe,this.H.bind(this)),this.a.on(this.m,_.Og,this.J.bind(this)),this.a.on(this.m,_.Ng,this.I.bind(this)),
6
+ (c=c.Ra())?c.frameRate:null};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.32.0-beta.3-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,_.kg,this.K.bind(this)),this.a.on(this.m,_.qe,this.H.bind(this)),this.a.on(this.m,_.Og,this.J.bind(this)),this.a.on(this.m,_.Ng,this.I.bind(this)),
7
7
  this.a.on(this.m,_.Fc,this.D.bind(this)),this.a.on(this.m,_.id,this.G.bind(this)))};b.prototype.unregisterListeners=function(){this.g.debug(_.Qb);_.Ei(this.a)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);this.B=!0};b.prototype.j=function(){return this.m.getStats()||_.lu()};b.prototype.w=function(){return!!this.m.getConfiguration().autoplay};b.prototype.K=function(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();
8
8
  this.A();this.fireResume();this.fireBufferEnd();break;case 4:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.mu: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(Sw,c)}};b.prototype.f=function(){this.plugin.isInitiated||(this.h=!1,this.fireInit())};b.prototype.A=function(){var c=this.m.getDrmInfo();c&&(c=cx(c.keySystem))&&
9
9
  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=ex(c,this.m.getConfiguration().youbora,this.g,this))&&c.severity===_.P&&(this.h=!0)};b.prototype.J=function(){this.m.isEnded()||(this.l(_.cg),this.f(),this.fireSeekBegin())};b.prototype.I=function(){this.l(_.bg);this.fireSeekEnd()};b.prototype.D=function(c){this.g.debug("adsTimeline",c);this.o=(c=c.adsTimeline)&&c.$b()};b.prototype.G=function(c){this.g.debug("Casting",
@@ -11,13 +11,13 @@ c);this.fireCasted()};b.prototype.l=function(c,d){for(var e=[],f=1;f<arguments.l
11
11
  null;this.a&&(c=youbora.Util.buildRenditionString(this.a.fb(),this.a.eb(),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&&this.a.getAdvertiserName()};b.prototype.getCreativeId=function(){return this.a&&
12
12
  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()};b.prototype.getExpectedBreaks=function(){return this.j&&this.j.getCuePoints().length};
13
13
  b.prototype.getGivenBreaks=function(){return this.getExpectedBreaks()};b.prototype.getExpectedAds=function(){return this.a&&this.a.gb()};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()};b.prototype.getIsVisible=function(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);
14
- this.g.debug(bx,c);return c};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.32.0-beta.2-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)),this.f.on(this.m,_.zc,this.L.bind(this)),this.f.on(this.m,_.mc,this.I.bind(this)),this.f.on(this.m,_.nc,this.o.bind(this,
14
+ this.g.debug(bx,c);return c};b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return"6.32.0-beta.3-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)),this.f.on(this.m,_.zc,this.L.bind(this)),this.f.on(this.m,_.mc,this.I.bind(this)),this.f.on(this.m,_.nc,this.o.bind(this,
15
15
  1)),this.f.on(this.m,_.vc,this.o.bind(this,2)),this.f.on(this.m,_.Dc,this.o.bind(this,3)),this.f.on(this.m,_.lc,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,_.ic,this.B.bind(this)),this.f.on(this.m,_.jc,this.D.bind(this)),this.f.on(this.m,_.kc,this.G.bind(this)),this.f.on(this.m,_.yc,this.w.bind(this)))};b.prototype.unregisterListeners=function(){_.Ei(this.f)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);
16
16
  this.A=!0};b.prototype.T=function(c){this.g.debug(Xw,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=!0;this.h(Vw);this.fireBufferBegin()};b.prototype.w=function(){this.l&&(this.h(Uw),this.l=
17
17
  !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(Ww,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(Tw,this.a);this.fireBreakStart()};b.prototype.D=function(){this.h("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){var c=this.plugin.getAdapter();
18
18
  c&&c.fireStop()}};b.prototype.J=function(c){(c=c.detail)&&10003===c.code&&ex(c,this.m.getConfiguration().youbora,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,[Rw+c+Qw].concat(_.uh(e)))};return new b(a)},ix=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);a.prototype.getPlayhead=function(){return this.getIsLive()?
19
19
  -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=function(){var b=this.player.ab();return b&&
20
- 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.Ec()};a.prototype.getFramesPerSecond=function(){var b=this.player.getTrackManager();return b&&(b=b.Ra())?b.frameRate:null};a.prototype.getPlayerName=function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-adapter-6.32.0-beta.2-js"};a.prototype.getPlayerVersion=function(){return _.ia};
20
+ 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.Ec()};a.prototype.getFramesPerSecond=function(){var b=this.player.getTrackManager();return b&&(b=b.Ra())?b.frameRate:null};a.prototype.getPlayerName=function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-adapter-6.32.0-beta.3-js"};a.prototype.getPlayerVersion=function(){return _.ia};
21
21
  a.prototype.registerListeners=function(){var b=this.w();this.player&&b&&(b.on(this.player,_.kg,this.M.bind(this)),b.on(this.player,_.qe,this.J.bind(this)),b.on(this.player,_.cg,this.L.bind(this)),b.on(this.player,_.bg,this.K.bind(this)),b.on(this.player,_.Fc,this.H.bind(this)),b.on(this.player,_.id,this.I.bind(this)),b.on(this.player,_.$c,this.P.bind(this)),b.on(this.player,_.wg,this.T.bind(this)))};a.prototype.unregisterListeners=function(){hx.debug(_.Qb);_.Ei(this.w())};a.prototype.dispose=function(){this.unregisterListeners();
22
22
  this.G=!0;this.f=this.h=!1;this.a=null};a.prototype.j=function(){return this.player.getStats()||_.lu()};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();break;case 4:this.o()&&this.fireStart();this.A();this.fireBufferEnd();
23
23
  this.firePause();break;case _.mu: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:hx.debug(Sw,b)}};a.prototype.A=function(){this.fireJoin()};a.prototype.J=function(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=ex(b,this.player.getConfiguration().npaw,hx,this))&&b.severity===_.P&&(this.f=!0)};a.prototype.L=function(){this.player.isEnded()||(this.l(_.cg),
@@ -27,7 +27,7 @@ this;b.a=null;b.l=null;b.h=null;b.j=null;b.D=!1;b.o=!1;return b}_.w(a,NpawPlugin
27
27
  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=this.h=this.a=null};a.prototype.getPosition=function(){var b=this.getNpawReference().Constants.AdPosition,
28
28
  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}jx.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};a.prototype.getGivenBreaks=function(){return this.getExpectedBreaks()};a.prototype.getExpectedAds=
29
29
  function(){return this.a&&this.a.gb()};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();b=this.getNpawUtils().calculateAdViewability(b);jx.debug(bx,b);return b};a.prototype.getPlayerName=
30
- function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-ads-adapter-6.32.0-beta.2-js"};a.prototype.getPlayerVersion=function(){return _.ia};a.prototype.B=function(){this.j||(this.j=new _.Bi);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)),b.on(this.player,_.zc,this.P.bind(this)),b.on(this.player,_.mc,this.K.bind(this)),
30
+ function(){return _.ya};a.prototype.getVersion=function(){return"castlabs-ads-adapter-6.32.0-beta.3-js"};a.prototype.getPlayerVersion=function(){return _.ia};a.prototype.B=function(){this.j||(this.j=new _.Bi);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)),b.on(this.player,_.zc,this.P.bind(this)),b.on(this.player,_.mc,this.K.bind(this)),
31
31
  b.on(this.player,_.nc,this.w.bind(this,1)),b.on(this.player,_.vc,this.w.bind(this,2)),b.on(this.player,_.Dc,this.w.bind(this,3)),b.on(this.player,_.lc,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,_.ic,this.G.bind(this)),b.on(this.player,_.jc,this.H.bind(this)),b.on(this.player,_.kc,this.I.bind(this)),b.on(this.player,_.yc,this.ba.bind(this)))};a.prototype.unregisterListeners=function(){_.Ei(this.B())};a.prototype.X=function(b){jx.debug(Xw,
32
32
  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(Vw);this.fireBufferBegin()};a.prototype.ba=function(){this.l=this.getPlayhead();this.A()};a.prototype.A=function(){this.o&&
33
33
  (this.f(Uw),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();jx.debug(Ww,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(Tw,this.a);this.fireBreakStart()};a.prototype.H=function(){this.f("ad break stop");this.fireBreakStop({adPlayhead:this.l});this.getPosition()===this.getNpawReference().Constants.AdPosition.Postroll&&
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,xa,za,Aa,Ba,Ga,Ha,Ia,Ja,Ka,Ma,Na,Sa,Ua,Va,Wa,Ya,Za,$a,bb,cb,gb,jb,qb,rb,ub,xb,Bb,Cb,Db,Gb,Hb,Lb,Mb,Pb,Tb,$b,ac,bc,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,je,le,me,te,Pe,We,Ye,Ze,$e,af,bf,cf,df,ef,ff,gf,lf,mf,nf,of,pf,rf,tf,xf,zf,Pf,Sf,kg,ng,wg,Ig,Jg,Kg,Lg,Mg,Og,Pg,Qg,Rg,Sg,$g,ah,dh,eh,jh,gh,rh,sh,uh,xh,zh,Hh,Lh,Sh,Th,Uh,Vh,Wh,Xh,Yh,Zh,bi,$h,di,fi,ei,hi,ji,ii,ki,li,mi,pi,qi,ti,Ji,Ki,Li,Mi,Qi,Vi,Ui,fj,Yi,
2
2
  Xi,qj,rj,uj,wj,xj,yj,zj,Nj,Ij,Pj,Qj,Rj,Tj,Uj,Sj,Xj,Yj,Zj,Wj,Aj,Bj,Ej,Fj,Gj,Hj,Jj,Kj,Lj,Mj,gk,hk,Oj,Vj,ik,dk,ck,fk,ak,lk,ok,pk,qk,rk,tk,sk,wk,xk,Ak,Bk,Ck,Ek,Fk,Gk,Hk,Jk,Kk,Mk,Nk,Ok,Rk,Sk,Pk,$k,al,bl,Zk,kl,Qk,dl,el,fl,gl,hl,il,jl,ml,Uk,ll,Vk,Tk,Wk,nl,ol,sl,ul,pl,vl,Xk,Yk,yl,Al,El,Fl,Dl,Hl,Cl,Bl,Ll,Ml,Nl,Pl,Ql,Rl,Sl,Tl,Vl,Wl,Ul,Xl,Zl,Yl,bm,km,Il,nm,mm,lm,wl,Gl,pm,om,rm,sm,wm,Em,Mm,Om,Pm,Sm,Wm,an,dn,fn,gn,hn,ln,rn,tn,un,vn,wn,xn,yn,zn,An,Bn,Cn,Dn,In,Pn,Mn,Rn,Wn,Yn,$n,bo,co,eo,fo,ho,qo,io,jo,lo,so,oo,
3
3
  Vn,vo,wo,uo,to,yo,zo,Do,xo,Eo,Co,Fo,Go,Ao,Bo,Ho,Mo,No,Io,Lo,Ko,Jo,Oo,Po,Qo,Ro,cp,ep,kp,op,qp,tp,up,zp,Jp,vp,Qp,Ep,Sp,Tp,Up,Wp,Xp,Yp,aq,Zp,$p,bq,cq,dq,gq,nq,oq,sq,vq,wq,yq,Aq,Bq,Dq,tq,zq,Eq,Fq,Gq,Hq,Qq,Jq,Rq,Iq,Kq,Lq,Sq,Xq,Zq,ar,$q,cr,Vq,kr,hr,jr,ir,Yq,lr,mr,nr,or,pr,qr,rr,sr,yr,Br,Dr,Er,Ir,Kr,Fr,Hr,Jr,Lr,Mr,Nr,Pr,Qr,Wr,Xr,Yr,$r,as,bs,cs,ds,es,gs,fs,hs,is,js,ks,ls,Zr,ms,os,us,vs,ws,Bs,Cs,Ds,Es,zs,ys,Ms,Os,Ps,Qs,Is,Ss,Ts,Us,Vs,Ys,Zs,$s,Ws,Xs,at,bt,et,it,jt,mt,ot,pt,nt,kt,dt,ht,ft,gt,st,tt,ut,vt,wt,
4
- xt,yt,zt,Bt,Mt,Qt,bh,ch;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.32.0-beta.2";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ka="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";
4
+ xt,yt,zt,Bt,Mt,Qt,bh,ch;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.32.0-beta.3";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ka="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";
5
5
  sa="Content-Length";ta="Content-Type";_.ua="Could not find configured DRM environment.";va="DRM licenses loaded";wa="DRMtoday";xa="DRMtodayOnboard";za="Destroying player";Aa="Error while decoding string!";Ba="Error while fetching certificate!";_.Da="FairPlay Certificate URL is not defined";_.Ea="FairPlay License URL is not defined";_.Fa="GROUP-ID";Ga="HW_SECURE_ALL";Ha="HW_SECURE_CRYPTO";Ia="HW_SECURE_DECODE";Ja="HeaderDrm";Ka="InvalidStateError";_.La="LANGUAGE";Ma="License verification failed: ";
6
6
  Na="Load interrupted while a player release is pending";_.Pa="Loading player with configuration";_.Qa="MaxHeight";_.Ra="MaxWidth";Sa="Missing media element";_.Ta="NAME";Ua="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Va="No event provided!";Wa="No items in the playlist";Ya="No sources provided!";Za="No track data attached to the event, unable to add track!";$a="Not a persistent session.";_.ab="Not supported";bb="NotAllowedError";cb="NotSupportedError";
7
7
  _.db="PLAYLIST";_.eb="POST";_.fb="PlayReady License URL is not defined";gb="Player not ready yet.";_.hb="Player sources";_.ib="Please make sure ";jb="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.";_.wb="URI";
@@ -400,7 +400,7 @@ _.yi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_
400
400
  "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",
401
401
  "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",
402
402
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var ro,Nn,Qn,On;ro=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Rn(this);this.f.Sc(this.h);this.a=null}release(){this.a=null;this.f.Xd(this.h)}};_.qu="maxSuggestedBitrateKbps";Nn={du:"duress",etp:_.Yd,mb:_.qu,rd:"responseDelay",rtt:"roundTripTime"};Qn={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:wg};
403
- On=new _.T("clpp.net.CmsdManager");var S=class extends _.Yt{constructor(a,b,c){super();wm();this.g=new _.T("clpp.Player");this.g.info("SDK version: 6.32.0-beta.2");if(!a)throw new _.I(_.D,7,7102);this.ca=new _.Vt;this.f=this.C=b||_.cn();this.l=null;void 0===this.f.license&&(this.f.license=$m,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!");
403
+ On=new _.T("clpp.net.CmsdManager");var S=class extends _.Yt{constructor(a,b,c){super();wm();this.g=new _.T("clpp.Player");this.g.info("SDK version: 6.32.0-beta.3");if(!a)throw new _.I(_.D,7,7102);this.ca=new _.Vt;this.f=this.C=b||_.cn();this.l=null;void 0===this.f.license&&(this.f.license=$m,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!");
404
404
  this.j=new vj(a,c);this.F=this.A=this.a=this.H=null;this.I=new _.Hn;this.h=null;this.W=[];this.X=!0;this.K={};this.da=null;this.R=!0;this.S=this.P=!1;this.L=this.Yc=null;this.gf=!1;this.ia=new iu(this);this.B=null;this.on(_.Rf,()=>{this.getState()===_.As&&(this.a?this.a.unload():Promise.resolve())});this.on(_.sc,()=>{this.gf=!0});this.on(_.rc,()=>{this.gf=!1});this.on(_.fg,()=>Wn(this));Yn(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
405
405
  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 Sn)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}$n(this,a);this.M=_.na;Uh(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,
406
406
  b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.H(_.Xd,{detail:a}),this.trigger(a)}Gd(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.ih(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=co(this);return this.l.finally(()=>{eo(this);this.g.debug("Player released");
package/cl.mse.js CHANGED
@@ -199,8 +199,8 @@ nH=function(a,b,c){var d=a.w;return null!=d.a&&d.a===c||b instanceof _.I&&7E3===
199
199
  SG=function(a,b){return _.w(function*(){var c=a.getNetworkEngine();c=yield _.Nt(b.url,c,a.configuration.manifest.attemptParameters,b.type||null);c.configure(a.configuration.manifest);return c})};
200
200
  TG=function(a,b,c,d){return(new _.Rs(Promise.resolve().then(()=>_.w(function*(){let e=null;for(;!e;)try{{var f=b,g=c.url;const k=FH(a,d);var h=f.start(g,k)}e=yield h}catch(k){if(a.Uc)if(f=yield a.Uc(c.url,k))c.url=f;else throw k;else throw k;}if(0===e.periods.length)throw new _.I(_.D,4,4014);nG(e.periods);return e})),()=>{a.log.info("Aborting parser step...");return b.stop()})).V};
201
201
  vH=function(a){if(a.F&&a.I&&a.B){var b=2===GH(a),c=a.H;c.l=b;OE(c,c.o?"seek":void 0);a.B.j.o=b;HH(a);a.Ce&&(c=1>Math.abs(a.getMediaDuration()-a.getMediaPosition()),a=a.Ce,b&&c&&(b=a.a,b.a[b.a.length-1]&&a.f(new _.H(_.Df))))}};
202
- XG=function(a,b){var c=a.a?hF(a.a):null;const d=a.a?iF(a.a):null,e=!gH(a);for(const g of b)sE(a.A,c,d,g,e);c=mB(b,g=>g.variants.some(vE));if(a.configuration.streaming.disableAudioTracks)for(var f of b)for(const g of f.variants)delete g.audio;if(a.configuration.streaming.disableVideoTracks)for(const g of b)for(const h of g.variants)(f=h.video)&&!nB(f.type,_.Xm(f.mimeType,f.codecs))&&delete h.video;if(0===c)throw new _.I(_.D,4,4032);if(c<b.length)throw new _.I(_.D,4,4011);for(const g of b)pE(g.variants,
203
- a.configuration.restrictions)&&a.a&&GD(a)===g&&WG(a),IH(a,g.variants)};ZG=function(a,b){const c=d=>{a.j&&a.I&&(d.type===_.Jf&&a.Lc?(a.I.a=JH,vH(a)):d.type===_.Gg&&3===a.getState()&&.1>a.getBufferInfo().Pa(a.getMediaPosition())?(a.I.a=JH,vH(a)):a.I&&KH(a));HH(a)};a.o.on(b,_.hf,c);a.o.on(b,_.Te,c);a.o.on(b,_.Wd,c);a.o.on(b,_.Jf,c);a.o.on(b,_.If,c);a.o.on(b,_.uf,c);a.o.on(b,_.Gg,c);a.o.on(b,_.wf,()=>{if(a.j){var d=a.j.playbackRate;0!==d&&a.H.set(d)}})};
202
+ XG=function(a,b){if(a.configuration.streaming.disableAudioTracks)for(var c of b)for(const g of c.variants)delete g.audio;if(a.configuration.streaming.disableVideoTracks)for(var d of b)for(var e of d.variants)(c=e.video)&&!nB(c.type,_.Xm(c.mimeType,c.codecs))&&delete e.video;d=a.a?hF(a.a):null;e=a.a?iF(a.a):null;c=!gH(a);for(var f of b)sE(a.A,d,e,f,c);f=mB(b,g=>g.variants.some(vE));if(0===f)throw new _.I(_.D,4,4032);if(f<b.length)throw new _.I(_.D,4,4011);for(const g of b)pE(g.variants,a.configuration.restrictions)&&
203
+ a.a&&GD(a)===g&&WG(a),IH(a,g.variants)};ZG=function(a,b){const c=d=>{a.j&&a.I&&(d.type===_.Jf&&a.Lc?(a.I.a=JH,vH(a)):d.type===_.Gg&&3===a.getState()&&.1>a.getBufferInfo().Pa(a.getMediaPosition())?(a.I.a=JH,vH(a)):a.I&&KH(a));HH(a)};a.o.on(b,_.hf,c);a.o.on(b,_.Te,c);a.o.on(b,_.Wd,c);a.o.on(b,_.Jf,c);a.o.on(b,_.If,c);a.o.on(b,_.uf,c);a.o.on(b,_.Gg,c);a.o.on(b,_.wf,()=>{if(a.j){var d=a.j.playbackRate;0!==d&&a.H.set(d)}})};
204
204
  $G=function(a,b){for(let c=0;c<b.length;c++){const d=b[c],e=new Map;for(const f of oG(a))if(f.video&&f.video.closedCaptions){const g=f.video;for(const h of g.closedCaptions.keys())if(!e.has(h)){const k={id:a.Xf++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,initSegmentReference:null,Ka:0,mimeType:_.uc,codecs:"",kind:_.GA,encrypted:!1,keyId:null,language:g.closedCaptions.get(h),label:null,type:_.K,primary:!1,trickModeVideo:null,
205
205
  emsgSchemeIdUris:null,roles:g.roles,channelsCount:null,spatialAudio:!1,closedCaptions:null};e.set(h,k)}}for(const f of e.values())d.textStreams.push(f)}};uG=function(a){return a.a?a.a.F:!1};oG=function(a){return a.f.alternativeVariants&&0<a.f.alternativeVariants.length?a.f.alternativeVariants:a.B?GD(a).variants:a.f.periods[0].variants};GD=function(a){const b=a.B.getTime();let c=null;for(const d of a.f.periods)d.startTime<=b&&(c=d);return c};
206
206
  vG=function(a,b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;_.w(function*(){if(a.configuration.abr.enabled&&a.a){var e=LH(a,b);if(HD(a.l,e).ib){const f=b.video;if(f){MH(a,e,()=>pG(a,e,f,!0));e===GD(a)&&NH(a);yield vF(a.a,f,c,d);return}}MH(a,e,()=>{qG(a,e,b,!0)});e===GD(a)&&NH(a);tF(a.a,b,c,d)}})};bH=function(a,b,c){return new OH(b,a.f,a.configuration.streaming,c,d=>{a.lb&&NC(a.lb,!0,d);a.a&&AF(a.a)},d=>a.dispatchEvent(d),a.S===_.db)};
@@ -208,8 +208,8 @@ cH=function(a){const b=new PH(a.j);var c=new QH(a.f);KE(c,()=>{WG(a)});b.a.add(c
208
208
  gH=function(a){return a.configuration.mediaSource.codecSwitchingStrategy===_.Of&&(_.Ti(2)||_.Ti(3)||_.Ti(4)||_.Ti(5)||_.Ti(6)||_.Wi()&&38===_.$i().major||_.Wi()&&53===_.$i().major||_.Wi()&&68===_.$i().major?!1:!0)};
209
209
  hH=function(a){const b={configuration:{xi:a.S===_.db},yb:()=>a.B.getTime(),$:a.K,Cb:a.getNetworkEngine(),Wc:a.U,nf:a.qh.bind(a),Og:a.rh.bind(a),onError:a.onError.bind(a),Pg:a.sh.bind(a),onEvent:a.Mf.bind(a),Sg:a.wh.bind(a),Fe:a.th.bind(a),Fd:()=>a.h,Xe:a.ph.bind(a),hh:a.vh.bind(a),Cd:a.A};return new _.UH(a.f,b)};
210
210
  iH=function(a,b){function c(g,h){if(!g)return null;h=g.findSegmentPosition(h-f.startTime);return null==h?null:(g=g.getSegmentReference(h))?g.startTime+f.startTime:null}const d=hF(a.a);var e=iF(a.a);const f=GD(a);a=c(d,b);e=c(e,b);return null!=e&&null!=a?Math.max(e,a):null!=e?e:null!=a?a:b};
211
- jH=function(a,b){var c=a.a?hF(a.a):null;const d=a.a?iF(a.a):null,e=!gH(a);sE(a.A,c,d,b,e);c=b.variants;if(a.configuration.streaming.disableAudioTracks)for(const f of c)delete f.audio;if(!c.some(vE))throw new _.I(_.D,4,4011);IH(a,b.variants);pE(c,a.configuration.restrictions)&&a.a&&GD(a)===b&&WG(a);if(!_.Ti(2)&&(b=a.A?a.A.getDrmInfo():null))for(const f of c)for(const g of f.drmInfos)if(g.keySystem===b.keySystem)for(const h of g.initData||[])_.Uq(a.A,h.keyId,h.initData)||_.Wq(a.A,h.initDataType,h.initData,
212
- h.keyId)};WG=function(a){const b=a.getTrackManager();b&&a.G!==LG&&(b.m&&(FD(b),b.m.trigger(new _.H(_.hg))),NH(a))};tG=function(a,b){b=VH(a,b);if(!b)return{variant:null,ib:null};a=WH(a,b);return{variant:b,ib:a}};
211
+ jH=function(a,b){const c=b.variants;if(a.configuration.streaming.disableAudioTracks)for(var d of c)delete d.audio;d=a.a?hF(a.a):null;const e=a.a?iF(a.a):null,f=!gH(a);sE(a.A,d,e,b,f);if(!c.some(vE))throw new _.I(_.D,4,4011);IH(a,b.variants);pE(c,a.configuration.restrictions)&&a.a&&GD(a)===b&&WG(a);if(!_.Ti(2)&&(b=a.A?a.A.getDrmInfo():null))for(const g of c)for(const h of g.drmInfos)if(h.keySystem===b.keySystem)for(const k of h.initData||[])_.Uq(a.A,k.keyId,k.initData)||_.Wq(a.A,k.initDataType,k.initData,
212
+ k.keyId)};WG=function(a){const b=a.getTrackManager();b&&a.G!==LG&&(b.m&&(FD(b),b.m.trigger(new _.H(_.hg))),NH(a))};tG=function(a,b){b=VH(a,b);if(!b)return{variant:null,ib:null};a=WH(a,b);return{variant:b,ib:a}};
213
213
  KH=function(a){if(a.j){switch(a.G){case yG:a:if(a.j.ended||VD(a.K))var b=!0;else{if(a.isLive()){b=nC(a.f.presentationTimeline);var c=a.getBufferInfo();if(null!==c&&(c=c.Oa(),null!==c&&c>=b)){b=!0;break a}}b=!1}break;default:b=!1}if(a.K){var d=XD(a.K);c=d.video;d=d.audio;var e=a.j.currentTime;c&&d?(c=c.Pa(e),d=d.Pa(e),d=Math.min(c,d)):d=c?c.Pa(e):d?d.Pa(e):0}else d=0;if(c=a.I){{c=a.I;e=d;var f=b;const g=c.f.get(c.a);d=c.a;e=f||e>=g?XH:JH;c.a=e;c=d!==e}}(d=YH(a))&&a.cb&&(a.cb.h=!0);c||2===a.getState()&&
214
214
  !d?(a.log.debug("Buffering state changed. Is buffering",d,"buffered to end",b,"state",a.getState()),vH(a)):a.Ic&&HH(a)}};HH=function(a){EG(a,GH(a))};YH=function(a){return a.A&&a.A.F?!0:a.I?a.I.getState()===JH:!1};ZH=function(a){const b=GD(a);return b?HD(a.l,b).video:null};$H=function(a){const b=GD(a);return b?HD(a.l,b).audio:null};bI=function(a){if(null==GD(a))return[];aI(a);return oG(a).filter(b=>vE(b))};
215
215
  cI=function(a){const b=GD(a);if(null==b)return[];aI(a);return a.f.alternativeTextStreams?a.f.alternativeTextStreams:b.textStreams.filter(c=>!a.od.has(c))};zG=function(a,b,c,d){CE(a.l,b,c);if(b=a.getTrackManager())JD(b,c.id,_.P,d),c=b.Xa(),a=a.F.f,a.h!==c&&(a.h=c,a.a.push({timestamp:Date.now()/1E3,id:c.id,trackId:c.track.id,type:c.track.type,fromAdaptation:d,width:null,height:null,bandwidth:null}))};AG=function(a,b){return _.w(function*(){uG(a)?yield _.xF(a.a,b):a.W=b})};
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.2-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,
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-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.2-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&this.f&&(this.f.on(this.m,
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.3-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.2-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.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.3-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,7 +19,7 @@ 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.2-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,
22
+ b);return b}getPlayerName(){return _.ra}getVersion(){return"castlabs-ads-adapter-6.32.0-beta.3-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."),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@castlabs/prestoplay",
3
3
  "description": "PRESTOplay Video Player",
4
- "version": "6.32.0-beta.2",
4
+ "version": "6.32.0-beta.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/castlabs/prestoplay-web.git"