@castlabs/prestoplay 6.22.0 → 6.23.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +116 -116
  6. package/cjs/cl.conviva.js +32 -33
  7. package/cjs/cl.core.js +592 -590
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +86 -80
  10. package/cjs/cl.externs.js +43 -36
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +71 -70
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -29
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +342 -328
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +16 -16
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +72 -72
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +12 -13
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +4 -4
  32. package/cjs/cl.youbora.js +37 -37
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +5 -5
  36. package/cl.cast.js +86 -86
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +474 -472
  39. package/cl.crypto.js +9 -9
  40. package/cl.dash.js +80 -75
  41. package/cl.externs.js +43 -36
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +74 -74
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +16 -16
  47. package/cl.mse.js +303 -290
  48. package/cl.muxdata.js +13 -13
  49. package/cl.onboard.js +4 -4
  50. package/cl.persistent.js +10 -10
  51. package/cl.playlist.js +5 -5
  52. package/cl.sessions.js +10 -10
  53. package/cl.simid.js +13 -13
  54. package/cl.smooth.js +59 -59
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +15 -15
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +27 -26
  64. package/package.json +1 -1
  65. package/typings.d.ts +53 -6
package/cl.vtt.js CHANGED
@@ -1,12 +1,12 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Pv=" The setting will be ignored.",Qv="VTT parser encountered an invalid VTT setting: ",Rv="application/x-subrip",Sv="text/srt",Tv='text/vtt; codecs\x3d"vtt"',Uv='text/vtt; codecs\x3d"wvtt"',Vv=function(a){return a.a===a.f.length?null:(a=_.fj(a,/[^ \t\n]*/gm))?a[0]:null},Wv=function(a){_.fj(a,/[ \t]+/gm)},Xv=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
- 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},Yv=function(a){a=_.fj(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)},$v=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"===b?a.textAlign=_.mt:a.textAlign=_.st[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"===d[1]?_.lg:_.mg;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===_.ke||b===_.Of?_.ke:b===_.le||b===_.Wd?
4
- _.le:_.dd);else if(d=/^region:(.*)$/.exec(b)){if(b=Zv(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=_.tt[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.ot,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.tt[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Zv=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
- b," The region will be ignored."),null)},bw=function(a,b,c){let d,e,f;(new _.nm).N("payl",_.im(g=>{d=_.Li(g)})).N("iden",_.im(g=>{e=_.Li(g)})).N("sttg",_.im(g=>{f=_.Li(g)})).parse(a);return d?aw(d,e,f,b,c):null},aw=function(a,b,c,d,e){a=new _.rt(d,e,a,_.wg);b&&(a.id=b);if(c)for(b=new _.gj(c),c=Vv(b);c;)$v(a,c,[])||_.C(Qv,c,Pv),Wv(b),c=Vv(b);return a},cw=class{a(a){a=_.Li(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
- "WEBVTT\n\n";for(const c of a)b+=Xv(c)}return _.Pi(b)}},dw=class{create(){return new cw}probe(a,b){return(a===Sv||a===Rv)&&b===_.Xf}};var ew=class{constructor(a){this.a=a}parseInit(){}parseMedia(a,b){a=_.Li(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=Yv(new _.gj(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+=
7
- 8589934592;a=b.periodStart+e/9E4-a}}else this.a.streaming.relativeTextTimestamp&&null!==b.segmentStart&&(a=b.segmentStart);b=[];for(var f of c)if(/^region/.test(f.toLowerCase())){e=new _.gj(f.replace(/\n/g," "));d=new _.wt;Vv(e);Wv(e);for(var g=Vv(e);g;){a:{var h;var k=d;var l=g;if(h=/^id:(.*)$/.exec(l))k.id=h[1];else if(h=/^width:(\d{1,2}|100)%$/.exec(l))k.width=Number(h[1]);else if(h=/^lines:(\d+)$/.exec(l))k.height=Number(h[1]),k.heightUnits=2;else if(h=/^regionanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))k.regionAnchorX=
8
- Number(h[1]),k.regionAnchorY=Number(h[2]);else if(h=/^viewportanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))k.viewportAnchorX=Number(h[1]),k.viewportAnchorY=Number(h[2]);else if(/^scroll:up$/.exec(l))k.scroll="up";else{k=!1;break a}k=!0}k||_.C("VTT parser encountered an invalid VTTRegion setting: ",g,Pv);Wv(e);g=Vv(e)}e=d;b.push(e)}f=[];for(var m of c)if(/^style/.test(m.toLowerCase())){e=m.replace(/^style/i,"").replace(/\n/g," ");d=/[^{}]+{[^{}]*}/g;do(g=d.exec(e))&&f.push(g[0]);while(g)}m=[];for(const n of c)if(n.includes("--\x3e")){a:{l=
9
- n.split("\n");h=a;c=b;if(1===l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"===l[0]){c=null;break a}e=null;l[0].includes("--\x3e")||(e=l[0],l.splice(0,1));d=new _.gj(l[0]);g=Yv(d);const q=_.fj(d,/[ \t]+--\x3e[ \t]+/g);k=Yv(d);if(null==g||null==q||null==k)throw new _.I(_.F,2,2001);g+=h;k+=h;l=l.slice(1).join("\n").trim();g=new _.rt(g,k,l,_.wg);e&&(g.id=e);Wv(d);for(k=Vv(d);k;)$v(g,k,c)||_.C(Qv,k,Pv),Wv(d),k=Vv(d);null!=e&&(g.id=e);c=g}c&&m.push(c)}return{cues:m,styles:f}}};var fw=class extends ew{parseMedia(a,b){return super.parseMedia((new cw).a(a),b)}};var gw=class{constructor(){this.a=null;this.g=new _.S("clpp.vtt.mp4")}parseInit(a){let b=!1;(new _.nm).N(_.Ce,_.gm).N(_.$f,_.gm).N(_.xe,_.gm).da("mdhd",c=>{0===c.version?(c.reader.skip(4),c.reader.skip(4),this.a=_.P(c.reader),c.reader.skip(4)):(c.reader.skip(8),c.reader.skip(8),this.a=_.P(c.reader),c.reader.skip(8));c.reader.skip(4)}).N(_.Be,_.gm).N(_.Rf,_.gm).da(_.Tf,_.hm).N("wvtt",()=>{b=!0}).parse(a);if(!this.a)throw new _.I(_.F,2,2008);if(!b)throw new _.I(_.F,2,2008);}parseMedia(a,b){if(!this.a)throw this.g.error("No init segment for MP4+VTT!"),
10
- new _.I(_.F,2,2008);let c=0,d=[],e;const f=[];let g=!1,h=!1,k=!1,l=null;(new _.nm).N("moof",_.gm).N("traf",_.gm).da("tfdt",q=>{g=!0;c=0===q.version?_.P(q.reader):_.bm(q.reader)}).da("tfhd",q=>{var u=q.flags;q=q.reader;q.skip(4);u&1&&q.skip(8);u&2&&q.skip(4);l=u&8?_.P(q):null}).da("trun",q=>{h=!0;{var u=q.version,v=q.flags;q=q.reader;const y=_.P(q);v&1&&q.skip(4);v&4&&q.skip(4);const A=[];for(let D=0;D<y;D++){const H={duration:null,sampleSize:null,Te:null};v&256&&(H.duration=_.P(q));v&512&&(H.sampleSize=
11
- _.P(q));v&1024&&q.skip(4);v&2048&&(H.Te=0===u?_.P(q):_.am(q));A.push(H)}d=A}}).N(_.we,_.im(q=>{k=!0;e=q})).parse(a);if(!k&&!g&&!h)throw new _.I(_.F,2,2008);a=c;var m=new DataView(e.buffer,e.byteOffset,e.byteLength);m=new _.$m(m,!1);for(const q of d){const u=q.duration||l,v=q.Te?c+q.Te:a;a=v+(u||0);let y=0;do{const A=_.P(m);y+=A;var n=_.P(m);n=_.fm(n);let D=null;"vttc"===n?8<A&&(D=_.dm(m,A-8)):("vtte"!==n&&this.g.error("Unknown box "+n+"! Skipping!"),m.skip(A-8));u?D&&f.push(bw(D,b.periodStart+v/this.a,
12
- b.periodStart+a/this.a)):this.g.error("WVTT sample duration unknown, and no default found!")}while(q.sampleSize&&y<q.sampleSize)}return{cues:f.filter(_.di),styles:[]}}};_.z("clpp.vtt.VttComponent",class extends _.Iu{constructor(){super();this.j=new dw}f(){_.Xs(_.Xf,ew);_.Xs(Tv,ew);_.Xs(Uv,ew);_.Xs(_.Fc,gw);_.Xs(Sv,fw);_.Xs(Rv,fw);_.fk.push(this.j)}a(){_.Zs(_.Xf);_.Zs(Tv);_.Zs(Uv);_.Zs(_.Fc);_.Zs(Sv);_.Zs(Rv);_.hk(this.j)}id(){return"subtitles-vtt"}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var kw=" The setting will be ignored.",lw="VTT parser encountered an invalid VTT setting: ",mw="application/x-subrip",nw="text/srt",ow='text/vtt; codecs\x3d"vtt"',pw='text/vtt; codecs\x3d"wvtt"',qw=function(a){return a.a===a.f.length?null:(a=_.lj(a,/[^ \t\n]*/gm))?a[0]:null},rw=function(a){_.lj(a,/[ \t]+/gm)},sw=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
+ 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},tw=function(a){a=_.lj(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)},vw=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"===b?a.textAlign=_.At:a.textAlign=_.Gt[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"===d[1]?_.pg:_.qg;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===_.pe||b===_.Rf?_.pe:b===_.qe||b===_.ae?
4
+ _.qe:_.ed);else if(d=/^region:(.*)$/.exec(b)){if(b=uw(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=_.Ht[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.Ct,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.Ht[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},uw=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
+ b," The region will be ignored."),null)},xw=function(a,b,c){let d,e,f;(new _.um).N("payl",_.pm(g=>{d=_.Ri(g)})).N("iden",_.pm(g=>{e=_.Ri(g)})).N("sttg",_.pm(g=>{f=_.Ri(g)})).parse(a);return d?ww(d,e,f,b,c):null},ww=function(a,b,c,d,e){a=new _.Ft(d,e,a,_.Ag);b&&(a.id=b);if(c)for(b=new _.mj(c),c=qw(b);c;)vw(a,c,[])||_.C(lw,c,kw),rw(b),c=qw(b);return a},yw=class{a(a){a=_.Ri(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
+ "WEBVTT\n\n";for(const c of a)b+=sw(c)}return _.Vi(b)}},zw=class{create(){return new yw}probe(a,b){return(a===nw||a===mw)&&b===_.$f}};var Aw=class{constructor(a){this.a=a}parseInit(){}parseMedia(a,b){a=_.Ri(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 _.H(_.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=tw(new _.mj(d[1]));if(null==a)throw new _.H(_.F,2,2E3);e=Number(e[1]);for(d=b.segmentStart;95443.7176888889<=d;)d-=95443.7176888889,e+=
7
+ 8589934592;a=b.periodStart+e/9E4-a}}else this.a.streaming.relativeTextTimestamp&&null!==b.segmentStart&&(a=b.segmentStart);b=[];for(var f of c)if(/^region/.test(f.toLowerCase())){e=new _.mj(f.replace(/\n/g," "));d=new _.Kt;qw(e);rw(e);for(var g=qw(e);g;){a:{var h;var k=d;var l=g;if(h=/^id:(.*)$/.exec(l))k.id=h[1];else if(h=/^width:(\d{1,2}|100)%$/.exec(l))k.width=Number(h[1]);else if(h=/^lines:(\d+)$/.exec(l))k.height=Number(h[1]),k.heightUnits=2;else if(h=/^regionanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))k.regionAnchorX=
8
+ Number(h[1]),k.regionAnchorY=Number(h[2]);else if(h=/^viewportanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))k.viewportAnchorX=Number(h[1]),k.viewportAnchorY=Number(h[2]);else if(/^scroll:up$/.exec(l))k.scroll="up";else{k=!1;break a}k=!0}k||_.C("VTT parser encountered an invalid VTTRegion setting: ",g,kw);rw(e);g=qw(e)}e=d;b.push(e)}f=[];for(var m of c)if(/^style/.test(m.toLowerCase())){e=m.replace(/^style/i,"").replace(/\n/g," ");d=/[^{}]+{[^{}]*}/g;do(g=d.exec(e))&&f.push(g[0]);while(g)}m=[];for(const n of c)if(n.includes("--\x3e")){a:{l=
9
+ n.split("\n");h=a;c=b;if(1===l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"===l[0]){c=null;break a}e=null;l[0].includes("--\x3e")||(e=l[0],l.splice(0,1));d=new _.mj(l[0]);g=tw(d);const q=_.lj(d,/[ \t]+--\x3e[ \t]+/g);k=tw(d);if(null==g||null==q||null==k)throw new _.H(_.F,2,2001);g+=h;k+=h;l=l.slice(1).join("\n").trim();g=new _.Ft(g,k,l,_.Ag);e&&(g.id=e);rw(d);for(k=qw(d);k;)vw(g,k,c)||_.C(lw,k,kw),rw(d),k=qw(d);null!=e&&(g.id=e);c=g}c&&m.push(c)}return{cues:m,styles:f}}};var Bw=class extends Aw{parseMedia(a,b){return super.parseMedia((new yw).a(a),b)}};var Cw=class{constructor(){this.a=null;this.g=new _.S("clpp.vtt.mp4")}parseInit(a){let b=!1;(new _.um).N(_.Ge,_.nm).N(_.cg,_.nm).N(_.Be,_.nm).ca("mdhd",c=>{0===c.version?(c.reader.skip(4),c.reader.skip(4),this.a=_.P(c.reader),c.reader.skip(4)):(c.reader.skip(8),c.reader.skip(8),this.a=_.P(c.reader),c.reader.skip(8));c.reader.skip(4)}).N(_.Fe,_.nm).N(_.Uf,_.nm).ca(_.Wf,_.om).N("wvtt",()=>{b=!0}).parse(a);if(!this.a)throw new _.H(_.F,2,2008);if(!b)throw new _.H(_.F,2,2008);}parseMedia(a,b){if(!this.a)throw this.g.error("No init segment for MP4+VTT!"),
10
+ new _.H(_.F,2,2008);let c=0,d=[],e;const f=[];let g=!1,h=!1,k=!1,l=null;(new _.um).N("moof",_.nm).N("traf",_.nm).ca("tfdt",q=>{g=!0;c=0===q.version?_.P(q.reader):_.im(q.reader)}).ca("tfhd",q=>{var u=q.flags;q=q.reader;q.skip(4);u&1&&q.skip(8);u&2&&q.skip(4);l=u&8?_.P(q):null}).ca("trun",q=>{h=!0;{var u=q.version,v=q.flags;q=q.reader;const y=_.P(q);v&1&&q.skip(4);v&4&&q.skip(4);const A=[];for(let D=0;D<y;D++){const I={duration:null,sampleSize:null,af:null};v&256&&(I.duration=_.P(q));v&512&&(I.sampleSize=
11
+ _.P(q));v&1024&&q.skip(4);v&2048&&(I.af=0===u?_.P(q):_.hm(q));A.push(I)}d=A}}).N(_.Ae,_.pm(q=>{k=!0;e=q})).parse(a);if(!k&&!g&&!h)throw new _.H(_.F,2,2008);a=c;var m=new DataView(e.buffer,e.byteOffset,e.byteLength);m=new _.rn(m,!1);for(const q of d){const u=q.duration||l,v=q.af?c+q.af:a;a=v+(u||0);let y=0;do{const A=_.P(m);y+=A;var n=_.P(m);n=_.mm(n);let D=null;"vttc"===n?8<A&&(D=_.km(m,A-8)):("vtte"!==n&&this.g.error("Unknown box "+n+"! Skipping!"),m.skip(A-8));u?D&&f.push(xw(D,b.periodStart+v/this.a,
12
+ b.periodStart+a/this.a)):this.g.error("WVTT sample duration unknown, and no default found!")}while(q.sampleSize&&y<q.sampleSize)}return{cues:f.filter(_.ji),styles:[]}}};_.z("clpp.vtt.VttComponent",class extends _.pv{constructor(){super();this.j=new zw}f(){_.kt(_.$f,Aw);_.kt(ow,Aw);_.kt(pw,Aw);_.kt(_.Ic,Cw);_.kt(nw,Bw);_.kt(mw,Bw);_.lk.push(this.j)}a(){_.mt(_.$f);_.mt(ow);_.mt(pw);_.mt(_.Ic);_.mt(nw);_.mt(mw);_.nk(this.j)}id(){return"subtitles-vtt"}});};f.call(g, window);
package/cl.yospace.js CHANGED
@@ -1,3 +1,3 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Lv="clpp.yospace.YospacePlugin",Ov=class extends _.iv{constructor(){super();this.a=null;this.g=new _.S(Lv)}Gf(){return this.a}onContentWillLoad(a,b){const c=this;return _.x(function*(){var d=a.getConfiguration().yospace;if(d.enabled){if(typeof window.YospaceAdManagement!==_.Ge)throw new _.I(_.F,9,7003,"Yospace SDK not found.");c.g.info("Yospace enabled.");a:{d=d.streamType||Mv;var e=b.url;c.g.info("Creating Yospace session for stream type",d);switch(d){case Mv:d=YospaceAdManagement.SessionVOD.create(e);
2
- break a;case Nv:d=YospaceAdManagement.SessionLive.create(e);break a;default:d=YospaceAdManagement.SessionDVRLive.create(e)}}d=yield d;e=d.getSessionState();if(e!==YospaceAdManagement.SessionState.INITIALISED)throw c.g.error("Failed to initialize Yospace session. State:",e,"URL",b.url),new _.I(_.F,9,7003,"Yospace session failed to initialize.");a.trigger(new _.E(_.Jg,{detail:d}));b.url=d.getPlaybackUrl();c.g.info("Yospace session initialized. New URL:",b.url);c.a=d}})}onPlayerWillRelease(a){if(this.a){this.g.info("Shutting down Yospace session.");
3
- const b=this.a;this.a.shutdown();this.a=null;a.trigger(new _.E(_.Ig,{detail:b}))}}id(){return"yospace"}};_.z(Lv,Ov);Ov.prototype.getSession=Ov.prototype.Gf;Ov.Id="yospace";_.Yq(new class{create(){return new Ov}});var Mv=_.Tb,Nv="LIVE";_.z("clpp.yospace.StreamType",{VOD:Mv,LIVE:Nv,DVR:"DVR"});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var gw="clpp.yospace.YospacePlugin",jw=class extends _.Fv{constructor(){super();this.a=null;this.g=new _.S(gw)}Of(){return this.a}onContentWillLoad(a,b){const c=this;return _.x(function*(){var d=a.getConfiguration().yospace;if(d.enabled){if(typeof window.YospaceAdManagement!==_.Ke)throw new _.H(_.F,9,7003,"Yospace SDK not found.");c.g.info("Yospace enabled.");a:{d=d.streamType||hw;var e=b.url;c.g.info("Creating Yospace session for stream type",d);switch(d){case hw:d=YospaceAdManagement.SessionVOD.create(e);
2
+ break a;case iw:d=YospaceAdManagement.SessionLive.create(e);break a;default:d=YospaceAdManagement.SessionDVRLive.create(e)}}d=yield d;e=d.getSessionState();if(e!==YospaceAdManagement.SessionState.INITIALISED)throw c.g.error("Failed to initialize Yospace session. State:",e,"URL",b.url),new _.H(_.F,9,7003,"Yospace session failed to initialize.");a.trigger(new _.E(_.Ng,{detail:d}));b.url=d.getPlaybackUrl();c.g.info("Yospace session initialized. New URL:",b.url);c.a=d}})}onPlayerWillRelease(a){if(this.a){this.g.info("Shutting down Yospace session.");
3
+ const b=this.a;this.a.shutdown();this.a=null;a.trigger(new _.E(_.Mg,{detail:b}))}}id(){return"yospace"}};_.z(gw,jw);jw.prototype.getSession=jw.prototype.Of;jw.Id="yospace";_.ur(new class{create(){return new jw}});var hw=_.Sb,iw="LIVE";_.z("clpp.yospace.StreamType",{VOD:hw,LIVE:iw,DVR:"DVR"});};f.call(g, window);
package/cl.youbora.js CHANGED
@@ -1,27 +1,28 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var jv="Unhandled state",kv="accountCode key is missing in Youbora config",lv="ad break start",mv="ad buffering ended",nv="ad buffering started",ov="ad click through url: ",pv="ad timeline changed",qv="clpp.npaw.NpawPlugin",rv="clpp.npaw.YouboraPlugin",sv="content.isLive",uv="content.title",vv="is container visible",wv="youbora",xv=function(a){return a.startsWith(_.zd)?"Widevine":a.startsWith(_.ud)?"FairPlay":a.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":a.startsWith(_.Oe)?
2
- "ClearKey":a.startsWith(_.td)?"Primetime":a},yv=function(a){a.a&&(a.g.info("Removing NPAW Plugins",a.a),a.a.removeAdsAdapter(),a.a.removeAdapter())},zv=function(a,b){if(b.namespace()===_.ld)return a.g.info("NPAW does not report when casting."),!1;const c=b.getConfiguration().youbora;return _.Zg(c)?c.accountCode?_.B(window.NpawPlugin)||_.B(window.NpawPluginAdapters)?(a.g.warn("NPAW SDK not found."),b.onError(new _.I(1,9,9100)),!1):!0:(a.g.warn(kv),b.onError(new _.I(1,9,9101)),!1):(a.g.warn("NPAW plugin is loaded but not configured. Will do nothing."),
3
- !1)},Av=function(a,b){if(b.namespace()===_.ld)return a.g.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.Zg(c))return a.g.debug("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.g.warn(kv),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
- `version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.I(1,9,9102)));return!0},Bv=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),Cv=(a,b,c,d)=>{b=Bv(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.r;b.severity===_.F?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,
5
- b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var Dv=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.a=new _.jt;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.la())&&(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.Ga())?c.frameRate:null}getPlayerName(){return _.pa}getVersion(){return"6.22.0-castlabsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.m&&this.a&&(this.g.debug("registering listeners"),
7
- youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Pf,this.I.bind(this)),this.a.on(this.m,_.r,this.F.bind(this)),this.a.on(this.m,_.ig,this.H.bind(this)),this.a.on(this.m,_.hg,this.G.bind(this)),this.a.on(this.m,_.xc,this.B.bind(this)),this.a.on(this.m,_.$c,this.C.bind(this)))}unregisterListeners(){this.g.debug(_.Pb);_.uh(this.a)}dispose(){super.dispose()}j(){return this.m.getStats()||_.po()}w(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;this.l("state change",c);if(c)switch(c.currentState){case _.Do:this.w()&&
8
- this.f();break;case _.Fo:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.Eo:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.Co:this.fireBufferEnd();this.fireStop();break;case _.uo:this.fireBufferEnd();this.o&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.xo:this.fireBufferBegin();break;default:this.g.debug(jv,c)}}f(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.m.getDrmInfo();c&&(c=xv(c.keySystem))&&
9
- this.plugin.setOptions({"content.drm":c});this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=Cv(c,this.m,this.g,this))&&c.severity===_.F&&(this.h=!0)}H(){this.m.isEnded()||(this.l(_.Hf),this.f(),this.fireSeekBegin())}G(){this.l(_.Gf);this.fireSeekEnd()}B(c){this.g.debug("adsTimeline",c);this.o=(c=c.adsTimeline)&&c.Fb()}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 Ev=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.j=this.a=null;this.f=new _.jt;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.eb(),this.a.cb(),this.a.Qa()));return c}getBitrate(){return this.a&&this.a.Qa()}getPlayhead(){const c=this.m.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Gv="Unhandled state",Hv="accountCode key is missing in Youbora config",Iv="ad break start",Jv="ad buffering ended",Kv="ad buffering started",Lv="ad click through url: ",Mv="ad timeline changed",Nv="clpp.npaw.NpawPlugin",Ov="clpp.npaw.YouboraPlugin",Pv="content.isLive",Qv="content.title",Rv="is container visible",Sv="youbora",Tv=function(a){return a.startsWith(_.Cd)?"Widevine":a.startsWith(_.wd)?"FairPlay":a.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":a.startsWith(_.Te)?
2
+ "ClearKey":a.startsWith(_.vd)?"Primetime":a},Uv=function(a){a.a&&(a.g.info("Removing NPAW Plugins",a.a),a.a.removeAdsAdapter(),a.a.removeAdapter())},Vv=function(a,b){if(b.namespace()===_.md)return a.g.info("NPAW does not report when casting."),!1;const c=b.getConfiguration().youbora;return _.eh(c)?c.accountCode?_.B(window.NpawPlugin)||_.B(window.NpawPluginAdapters)?(a.g.warn("NPAW SDK not found."),b.onError(new _.H(1,9,9100)),!1):!0:(a.g.warn(Hv),b.onError(new _.H(1,9,9101)),!1):(a.g.warn("NPAW plugin is loaded but not configured. Will do nothing."),
3
+ !1)},Wv=function(a,b){if(b.namespace()===_.md)return a.g.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.eh(c))return a.g.debug("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.g.warn(Hv),b.onError(new _.H(1,9,9101)),!1;if(_.B(window.youbora))return a.g.warn("Youbora SDK not found."),b.onError(new _.H(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
+ `version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.H(1,9,9102)));return!0},Xv=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),Yv=(a,b,c,d)=>{b=Xv(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.r;b.severity===_.F?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,
5
+ b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var Zv=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.a=new _.xt;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.la())&&(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.Ha())?c.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"6.23.1-castlabsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&this.a&&(this.g.debug("registering listeners"),
7
+ youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Sf,this.I.bind(this)),this.a.on(this.m,_.r,this.F.bind(this)),this.a.on(this.m,_.lg,this.H.bind(this)),this.a.on(this.m,_.kg,this.G.bind(this)),this.a.on(this.m,_.Ac,this.B.bind(this)),this.a.on(this.m,_.Zc,this.C.bind(this)))}unregisterListeners(){this.g.debug(_.Ob);_.Ah(this.a)}dispose(){super.dispose()}j(){return this.m.getStats()||_.No()}w(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;this.l("state change",c);if(c)switch(c.currentState){case _.Zo:this.w()&&
8
+ this.f();break;case _.ap:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.$o:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.Yo:this.fireBufferEnd();this.fireStop();break;case _.Qo:this.fireBufferEnd();this.o&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Uo:this.fireBufferBegin();break;default:this.g.debug(Gv,c)}}f(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.m.getDrmInfo();c&&(c=Tv(c.keySystem))&&
9
+ this.plugin.setOptions({"content.drm":c});this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=Yv(c,this.m,this.g,this))&&c.severity===_.F&&(this.h=!0)}H(){this.m.isEnded()||(this.l(_.Kf),this.f(),this.fireSeekBegin())}G(){this.l(_.Jf);this.fireSeekEnd()}B(c){this.g.debug("adsTimeline",c);this.o=(c=c.adsTimeline)&&c.Eb()}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 $v=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.j=this.a=null;this.f=new _.xt;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.bb(),this.a.ab(),this.a.Qa()));return c}getBitrate(){return this.a&&this.a.Qa()}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.Ra()){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.fb()}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(vv,c);return c}getPlayerName(){return _.pa}getVersion(){return"6.22.0-castlabsadsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.m&&
12
- this.f&&(this.f.on(this.m,_.xc,this.M.bind(this)),this.f.on(this.m,_.tc,this.L.bind(this)),this.f.on(this.m,_.oc,this.I.bind(this)),this.f.on(this.m,_.rc,this.J.bind(this)),this.f.on(this.m,_.gc,this.G.bind(this)),this.f.on(this.m,_.hc,this.o.bind(this,1)),this.f.on(this.m,_.nc,this.o.bind(this,2)),this.f.on(this.m,_.vc,this.o.bind(this,3)),this.f.on(this.m,_.fc,this.F.bind(this)),this.f.on(this.m,_.sc,this.K.bind(this)),this.f.on(this.m,_.r,this.H.bind(this)),this.f.on(this.m,_.cc,this.A.bind(this)),
13
- this.f.on(this.m,_.dc,this.B.bind(this)),this.f.on(this.m,_.ec,this.C.bind(this)),this.f.on(this.m,_.qc,this.w.bind(this)))}unregisterListeners(){_.uh(this.f)}dispose(){super.dispose()}M(c){this.g.debug(pv,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(nv);this.fireBufferBegin()}w(){this.l&&
14
- (this.h(mv),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.ob();this.g.debug(ov,c);this.fireClick(c)}K(){this.h("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.h(lv,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&&Cv(c,this.m,this.g,this)}h(c,
15
- ...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var Gv=()=>{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.la())&&(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.Ga())?b.frameRate:null}getPlayerName(){return _.pa}getVersion(){return"castlabs-adapter-6.22.0-js"}getPlayerVersion(){return _.da}registerListeners(){const b=this.w();this.player&&b&&(b.on(this.player,_.Pf,this.I.bind(this)),b.on(this.player,
17
- _.r,this.F.bind(this)),b.on(this.player,_.ig,this.H.bind(this)),b.on(this.player,_.hg,this.G.bind(this)),b.on(this.player,_.xc,this.B.bind(this)),b.on(this.player,_.$c,this.C.bind(this)))}unregisterListeners(){Fv.debug(_.Pb);_.uh(this.w())}dispose(){this.unregisterListeners();this.f=this.h=!1;this.a=null}j(){return this.player.getStats()||_.po()}o(){return!!this.player.getConfiguration().autoplay}I(b){b=b.detail;this.l("state change",b);if(b)switch(b.currentState){case _.Do:this.o()&&this.fireInit();
18
- break;case _.Fo:this.fireInit();this.A();this.fireResume();this.fireBufferEnd();break;case _.Eo:this.o()&&this.fireInit();this.A();this.fireBufferEnd();this.firePause();break;case _.Co:this.fireBufferEnd();this.fireStop();break;case _.uo:this.fireBufferEnd();this.h&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.xo:this.fireBufferBegin();break;default:Fv.debug(jv,b)}}A(){var b=this.player.getDrmInfo();b&&(b=xv(b.keySystem))&&this.plugin.setAnalyticsOptions({"content.drm":b});
19
- this.fireJoin()}F(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=Cv(b,this.player,Fv,this))&&b.severity===_.F&&(this.f=!0)}H(){this.player.isEnded()||(this.l(_.Hf),this.fireInit(),this.fireSeekBegin())}w(){this.a||(this.a=new _.jt);return this.a}G(){this.l(_.Gf);this.fireSeekEnd()}B(b){Fv.debug("adsTimeline",b);this.h=(b=b.adsTimeline)&&b.Fb()}C(b){Fv.debug("Casting",b);this.fireCasted()}l(b,...c){Fv.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},Fv=new _.S("clpp.npaw.NpawAdapter");var Iv=()=>{class a extends NpawPluginAdapters.ads.Ima{constructor(){super();this.j=this.h=this.a=null;this.l=!1}getDuration(){return this.a?this.a.getDuration():null}getRendition(){let b=null;this.a&&(b=this.getNpawUtils().buildRenditionString(this.a.eb(),this.a.cb(),this.a.Qa()));return b}getBitrate(){let b=null;this.a&&(b=this.a.Qa());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=
20
- 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.Ra()){case 0:c=b.Preroll;break;case 2:c=b.Postroll;break;case 1:c=b.Midroll}Hv.debug("Ad position",c);return c}getIsSkippable(){return this.a&&-1!==
21
- 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.fb()}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);Hv.debug(vv,b);return b}getPlayerName(){return _.pa}getVersion(){return"castlabs-ads-adapter-6.22.0-js"}getPlayerVersion(){return _.da}A(){this.j||(this.j=new _.jt);return this.j}registerListeners(){const b=this.A();this.player&&b&&(b.on(this.player,_.xc,this.P.bind(this)),b.on(this.player,_.tc,this.M.bind(this)),b.on(this.player,_.oc,this.J.bind(this)),b.on(this.player,_.rc,this.K.bind(this)),b.on(this.player,_.gc,this.H.bind(this)),b.on(this.player,
23
- _.hc,this.o.bind(this,1)),b.on(this.player,_.nc,this.o.bind(this,2)),b.on(this.player,_.vc,this.o.bind(this,3)),b.on(this.player,_.fc,this.G.bind(this)),b.on(this.player,_.sc,this.L.bind(this)),b.on(this.player,_.r,this.I.bind(this)),b.on(this.player,_.cc,this.B.bind(this)),b.on(this.player,_.dc,this.C.bind(this)),b.on(this.player,_.ec,this.F.bind(this)),b.on(this.player,_.qc,this.w.bind(this)))}unregisterListeners(){_.uh(this.A())}P(b){Hv.debug(pv,b);this.h=b.adsTimeline}M(b){this.a=b.ad;this.f("ad start",
24
- this.a);this.fireStart();this.fireJoin()}H(){this.f("ad ended");this.fireStop()}J(){this.f("ad pause");this.w();this.firePause()}K(){this.f("ad resume");this.w();this.fireResume()}F(){this.l=!0;this.f(nv);this.fireBufferBegin()}w(){this.l&&(this.f(mv),this.l=!1,this.fireBufferEnd())}o(b){this.f("ad quartile",b);this.fireQuartile(b)}G(){this.f("ad clicked");const b=this.a&&this.a.ob();Hv.debug(ov,b);this.fireClick(b)}L(){this.f("ad skipped");this.fireSkip()}B(b){this.a=b.ad;this.f(lv,this.a);this.fireBreakStart()}C(){this.f("ad break stop");
25
- this.fireBreakStop();this.getPosition()===this.getNpawReference().Constants.AdPosition.Postroll&&this.fireStop()}I(b){(b=b.detail)&&10003===b.code&&Cv(b,this.player,Hv,this)}f(b,...c){Hv.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},Hv=new _.S("clpp.npaw.NpawAdsAdapter");var Jv=class extends _.iv{constructor(){super();this.a=null;this.g=new _.S(qv);this.m=null}Ne(a){yv(this);if(this.a=a)this.a.registerAdapterFromClass(this.m,Gv()),this.a.registerAdsAdapterFromClass(this.m,Iv())}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;zv(this,a)&&(a=a.getConfiguration().youbora,this.Ne(new NpawPlugin(a.accountCode)))}onContentWillLoad(a,b){if(zv(this,a)){a=a.getConfiguration();var c=a.youbora;
26
- void 0===c[sv]&&(c[sv]=b.isLive);void 0===c[uv]&&(c[uv]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Ne(new NpawPlugin(c.accountCode));this.a.setAnalyticsOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){yv(this);this.a.destroy()}id(){return wv}};_.z(qv,Jv);Jv.prototype.getAdsAdapter=Jv.prototype.getAdsAdapter;Jv.prototype.getAdapter=Jv.prototype.getAdapter;Jv.prototype.setNpawPlugin=Jv.prototype.Ne;Jv.Id=wv;new _.S(qv);var Kv=class extends _.iv{constructor(){super();this.a=null;this.g=new _.S(rv);this.m=null}Oe(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(Dv(this.m)),this.a.setAdsAdapter(Ev(this.m))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;Av(this,a)&&(a=a.getConfiguration().youbora,this.Oe(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(Av(this,a)){a=a.getConfiguration();var c=
27
- a.youbora;void 0===c[sv]&&(c[sv]=b.isLive);void 0===c[uv]&&(c[uv]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Oe(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return wv}};_.z(rv,Kv);Kv.prototype.getAdsAdapter=Kv.prototype.getAdsAdapter;Kv.prototype.getAdapter=Kv.prototype.getAdapter;Kv.prototype.setYouboraPlugin=Kv.prototype.Oe;Kv.Id=wv;_.Yq(new class{create(a){return a.youbora&&a.youbora.v7?new Jv:new Kv}});};f.call(g, window);
11
+ this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.cb()}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(Rv,c);return c}getPlayerName(){return _.qa}getVersion(){return"6.23.1-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
12
+ this.f&&(this.f.on(this.m,_.Ac,this.M.bind(this)),this.f.on(this.m,_.uc,this.L.bind(this)),this.f.on(this.m,_.pc,this.I.bind(this)),this.f.on(this.m,_.rc,this.J.bind(this)),this.f.on(this.m,_.hc,this.G.bind(this)),this.f.on(this.m,_.ic,this.o.bind(this,1)),this.f.on(this.m,_.oc,this.o.bind(this,2)),this.f.on(this.m,_.yc,this.o.bind(this,3)),this.f.on(this.m,_.gc,this.F.bind(this)),this.f.on(this.m,_.tc,this.K.bind(this)),this.f.on(this.m,_.r,this.H.bind(this)),this.f.on(this.m,_.cc,this.A.bind(this)),
13
+ this.f.on(this.m,_.ec,this.B.bind(this)),this.f.on(this.m,_.fc,this.C.bind(this)),this.f.on(this.m,_.qc,this.w.bind(this)))}unregisterListeners(){_.Ah(this.f)}dispose(){super.dispose()}M(c){this.g.debug(Mv,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(Kv);this.fireBufferBegin()}w(){this.l&&
14
+ (this.h(Jv),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.ob();this.g.debug(Lv,c);this.fireClick(c)}K(){this.h("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.h(Iv,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&&Yv(c,this.m,this.g,this)}h(c,
15
+ ...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var bw=()=>{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.la())&&(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.Ha())?b.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"castlabs-adapter-6.23.1-js"}getPlayerVersion(){return _.ea}registerListeners(){const b=this.w();this.player&&b&&(b.on(this.player,_.Sf,this.I.bind(this)),b.on(this.player,
17
+ _.r,this.F.bind(this)),b.on(this.player,_.Kf,this.H.bind(this)),b.on(this.player,_.Jf,this.G.bind(this)),b.on(this.player,_.Ac,this.B.bind(this)),b.on(this.player,_.Zc,this.C.bind(this)))}unregisterListeners(){aw.debug(_.Ob);_.Ah(this.w())}dispose(){this.unregisterListeners();this.f=this.h=!1;this.a=null}j(){return this.player.getStats()||_.No()}o(){return!!this.player.getConfiguration().autoplay}I(b){b=b.detail;this.l("state change",b);if(b)switch(b.currentState){case _.Zo:this.o()&&this.fireStart();
18
+ break;case _.ap:this.fireStart();this.A();this.fireResume();this.fireBufferEnd();break;case _.$o:this.o()&&this.fireStart();this.A();this.fireBufferEnd();this.firePause();break;case _.Yo:this.fireBufferEnd();this.fireStop();break;case _.Qo:this.fireBufferEnd();this.h&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Uo:this.fireBufferBegin();break;default:aw.debug(Gv,b)}}A(){this.fireJoin()}F(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=Yv(b,this.player,aw,this))&&
19
+ b.severity===_.F&&(this.f=!0)}H(){this.player.isEnded()||(this.l(_.Kf),this.fireSeekBegin())}w(){this.a||(this.a=new _.xt);return this.a}G(){this.l(_.Jf);this.fireSeekEnd()}B(b){aw.debug("adsTimeline",b);this.h=(b=b.adsTimeline)&&b.Eb()}C(b){aw.debug("Casting",b);this.fireCasted()}l(b,...c){aw.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},aw=new _.S("clpp.npaw.NpawAdapter");var dw=()=>{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.bb(),this.a.ab(),this.a.Qa()));return b}getBitrate(){let b=null;this.a&&(b=this.a.Qa());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
+ 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.Ra()){case 0:c=b.Preroll;break;case 2:c=b.Postroll;break;case 1:c=b.Midroll}cw.debug("Ad position",c);return c}getIsSkippable(){return this.a&&
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.cb()}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);cw.debug(Rv,b);return b}getPlayerName(){return _.qa}getVersion(){return"castlabs-ads-adapter-6.23.1-js"}getPlayerVersion(){return _.ea}B(){this.j||(this.j=new _.xt);return this.j}registerListeners(){const b=this.B();this.player&&b&&(b.on(this.player,_.Ac,this.R.bind(this)),b.on(this.player,_.uc,this.O.bind(this)),b.on(this.player,_.pc,this.K.bind(this)),b.on(this.player,_.rc,this.L.bind(this)),b.on(this.player,_.hc,this.I.bind(this)),b.on(this.player,
23
+ _.ic,this.w.bind(this,1)),b.on(this.player,_.oc,this.w.bind(this,2)),b.on(this.player,_.yc,this.w.bind(this,3)),b.on(this.player,_.gc,this.H.bind(this)),b.on(this.player,_.tc,this.M.bind(this)),b.on(this.player,_.r,this.J.bind(this)),b.on(this.player,_.cc,this.C.bind(this)),b.on(this.player,_.ec,this.F.bind(this)),b.on(this.player,_.fc,this.G.bind(this)),b.on(this.player,_.qc,this.S.bind(this)))}unregisterListeners(){_.Ah(this.B())}R(b){cw.debug(Mv,b);this.h=b.adsTimeline}O(b){this.a=b.ad;this.f("ad start",
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(Kv);this.fireBufferBegin()}S(){this.l=this.getPlayhead();this.A()}A(){this.o&&(this.f(Jv),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.ob();cw.debug(Lv,b);this.fireClick(b)}M(){this.f("ad skipped");
25
+ this.fireSkip()}C(b){this.a=b.ad;this.f(Iv,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&&Yv(b,this.player,cw,this)}f(b,...c){cw.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},cw=new _.S("clpp.npaw.NpawAdsAdapter");var ew=class extends _.Fv{constructor(){super();this.a=null;this.g=new _.S(Nv);this.m=null}We(a){Uv(this);if(this.a=a)this.a.registerAdapterFromClass(this.m,bw()),this.a.registerAdsAdapterFromClass(this.m,dw())}ih(){return this.a}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;Vv(this,a)&&(a=a.getConfiguration().youbora,this.We(new NpawPlugin(a.accountCode)))}onContentWillLoad(a,b){if(Vv(this,a)){a=a.getConfiguration();
26
+ var c=a.youbora;void 0===c[Pv]&&(c[Pv]=b.isLive);void 0===c[Qv]&&(c[Qv]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.We(new NpawPlugin(c.accountCode));this.a.setAnalyticsOptions(c)}}onContentLoaded(a){const b={};(a=a.getDrmInfo())&&(a=Tv(a.keySystem))&&(b["content.drm"]=a);this.g.info(_.Me,b);this.a.setAnalyticsOptions(b)}onPlayerWillRelease(){}onPlayerWillDestroy(){Uv(this);this.a.destroy()}id(){return Sv}};_.z(Nv,ew);ew.prototype.getAdsAdapter=ew.prototype.getAdsAdapter;
27
+ ew.prototype.getAdapter=ew.prototype.getAdapter;ew.prototype.getNpawPlugin=ew.prototype.ih;ew.prototype.setNpawPlugin=ew.prototype.We;ew.Id=Sv;new _.S(Nv);var fw=class extends _.Fv{constructor(){super();this.a=null;this.g=new _.S(Ov);this.m=null}Xe(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(Zv(this.m)),this.a.setAdsAdapter($v(this.m))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;Wv(this,a)&&(a=a.getConfiguration().youbora,this.Xe(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(Wv(this,a)){a=a.getConfiguration();var c=
28
+ a.youbora;void 0===c[Pv]&&(c[Pv]=b.isLive);void 0===c[Qv]&&(c[Qv]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Xe(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return Sv}};_.z(Ov,fw);fw.prototype.getAdsAdapter=fw.prototype.getAdsAdapter;fw.prototype.getAdapter=fw.prototype.getAdapter;fw.prototype.setYouboraPlugin=fw.prototype.Xe;fw.Id=Sv;_.ur(new class{create(a){return a.youbora&&a.youbora.v7?new ew:new fw}});};f.call(g, window);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@castlabs/prestoplay",
3
3
  "description": "PRESTOplay Video Player",
4
- "version": "6.22.0",
4
+ "version": "6.23.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/castlabs/prestoplay-web.git"
package/typings.d.ts CHANGED
@@ -442,8 +442,8 @@ export namespace clpp {
442
442
  */
443
443
  enforceSingleSession?: boolean;
444
444
  /**
445
- * DRM environment to use. By default, provided environments are: DRMtoday,
446
- * DRMtoday_STAGING. DRMtoday_TEST. You may also register your own
445
+ * DRM environment to use. By default, provided environments are: DRMtoday and
446
+ * DRMtoday_STAGING. You may also register your own
447
447
  * environments (please refer to the manual).
448
448
  */
449
449
  env: string;
@@ -471,6 +471,11 @@ export namespace clpp {
471
471
  widevineVersion?: string;
472
472
  }
473
473
 
474
+ /**
475
+ * DRM configuration resolver callback.
476
+ */
477
+ export type DrmConfigurationResolver = Function;
478
+
474
479
  /**
475
480
  * DRM configuration for a single key system.
476
481
  */
@@ -543,6 +548,17 @@ export namespace clpp {
543
548
  videoRobustness: string|Array<string>;
544
549
  }
545
550
 
551
+ /**
552
+ * Arguments passed to the DRM configuration resolver callback.
553
+ */
554
+ export type DrmResolverArgs = {
555
+ /**
556
+ * Indicates whether the manifest contains at least one License
557
+ * Acquisition URL (dashif:Laurl).
558
+ */
559
+ hasLaurl: boolean;
560
+ }
561
+
546
562
  export type DrmSupportType = {
547
563
  /**
548
564
  * Whether this key system supports persistent state.
@@ -1210,9 +1226,15 @@ export namespace clpp {
1210
1226
  */
1211
1227
  conviva?: Partial<clpp.ConvivaConfiguration>;
1212
1228
  /**
1213
- * The drm configuration.
1229
+ * The DRM configuration.
1214
1230
  */
1215
1231
  drm?: Partial<clpp.DrmConfiguration>|null;
1232
+ /**
1233
+ * The DRM configuration resolver. Only works on MSE, not compatible
1234
+ * with {@link clpp.onboard.OnboardComponent}, {@link clpp.drm.HeaderDrmComponent}
1235
+ * nor {@link clpp.verimatrix.VcasComponent}.
1236
+ */
1237
+ drmResolver?: Partial<clpp.DrmConfigurationResolver>;
1216
1238
  /**
1217
1239
  * Defaults to true.
1218
1240
  *
@@ -3180,6 +3202,10 @@ export namespace clpp {
3180
3202
  * and considered by the players bandwidth estimation.
3181
3203
  */
3182
3204
  DOWNLOAD_TRACE = "downloadtrace",
3205
+ /**
3206
+ * Triggered when the players DRM session is created.
3207
+ */
3208
+ DRM_SESSION_CREATED = "drmsessioncreated",
3183
3209
  /**
3184
3210
  * Triggered when the players DRM session is updated.
3185
3211
  */
@@ -3197,6 +3223,10 @@ export namespace clpp {
3197
3223
  * Triggered when the DRM license expiration time is updated.
3198
3224
  */
3199
3225
  DRM_EXPIRATION_UPDATE = "drmexpirationupdate",
3226
+ /**
3227
+ * Triggered when a DRM license request is sent to the server.
3228
+ */
3229
+ DRM_LICENSE_REQUESTED = "drmlicenserequested",
3200
3230
  /**
3201
3231
  * Triggered when an attempt to autoplay the media was block by the platform.
3202
3232
  */
@@ -4372,7 +4402,7 @@ export namespace clpp {
4372
4402
  * @param rendition The rendition
4373
4403
  * @param clearBuffer clear buffer
4374
4404
  */
4375
- setAudioRendition(rendition: clpp.Rendition, clearBuffer?: boolean): void;
4405
+ setAudioRendition(rendition: clpp.Rendition|null, clearBuffer?: boolean): void;
4376
4406
  /**
4377
4407
  * @param track The track
4378
4408
  */
@@ -4381,7 +4411,7 @@ export namespace clpp {
4381
4411
  * @param rendition The rendition
4382
4412
  * @param clearBuffer clear buffer
4383
4413
  */
4384
- setTextRendition(rendition: clpp.Rendition, clearBuffer?: boolean): void;
4414
+ setTextRendition(rendition: clpp.Rendition|null, clearBuffer?: boolean): void;
4385
4415
  /**
4386
4416
  * @param track The track
4387
4417
  */
@@ -4390,7 +4420,7 @@ export namespace clpp {
4390
4420
  * @param rendition The rendition
4391
4421
  * @param clearBuffer clear buffer
4392
4422
  */
4393
- setVideoRendition(rendition: clpp.Rendition, clearBuffer?: boolean): void;
4423
+ setVideoRendition(rendition: clpp.Rendition|null, clearBuffer?: boolean): void;
4394
4424
  /**
4395
4425
  * @param track The track
4396
4426
  */
@@ -6360,6 +6390,10 @@ export namespace clpp {
6360
6390
  * The DRMtoday staging environment.
6361
6391
  */
6362
6392
  STAGING = "STAGING",
6393
+ /**
6394
+ * The DRMtoday demo environment.
6395
+ */
6396
+ DEMO = "DEMO",
6363
6397
  /**
6364
6398
  * The DRMtoday test environment.
6365
6399
  */
@@ -7607,6 +7641,19 @@ export namespace clpp {
7607
7641
  * For more details, check {@link https://documentation.npaw.com/integration-docs/docs/custom-video-events-js#custom-event-code-example}
7608
7642
  */
7609
7643
  getAdsAdapter(): any|null;
7644
+ /**
7645
+ * Gives access to the underlying NPAW Plugin instance.
7646
+ * Can be used e.g. to set custom options using `setAnalyticsOptions`
7647
+ * For more details, check {@link https://documentation.npaw.com/integration-docs/docs/options-analytics-js}
7648
+ *
7649
+ * @example
7650
+ *
7651
+ * const plugin = player.getPlugin(clpp.npaw.NpawPlugin.Id).getNpawPlugin()
7652
+ * plugin.setAnalyticsOptions({
7653
+ * 'content.isLive': true
7654
+ * })
7655
+ */
7656
+ getNpawPlugin(): NpawPlugin|null;
7610
7657
  /**
7611
7658
  * Sets NPAW V7 Plugin.
7612
7659
  * Use it before playback if you want to use Castlabs