@castlabs/prestoplay 6.25.0 → 6.25.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/cl.tizen.js CHANGED
@@ -17,15 +17,15 @@ _.tg);c.language=_.Tj(d);c.originalLanguage=d;c.channelsCount=b.channels?Number(
17
17
  b;c.kind=_.OC;return new _.fk(String(a),c)},NQ=function(a,b){b=b.filter(d=>d.type===TQ);const c=[];for(let d=0;d<b.length;d++){const e=GQ(a,b[d].extra_info);if(!e){a.g.warn("Skipping text stream with no extra info");continue}const f=new _.Xj(String(a.h++),_.L);f.renditions.push(VQ(b[d].index,e,f));c.push(f)}return c},QQ=function(a,b,c){a=a.f[c]||[];b=String(b.index);c=null;for(let d=0;d<a.length;d++)for(let e=0;e<a[d].renditions.length;e++)if(a[d].renditions[e].id===b){c=a[d].renditions[e];break}return c},
18
18
  WQ=function(a){return a.f&&a.a?a.a.yi:webapis.avplay.getTotalTrackInfo()},YQ=function(a,b,c){a.g.debug("switchVideoTrack()");try{const d={estimatedBandwidth:parseInt(webapis.avplay.getStreamingProperty("CURRENT_BANDWITH"),10),currentBandwidth:b,nextBandwidth:c,currentPosition:a.getPosition()};a.a=XQ(a);a.f=!0;webapis.avplay.stop();webapis.avplay.close();return a.load(a.m.getConfiguration(),d).then(()=>{const e=a.a.Bf;a.f=!1;a.a=null;return e===uQ?a.pause():a.play()})}catch(d){return Promise.reject(d)}},
