@castlabs/prestoplay 6.6.1 → 6.8.0

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 (59) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +418 -419
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +48 -42
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +68 -49
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -31
  15. package/cjs/cl.ima.js +24 -23
  16. package/cjs/cl.mse.js +275 -261
  17. package/cjs/cl.muxdata.js +15 -12
  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.smooth.js +71 -71
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +27 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +362 -365
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +48 -42
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +58 -40
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +17 -16
  44. package/cl.mse.js +238 -228
  45. package/cl.muxdata.js +12 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +10 -10
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -59
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +15 -15
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -15
  58. package/package.json +1 -1
  59. package/typings.d.ts +147 -19
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 sq=" The setting will be ignored.",tq="VTT parser encountered an invalid VTT setting: ",uq="application/x-subrip",vq="text/srt",wq='text/vtt; codecs\x3d"vtt"',xq='text/vtt; codecs\x3d"wvtt"',yq=function(a){return a.a==a.f.length?null:(a=_.ug(a,/[^ \t\n]*/gm))?a[0]:null},zq=function(a){_.ug(a,/[ \t]+/gm)},Aq=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},Bq=function(a){a=_.ug(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)},Dq=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=_.xo:a.textAlign=_.Do[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?_.Ge:_.He;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==_.ld||b==_.je?_.ld:b==_.md||b==_.Yc?_.md:
4
- _.uc);else if(d=/^region:(.*)$/.exec(b)){if(b=Cq(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=_.Eo[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.zo,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.Eo[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Cq=function(a,b){a=a.filter(c=>c.id==b);return a.length?a[0]:(_.B("VTT parser could not find a region with id: ",
5
- b," The region will be ignored."),null)},Fq=function(a,b,c){let d,e,f;(new _.Mj).M("payl",_.Hj(g=>{d=_.Ig(g)})).M("iden",_.Hj(g=>{e=_.Ig(g)})).M("sttg",_.Hj(g=>{f=_.Ig(g)})).parse(a);return d?Eq(d,e,f,b,c):null},Eq=function(a,b,c,d,e){a=new _.Co(d,e,a);b&&(a.id=b);if(c)for(b=new _.vg(c),c=yq(b);c;)Dq(a,c,[])||_.B(tq,c,sq),zq(b),c=yq(b);return a},Gq=class{a(a){a=_.Ig(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+=Aq(c)}return _.Mg(b)}},Hq=class{create(){return new Gq}probe(a,b){return(a===vq||a===uq)&&b===_.te}};var Iq=class{constructor(a){this.a=a}parseInit(){}parseMedia(a,b){a=_.Ig(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 _.G(_.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=Bq(new _.vg(d[1]));if(null==a)throw new _.G(_.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 _.vg(f.replace(/\n/g," "));d=new _.Ho;yq(e);zq(e);for(var g=yq(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||_.B("VTT parser encountered an invalid VTTRegion setting: ",g,sq);zq(e);g=yq(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 _.vg(l[0]);g=Bq(d);const q=_.ug(d,/[ \t]+--\x3e[ \t]+/g);k=Bq(d);if(null==g||null==q||null==k)throw new _.G(_.F,2,2001);g+=h;k+=h;l=l.slice(1).join("\n").trim();g=new _.Co(g,k,l,_.Oe);e&&(g.id=e);zq(d);for(k=yq(d);k;)Dq(g,k,c)||_.B(tq,k,sq),zq(d),k=yq(d);null!=e&&(g.id=e);c=g}c&&m.push(c)}return{cues:m,styles:f}}};var Jq=class extends Iq{parseMedia(a,b){return super.parseMedia((new Gq).a(a),b)}};var Kq=class{constructor(){this.a=null;this.f=new _.O("clpp.vtt.mp4")}parseInit(a){let b=!1;(new _.Mj).M(_.wd,_.N).M(_.we,_.N).M(_.rd,_.N).X("mdhd",c=>{0==c.version?(c.reader.skip(4),c.reader.skip(4),this.a=_.M(c.reader),c.reader.skip(4)):(c.reader.skip(8),c.reader.skip(8),this.a=_.M(c.reader),c.reader.skip(8));c.reader.skip(4)}).M(_.vd,_.N).M(_.me,_.N).X(_.oe,_.Gj).M("wvtt",()=>{b=!0}).parse(a);if(!this.a)throw new _.G(_.F,2,2008);if(!b)throw new _.G(_.F,2,2008);}parseMedia(a,b){if(!this.a)throw this.f.error("No init segment for MP4+VTT!"),
10
- new _.G(_.F,2,2008);let c=0,d=[],e;const f=[];let g=!1,h=!1,k=!1,l=null;(new _.Mj).M("moof",_.N).M("traf",_.N).X("tfdt",q=>{g=!0;c=0==q.version?_.M(q.reader):_.Cj(q.reader)}).X("tfhd",q=>{var t=q.flags;q=q.reader;q.skip(4);t&1&&q.skip(8);t&2&&q.skip(4);l=t&8?_.M(q):null}).X("trun",q=>{h=!0;{var t=q.version,v=q.flags;q=q.reader;const y=_.M(q);v&1&&q.skip(4);v&4&&q.skip(4);const A=[];for(let E=0;E<y;E++){const D={duration:null,sampleSize:null,Yd:null};v&256&&(D.duration=_.M(q));v&512&&(D.sampleSize=
11
- _.M(q));v&1024&&q.skip(4);v&2048&&(D.Yd=0==t?_.M(q):_.Aj(q));A.push(D)}d=A}}).M(_.qd,_.Hj(q=>{k=!0;e=q})).parse(a);if(!k&&!g&&!h)throw new _.G(_.F,2,2008);a=c;var m=new DataView(e.buffer,e.byteOffset,e.byteLength);m=new _.vk(m,!1);for(const q of d){const t=q.duration||l,v=q.Yd?c+q.Yd:a;a=v+(t||0);let y=0;do{const A=_.M(m);y+=A;var n=_.M(m);n=_.Fj(n);let E=null;"vttc"==n?8<A&&(E=_.Dj(m,A-8)):("vtte"!=n&&this.f.error("Unknown box "+n+"! Skipping!"),m.skip(A-8));t?E&&f.push(Fq(E,b.periodStart+v/this.a,
12
- b.periodStart+a/this.a)):this.f.error("WVTT sample duration unknown, and no default found!")}while(q.sampleSize&&y<q.sampleSize)}return{cues:f.filter(_.dg),styles:[]}}};_.x("clpp.vtt.VttComponent",class extends _.Lp{constructor(){super();this.h=new Hq}f(){_.io[_.te]=Iq;_.io[wq]=Iq;_.io[xq]=Iq;_.io[_.Xb]=Kq;_.io[vq]=Jq;_.io[uq]=Jq;_.Jh.push(this.h)}a(){_.jo(_.te);_.jo(wq);_.jo(xq);_.jo(_.Xb);_.jo(vq);_.jo(uq);_.Lh(this.h)}id(){return _.re}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var jq=" The setting will be ignored.",kq="VTT parser encountered an invalid VTT setting: ",lq="application/x-subrip",mq="text/srt",nq='text/vtt; codecs\x3d"vtt"',oq='text/vtt; codecs\x3d"wvtt"',pq=function(a){return a.a==a.f.length?null:(a=_.ah(a,/[^ \t\n]*/gm))?a[0]:null},qq=function(a){_.ah(a,/[ \t]+/gm)},rq=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},sq=function(a){a=_.ah(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)},uq=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=_.mo:a.textAlign=_.so[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?_.Ee:_.Fe;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==_.ld||b==_.ie?_.ld:b==_.md||b==_.Yc?_.md:
4
+ _.tc);else if(d=/^region:(.*)$/.exec(b)){if(b=tq(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=_.to[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.oo,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.to[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},tq=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)},wq=function(a,b,c){let d,e,f;(new _.Lj).M("payl",_.Gj(g=>{d=_.Eg(g)})).M("iden",_.Gj(g=>{e=_.Eg(g)})).M("sttg",_.Gj(g=>{f=_.Eg(g)})).parse(a);return d?vq(d,e,f,b,c):null},vq=function(a,b,c,d,e){a=new _.ro(d,e,a);b&&(a.id=b);if(c)for(b=new _.bh(c),c=pq(b);c;)uq(a,c,[])||_.C(kq,c,jq),qq(b),c=pq(b);return a},xq=class{a(a){a=_.Eg(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+=rq(c)}return _.Ig(b)}},yq=class{create(){return new xq}probe(a,b){return(a===mq||a===lq)&&b===_.se}};var zq=class{constructor(a){this.a=a}parseInit(){}parseMedia(a,b){a=_.Eg(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(_.G,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=sq(new _.bh(d[1]));if(null==a)throw new _.H(_.G,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 _.bh(f.replace(/\n/g," "));d=new _.wo;pq(e);qq(e);for(var g=pq(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,jq);qq(e);g=pq(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 _.bh(l[0]);g=sq(d);const q=_.ah(d,/[ \t]+--\x3e[ \t]+/g);k=sq(d);if(null==g||null==q||null==k)throw new _.H(_.G,2,2001);g+=h;k+=h;l=l.slice(1).join("\n").trim();g=new _.ro(g,k,l,_.Oe);e&&(g.id=e);qq(d);for(k=pq(d);k;)uq(g,k,c)||_.C(kq,k,jq),qq(d),k=pq(d);null!=e&&(g.id=e);c=g}c&&m.push(c)}return{cues:m,styles:f}}};var Aq=class extends zq{parseMedia(a,b){return super.parseMedia((new xq).a(a),b)}};var Bq=class{constructor(){this.a=null;this.f=new _.P("clpp.vtt.mp4")}parseInit(a){let b=!1;(new _.Lj).M(_.wd,_.Ej).M(_.ve,_.Ej).M(_.rd,_.Ej).Z("mdhd",c=>{0==c.version?(c.reader.skip(4),c.reader.skip(4),this.a=_.N(c.reader),c.reader.skip(4)):(c.reader.skip(8),c.reader.skip(8),this.a=_.N(c.reader),c.reader.skip(8));c.reader.skip(4)}).M(_.vd,_.Ej).M(_.le,_.Ej).Z(_.ne,_.Fj).M("wvtt",()=>{b=!0}).parse(a);if(!this.a)throw new _.H(_.G,2,2008);if(!b)throw new _.H(_.G,2,2008);}parseMedia(a,b){if(!this.a)throw this.f.error("No init segment for MP4+VTT!"),
10
+ new _.H(_.G,2,2008);let c=0,d=[],e;const f=[];let g=!1,h=!1,k=!1,l=null;(new _.Lj).M("moof",_.Ej).M("traf",_.Ej).Z("tfdt",q=>{g=!0;c=0==q.version?_.N(q.reader):_.Aj(q.reader)}).Z("tfhd",q=>{var t=q.flags;q=q.reader;q.skip(4);t&1&&q.skip(8);t&2&&q.skip(4);l=t&8?_.N(q):null}).Z("trun",q=>{h=!0;{var t=q.version,u=q.flags;q=q.reader;const x=_.N(q);u&1&&q.skip(4);u&4&&q.skip(4);const z=[];for(let E=0;E<x;E++){const D={duration:null,sampleSize:null,ae:null};u&256&&(D.duration=_.N(q));u&512&&(D.sampleSize=
11
+ _.N(q));u&1024&&q.skip(4);u&2048&&(D.ae=0==t?_.N(q):_.yj(q));z.push(D)}d=z}}).M(_.qd,_.Gj(q=>{k=!0;e=q})).parse(a);if(!k&&!g&&!h)throw new _.H(_.G,2,2008);a=c;var m=new DataView(e.buffer,e.byteOffset,e.byteLength);m=new _.qk(m,!1);for(const q of d){const t=q.duration||l,u=q.ae?c+q.ae:a;a=u+(t||0);let x=0;do{const z=_.N(m);x+=z;var n=_.N(m);n=_.Dj(n);let E=null;"vttc"==n?8<z&&(E=_.Bj(m,z-8)):("vtte"!=n&&this.f.error("Unknown box "+n+"! Skipping!"),m.skip(z-8));t?E&&f.push(wq(E,b.periodStart+u/this.a,
12
+ b.periodStart+a/this.a)):this.f.error("WVTT sample duration unknown, and no default found!")}while(q.sampleSize&&x<q.sampleSize)}return{cues:f.filter(_.bg),styles:[]}}};_.A("clpp.vtt.VttComponent",class extends _.Ap{constructor(){super();this.h=new yq}f(){_.Xn[_.se]=zq;_.Xn[nq]=zq;_.Xn[oq]=zq;_.Xn[_.Xb]=Bq;_.Xn[mq]=Aq;_.Xn[lq]=Aq;_.Rh.push(this.h)}a(){_.Yn(_.se);_.Yn(nq);_.Yn(oq);_.Yn(_.Xb);_.Yn(mq);_.Yn(lq);_.Th(this.h)}id(){return _.qe}});};f.call(g, window);
package/cl.youbora.js CHANGED
@@ -1,15 +1,15 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var kq="clpp.npaw.YouboraPlugin",lq="content.isLive",mq=function(a,b){if(b.namespace()===_.Ac)return a.f.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.of(c))return a.f.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.f.warn("accountCode key is missing in Youbora config"),b.onError(new _.G(1,9,9101)),!1;if(_.z(window.youbora))return a.f.warn("Youbora SDK not found."),b.onError(new _.G(1,9,
2
- 9100)),!1;"6.8.49"!==youbora.VERSION&&(a.f.warn("Youbora SDK version is not supported. The supported version is 6.8.49, found "+`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.G(1,9,9102)));return!0},nq=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),oq=(a,b,c,d)=>{b=nq(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===
3
- a.code?"ad error":_.$c;b.severity===_.F?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var pq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.a=new _.uo;this.f=new _.O("clpp.npaw.YouboraAdapter");this.h=this.w=!1;this.registerListeners()}getPlayhead(){return this.getIsLive()?-1:this.l.getPosition()}getDuration(){return this.l.getDuration()}getRendition(){let c,d,e;var f=this.l.getTrackManager();f&&(f=f.ga())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.m(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,
4
- d,e)}getIsLive(){return this.l.isLive()}getResource(){const c=this.l.getLoadedSource();return c&&c.url}getBitrate(){return this.m().streamBandwidth}getThroughput(){return this.m().estimatedBandwidth}getPlayrate(){return this.l.getPlaybackRate()}getFramesPerSecond(){var c=this.l.getTrackManager();return c&&(c=c.Da())?c.frameRate:null}getPlayerName(){return _.oa}getVersion(){return"6.6.1-castlabsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&this.a&&(this.f.debug("registering listeners"),
5
- youbora.Util.logAllEvents(this.l),this.a.on(this.l,_.ke,this.I.bind(this)),this.a.on(this.l,_.$c,this.F.bind(this)),this.a.on(this.l,_.Ee,this.H.bind(this)),this.a.on(this.l,_.Ce,this.G.bind(this)),this.a.on(this.l,_.Ob,this.B.bind(this)),this.a.on(this.l,_.qc,this.C.bind(this)))}unregisterListeners(){this.f.debug(_.pb);_.Of(this.a)}dispose(){super.dispose()}m(){return this.l.getStats()||_.Cl()}o(){return!!this.l.getConfiguration().autoplay}I(c){c=c.detail;this.j("state change",c);if(c)switch(c.currentState){case _.Ql:this.o()&&
6
- this.g();break;case _.Sl:this.g();this.A();this.fireResume();this.fireBufferEnd();break;case _.Rl:this.o()&&this.g();this.A();this.fireBufferEnd();this.firePause();break;case _.Pl:this.fireBufferEnd();this.fireStop();break;case _.Hl:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Kl:this.fireBufferBegin();break;default:this.f.debug("Unhandled state",c)}}g(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.l.getDrmInfo();c&&
7
- (c=c.keySystem,(c=c.startsWith(_.Kc)?"Widevine":c.startsWith(_.Ic)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.Md)?"ClearKey":c.startsWith(_.Hc)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=oq(c,this.l,this.f,this))&&c.severity===_.F&&(this.h=!0)}H(){this.j(_.fe);this.l.isEnded()||(this.g(),this.fireSeekBegin())}G(){this.j(_.ee);this.fireSeekEnd()}B(c){this.f.debug("adsTimeline",
8
- c);c=c.adsTimeline;this.w=!!c&&c.eb()}C(c){this.f.debug("Casting",c);this.fireCasted()}j(c,...d){this.f.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var qq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.j=this.a=null;this.f=new _.uo;this.h=new _.O("clpp.npaw.YouboraAdsAdapter");this.registerListeners();this.m=!1}getDuration(){return this.a&&this.a.getDuration()}getRendition(){let c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.pb(),this.a.ob(),this.a.cb()));return c}getBitrate(){return this.a&&this.a.cb()}getPlayhead(){const c=this.l.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&
9
- 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.Oa()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.h.debug("Ad position",d);return d}getIsSkippable(){return this.a&&-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const c=this.l.getAdsManager();return c&&0<c.getVolume()}getExpectedBreaks(){return this.j&&
10
- this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.rb()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.j&&this.j.getCuePoints().map(c=>-1===c?this.l.getDuration():c)}getIsFullscreen(){return this.l.getSurface().isFullscreen()}getIsVisible(){var c=this.l.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.h.debug("is container visible",c);return c}getPlayerName(){return _.oa}getVersion(){return"6.6.1-castlabsadsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&
11
- this.f&&(this.f.on(this.l,_.Ob,this.N.bind(this)),this.f.on(this.l,_.Kb,this.L.bind(this)),this.f.on(this.l,_.Gb,this.I.bind(this)),this.f.on(this.l,_.Ib,this.J.bind(this)),this.f.on(this.l,_.Bb,this.G.bind(this)),this.f.on(this.l,_.Cb,this.o.bind(this,1)),this.f.on(this.l,_.Fb,this.o.bind(this,2)),this.f.on(this.l,_.Mb,this.o.bind(this,3)),this.f.on(this.l,_.Ab,this.F.bind(this)),this.f.on(this.l,_.Jb,this.K.bind(this)),this.f.on(this.l,_.$c,this.H.bind(this)),this.f.on(this.l,_.wb,this.A.bind(this)),
12
- this.f.on(this.l,_.xb,this.B.bind(this)),this.f.on(this.l,_.zb,this.C.bind(this)),this.f.on(this.l,_.Hb,this.w.bind(this)))}unregisterListeners(){_.Of(this.f)}dispose(){super.dispose()}N(c){this.h.debug("ad timeline changed",c);this.j=c.adsTimeline}L(c){this.a=c.ad;this.g("ad start",this.a);this.fireStart();this.fireJoin()}G(){this.g("ad ended");this.fireStop()}I(){this.g("ad pause");this.w();this.firePause()}J(){this.g("ad resume");this.w();this.fireResume()}C(){this.m=!0;this.g("ad buffering started");
13
- this.fireBufferBegin()}w(){this.m&&(this.g("ad buffering ended"),this.m=!1,this.fireBufferEnd())}o(c){this.g("ad quartile",c);this.fireQuartile(c)}F(){this.g("ad clicked");const c=this.a&&this.a.Db();this.h.debug("ad click through url: ",c);this.fireClick(c)}K(){this.g("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.g("ad break start",this.a);this.fireBreakStart()}B(){this.g("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){const c=this.plugin.getAdapter();
14
- c&&c.fireStop()}}H(c){(c=c.detail)&&10003===c.code&&oq(c,this.l,this.h,this)}g(c,...d){this.h.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var rq=class extends _.jq{constructor(){super();this.a=null;this.f=new _.O(kq);this.l=null}Ud(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(pq(this.l)),this.a.setAdsAdapter(qq(this.l))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.l=a;mq(this,a)&&(a=a.getConfiguration().youbora,this.Ud(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(mq(this,a)){a=a.getConfiguration();var c=
15
- a.youbora;void 0===c[lq]&&(c[lq]=b.isLive);void 0===c["content.title"]&&(c["content.title"]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Ud(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return"youbora"}};_.x(kq,rq);rq.prototype.getAdsAdapter=rq.prototype.getAdsAdapter;rq.prototype.getAdapter=rq.prototype.getAdapter;rq.prototype.setYouboraPlugin=rq.prototype.Ud;rq.Id="youbora";_.Sm(new class{create(){return new rq}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var bq="clpp.npaw.YouboraPlugin",cq="content.isLive",dq=function(a,b){if(b.namespace()===_.zc)return a.f.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.of(c))return a.f.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.f.warn("accountCode key is missing in Youbora config"),b.onError(new _.H(1,9,9101)),!1;if(_.B(window.youbora))return a.f.warn("Youbora SDK not found."),b.onError(new _.H(1,9,
2
+ 9100)),!1;"6.8.49"!==youbora.VERSION&&(a.f.warn("Youbora SDK version is not supported. The supported version is 6.8.49, found "+`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.H(1,9,9102)));return!0},eq=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),fq=(a,b,c,d)=>{b=eq(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===
3
+ a.code?"ad error":_.$c;b.severity===_.G?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var gq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.a=new _.jo;this.f=new _.P("clpp.npaw.YouboraAdapter");this.h=this.w=!1;this.registerListeners()}getPlayhead(){return this.getIsLive()?-1:this.l.getPosition()}getDuration(){return this.l.getDuration()}getRendition(){let c,d,e;var f=this.l.getTrackManager();f&&(f=f.ia())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.m(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,
4
+ d,e)}getIsLive(){return this.l.isLive()}getResource(){const c=this.l.getLoadedSource();return c&&c.url}getBitrate(){return this.m().streamBandwidth}getThroughput(){return this.m().estimatedBandwidth}getPlayrate(){return this.l.getPlaybackRate()}getFramesPerSecond(){var c=this.l.getTrackManager();return c&&(c=c.Ga())?c.frameRate:null}getPlayerName(){return _.ma}getVersion(){return"6.8.0-castlabsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&this.a&&(this.f.debug("registering listeners"),
5
+ youbora.Util.logAllEvents(this.l),this.a.on(this.l,_.je,this.I.bind(this)),this.a.on(this.l,_.$c,this.F.bind(this)),this.a.on(this.l,_.Ce,this.H.bind(this)),this.a.on(this.l,_.Be,this.G.bind(this)),this.a.on(this.l,_.Nb,this.B.bind(this)),this.a.on(this.l,_.pc,this.C.bind(this)))}unregisterListeners(){this.f.debug(_.ob);_.Mf(this.a)}dispose(){super.dispose()}m(){return this.l.getStats()||_.rl()}o(){return!!this.l.getConfiguration().autoplay}I(c){c=c.detail;this.j("state change",c);if(c)switch(c.currentState){case _.Fl:this.o()&&
6
+ this.g();break;case _.Hl:this.g();this.A();this.fireResume();this.fireBufferEnd();break;case _.Gl:this.o()&&this.g();this.A();this.fireBufferEnd();this.firePause();break;case _.El:this.fireBufferEnd();this.fireStop();break;case _.wl:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.zl:this.fireBufferBegin();break;default:this.f.debug("Unhandled state",c)}}g(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.l.getDrmInfo();c&&
7
+ (c=c.keySystem,(c=c.startsWith(_.Jc)?"Widevine":c.startsWith(_.Hc)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.Jd)?"ClearKey":c.startsWith(_.Gc)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=fq(c,this.l,this.f,this))&&c.severity===_.G&&(this.h=!0)}H(){this.j(_.ee);this.l.isEnded()||(this.g(),this.fireSeekBegin())}G(){this.j(_.de);this.fireSeekEnd()}B(c){this.f.debug("adsTimeline",
8
+ c);c=c.adsTimeline;this.w=!!c&&c.fb()}C(c){this.f.debug("Casting",c);this.fireCasted()}j(c,...d){this.f.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var hq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.j=this.a=null;this.f=new _.jo;this.h=new _.P("clpp.npaw.YouboraAdsAdapter");this.registerListeners();this.m=!1}getDuration(){return this.a&&this.a.getDuration()}getRendition(){let c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.qb(),this.a.pb(),this.a.eb()));return c}getBitrate(){return this.a&&this.a.eb()}getPlayhead(){const c=this.l.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&
9
+ 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.Qa()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.h.debug("Ad position",d);return d}getIsSkippable(){return this.a&&-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const c=this.l.getAdsManager();return c&&0<c.getVolume()}getExpectedBreaks(){return this.j&&
10
+ this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.sb()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.j&&this.j.getCuePoints().map(c=>-1===c?this.l.getDuration():c)}getIsFullscreen(){return this.l.getSurface().isFullscreen()}getIsVisible(){var c=this.l.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.h.debug("is container visible",c);return c}getPlayerName(){return _.ma}getVersion(){return"6.8.0-castlabsadsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&
11
+ this.f&&(this.f.on(this.l,_.Nb,this.N.bind(this)),this.f.on(this.l,_.Jb,this.L.bind(this)),this.f.on(this.l,_.Fb,this.I.bind(this)),this.f.on(this.l,_.Hb,this.J.bind(this)),this.f.on(this.l,_.Ab,this.G.bind(this)),this.f.on(this.l,_.Bb,this.o.bind(this,1)),this.f.on(this.l,_.Eb,this.o.bind(this,2)),this.f.on(this.l,_.Lb,this.o.bind(this,3)),this.f.on(this.l,_.zb,this.F.bind(this)),this.f.on(this.l,_.Ib,this.K.bind(this)),this.f.on(this.l,_.$c,this.H.bind(this)),this.f.on(this.l,_.wb,this.A.bind(this)),
12
+ this.f.on(this.l,_.xb,this.B.bind(this)),this.f.on(this.l,_.yb,this.C.bind(this)),this.f.on(this.l,_.Gb,this.w.bind(this)))}unregisterListeners(){_.Mf(this.f)}dispose(){super.dispose()}N(c){this.h.debug("ad timeline changed",c);this.j=c.adsTimeline}L(c){this.a=c.ad;this.g("ad start",this.a);this.fireStart();this.fireJoin()}G(){this.g("ad ended");this.fireStop()}I(){this.g("ad pause");this.w();this.firePause()}J(){this.g("ad resume");this.w();this.fireResume()}C(){this.m=!0;this.g("ad buffering started");
13
+ this.fireBufferBegin()}w(){this.m&&(this.g("ad buffering ended"),this.m=!1,this.fireBufferEnd())}o(c){this.g("ad quartile",c);this.fireQuartile(c)}F(){this.g("ad clicked");const c=this.a&&this.a.Fb();this.h.debug("ad click through url: ",c);this.fireClick(c)}K(){this.g("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.g("ad break start",this.a);this.fireBreakStart()}B(){this.g("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){const c=this.plugin.getAdapter();
14
+ c&&c.fireStop()}}H(c){(c=c.detail)&&10003===c.code&&fq(c,this.l,this.h,this)}g(c,...d){this.h.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var iq=class extends _.aq{constructor(){super();this.a=null;this.f=new _.P(bq);this.l=null}Xd(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(gq(this.l)),this.a.setAdsAdapter(hq(this.l))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.l=a;dq(this,a)&&(a=a.getConfiguration().youbora,this.Xd(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(dq(this,a)){a=a.getConfiguration();var c=
15
+ a.youbora;void 0===c[cq]&&(c[cq]=b.isLive);void 0===c["content.title"]&&(c["content.title"]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Xd(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return"youbora"}};_.A(bq,iq);iq.prototype.getAdsAdapter=iq.prototype.getAdsAdapter;iq.prototype.getAdapter=iq.prototype.getAdapter;iq.prototype.setYouboraPlugin=iq.prototype.Xd;iq.Id="youbora";_.Hm(new class{create(){return new iq}});};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.6.1",
4
+ "version": "6.8.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/castlabs/prestoplay-web.git"
package/typings.d.ts CHANGED
@@ -199,7 +199,7 @@ export namespace clpp {
199
199
  * bit/sec. This value is used for initial video track selection when there
200
200
  * is no bandwidth estimation from previous playbacks. If the player instance
201
201
  * is destroyed, any new load() call will use this value. Otherwise
202
- * bandwidth estimation from current playback is transfered to the next
202
+ * bandwidth estimation from current playback is transferred to the next
203
203
  * playback.
204
204
  */
205
205
  defaultBandwidthEstimate: number;
@@ -381,14 +381,15 @@ export namespace clpp {
381
381
  /**
382
382
  * Specifies which EME API shall be used. If not explicitly set, we
383
383
  * will try to use the one that is more suitable on active platform.
384
- * Specify it to {@link clpp.drm.eme.EmeFactory.Apis.STANDARD} if you want to
384
+ * Specify it to {@link clpp.drm.eme.EmeFactory.Apis|
385
+ * clpp.drm.eme.EmeFactory.Apis.STANDARD} if you want to
385
386
  * play protected content on Safari using MSE.
386
387
  */
387
388
  emeApi?: clpp.drm.eme.EmeFactory.Apis;
388
389
  /**
389
390
  * Enable the DRM session cache for SKD license request.
390
391
  * We encountered issues with FairPlay in native Safari when SKD
391
- * initialization is used.We do received multiple requests for the same key
392
+ * initialization is used. We do received multiple requests for the same key
392
393
  * request from the native engine and if we are not full-filling the requests,
393
394
  * it can cause a decryption error. The default implementation ignores the
394
395
  * session cache and will handle each `encrypted` event. In this case,
@@ -410,12 +411,17 @@ export namespace clpp {
410
411
  * environments (please refer to the manual).
411
412
  */
412
413
  env: string;
414
+ /**
415
+ * Ignore unrecognized init data. If the player encounters init data that
416
+ * cannot be processed, it will not pass it to the CDM.
417
+ */
418
+ ignoreUnrecognizedInitData?: boolean;
413
419
  /**
414
420
  * ID for offline playback of secure content.
415
421
  */
416
422
  offlineId?: string;
417
423
  /**
418
- * Specifies which DRM system should be preferred during configuration (i.e.
424
+ * Specifies which DRM system should be preferred during configuration (e.g.
419
425
  * to use Widevine on Edge Chromium).
420
426
  * Fallbacks to the other available system if a specified one is unavailable.
421
427
  * By default player tries to setup most secure system on given platform.
@@ -719,6 +725,13 @@ export namespace clpp {
719
725
  * Default value, -1, means the bitrate will be selected by the SDK.
720
726
  */
721
727
  bitrate: number;
728
+ /**
729
+ * Defaults to false.
730
+ *
731
+ * Disables IMA SDK on Tizen SmartTV devices.
732
+ * This can be useful in case of any issues with ad playback.
733
+ */
734
+ disableCustomPlayback?: boolean;
722
735
  /**
723
736
  * Enables preloading of video assets.
724
737
  */
@@ -874,17 +887,85 @@ export namespace clpp {
874
887
  */
875
888
  export type MuxDataConfiguration = {
876
889
  /**
877
- * Your environment key.
890
+ * Your MUX Data environment key.
878
891
  */
879
892
  envKey: string;
880
893
  /**
881
- * The MUX data SDK
894
+ * The MUX Data SDK API instance. By default PRESTOPlay looks for the MUX
895
+ * Data SDK API in the global namespace variable `window.mux`, but that can
896
+ * be overridden by passing the API instance explicitly here through this
897
+ * config.
882
898
  */
883
899
  muxLib?: Object;
884
900
  /**
885
- * Pass more or/and override MUX SDK options.
901
+ * Pass additional or overriding MUX SDK options, which will be passed
902
+ * to the call of `mux.init()`.
903
+ */
904
+ muxOptionsOverride?: clpp.MuxOverride;
905
+ }
906
+
907
+ /**
908
+ * Options metadata.
909
+ */
910
+ export type MuxOptionsData = {
911
+ /**
912
+ * A key identifying a MUX Data environment/bucket/project.
913
+ */
914
+ env_key: string;
915
+ /**
916
+ * The name of the plugin being built (some descriptive string).
917
+ */
918
+ player_mux_plugin_name?: string;
919
+ /**
920
+ * The version of the plugin being built (a version string).
921
+ */
922
+ player_mux_plugin_version?: string;
923
+ /**
924
+ * Player Software being used to play the Video (e.g. Video.js, JW Player,
925
+ * etc.). Note this was previously named player_software
926
+ */
927
+ player_software_name?: string;
928
+ /**
929
+ * Player Software Version (e.g. 2.45.5).
930
+ */
931
+ player_software_version?: string;
932
+ /**
933
+ * As you make changes to your player you can compare how new versions of your
934
+ * player perform. This is not the player software version (e.g. Video.js
935
+ * 5.0.0), which is tracked automatically by the SDK.
936
+ */
937
+ player_version?: string;
938
+ /**
939
+ * Your internal ID for the video.
940
+ */
941
+ video_id?: string;
942
+ /**
943
+ * Title of the video player (e.g.: 'Awesome Show: Pilot')
944
+ */
945
+ video_title?: string;
946
+ /**
947
+ * An ID representing the viewer who is watching the stream. Use this to look
948
+ * up video views for an individual viewer. If no value is specified, a unique
949
+ * ID will be generated by the SDK. Note: You should not use any value that is
950
+ * personally identifiable on its own (such as email address, username, etc).
951
+ * Instead, you should supply an anonymized viewer ID which you have stored
952
+ * within your own system.
953
+ */
954
+ viewer_user_id?: string;
955
+ }
956
+
957
+ /**
958
+ * Overriding options to pass to the MUX Data SDK.
959
+ */
960
+ export type MuxOverride = {
961
+ /**
962
+ * Data about the viewer, video and the integration.
886
963
  */
887
- muxOptionsOverride: Record<string, any>;
964
+ data?: clpp.MuxOptionsData;
965
+ /**
966
+ * Controls whether debug log statements are logged to the console.
967
+ */
968
+ debug?: boolean;
888
969
  }
889
970
 
890
971
  /**
@@ -1102,7 +1183,7 @@ export namespace clpp {
1102
1183
  */
1103
1184
  muted?: boolean;
1104
1185
  /**
1105
- * Mux Data configuration.
1186
+ * Mux Data Analytics configuration.
1106
1187
  */
1107
1188
  muxdata?: Partial<clpp.MuxDataConfiguration>;
1108
1189
  /**
@@ -1729,6 +1810,19 @@ export namespace clpp {
1729
1810
  * |chasingRate| cannot be lower than or equal to 1.
1730
1811
  */
1731
1812
  chasingRate: number;
1813
+ /**
1814
+ * Defaults to false.
1815
+ *
1816
+ * If true, audio tracks will be disabled. Disabling audio tracks means they
1817
+ * will be discarded as if the source had no audio. The audio tracks will not
1818
+ * be loaded and won't show up in {@link clpp.TrackManager}.
1819
+ * This option reduces network utilization compared to the
1820
+ * {@link clpp.PlayerConfiguration#muted|mute} config option which just
1821
+ * silences the audio.
1822
+ * This config option applies only to the MSE player (i.e. it is not
1823
+ * applicable to Safari or Tizen native playback).
1824
+ */
1825
+ disableAudioTracks?: boolean;
1732
1826
  /**
1733
1827
  * Defaults to false.
1734
1828
  *
@@ -1744,6 +1838,16 @@ export namespace clpp {
1744
1838
  * time the decoder needs to get to the first frame
1745
1839
  */
1746
1840
  disableMergedFragments: boolean;
1841
+ /**
1842
+ * Defaults to false.
1843
+ *
1844
+ * If true, video tracks will be disabled. Disabling video tracks means they
1845
+ * will be discarded as if the source had no video. The video tracks will not
1846
+ * be loaded and won't show up in {@link clpp.TrackManager}.
1847
+ * This config option applies only to the MSE player (i.e. it is not
1848
+ * applicable to Safari or Tizen native playback).
1849
+ */
1850
+ disableVideoTracks?: boolean;
1747
1851
  /**
1748
1852
  * Defaults to 1.
1749
1853
  *
@@ -4107,8 +4211,8 @@ export namespace clpp {
4107
4211
  */
4108
4212
  DASH_DUPLICATE_REPRESENTATION_ID = 4018,
4109
4213
  /**
4110
- * HLS manifest has several #EXT-X-MAP tags. We can only
4111
- * support one at the moment.
4214
+ * HLS manifest is invalid because multiple #EXT-X-MAP tags
4215
+ * were found attached to the same segment.
4112
4216
  */
4113
4217
  HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND = 4020,
4114
4218
  /**
@@ -4244,6 +4348,20 @@ export namespace clpp {
4244
4348
  * HLS media playlist does not contain any media segments.
4245
4349
  */
4246
4350
  HLS_PLAYLIST_EMPTY = 4043,
4351
+ /**
4352
+ * Some tag or attribute value in the HLS playlist is invalid.
4353
+ */
4354
+ HLS_INVALID_VALUE = 4044,
4355
+ /**
4356
+ * Encountered a complex HLS playlist with discontinuities.
4357
+ * Discontinuity in HLS is not fully supported yet,
4358
+ * only certain simple playlists are supported.
4359
+ */
4360
+ HLS_DISCONTINUITY_NOT_SUPPORTED = 4045,
4361
+ /**
4362
+ * Encountered a feature of HLS which is not currently supported.
4363
+ */
4364
+ HLS_UNSUPPORTED_FEATURE = 4046,
4247
4365
  /**
4248
4366
  * The StreamingEngine called onChooseStreams() but the callback receiver
4249
4367
  * did not return the correct number or type of Streams.
@@ -5318,8 +5436,8 @@ export namespace clpp {
5318
5436
  namespace drm {
5319
5437
  /**
5320
5438
  * Callback function that can be used to extract the Fairplay Content ID.
5321
- * It takes the current {@link clpp.extern.PlayerConfiguration}, `initData` and
5322
- * a {@link clpp.drm.SessionContext}. Returns an extracted Content ID string.
5439
+ * It takes the current {@link clpp.PlayerConfiguration}, `initData` and
5440
+ * a {@link clpp.SessionContext}. Returns an extracted Content ID string.
5323
5441
  * This callback needs to be created only if you are using custom DRM
5324
5442
  * environment and your Fairplay server expects different Content ID than
5325
5443
  * that defined in default Apple implementation. If not provided, the default
@@ -5345,7 +5463,7 @@ export namespace clpp {
5345
5463
  * `
5346
5464
  * d192ebad-5097
5347
5465
  * `
5348
- * You can also use `customData` object in the {@link clpp.drm.SessionContext}
5466
+ * You can also use `customData` object in the {@link clpp.SessionContext}
5349
5467
  * to pass some additional data to license request/response modifiers if needed.
5350
5468
  */
5351
5469
  export type ContentIdExtractor = Function;
@@ -5371,20 +5489,21 @@ export namespace clpp {
5371
5489
  export type DrmResponseModifier = Function;
5372
5490
 
5373
5491
  /**
5374
- * A function that takes the {@link clpp.InitDataTransformerParams} object
5375
- * which provides:
5492
+ * A function that accepts one parameter of type
5493
+ * {@link clpp.InitDataTransformerParams} which provides:
5376
5494
  *
5377
5495
  * initData and initDataType from `encrypted` event;
5378
5496
  * the current player configuration ({@link clpp.PlayerConfiguration});
5379
5497
  * the current DRM system configuration
5380
- * ({@link clpp.drm.DrmSystemConfiguration});
5498
+ * ({@link clpp.FairplayDrmSystem}|{@link clpp.PlayreadyDrmSystem}|
5499
+ * {@link clpp.WidevineDrmSystem});
5381
5500
  * the current DRM info ({@link clpp.DrmInfo});
5382
5501
  * the current session context ({@link clpp.SessionContext}) which could
5383
5502
  * be used to get and store some customData for later use within
5384
5503
  * licenseRequest and/or licenseResponse modifiers.
5385
5504
  *
5386
- * It should return valid initData to pass to the currently used CDM to generate
5387
- * a license request.
5505
+ * It should return valid initData of type `Uint8Array` to pass to the currently
5506
+ * used CDM to generate a license request.
5388
5507
  */
5389
5508
  export type InitDataTransformer = Function;
5390
5509
 
@@ -6170,6 +6289,11 @@ export namespace clpp {
6170
6289
  * of request modifiers that will be applied to this request
6171
6290
  */
6172
6291
  requestModifiers: Array<clpp.net.RequestModifier>;
6292
+ /**
6293
+ * Timestamp when the request
6294
+ * was started. Optional and only set and used now for purposes of analytics.
6295
+ */
6296
+ requestStartTimestamp: number|null;
6173
6297
  /**
6174
6298
  * The list
6175
6299
  * of request modifiers that will be applied to this request
@@ -6252,6 +6376,10 @@ export namespace clpp {
6252
6376
  * The associated request
6253
6377
  */
6254
6378
  request?: clpp.net.Request;
6379
+ /**
6380
+ * Optional. The time it took to get the first byte of the response, in ms.
6381
+ */
6382
+ responseStartMs?: number;
6255
6383
  /**
6256
6384
  * The HTTP status code
6257
6385
  */