19
19
  ZQ=function(a,b){var c=a.m.getTextDisplayer();c&&c.setTextVisibility(b);c=a.m.h;try{c||webapis.avplay.setSilentSubtitle(!b)}catch(d){a.g.debug("Could not set text track visibility",d)}},SQ=function(a,b,c){b=b.toUpperCase();b===TQ&&ZQ(a,!0);const d=a.j[b];d&&(d.je.stop(),a.j[b]=null,a.g.debug(`Cancelled pending track switch for ${b}`));return new Promise((e,f)=>{const g=(h,k,l)=>{l=void 0===l?!1:l;try{webapis.avplay.setSelectTrack(h,k),a.j[h]=null,e()}catch(m){a.g.debug(`Could not set ${h} track. Trying again...`+
20
- `AVPlay state: ${a.getState()}, `+`buffering: ${a.w}`,m),!1===l&&(a.j[h]={type:h,index:k,xf:0,je:new _.Gk(()=>g(h,c,!0))}),(k=a.j[h])&&3>k.xf?(!a.w&&++k.xf,k.je.ia(a.w?.5:.25)):(a.g.debug("Could not set track after multiple attempts.Giving up..."),k&&k.je.stop(),a.j[h]=null,f())}};g(b,c)})},PQ=function(a){return a.f&&a.a?a.a.dh:webapis.avplay.getCurrentStreamInfo()},$Q=function(a){return _.x(function*(){tizen.systeminfo.getPropertyValue("DISPLAY",b=>{a.A=b.resolutionWidth/1920;a.g.debug("Display resolution ratio: ",
20
+ `AVPlay state: ${a.getState()}, `+`buffering: ${a.w}`,m),!1===l&&(a.j[h]={type:h,index:k,xf:0,je:new _.Gk(()=>g(h,c,!0))}),(k=a.j[h])&&3>k.xf?(!a.w&&++k.xf,k.je.ha(a.w?.5:.25)):(a.g.debug("Could not set track after multiple attempts.Giving up..."),k&&k.je.stop(),a.j[h]=null,f())}};g(b,c)})},PQ=function(a){return a.f&&a.a?a.a.dh:webapis.avplay.getCurrentStreamInfo()},$Q=function(a){return _.x(function*(){tizen.systeminfo.getPropertyValue("DISPLAY",b=>{a.A=b.resolutionWidth/1920;a.g.debug("Display resolution ratio: ",
21
21
  a.A)},b=>{a.g.debug("Could not load DISPLAY property");throw b;})})},bR=function(a){try{webapis.avplay.setListener({onbufferingstart:a.J.bind(a),onbufferingprogress:a.I.bind(a),onbufferingcomplete:a.H.bind(a),onstreamcompleted:a.M.bind(a),oncurrentplaytime:b=>{a.trigger(new _.D(aR,{currentTime:b}))},onevent:a.L.bind(a),onsubtitlechange:a.O.bind(a),ondrmevent:a.K.bind(a),onerror:a.B.bind(a)})}catch(b){a.g.error(b)}},cR=function(a){const b=!!a.m.getTrackManager().Va();try{webapis.avplay.setSilentSubtitle(!b)}catch(c){a.g.debug("Could not set AVPlay subtitle config",
22
22
  c)}},dR=function(a,b){try{const c=b.estimatedBandwidth||0,d=b.currentBandwidth||0;a.g.debug({estimatedBandwidth:c,Ni:d});0!==c&&0!==d&&c>=1.15*d&&webapis.avplay.setStreamingProperty("ADAPTIVE_INFO",gQ+d)}catch(c){a.g.debug(c)}},eR=function(a,b){try{webapis.avplay.setStreamingProperty("ADAPTIVE_INFO","|BITRATES\x3d"+b+gQ+b)}catch(c){throw a.g.debug("Could not set fixed bandwidth",c),c;}},fR=function(a){let b=null;try{b=tizen.tvaudiocontrol.isMute()}catch(c){switch(c.name){case eQ:a.g.warn("The application doesn't have the privilege to get the mute state.",
23
23
  fQ);break;default:a.g.warn(cQ,c)}}return!!b},XQ=function(a){return{position:a.getPosition(),state:a.m.getState(),Bf:a.getState(),playbackRate:a.getPlaybackRate(),isLive:a.isLive(),duration:a.getDuration(),isMuted:fR(a),volume:a.getVolume(),yi:WQ(a),dh:PQ(a)}},gR=function(){return new Promise((a,b)=>{if(window.webapis)a();else{const c=document.createElement("script");hQ(c,_.De,d=>a(d));hQ(c,_.q,d=>b(d));c.src="$WEBAPIS/webapis/webapis.js";document.querySelector("head").appendChild(c)}})},hR=function(a){return _.x(function*(){yield gR();
24
- const b=new Promise(c=>{(new _.Gk(c)).ia(5)});if(!(yield Promise.race([$Q(a).then(()=>!0),b.then(()=>!1)])))return a.g.debug("Took to long for the SDK to be ready"),Promise.reject("SDK Timeout")})},iR=function(a){return _.x(function*(){a.g.debug("avplay.prepare()");return new Promise((b,c)=>{try{webapis.avplay.prepareAsync(()=>{a.g.debug("AVPlay is ready!");cR(a);b()},d=>{a.g.debug("prepareAsync failed",d);c(d)})}catch(d){a.g.debug("Failed to prepare media player for playback"),c(d)}})})},jR=function(a,
24
+ const b=new Promise(c=>{(new _.Gk(c)).ha(5)});if(!(yield Promise.race([$Q(a).then(()=>!0),b.then(()=>!1)])))return a.g.debug("Took to long for the SDK to be ready"),Promise.reject("SDK Timeout")})},iR=function(a){return _.x(function*(){a.g.debug("avplay.prepare()");return new Promise((b,c)=>{try{webapis.avplay.prepareAsync(()=>{a.g.debug("AVPlay is ready!");cR(a);b()},d=>{a.g.debug("prepareAsync failed",d);c(d)})}catch(d){a.g.debug("Failed to prepare media player for playback"),c(d)}})})},jR=function(a,
25
25
  b){try{tizen.tvaudiocontrol.setMute(b)}catch(c){switch(c.name){case eQ:a.g.warn("The application does not have the privilege to set mute.",fQ);break;default:a.g.warn(cQ,c)}}},oR=function(a,b,c){return _.x(function*(){a.l=_.np(b);const d=a.G,e=c||{estimatedBandwidth:0,currentBandwidth:0,nextBandwidth:null,currentPosition:0};a.g.debug(`Loading manifest URL: ${a.l[d].url}`);let f=b.startTime||void 0;a.f&&(a.trigger(new _.D(kR)),f=c.currentPosition);try{let g=a.l[d].url;if(a.l[d].type===_.Kc&&!g.includes(".mpd")){const h=
26
26
  new URL(g);h.searchParams.append("cl-ext",".mpd");g=h.toString()}webapis.avplay.open(g);e.nextBandwidth?(eR(a,e.nextBandwidth),a.o=!1):(a.o||dR(a,e),a.o=!0);bR(a);if(b.drm&&b.drm.env){const h={onError:k=>a.m.onError(k),yb:a.m.getNetworkEngine()};a.h=new lR(b.drm,h);yield a.h.init()}else a.g.debug("No DRM configuration was provided. Assuming clear content");a.f||a.trigger(new _.D(mR));yield iR(a);a.f||a.trigger(new _.D(nR));f&&typeof f===_.t&&0<f&&a.seek(f).catch(h=>{a.g.debug("Couldn't set start position",
27
27
  h)});a.f||(b.volume&&a.setVolume(b.volume),b.muted&&jR(a,b.muted),b.autoplay&&a.m.play().catch(h=>{a.g.debug("Autoplay failed",h)}))}catch(g){throw a.g.debug("Error while attempting to load source."),g;}})},pR=function(a){if("NONE"!==a.a.getState()){var b=a.j.getBoundingClientRect();{a=a.a;const c=Math.floor(b.left*a.A),d=Math.floor(b.top*a.A),e=Math.floor(b.width*a.A);b=Math.floor(b.height*a.A);a.g.debug("Setting display area to","x:",c,"y:",d,"width:",e,"height:",b);webapis.avplay.setDisplayRect(c,
28
- d,e,b);0===c&&0===d&&1920===e&&1080===b&&webapis.avplay.setDisplayMethod("PLAYER_DISPLAY_MODE_LETTER_BOX")}}else a.g.debug("Could not apply dimension. Player state "+a.a.getState())},lR=class{constructor(a,b){this.h=a;this.o=null;this.a=_.Re;this.l=null;this.j=!1;this.f=new Map;this.D=b;this.g=new _.S("clpp.tizen.DrmEngine")}init(){const a=this;return _.x(function*(){var b=_.em[a.h.env]||null;if(!b)throw a.g.debug(_.ua,_.xb+a.h.env+_.aa),new _.I(_.F,6,6015,`DRM environment '${a.h.env}' is missing.`);
28
+ d,e,b);0===c&&0===d&&1920===e&&1080===b&&webapis.avplay.setDisplayMethod("PLAYER_DISPLAY_MODE_LETTER_BOX")}}else a.g.debug("Could not apply dimension. Player state "+a.a.getState())},lR=class{constructor(a,b){this.h=a;this.o=null;this.a=_.Re;this.l=null;this.j=!1;this.f=new Map;this.D=b;this.g=new _.S("clpp.tizen.DrmEngine")}init(){const a=this;return _.x(function*(){var b=_.em[a.h.env]||null;if(!b)throw a.g.debug(_.ua,_.wb+a.h.env+_.aa),new _.I(_.F,6,6015,`DRM environment '${a.h.env}' is missing.`);
29
29
  a.l={id:String(Math.floor(1E4*Math.random())),type:"MPEG-DASH"};var c=Object.keys(a.h.customData||{}).length?btoa(JSON.stringify(a.h.customData)):"";b=_.gm(b,a.h.customData);const d=b[_.Hd];d&&a.f.set(_.Hd,{qd:d.licenseUrl||"",customData:c,Pe:!1});(b=b[_.Jd])&&a.f.set(_.Jd,{qd:b.licenseUrl||"",customData:c,Pe:!1});if(0===a.f.size)throw new _.I(_.F,6,6E3);if((c=a.h.preferredDrmSystem)&&a.f.get(c))a.a=c;else if(a.f.get(_.Hd))a.a=_.Hd;else if(a.f.get(_.Jd))a.a=_.Jd;else throw new _.I(_.F,6,6001,"Configuration for the target system is missing.");
30
30
  yield kQ(a);a.j=!0})}release(){const a=this;return _.x(function*(){a.j=!1;a.o=null;a.a=_.Re;a.l=null;a.f=new Map})}getDrmInfo(){return this.o}},nQ="DeleteLicenseAfterUse",oQ="LicenseServer",pQ="CustomData";var vR=class{constructor(a){this.m=a;this.a=this.m.a;this.f=_.hp;this.j=_.rv;this.w=(new Date).getTime();this.l=!1;this.o=-1;this.h=2;this.g=new _.S("clpp.tizen.StateManager")}initialize(){this.a.on(kR,this.C,this);this.a.on(qR,this.B,this);this.a.on(rR,this.A,this);this.a.on(mR,this.H,this);this.a.on(nR,this.G,this);this.a.on(sR,this.F,this)}release(){sQ(this,_.hp);this.l=!1;this.o=-1;this.h=2}destroy(){this.release();this.a.off(kR,this.C);this.a.off(qR,this.B);this.a.off(rR,this.A);this.a.off(mR,
31
31
  this.H);this.a.off(nR,this.G);this.a.off(sR,this.F);this.m=this.a=null}C(){this.g.debug("Buffering start. Player state: ",this.a.getState());this.h=this.a.C?1:2;sQ(this,_.dp)}B(a){this.g.debug("Buffering progress: "+a.percent+" %. Player state: ",rQ(this.f))}A(){this.g.debug("Buffering complete. Player state: ",this.a.getState());if(!this.l){this.l=!0;var a=this.m.getConfiguration().autoplay;const b=this.a.getState()===tR;if(!a&&b){sQ(this,_.jp);return}}if(a=this.f!==_.ip)a=this.a.getState(),a=a===
package/cl.ttml.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Kx='application/mp4; codecs\x3d"stpp.ttml"',Lx='application/mp4; codecs\x3d"stpp.ttml.im1i"',Mx='application/mp4; codecs\x3d"stpp.ttml.im1t"',Nx="backgroundColor",Ox="direction",Px="displayAlign",Qx="region",Rx="textAlign",Sx="textDecoration",Tx="writingMode",Ux=function(a,b,c){a=a.f;for(let d=a.length-1;0<=d;d--){const e=b.get(a[d]);if(e.hasAttribute(c))return e.getAttribute(c)}return null},by=function(a,b){var c=null;if(Vx.test(a)){{a=Vx.exec(a);c=Number(a[1]);const d=Number(a[2]);
2
2
  let e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.f;e+=f/b.frameRate;c=e+60*d+3600*c}}else Wx.test(a)?c=Xx(Wx,a):Yx.test(a)?c=Xx(Yx,a):Zx.test(a)?(a=Zx.exec(a),c=Number(a[1])/b.frameRate):$x.test(a)?(a=$x.exec(a),c=Number(a[1])/b.a):ay.test(a)&&(c=Xx(ay,a));return c},Xx=function(a,b){a=a.exec(b);return null==a||""===a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)},cy=function(a){return a.split(":").pop()},dy=function(a){return a.replace(/(\d*\.?\d+)c/g,
3
- "$1em")},fy=function(a,b){for(;ey.test(a);){const c=ey.exec(a)[0];a=a.replace(c,`${parseInt(c,10)/b}em`)}return a},gy=function(a){return a?a.replace(/(\d*\.?\d+)%/g,(b,c)=>`${c/100}em`):""},hy=function(a,b,c){a=Ux(a,b,Rx);if(!a&&c&&(a=Ux(c,b,Rx),!a&&"rltb"===Ux(c,b,Tx)))return _.Mf;switch(a){case _.ld:return _.Vt;case _.Mf:case _.ie:return _.Mf;default:return _.ue}},iy=function(a,b,c){if(_.rj(a.w))return document.createTextNode(_.vj(a.w||""));if(a.A)return _.Dp("br");const d=_.Dp("span");for(const e of a.f)_.Ep(d,
3
+ "$1em")},fy=function(a,b){for(;ey.test(a);){const c=ey.exec(a)[0];a=a.replace(c,`${parseInt(c,10)/b}em`)}return a},gy=function(a){return a?a.replace(/(\d*\.?\d+)%/g,(b,c)=>`${c/100}em`):""},hy=function(a,b,c){a=Ux(a,b,Rx);if(!a&&c&&(a=Ux(c,b,Rx),!a&&"rltb"===Ux(c,b,Tx)))return _.ie;switch(a){case _.ld:return _.Vt;case _.Mf:case _.ie:return _.ie;default:return _.Zf}},iy=function(a,b,c){if(_.rj(a.w))return document.createTextNode(_.vj(a.w||""));if(a.A)return _.Dp("br");const d=_.Dp("span");for(const e of a.f)_.Ep(d,
4
4
  e);for(const e of a.j)d.appendChild(iy(c.get(e),b,c));return d},ly=function(a,b,c,d){const e=jy.exec(a);a=ky.exec(a);return typeof b===_.t&&0<b&&a?100*Number(a[c])/b:e?Number(e[c]):a?Number(a[c]):d},my=function(a,b){return typeof b===_.t&&0<b?_.cu:ky.test(a)?0:_.cu},ny=function(a,b,c){return typeof a===_.t?a:typeof b===_.t?b:c},oy=function(a,b){a=a.getAttribute("extent");return(a=ky.exec(a))?Number(a[b]):null},qy=function(a){a=a.getAttribute("cellResolution");return(a=py.exec(a))?Number(a[2]):null},
5
5
  sy=function(){return`${"inline-"}${ry++}`},uy=function(a){return ty.some(b=>b in a.attributes)},vy=function(a,b){if(0===b.length)return[];const c=[];for(const d of b)a.a.has(d)&&c.push(...vy(a,a.a.get(d).f),d);return c},wy=function(a){return a.o.map(b=>b.build(a.l,a.w,a.A,a.h,a.a,a.j,a.f)).filter(b=>null!=b)},xy=function(a){return cy(a.h.nodeName)},Ay=function(a,b){if(a.a.has(b))return a.a.get(b);var c=null,d=null;let e=[],f=[],g={};const h=b.parentNode;if(h&&a.a.has(h)){const k=a.a.get(h);e=[...k.l];
6
6
  -1===[_.da,"span","br"].indexOf(b.nodeName)&&(c=k.a,d=k.j,f=[...k.f],g={},yy.forEach(l=>{l in k.attributes&&(g[l]=k.attributes[l])}))}if(b.nodeType===b.ELEMENT_NODE){b.hasAttribute(Qx)&&(c=b.getAttribute(Qx));b.hasAttribute(_.eg)&&f.push(...b.getAttribute(_.eg).split(" "));d=Array.from(b.attributes).map(k=>k.name);for(const k of d)d=cy(k),g[d]=b.getAttribute(k);d=g.backgroundImage}c=new zy(b,c,d,e,f,g);a.a.set(b,c);return c},By=function(a){return`${String(Math.floor(a/3600)).padStart(2,"0")}:${String(Math.floor(a/
@@ -17,6 +17,6 @@ _.Sd,"p","span","br"]),Oy=new Set([_.eg,_.re]);var zy=class{constructor(a,b,c,d,
17
17
  new Dy(m,k,{imageType:"PNG",encoding:"Base64"}));b+=h}for(;f.kd();)a=f.next(),a=Ay(e,a),c=d,b=a,"tt"===xy(b)&&(c.l=new Jy(c.B,Object.assign({},b.attributes))),c=d,b=a,"tt"===xy(b)&&(c.w=new Hy(b.attributes.frameRate,b.attributes.subFrameRate,b.attributes.frameRateMultiplier,b.attributes.tickRate)),c=d,b=a,xy(b)!==_.re||b.attributes.begin||b.attributes.end||(g=`#${b.getId()}`,c.h.set(g,new Dy(g,b.h.textContent,b.attributes))),c=d,g=a,xy(g)===_.re&&g.attributes.begin&&g.attributes.end?(b=`#${sy()}`,
18
18
  g=new Dy(b,g.h.textContent,g.attributes),c.h.set(b,g),c=g):c=null,c&&(a.j=c.getId()),c=d,b=a,xy(b)===_.eg&&(g=b.getId()||sy(),h=new Ly(g,b.f,Object.assign({},b.attributes)),c.a.set(g,h),b.a&&c.j.get(b.a).f.push(g)),c=d,g=a,xy(g)!==_.eg&&uy(g)?(b=sy(),g=new Ly(b,[],Object.assign({},g.attributes)),c.a.set(b,g),c=g):c=null,c&&a.f.push(c.getId()),c=d,g=a,xy(g)!==_.Sd||!g.attributes.extent&&!g.attributes.origin?c=null:(b=sy(),g=new Iy(b,vy(c,g.f),Object.assign({},g.attributes)),c.j.set(b,g),c=g),c&&(a.a=
19
19
  c.getId()),c=d,g=a,xy(g)!==Qx?c=null:(b=g.getId(),g=new Iy(b,vy(c,g.f),Object.assign({},g.attributes)),c.j.set(b,g),c=g),c&&(a.a=c.getId()),c=d,g=a,b=g.l,-1===[_.da,"span","br"].indexOf(xy(g))||0===b.length?c=null:(h=b[b.length-1],c.f.has(h)?(b=sy(),g=new Gy(b,g.h.nodeName===_.da?g.h.textContent:null,"br"===xy(g),g.a,g.j,vy(c,g.f),g.attributes),c.f.set(b,g),(c=c.f.get(h))&&c.j.push(b),c=g):c=null),c&&a.l.push(c.getId()),c=d,g=a,"p"===xy(g)||g.j?(b=sy(),g=new Gy(b,null,!1,g.a,g.j,vy(c,g.f),g.attributes),
20
- c.f.set(b,g),c.o.push(g),c=g):c=null,c&&a.l.push(c.getId());e=wy(d);f=[];for(l of d.a.values())f.push(...l.build(d.l));var l=f;return{cues:e,styles:l}}};var Sy=class{constructor(a){this.f=a}a(a){var b=new Ry(this.f);({cues:a}=b.parseMedia(a,{periodStart:0,segmentStart:null,segmentEnd:0}));b="WEBVTT\n\n";for(const d of a){a=b;b=By(d.startTime)+" --\x3e "+By(d.endTime);{var c=d;const e=[];switch(c.textAlign){case _.ue:e.push("align:left");break;case _.Mf:e.push("align:right");break;case _.Vt:e.push("align:middle");break;case _.ue:e.push("align:start");break;case _.Mf:e.push("align:end")}switch(c.writingMode){case _.Fg:e.push("vertical:lr");break;case _.Gg:e.push("vertical:rl")}c=
20
+ c.f.set(b,g),c.o.push(g),c=g):c=null,c&&a.l.push(c.getId());e=wy(d);f=[];for(l of d.a.values())f.push(...l.build(d.l));var l=f;return{cues:e,styles:l}}};var Sy=class{constructor(a){this.f=a}a(a){var b=new Ry(this.f);({cues:a}=b.parseMedia(a,{periodStart:0,segmentStart:null,segmentEnd:0}));b="WEBVTT\n\n";for(const d of a){a=b;b=By(d.startTime)+" --\x3e "+By(d.endTime);{var c=d;const e=[];switch(c.textAlign){case _.ue:e.push("align:left");break;case _.Mf:e.push("align:right");break;case _.Vt:e.push("align:middle");break;case _.Zf:e.push("align:start");break;case _.ie:e.push("align:end")}switch(c.writingMode){case _.Fg:e.push("vertical:lr");break;case _.Gg:e.push("vertical:rl")}c=
21
21
  e.length?" "+e.join(" "):""}b=a+(b+c+"\n");b+=d.payload+"\n\n"}return _.mj(b)}},Ty=class{probe(a,b){return a===_.Oc&&b===_.hg}create(a){return new Sy(a)}};var Uy=class{constructor(a){this.a=new Ry(a);this.g=new _.S("clpp.ttml.Mp4TtmlParser")}parseInit(a){let b=!1;(new _.Dm).N(_.Oe,_.wm).N(_.qg,_.wm).N(_.Je,_.wm).N(_.Ne,_.wm).N(_.bg,_.wm).ea(_.dg,_.xm).N("stpp",c=>{b=!0;c.parser.stop()}).parse(a);if(!b)throw new _.I(_.F,2,2007);}parseMedia(a,b){let c=!1,d=[],e=[];const f=[];(new _.Dm).N("moof",_.wm).N("traf",_.wm).ea("subs",g=>{const h=_.P(g.reader);for(let k=0;k<h;++k){g.reader.skip(4);const l=_.pm(g.reader);for(let m=0;m<l;++m){const n=1===g.version?
22
22
  _.P(g.reader):_.pm(g.reader);f.push(n);g.reader.skip(6)}}}).N(_.Ie,_.ym(g=>{c=!0;g=this.a.parseMedia(g,b,f);d=d.concat(g.cues);e=e.concat(g.styles)})).parse(a);c||this.g.warn("Couldn't find the mdat box");return{cues:d,styles:e}}};_.z("clpp.ttml.TtmlComponent",class extends _.Kv{constructor(){super();this.j=new Ty}f(){_.Dt(_.Oc,Ry);_.Dt(_.Mc,Uy);_.Dt(Kx,Uy);_.Dt(Mx,Uy);_.Dt(Lx,Uy);_.rk.push(this.j)}a(){_.Ft(_.Oc);_.Ft(_.Mc);_.Ft(Kx);_.Ft(Mx);_.Ft(Lx);_.tk(this.j)}id(){return"subtitles-ttml"}});};f.call(g, window);
package/cl.vimond.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var qx="Registering listeners",rx="clpp.vimond.VimondPlugin",sx=function(a,b){a.m.trigger(new _.D(_.Lg,{detail:b}))},tx=function(a,b,c){b&&(a.B=!0,a.h.stop());a.m.onError(new _.I(b?_.F:1,9,9201,c))},ux=function(a,b){const c=a.m.getState();if(1===b)return["str-start",_.sf];if(a.h)return[_.ie,_.cf];if(c===_.$o)return[_.ie,null];if(c===_.ap)return[_.q,_.cf];b=_.cf;if(c===_.dp||c===_.kp||a.f)b=_.sf;return["period",b]},vx=class{constructor(a,b,c,d,e){this.K=a;this.L=b;this.M=c;this.m=d;this.F=
2
2
  e;this.a=new _.St;this.l=!0;this.f=this.j=this.B=!1;this.C=null;this.h=new _.Gk(this.A.bind(this));this.g=new _.S("clpp.vimond.VimondDispatcher");this.o=this.w=0;this.m&&this.a&&(this.g.debug(qx),this.a.on(this.m,_.$f,this.I.bind(this)),this.a.on(this.m,_.og,this.J.bind(this)),this.a.on(this.m,_.jc,this.G.bind(this)),this.a.on(this.m,_.kc,this.H.bind(this)))}J(){this.f||(this.f=1<Math.abs(this.w-this.m.getPosition()));this.w=this.m.getPosition()}G(){this.g.debug("Ad break started");this.j=!0}H(){this.g.debug("Ad break stopped");
3
3
  this.j=!1}I(a){const b=this;return _.x(function*(){const c=a.detail,d=c.currentState;b.g.debug(`State changed, prev: ${c.previousState} curr: ${d}`);b.B||b.j||(d!==b.C||b.f?b.l&&d!==_.kp||(b.f&&[_.jp,_.dp].includes(d)?b.g.debug("Seeking"):(b.f&&d===_.kp&&(b.g.debug("Seeked"),b.f=!1),[_.kp,_.jp,_.ap,_.$o].includes(d)&&(b.C=d,yield b.A(),d===_.$o&&b.h.stop()))):b.g.debug("Ignore transition"))})}A(){const a=this;return _.x(function*(){var b=Math.floor(Date.now()/1E3);0<a.o&&a.g.debug(`Last event was ${b-
4
- a.o} seconds ago`);a.o=b;a.h.stop();a.h.ia(a.l?10:a.K);a.l=!1;try{var c=yield a.F.fireEvent();sx(a,c)}catch(d){b=d.code,c=d.data,[1002,1003].includes(b)?(a.g.debug("Unreachable service"),sx(a,c),tx(a,a.L,c)):1001===b?(a.g.debug("Generic service error"),sx(a,c),tx(a,a.M,c)):a.g.error(d.toString())}})}};var wx=class{constructor(a,b,c,d,e){this.l=a;this.o=c;this.h=b;this.a=d;this.j=e;this.g=new _.S("clpp.vimond.VimondService");this.f=0}fireEvent(){this.f++;const a=_.lh(this.o);a.client.buildName=_.qa;a.client.buildVersion=_.ea;var b=a.client;var c=(c=this.a.m.getDrmInfo())?c.keySystem:"";b.drm=c;a.client.pageUrl=document.location.href;a.client.streamUrl=this.a.m.getLoadedSource().url;a.client.userAgent=navigator.userAgent;a.client.videoFormat=this.a.m.getLoadedSource().type||"";b=a.client;c=this.a.m.getLoadedSource();
4
+ a.o} seconds ago`);a.o=b;a.h.stop();a.h.ha(a.l?10:a.K);a.l=!1;try{var c=yield a.F.fireEvent();sx(a,c)}catch(d){b=d.code,c=d.data,[1002,1003].includes(b)?(a.g.debug("Unreachable service"),sx(a,c),tx(a,a.L,c)):1001===b?(a.g.debug("Generic service error"),sx(a,c),tx(a,a.M,c)):a.g.error(d.toString())}})}};var wx=class{constructor(a,b,c,d,e){this.l=a;this.o=c;this.h=b;this.a=d;this.j=e;this.g=new _.S("clpp.vimond.VimondService");this.f=0}fireEvent(){this.f++;const a=_.lh(this.o);a.client.buildName=_.qa;a.client.buildVersion=_.ea;var b=a.client;var c=(c=this.a.m.getDrmInfo())?c.keySystem:"";b.drm=c;a.client.pageUrl=document.location.href;a.client.streamUrl=this.a.m.getLoadedSource().url;a.client.userAgent=navigator.userAgent;a.client.videoFormat=this.a.m.getLoadedSource().type||"";b=a.client;c=this.a.m.getLoadedSource();
5
5
  c=((new _.Bm(c.url)).scheme||"").replace(":","");b.videoProtocol=c;b=ux(this.a,this.f);a.client.playerEvent=b[0]||"";a.client.playerState=b[1]||"";a.progress.vod&&(a.progress.vod.position=this.a.getPosition());if(b=a.progress.live){c=this.a;var d=c.m.getPresentationStartTime()||0;c=Math.floor(d+c.m.getPosition());c=(new Date(1E3*c)).toISOString();b.position=c;d=this.a;c=d.m.getPosition();d=d.m.getSeekRange().end;c=30>Math.abs(d-c);b.onLiveEdge=c;typeof b.liveResumePossible!==_.$c&&(b.liveResumePossible=
6
6
  !0)}a.progress.eventNumber=this.f;a.timestamp=(new Date).toISOString();this.g.debug("Fire an event");b=_.Bj(this.l);b.method=_.sb;b.contentType="application/json";b.headers.Authorization=`Bearer ${this.h}`;b.body=_.oj(JSON.stringify(a));return this.j.fetch(b).V}lf(a){this.h=a}};var xx=class{constructor(a){this.m=a;this.a=new _.St;this.g=new _.S("clpp.vimond.VimondAdapter");this.f=this.h=!1;this.m&&this.a&&(this.g.debug(qx),this.a.on(this.m,_.If,this.o.bind(this)),this.a.on(this.m,_.jc,this.j.bind(this)),this.a.on(this.m,_.kc,this.l.bind(this)))}getPosition(){return Math.floor(this.m.getPosition())}o(){this.h=!0}j(){this.f=!0}l(){this.f=!1}};var yx=class extends _.Zv{constructor(){super();this.a=!1;this.g=new _.S(rx);this.j=this.h=this.f=null}onPlayerCreated(){}onContentWillLoad(a){var b=a.getConfiguration();(this.a=!_.B(b.vimond)&&typeof b.vimond===_.Se)?a.namespace()===_.ud&&(this.a=!1,this.g.info("Vimond does not report when casting.")):this.g.debug("Vimond plugin is loaded but not configured. Will do nothing.");if(this.a){b=a.getConfiguration().vimond;for(var c of["authToken","playerEventRequest"])if(!b[c]){this.g.warn(`${c} key is missing`);
7
7
  a.onError(new _.I(1,9,9200));return}this.g.debug(_.ra);c=b.failIfUnreachable;typeof c!==_.$c&&(c=!0);var d=b.failOnError;typeof d!==_.$c&&(d=!0);this.f=new xx(a);this.h=new wx(b.playerEventRequest.uri,b.authToken,b.playerEventRequest.body,this.f,a.getNetworkEngine());this.j=new vx(b.playerEventRequest.eventInterval,c,d,a,this.h)}}onPlayerWillRelease(){if(this.a){if(this.f){var a=this.f;a.g.debug(_.Pb);_.Th(a.a)}this.j&&(a=this.j,a.g.debug(_.Pb),_.Th(a.a),a.h.stop());this.j=this.h=this.f=null}}onPlayerWillDestroy(){}id(){return"vimond"}lf(a){this.a&&
package/cl.vr.js CHANGED
@@ -4,12 +4,12 @@ new fx(0,1,0);f.x=b.x-g.x;f.y=b.y-g.y;f.a=b.a-g.a;g=f.length();bx(f,1/g);c=dx(d,
4
4
  a.a.getShaderInfoLog(b));return b},ix=function(a){a.a&&(a.a.removeEventListener("mousemove",a.A,!1),a.a.removeEventListener(Xw,a.A,!1),a.a.removeEventListener("mouseup",a.B,!1),a.a.removeEventListener("touchend",a.B,!1))},jx=function(a){const b=$w(1,0,a.l*Math.PI/180);ax($w(0,1,a.j*Math.PI/180),a.O);ax(b,a.R);gx(a.Y);ex(a.$,a.O,a.Y);ex(a.G,a.R,a.$)},Zw=class{constructor(a,b,c,d){this.x=a||0;this.y=b||0;this.a=c||0;this.f=d||1}};var fx=class{constructor(a,b,c){this.x=a||0;this.y=b||0;this.a=c||0}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.a*this.a)}};var kx=class{constructor(){this.a=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}set(a,b,c,d,e,f,g,h,k,l,m,n,r,u,v,y){const A=this.a;A[0]=a;A[4]=b;A[8]=c;A[12]=d;A[1]=e;A[5]=f;A[9]=g;A[13]=h;A[2]=k;A[6]=l;A[10]=m;A[14]=n;A[3]=r;A[7]=u;A[11]=v;A[15]=y;return this}};var lx=class{constructor(a){this.a=a;this.f=a.createProgram();this.l=hx(this,!1,"uniform highp mat4 Mvpm;\nattribute highp vec4 aPosition;\nattribute highp vec2 aTexCoord;\nvarying highp vec2 oTexCoord;\nvoid main()\n{\n gl_Position \x3d Mvpm * aPosition;\n oTexCoord \x3d aTexCoord;\n}\n");this.j=hx(this,!0,"precision highp float;\nuniform sampler2D Texture0;\nvarying highp vec2 oTexCoord;\nvoid main()\n{\n gl_FragColor \x3d texture2D(Texture0, oTexCoord);\n gl_FragColor.w \x3d 1.0;\n}\n");
5
5
  a.attachShader(this.f,this.l);a.attachShader(this.f,this.j);a.bindAttribLocation(this.f,0,"aPosition");a.bindAttribLocation(this.f,1,"aTexCoord");a.linkProgram(this.f);if(!a.getProgramParameter(this.f,a.LINK_STATUS))throw new _.I(1,9,9004,"Unable to initialize shader");a.useProgram(this.f);this.h=a.getUniformLocation(this.f,"Mvpm");a.uniform1i(a.getUniformLocation(this.f,"Texture0"),0);a.useProgram(null)}};var mx=class{constructor(a){this.a=a;var b=[];let c,d;for(d=0;70>=d;d++){var e=3>=d?d/4/64:67<=d?(63+(d-66)/4)/64:(d-3)/64;var f=(e-.5)*Math.PI;const g=Math.cos(f);for(c=0;128>=c;c++){const h=c/128,k=(.5+h)*Math.PI*2;128===c?(b.push(b[645*d]),b.push(b[645*d+1]),b.push(b[645*d+2])):(b.push(100*Math.cos(k)*g),b.push(100*Math.sin(k)*g),b.push(100*Math.sin(f)));0===d||70===d?b.push(.5):b.push(1-h);b.push(1-e)}}e=[];for(c=0;128>c;c++)for(d=0;70>d;d++)f=5*(129*d+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+
6
6
  4]),f=5*(129*d+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*d+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]);this.h=e.length/5;this.f=a.createBuffer();b=new Float32Array(e);a.bindBuffer(a.ARRAY_BUFFER,this.f);a.bufferData(a.ARRAY_BUFFER,b,a.STATIC_DRAW)}};var nx=class{constructor(a,b){this.a=b;this.f=this.a.createTexture();b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.f);b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,a);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.bindTexture(b.TEXTURE_2D,null)}};var ox={alpha:!1,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!1,devicePixelRatio:1},px=class extends _.Zv{constructor(){super();this.o=this.w=this.K=this.I=this.C=this.W=this.G=this.f=this.a=this.m=null;this.g=new _.S("clpp.vr");this.H=70;this.U=1;this.M=this.L=!1;this.F=()=>{if(this.a&&this.f){this.f.viewport(0,0,this.a.width,this.a.height);{const a=this.K.a,b=Math.tan(.5*this.H*Math.PI/180);a[0]=1/(this.a.width/this.a.height*b);a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1/
7
- b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=2E3/-1999.9;a[11]=200/-1999.9;a[12]=0;a[13]=0;a[14]=-1;a[15]=1}}};this.l=this.j=0;this.h={x:0,y:0};this.O=new kx;this.R=new kx;this.Y=new kx;this.$=new kx;this.A=this.ba.bind(this);this.B=this.ha.bind(this);this.J=this.da.bind(this)}onPlayerCreated(a){this.g.info("Player created");this.m=a}onContentWillLoad(a){const b=a.getConfiguration();if(b.vr&&b.vr.enable){{var c=b.vr,d=c.fieldOfView;const e=c.sensitivity,f=c.invertHorizontalControl;c=c.invertVerticalControl;
7
+ b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=2E3/-1999.9;a[11]=200/-1999.9;a[12]=0;a[13]=0;a[14]=-1;a[15]=1}}};this.l=this.j=0;this.h={x:0,y:0};this.O=new kx;this.R=new kx;this.Y=new kx;this.$=new kx;this.A=this.ba.bind(this);this.B=this.ja.bind(this);this.J=this.da.bind(this)}onPlayerCreated(a){this.g.info("Player created");this.m=a}onContentWillLoad(a){const b=a.getConfiguration();if(b.vr&&b.vr.enable){{var c=b.vr,d=c.fieldOfView;const e=c.sensitivity,f=c.invertHorizontalControl;c=c.invertVerticalControl;
8
8
  if(void 0!==d&&_.th(d))this.H=d;else throw new _.I(1,7,7100,"fieldOfView configuration must be a number");if(void 0!==e&&_.th(e)&&0<e)this.U=e;else throw new _.I(1,7,7100,"sensitivity configuration must be a positive number");this.L=!!f;this.M=!!c}if(a=a.getSurface())if((d=a.getMedia())&&d.tagName.toLowerCase()===_.w){this.g.info("Initialize VR Surface");if(!this.a){this.a=document.createElement("canvas");this.a.style.width="100%";this.f=this.a.getContext("webgl",ox)||this.a.getContext("experimental-webgl",
9
9
  ox);if(!this.f)throw new _.I(1,9,9003,"Unable to create GL context");this.G=new kx;gx(this.G);this.W=new mx(this.f);this.C=new lx(this.f);this.I=new kx;this.K=new kx;this.o=this.w=null;this.a.addEventListener(_.Lf,this.F)}a.addElementToContainer(this.a,!0,!0);a.hideMediaElement();b.vr.attachMouseListener&&(this.a.addEventListener("mousedown",this.J,!1),this.a.addEventListener(Yw,this.J,!1));this.F();this.S()}else this.g.info("No video element found, can not initialize VR plugin");else this.g.info("No surface found, can not initialize VR plugin")}}onPlayerWillRelease(){this.g.info("Releasing VR plugin resources");
10
10
  this.w&&cancelAnimationFrame(this.w);this.h.x=0;this.l=this.j=this.h.y=0;this.f&&(delete this.f,this.f=null);this.a&&(ix(this),this.a.removeEventListener(_.Lf,this.F),this.a.parentElement.removeChild(this.a),this.a.removeEventListener("mousedown",this.J,!1),delete this.a,this.a=null)}onPlayerWillDestroy(){const a=this;return _.x(function*(){a.m=null})}id(){return"vr"}S(){if(this.m&&this.f){var a=this.m.getSurface();if(a&&(a=a.getMedia())&&a.tagName.toLowerCase()===_.w){this.w=requestAnimationFrame(this.S.bind(this));
11
11
  var b=this.f;this.o||a.readyState!==a.HAVE_ENOUGH_DATA||(this.o=new nx(a,b));b.clearColor(0,0,0,1);b.clearDepth(1);b.clearStencil(0);b.enable(b.DEPTH_TEST);b.depthFunc(b.LEQUAL);b.frontFace(b.CCW);b.cullFace(b.BACK);b.disable(b.CULL_FACE);b.enable(b.BLEND);b.blendFunc(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA);b.depthMask(!0);b.clearColor(0,0,0,1);b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT);if(this.o){var c=this.C;c.a.useProgram(c.f);{c=ex(this.I,this.K,this.G).a;let d;d=c[1];c[1]=c[4];c[4]=d;d=c[2];c[2]=
12
12
  c[8];c[8]=d;d=c[6];c[6]=c[9];c[9]=d;d=c[3];c[3]=c[12];c[12]=d;d=c[7];c[7]=c[13];c[13]=d;d=c[11];c[11]=c[14];c[14]=d}b.uniformMatrix4fv(this.C.h,!1,this.I.a);c=this.o;c.a.activeTexture(c.a.TEXTURE0);c.a.bindTexture(c.a.TEXTURE_2D,c.f);b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,a);a=this.W;a.a.bindBuffer(a.a.ARRAY_BUFFER,a.f);a.a.vertexAttribPointer(0,3,a.a.FLOAT,!1,20,0);a.a.vertexAttribPointer(1,2,a.a.FLOAT,!1,20,12);a.a.enableVertexAttribArray(0);a.a.enableVertexAttribArray(1);a.a.drawArrays(a.a.TRIANGLES,
13
13
  0,a.h);a=this.o;a.a.bindTexture(a.a.TEXTURE_2D,null);this.C.a.useProgram(null)}}}}da(a){this.g.debug("Mouse Down. Enable VR mouse interaction");a.preventDefault();if(0===a.button||a.type===Yw)a.type===Yw?a.touches[0]&&(this.h.x=a.touches[0].clientX,this.h.y=a.touches[0].clientY):(this.h.x=a.clientX,this.h.y=a.clientY),this.g.debug("Mouse Start coordinates:",this.h,a),this.a.addEventListener("mousemove",this.A,!1),this.a.addEventListener(Xw,this.A,!1),this.a.addEventListener("mouseup",this.B,!1),this.a.addEventListener("touchend",
14
- this.B,!1)}ba(a){a.preventDefault();var b=a.clientX;let c=a.clientY;a.type===Xw&&a.touches[0]&&(b=a.touches[0].clientX,c=a.touches[0].clientY);a=this.h.x-b;const d=this.h.y-c;this.h.x=b;this.h.y=c;b=this.U;const {Ug:e,Vg:f}={Ug:a*b*(this.L?-1:1),Vg:d*b*(this.M?-1:1)};this.j+=e;this.l+=f;jx(this)}ha(a){this.g.debug("Mouse Up. Removing mouse interaction listeners");a.preventDefault();ix(this)}Ph(a,b){this.l=b;this.j=a;jx(this)}rh(){return{x:this.j,y:this.l}}ii(a){this.H=a;this.F()}};
14
+ this.B,!1)}ba(a){a.preventDefault();var b=a.clientX;let c=a.clientY;a.type===Xw&&a.touches[0]&&(b=a.touches[0].clientX,c=a.touches[0].clientY);a=this.h.x-b;const d=this.h.y-c;this.h.x=b;this.h.y=c;b=this.U;const {Ug:e,Vg:f}={Ug:a*b*(this.L?-1:1),Vg:d*b*(this.M?-1:1)};this.j+=e;this.l+=f;jx(this)}ja(a){this.g.debug("Mouse Up. Removing mouse interaction listeners");a.preventDefault();ix(this)}Ph(a,b){this.l=b;this.j=a;jx(this)}rh(){return{x:this.j,y:this.l}}ii(a){this.H=a;this.F()}};
15
15
  _.z("clpp.vr.VrPlugin",px);px.prototype.setCameraFieldOfView=px.prototype.ii;px.prototype.getCameraCoordinates=px.prototype.rh;px.prototype.moveCamera=px.prototype.Ph;px.Id="vr";_.Nr(new class{create(){return new px}});};f.call(g, window);
package/cl.vtt.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Ew=" The setting will be ignored.",Fw="VTT parser encountered an invalid VTT setting: ",Gw="application/x-subrip",Hw="text/srt",Iw='text/vtt; codecs\x3d"vtt"',Jw='text/vtt; codecs\x3d"wvtt"',Kw=function(a){return a.a===a.f.length?null:(a=_.Ti(a,/[^ \t\n]*/gm))?a[0]:null},Lw=function(a){_.Ti(a,/[ \t]+/gm)},Mw=function(a){let b="";for(a=a.split(/\n/);3<a.length;){for(var c=3;c<a.length;++c)a[2]+=`\n${a[c]}`;a.splice(3,a.length-3)}if(3!==a.length)return"";c=0;!a[0].match(/\d+:\d+:\d+/)&&
2
2
  a[1].match(/\d+:\d+:\d+/)&&(b+=`${a[0].match(/\w+/)}\n`,++c);if(a[c].match(/\d+:\d+:\d+/)){const d=a[1].match(/(\d+):(\d+):(\d+)(?:,(\d+))?\s*--?>\s*(\d+):(\d+):(\d+)(?:,(\d+))?/);if(d)b+=`${d[1]}:${d[2]}:${d[3]}.${d[4]} --> `,b+=`${d[5]}:${d[6]}:${d[7]}.${d[8]}\n`,++c;else return""}else return"";a[c]&&(b+=`${a[c]}\n\n`);return b},Nw=function(a){a=_.Ti(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;const b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+
3
- c+60*b+3600*(Number(a[1])||0)},Pw=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"===b?a.textAlign=_.Vt:a.textAlign=_.au[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"===d[1]?_.Fg:_.Gg;else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b===_.xe||b===_.Zf?_.xe:b===_.Be||b===_.ie?
3
+ c+60*b+3600*(Number(a[1])||0)},Pw=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"===b?a.textAlign=_.Vt:a.textAlign=_.au[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"===d[1]?_.Fg:_.Gg;else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b===_.Ae||b===_.Zf?_.Ae:b===_.Be||b===_.ie?
4
4
  _.Be:_.ld);else if(d=/^region:(.*)$/.exec(b)){if(b=Ow(c,d[1]))a.region=b}else{a:{if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.bu[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.Xt,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.bu[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Ow=function(a,b){a=a.filter(c=>c.id===b);return a.length?a[0]:(_.C("VTT parser could not find a region with id: ",
5
5
  b," The region will be ignored."),null)},Rw=function(a,b,c){let d,e,f;(new _.Dm).N("payl",_.ym(g=>{d=_.ij(g)})).N("iden",_.ym(g=>{e=_.ij(g)})).N("sttg",_.ym(g=>{f=_.ij(g)})).parse(a);return d?Qw(d,e,f,b,c):null},Qw=function(a,b,c,d,e){a=new _.$t(d,e,a,_.Ng);b&&(a.id=b);if(c)for(b=new _.Ui(c),c=Kw(b);c;)Pw(a,c,[])||_.C(Fw,c,Ew),Lw(b),c=Kw(b);return a},Sw=class{a(a){a=_.ij(a);a=a.replace(/\r+/g,"");a=a.replace(/^\s+|\s+$/g,"");a=a.replace(/<[a-zA-Z\\/][^>]*>/g,"");a=a.split("\n\n");let b="";if(0<a.length){b+=
6
6
  "WEBVTT\n\n";for(const c of a)b+=Mw(c)}return _.mj(b)}},Tw=class{create(){return new Sw}probe(a,b){return(a===Hw||a===Gw)&&b===_.hg}};var Uw=class{constructor(a){this.a=a}parseInit(){}parseMedia(a,b){a=_.ij(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new _.I(_.F,2,2E3);a=b.periodStart;if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Nw(new _.Ui(d[1]));if(null==a)throw new _.I(_.F,2,2E3);e=Number(e[1]);for(d=b.segmentStart;95443.7176888889<=d;)d-=95443.7176888889,e+=
package/cl.youbora.js CHANGED
@@ -3,23 +3,23 @@ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(windo
3
3
  !1)},pw=function(a,b){if(b.namespace()===_.ud)return a.g.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.rh(c))return a.g.debug("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.g.warn(aw),b.onError(new _.I(1,9,9101)),!1;if(_.B(window.youbora))return a.g.warn("Youbora SDK not found."),b.onError(new _.I(1,9,9100)),!1;"6.8.59"!==youbora.VERSION&&(a.g.warn("Youbora SDK version is not supported. The supported version is 6.8.59, found "+
4
4
  `version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.I(1,9,9102)));return!0},qw=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),rw=(a,b,c,d)=>{b=qw(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.q;b.severity===_.F?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,
5
5
  b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var sw=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.a=new _.St;this.g=new _.S("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.oa())&&(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,
6
- 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.Ia())?c.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"6.25.0-castlabsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&this.a&&(this.g.debug("registering listeners"),
6
+ 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.Ia())?c.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"6.25.1-castlabsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&this.a&&(this.g.debug("registering listeners"),
7
7
  youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.$f,this.I.bind(this)),this.a.on(this.m,_.q,this.F.bind(this)),this.a.on(this.m,_.Cg,this.H.bind(this)),this.a.on(this.m,_.Bg,this.G.bind(this)),this.a.on(this.m,_.Fc,this.B.bind(this)),this.a.on(this.m,_.fd,this.C.bind(this)))}unregisterListeners(){this.g.debug(_.Pb);_.Th(this.a)}dispose(){super.dispose()}j(){return this.m.getStats()||_.Xo()}w(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;this.l("state change",c);if(c)switch(c.currentState){case _.ip:this.w()&&
8
8
  this.f();break;case _.kp:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.jp:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.hp:this.fireBufferEnd();this.fireStop();break;case _.$o:this.fireBufferEnd();this.o&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.dp:this.fireBufferBegin();break;default:this.g.debug($v,c)}}f(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.m.getDrmInfo();c&&(c=mw(c.keySystem))&&
9
9
  this.plugin.setOptions({"content.drm":c});this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=rw(c,this.m,this.g,this))&&c.severity===_.F&&(this.h=!0)}H(){this.m.isEnded()||(this.l(_.Sf),this.f(),this.fireSeekBegin())}G(){this.l(_.Rf);this.fireSeekEnd()}B(c){this.g.debug("adsTimeline",c);this.o=(c=c.adsTimeline)&&c.Kb()}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)};var tw=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.j=this.a=null;this.f=new _.St;this.g=new _.S("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.ib(),this.a.hb(),this.a.Ta()));return c}getBitrate(){return this.a&&this.a.Ta()}getPlayhead(){const c=this.m.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&
10
10
  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.Ua()){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.getVolume()}getExpectedBreaks(){return this.j&&
11
- this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.jb()}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(kw,c);return c}getPlayerName(){return _.qa}getVersion(){return"6.25.0-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
11
+ this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.jb()}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(kw,c);return c}getPlayerName(){return _.qa}getVersion(){return"6.25.1-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
12
12
  this.f&&(this.f.on(this.m,_.Fc,this.M.bind(this)),this.f.on(this.m,_.zc,this.L.bind(this)),this.f.on(this.m,_.vc,this.I.bind(this)),this.f.on(this.m,_.xc,this.J.bind(this)),this.f.on(this.m,_.nc,this.G.bind(this)),this.f.on(this.m,_.oc,this.o.bind(this,1)),this.f.on(this.m,_.uc,this.o.bind(this,2)),this.f.on(this.m,_.Dc,this.o.bind(this,3)),this.f.on(this.m,_.mc,this.F.bind(this)),this.f.on(this.m,_.yc,this.K.bind(this)),this.f.on(this.m,_.q,this.H.bind(this)),this.f.on(this.m,_.jc,this.A.bind(this)),
13
13
  this.f.on(this.m,_.kc,this.B.bind(this)),this.f.on(this.m,_.lc,this.C.bind(this)),this.f.on(this.m,_.wc,this.w.bind(this)))}unregisterListeners(){_.Th(this.f)}dispose(){super.dispose()}M(c){this.g.debug(fw,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(dw);this.fireBufferBegin()}w(){this.l&&
14
14
  (this.h(cw),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.ub();this.g.debug(ew,c);this.fireClick(c)}K(){this.h("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.h(bw,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&&rw(c,this.m,this.g,this)}h(c,
15
15
  ...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var vw=()=>{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.oa())&&(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)}getIsLive(){return this.player.isLive()}getResource(){const b=
16
- 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.Ia())?b.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"castlabs-adapter-6.25.0-js"}getPlayerVersion(){return _.ea}registerListeners(){const b=this.w();this.player&&b&&(b.on(this.player,_.$f,this.I.bind(this)),b.on(this.player,
16
+ 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.Ia())?b.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"castlabs-adapter-6.25.1-js"}getPlayerVersion(){return _.ea}registerListeners(){const b=this.w();this.player&&b&&(b.on(this.player,_.$f,this.I.bind(this)),b.on(this.player,
17
17
  _.q,this.F.bind(this)),b.on(this.player,_.Sf,this.H.bind(this)),b.on(this.player,_.Rf,this.G.bind(this)),b.on(this.player,_.Fc,this.B.bind(this)),b.on(this.player,_.fd,this.C.bind(this)))}unregisterListeners(){uw.debug(_.Pb);_.Th(this.w())}dispose(){this.unregisterListeners();this.f=this.h=!1;this.a=null}j(){return this.player.getStats()||_.Xo()}o(){return!!this.player.getConfiguration().autoplay}I(b){b=b.detail;this.l("state change",b);if(b)switch(b.currentState){case _.ip:this.o()&&this.fireStart();
18
18
  break;case _.kp:this.fireStart();this.A();this.fireResume();this.fireBufferEnd();break;case _.jp:this.o()&&this.fireStart();this.A();this.fireBufferEnd();this.firePause();break;case _.hp:this.fireBufferEnd();this.fireStop();break;case _.$o:this.fireBufferEnd();this.h&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.dp:this.fireBufferBegin();break;default:uw.debug($v,b)}}A(){this.fireJoin()}F(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=rw(b,this.player,uw,this))&&
19
19
  b.severity===_.F&&(this.f=!0)}H(){this.player.isEnded()||(this.l(_.Sf),this.fireSeekBegin())}w(){this.a||(this.a=new _.St);return this.a}G(){this.l(_.Rf);this.fireSeekEnd()}B(b){uw.debug("adsTimeline",b);this.h=(b=b.adsTimeline)&&b.Kb()}C(b){uw.debug("Casting",b);this.fireCasted()}l(b,...c){uw.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},uw=new _.S("clpp.npaw.NpawAdapter");var xw=()=>{class a extends NpawPluginAdapters.ads.Ima{constructor(){super();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.ib(),this.a.hb(),this.a.Ta()));return b}getBitrate(){let b=null;this.a&&(b=this.a.Ta());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());
20
20
  return b}getTitle(){let b=null;this.a&&(b=this.a.getTitle());return b}getProvider(){let b=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.Ua()){case 0:c=b.Preroll;break;case 2:c=b.Postroll;break;case 1:c=b.Midroll}ww.debug("Ad position",c);return c}getIsSkippable(){return this.a&&
21
21
  -1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const b=this.player.getAdsManager();return b&&0<b.getVolume()}getExpectedBreaks(){return this.h&&this.h.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.jb()}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();
22
- b=this.getNpawUtils().calculateAdViewability(b);ww.debug(kw,b);return b}getPlayerName(){return _.qa}getVersion(){return"castlabs-ads-adapter-6.25.0-js"}getPlayerVersion(){return _.ea}B(){this.j||(this.j=new _.St);return this.j}registerListeners(){const b=this.B();this.player&&b&&(b.on(this.player,_.Fc,this.R.bind(this)),b.on(this.player,_.zc,this.O.bind(this)),b.on(this.player,_.vc,this.K.bind(this)),b.on(this.player,_.xc,this.L.bind(this)),b.on(this.player,_.nc,this.I.bind(this)),b.on(this.player,
22
+ b=this.getNpawUtils().calculateAdViewability(b);ww.debug(kw,b);return b}getPlayerName(){return _.qa}getVersion(){return"castlabs-ads-adapter-6.25.1-js"}getPlayerVersion(){return _.ea}B(){this.j||(this.j=new _.St);return this.j}registerListeners(){const b=this.B();this.player&&b&&(b.on(this.player,_.Fc,this.R.bind(this)),b.on(this.player,_.zc,this.O.bind(this)),b.on(this.player,_.vc,this.K.bind(this)),b.on(this.player,_.xc,this.L.bind(this)),b.on(this.player,_.nc,this.I.bind(this)),b.on(this.player,
23
23
  _.oc,this.w.bind(this,1)),b.on(this.player,_.uc,this.w.bind(this,2)),b.on(this.player,_.Dc,this.w.bind(this,3)),b.on(this.player,_.mc,this.H.bind(this)),b.on(this.player,_.yc,this.M.bind(this)),b.on(this.player,_.q,this.J.bind(this)),b.on(this.player,_.jc,this.C.bind(this)),b.on(this.player,_.kc,this.F.bind(this)),b.on(this.player,_.lc,this.G.bind(this)),b.on(this.player,_.wc,this.S.bind(this)))}unregisterListeners(){_.Th(this.B())}R(b){ww.debug(fw,b);this.h=b.adsTimeline}O(b){this.a=b.ad;this.f("ad start",
24
24
  this.a);this.fireStart();this.fireJoin()}I(){this.f("ad ended");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(dw);this.fireBufferBegin()}S(){this.l=this.getPlayhead();this.A()}A(){this.o&&(this.f(cw),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.ub();ww.debug(ew,b);this.fireClick(b)}M(){this.f("ad skipped");
25
25
  this.fireSkip()}C(b){this.a=b.ad;this.f(bw,this.a);this.fireBreakStart()}F(){this.f("ad break stop");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&&rw(b,this.player,ww,this)}f(b,...c){ww.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},ww=new _.S("clpp.npaw.NpawAdsAdapter");var yw=class extends _.Zv{constructor(){super();this.a=null;this.g=new _.S(gw);this.m=null}bf(a){nw(this);if(this.a=a)this.a.registerAdapterFromClass(this.m,vw()),this.a.registerAdsAdapterFromClass(this.m,xw())}uh(){return this.a}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;ow(this,a)&&(a=a.getConfiguration().youbora,this.bf(new NpawPlugin(a.accountCode)))}onContentWillLoad(a,b){if(ow(this,a)){a=a.getConfiguration();
package/clpp.styles.css CHANGED
@@ -45,6 +45,10 @@
45
45
  margin: 1.5%;
46
46
  }
47
47
 
48
+ .clpp-text-wrapper {
49
+ unicode-bidi: plaintext;
50
+ }
51
+
48
52
  .clpp-text-cue {
49
53
  display: inline;
50
54
  unicode-bidi: plaintext;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@castlabs/prestoplay",
3
3
  "description": "PRESTOplay Video Player",
4
- "version": "6.25.0",
4
+ "version": "6.25.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/castlabs/prestoplay-web.git"
package/typings.d.ts CHANGED
@@ -3987,21 +3987,19 @@ export namespace clpp {
3987
3987
  setCdnErrorCallback(callback: Function|null): void;
3988
3988
  /**
3989
3989
  * Sets the DRM custom data modifier.
3990
- * The callback is trigger
3991
- * when connecting to an AirPlay device and
3992
- * when disconnecting from it.
3993
- * This is especially useful when you want to generate
3994
- * a new auth token for the upcoming license acquisition.
3995
- * The AirPlay plugin has be enabled in order
3996
- * to track AirPlay status.
3990
+ * This modifier can be used to enable AirPlay of DRM-protected streams
3991
+ * with upfront authorization tokens where it is necessary to generate
3992
+ * and provide a new auth token for the AirPlay session.
3993
+ * The AirPlay plugin must be enabled, otherwise the modifier callback
3994
+ * won't trigger at all.
3997
3995
  *
3998
3996
  * @param modifier The callback which can adjust DRM custom data
3999
3997
  * before the upcoming license acquisition.
4000
3998
  *
4001
- * @example // New auth token
3999
+ * @example // Generate a new upfront auth token for AirPlay session
4002
4000
  *
4003
4001
  * player.setDrmCustomDataModifier(async customData => {
4004
- * customData.authToken = await generateNewAuthToken ();
4002
+ * customData.authToken = await generateNewAuthToken();
4005
4003
  * });
4006
4004
  */
4007
4005
  setDrmCustomDataModifier(modifier: Function): void;
@@ -8448,8 +8446,8 @@ export namespace clpp {
8448
8446
  LEFT = "left",
8449
8447
  RIGHT = "right",
8450
8448
  CENTER = "center",
8451
- START = "left",
8452
- END = "right",
8449
+ START = "start",
8450
+ END = "end",
8453
8451
  }
8454
8452
 
8455
8453
  export enum writingMode {