@castlabs/prestoplay 6.17.1 → 6.18.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 (63) hide show
  1. package/CHANGELOG.md +30 -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 +111 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +566 -558
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +75 -74
  10. package/cjs/cl.externs.js +46 -46
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +71 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +311 -311
  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 +15 -15
  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 +69 -69
  26. package/cjs/cl.ttml.js +28 -28
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +13 -13
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.youbora.js +18 -18
  32. package/cl.adobe.js +3 -3
  33. package/cl.airplay.js +3 -3
  34. package/cl.broadpeak.js +5 -5
  35. package/cl.cast.js +87 -87
  36. package/cl.conviva.js +27 -27
  37. package/cl.core.js +456 -450
  38. package/cl.crypto.js +8 -8
  39. package/cl.dash.js +70 -69
  40. package/cl.externs.js +46 -46
  41. package/cl.freewheel.js +19 -19
  42. package/cl.hls.js +72 -72
  43. package/cl.hlssmpte.js +5 -5
  44. package/cl.htmlcue.js +26 -26
  45. package/cl.ima.js +17 -17
  46. package/cl.mse.js +274 -273
  47. package/cl.muxdata.js +13 -13
  48. package/cl.onboard.js +4 -4
  49. package/cl.persistent.js +10 -10
  50. package/cl.playlist.js +5 -5
  51. package/cl.sessions.js +10 -10
  52. package/cl.simid.js +13 -13
  53. package/cl.smooth.js +59 -59
  54. package/cl.thumbnails.js +19 -19
  55. package/cl.tizen.js +57 -57
  56. package/cl.ttml.js +22 -22
  57. package/cl.verimatrix.js +4 -4
  58. package/cl.vimond.js +8 -8
  59. package/cl.vr.js +15 -15
  60. package/cl.vtt.js +12 -12
  61. package/cl.youbora.js +15 -15
  62. package/package.json +2 -2
  63. package/typings.d.ts +37 -3
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 Au=" The setting will be ignored.",Bu="VTT parser encountered an invalid VTT setting: ",Cu="application/x-subrip",Du="text/srt",Eu='text/vtt; codecs\x3d"vtt"',Fu='text/vtt; codecs\x3d"wvtt"',Gu=function(a){return a.a===a.f.length?null:(a=_.Gi(a,/[^ \t\n]*/gm))?a[0]:null},Hu=function(a){_.Gi(a,/[ \t]+/gm)},Iu=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},Ju=function(a){a=_.Gi(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)},Lu=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"===b?a.textAlign=_.ns:a.textAlign=_.ts[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"===d[1]?_.eg:_.fg;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===_.he||b===_.If?_.he:b===_.ie||b===_.Td?
4
- _.ie:_.$c);else if(d=/^region:(.*)$/.exec(b)){if(b=Ku(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=_.us[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.ps,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.us[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Ku=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)},Nu=function(a,b,c){let d,e,f;(new _.Jl).M("payl",_.El(g=>{d=_.li(g)})).M("iden",_.El(g=>{e=_.li(g)})).M("sttg",_.El(g=>{f=_.li(g)})).parse(a);return d?Mu(d,e,f,b,c):null},Mu=function(a,b,c,d,e){a=new _.ss(d,e,a,_.rg);b&&(a.id=b);if(c)for(b=new _.Hi(c),c=Gu(b);c;)Lu(a,c,[])||_.C(Bu,c,Au),Hu(b),c=Gu(b);return a},Ou=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+=Iu(c)}return _.pi(b)}},Pu=class{create(){return new Ou}probe(a,b){return(a===Du||a===Cu)&&b===_.Rf}};var Qu=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 _.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=Ju(new _.Hi(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 _.Hi(f.replace(/\n/g," "));d=new _.xs;Gu(e);Hu(e);for(var g=Gu(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,Au);Hu(e);g=Gu(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 _.Hi(l[0]);g=Ju(d);const q=_.Gi(d,/[ \t]+--\x3e[ \t]+/g);k=Ju(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 _.ss(g,k,l,_.rg);e&&(g.id=e);Hu(d);for(k=Gu(d);k;)Lu(g,k,c)||_.C(Bu,k,Au),Hu(d),k=Gu(d);null!=e&&(g.id=e);c=g}c&&m.push(c)}return{cues:m,styles:f}}};var Ru=class extends Qu{parseMedia(a,b){return super.parseMedia((new Ou).a(a),b)}};var Su=class{constructor(){this.a=null;this.h=new _.R("clpp.vtt.mp4")}parseInit(a){let b=!1;(new _.Jl).M(_.ye,_.Cl).M(_.Uf,_.Cl).M(_.te,_.Cl).ba("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)}).M(_.xe,_.Cl).M(_.Lf,_.Cl).ba(_.Nf,_.Dl).M("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.h.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 _.Jl).M("moof",_.Cl).M("traf",_.Cl).ba("tfdt",q=>{g=!0;c=0===q.version?_.P(q.reader):_.xl(q.reader)}).ba("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}).ba("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 B=[];for(let D=0;D<y;D++){const M={duration:null,sampleSize:null,He:null};v&256&&(M.duration=_.P(q));v&512&&(M.sampleSize=
11
- _.P(q));v&1024&&q.skip(4);v&2048&&(M.He=0===u?_.P(q):_.wl(q));B.push(M)}d=B}}).M(_.se,_.El(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 _.vm(m,!1);for(const q of d){const u=q.duration||l,v=q.He?c+q.He:a;a=v+(u||0);let y=0;do{const B=_.P(m);y+=B;var n=_.P(m);n=_.Bl(n);let D=null;"vttc"===n?8<B&&(D=_.zl(m,B-8)):("vtte"!==n&&this.h.error("Unknown box "+n+"! Skipping!"),m.skip(B-8));u?D&&f.push(Nu(D,b.periodStart+v/this.a,
12
- b.periodStart+a/this.a)):this.h.error("WVTT sample duration unknown, and no default found!")}while(q.sampleSize&&y<q.sampleSize)}return{cues:f.filter(_.Fh),styles:[]}}};_.z("clpp.vtt.VttComponent",class extends _.Pt{constructor(){super();this.j=new Pu}f(){_.Yr(_.Rf,Qu);_.Yr(Eu,Qu);_.Yr(Fu,Qu);_.Yr(_.Bc,Su);_.Yr(Du,Ru);_.Yr(Cu,Ru);_.Aj.push(this.j)}a(){_.$r(_.Rf);_.$r(Eu);_.$r(Fu);_.$r(_.Bc);_.$r(Du);_.$r(Cu);_.Cj(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 Ju=" The setting will be ignored.",Ku="VTT parser encountered an invalid VTT setting: ",Lu="application/x-subrip",Mu="text/srt",Nu='text/vtt; codecs\x3d"vtt"',Ou='text/vtt; codecs\x3d"wvtt"',Pu=function(a){return a.a===a.f.length?null:(a=_.Ji(a,/[^ \t\n]*/gm))?a[0]:null},Qu=function(a){_.Ji(a,/[ \t]+/gm)},Ru=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},Su=function(a){a=_.Ji(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)},Uu=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"===b?a.textAlign=_.ws:a.textAlign=_.Cs[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"===d[1]?_.ig:_.jg;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===_.Mf?_.ke:b===_.me||b===_.Ud?
4
+ _.me:_.ad);else if(d=/^region:(.*)$/.exec(b)){if(b=Tu(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=_.Ds[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.ys,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.Ds[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Tu=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)},Wu=function(a,b,c){let d,e,f;(new _.Ml).M("payl",_.Hl(g=>{d=_.oi(g)})).M("iden",_.Hl(g=>{e=_.oi(g)})).M("sttg",_.Hl(g=>{f=_.oi(g)})).parse(a);return d?Vu(d,e,f,b,c):null},Vu=function(a,b,c,d,e){a=new _.Bs(d,e,a,_.ug);b&&(a.id=b);if(c)for(b=new _.Ki(c),c=Pu(b);c;)Uu(a,c,[])||_.C(Ku,c,Ju),Qu(b),c=Pu(b);return a},Xu=class{a(a){a=_.oi(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+=Ru(c)}return _.si(b)}},Yu=class{create(){return new Xu}probe(a,b){return(a===Mu||a===Lu)&&b===_.Vf}};var Zu=class{constructor(a){this.a=a}parseInit(){}parseMedia(a,b){a=_.oi(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=Su(new _.Ki(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 _.Ki(f.replace(/\n/g," "));d=new _.Gs;Pu(e);Qu(e);for(var g=Pu(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,Ju);Qu(e);g=Pu(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 _.Ki(l[0]);g=Su(d);const q=_.Ji(d,/[ \t]+--\x3e[ \t]+/g);k=Su(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 _.Bs(g,k,l,_.ug);e&&(g.id=e);Qu(d);for(k=Pu(d);k;)Uu(g,k,c)||_.C(Ku,k,Ju),Qu(d),k=Pu(d);null!=e&&(g.id=e);c=g}c&&m.push(c)}return{cues:m,styles:f}}};var $u=class extends Zu{parseMedia(a,b){return super.parseMedia((new Xu).a(a),b)}};var av=class{constructor(){this.a=null;this.g=new _.R("clpp.vtt.mp4")}parseInit(a){let b=!1;(new _.Ml).M(_.Be,_.Fl).M(_.Yf,_.Fl).M(_.we,_.Fl).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)}).M(_.Ae,_.Fl).M(_.Pf,_.Fl).ca(_.Rf,_.Gl).M("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 _.Ml).M("moof",_.Fl).M("traf",_.Fl).ca("tfdt",q=>{g=!0;c=0===q.version?_.P(q.reader):_.Al(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 B=[];for(let D=0;D<y;D++){const M={duration:null,sampleSize:null,Je:null};v&256&&(M.duration=_.P(q));v&512&&(M.sampleSize=
11
+ _.P(q));v&1024&&q.skip(4);v&2048&&(M.Je=0===u?_.P(q):_.zl(q));B.push(M)}d=B}}).M(_.ve,_.Hl(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 _.ym(m,!1);for(const q of d){const u=q.duration||l,v=q.Je?c+q.Je:a;a=v+(u||0);let y=0;do{const B=_.P(m);y+=B;var n=_.P(m);n=_.El(n);let D=null;"vttc"===n?8<B&&(D=_.Cl(m,B-8)):("vtte"!==n&&this.g.error("Unknown box "+n+"! Skipping!"),m.skip(B-8));u?D&&f.push(Wu(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(_.Ih),styles:[]}}};_.z("clpp.vtt.VttComponent",class extends _.Yt{constructor(){super();this.j=new Yu}f(){_.gs(_.Vf,Zu);_.gs(Nu,Zu);_.gs(Ou,Zu);_.gs(_.Cc,av);_.gs(Mu,$u);_.gs(Lu,$u);_.Dj.push(this.j)}a(){_.is(_.Vf);_.is(Nu);_.is(Ou);_.is(_.Cc);_.is(Mu);_.is(Lu);_.Fj(this.j)}id(){return"subtitles-vtt"}});};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 su="clpp.npaw.YouboraPlugin",tu="content.isLive",uu=function(a,b){if(b.namespace()===_.jd)return a.h.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.Sg(c))return a.h.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.h.warn("accountCode key is missing in Youbora config"),b.onError(new _.H(1,9,9101)),!1;if(_.A(window.youbora))return a.h.warn("Youbora SDK not found."),b.onError(new _.H(1,9,
2
- 9100)),!1;"6.8.57"!==youbora.VERSION&&(a.h.warn("Youbora SDK version is not supported. The supported version is 6.8.57, found "+`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.H(1,9,9102)));return!0},vu=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),wu=(a,b,c,d)=>{b=vu(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===
3
- a.code?"ad error":_.r;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 xu=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.a=new _.ks;this.h=new _.R("clpp.npaw.YouboraAdapter");this.g=this.w=!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.ma())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.l(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,
4
- d,e)}getIsLive(){return this.m.isLive()}getResource(){const c=this.m.getLoadedSource();return c&&c.url}getBitrate(){return this.l().streamBandwidth}getThroughput(){return this.l().estimatedBandwidth}getPlayrate(){return this.m.getPlaybackRate()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.Fa())?c.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"6.17.1-castlabsadapter-js"}getPlayerVersion(){return _.fa}registerListeners(){this.m&&this.a&&(this.h.debug("registering listeners"),
5
- youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Jf,this.I.bind(this)),this.a.on(this.m,_.r,this.F.bind(this)),this.a.on(this.m,_.cg,this.H.bind(this)),this.a.on(this.m,_.bg,this.G.bind(this)),this.a.on(this.m,_.tc,this.B.bind(this)),this.a.on(this.m,_.Wc,this.C.bind(this)))}unregisterListeners(){this.h.debug(_.Ob);_.mh(this.a)}dispose(){super.dispose()}l(){return this.m.getStats()||_.Gn()}o(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;this.j("state change",c);if(c)switch(c.currentState){case _.Un:this.o()&&
6
- this.f();break;case _.Wn:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.Vn:this.o()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.Tn:this.fireBufferEnd();this.fireStop();break;case _.Ln:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.On:this.fireBufferBegin();break;default:this.h.debug("Unhandled state",c)}}f(){this.plugin.isInitiated||(this.g=!1,this.fireInit())}A(){var c=this.m.getDrmInfo();c&&
7
- (c=c.keySystem,(c=c.startsWith(_.yd)?"Widevine":c.startsWith(_.ud)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.Ke)?"ClearKey":c.startsWith(_.td)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()}F(c){!(c=c.detail)||this.g||10003===c.code&&this.plugin.getAdsAdapter()||(c=wu(c,this.m,this.h,this))&&c.severity===_.F&&(this.g=!0)}H(){this.m.isEnded()||(this.j(_.Bf),this.f(),this.fireSeekBegin())}G(){this.j(_.Af);this.fireSeekEnd()}B(c){this.h.debug("adsTimeline",
8
- c);c=c.adsTimeline;this.w=!!c&&c.pb()}C(c){this.h.debug("Casting",c);this.fireCasted()}j(c,...d){this.h.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var yu=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.j=this.a=null;this.f=new _.ks;this.h=new _.R("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.zb(),this.a.yb(),this.a.nb()));return c}getBitrate(){return this.a&&this.a.nb()}getPlayhead(){const c=this.m.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.ab()){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.m.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.Bb()}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.h.debug("is container visible",c);return c}getPlayerName(){return _.ra}getVersion(){return"6.17.1-castlabsadsadapter-js"}getPlayerVersion(){return _.fa}registerListeners(){this.m&&
11
- this.f&&(this.f.on(this.m,_.tc,this.N.bind(this)),this.f.on(this.m,_.pc,this.L.bind(this)),this.f.on(this.m,_.lc,this.I.bind(this)),this.f.on(this.m,_.nc,this.J.bind(this)),this.f.on(this.m,_.fc,this.G.bind(this)),this.f.on(this.m,_.gc,this.o.bind(this,1)),this.f.on(this.m,_.jc,this.o.bind(this,2)),this.f.on(this.m,_.rc,this.o.bind(this,3)),this.f.on(this.m,_.ec,this.F.bind(this)),this.f.on(this.m,_.oc,this.K.bind(this)),this.f.on(this.m,_.r,this.H.bind(this)),this.f.on(this.m,_.bc,this.A.bind(this)),
12
- this.f.on(this.m,_.cc,this.B.bind(this)),this.f.on(this.m,_.dc,this.C.bind(this)),this.f.on(this.m,_.mc,this.w.bind(this)))}unregisterListeners(){_.mh(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.l=!0;this.g("ad buffering started");
13
- this.fireBufferBegin()}w(){this.l&&(this.g("ad buffering ended"),this.l=!1,this.fireBufferEnd())}o(c){this.g("ad quartile",c);this.fireQuartile(c)}F(){this.g("ad clicked");const c=this.a&&this.a.Mb();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&&wu(c,this.m,this.h,this)}g(c,...d){this.h.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var zu=class extends _.ru{constructor(){super();this.a=null;this.h=new _.R(su);this.m=null}Ce(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(xu(this.m)),this.a.setAdsAdapter(yu(this.m))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;uu(this,a)&&(a=a.getConfiguration().youbora,this.Ce(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(uu(this,a)){a=a.getConfiguration();var c=
15
- a.youbora;void 0===c[tu]&&(c[tu]=b.isLive);void 0===c["content.title"]&&(c["content.title"]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Ce(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return"youbora"}};_.z(su,zu);zu.prototype.getAdsAdapter=zu.prototype.getAdsAdapter;zu.prototype.getAdapter=zu.prototype.getAdapter;zu.prototype.setYouboraPlugin=zu.prototype.Ce;zu.Id="youbora";_.ap(new class{create(){return new zu}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Bu="clpp.npaw.YouboraPlugin",Cu="content.isLive",Du=function(a,b){if(b.namespace()===_.kd)return a.g.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.Vg(c))return a.g.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.g.warn("accountCode key is missing in Youbora config"),b.onError(new _.H(1,9,9101)),!1;if(_.A(window.youbora))return a.g.warn("Youbora SDK not found."),b.onError(new _.H(1,9,
2
+ 9100)),!1;"6.8.59"!==youbora.VERSION&&(a.g.warn("Youbora SDK version is not supported. The supported version is 6.8.59, found "+`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.H(1,9,9102)));return!0},Eu=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),Fu=(a,b,c,d)=>{b=Eu(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===
3
+ a.code?"ad error":_.r;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 Gu=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.a=new _.ts;this.g=new _.R("clpp.npaw.YouboraAdapter");this.h=this.w=!1;this.registerListeners()}getPlayhead(){return this.getIsLive()?-1:this.m.getPosition()}getDuration(){return this.m.getDuration()}getRendition(){let c,d,e;var f=this.m.getTrackManager();f&&(f=f.oa())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.l(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,
4
+ d,e)}getIsLive(){return this.m.isLive()}getResource(){const c=this.m.getLoadedSource();return c&&c.url}getBitrate(){return this.l().streamBandwidth}getThroughput(){return this.l().estimatedBandwidth}getPlayrate(){return this.m.getPlaybackRate()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.Ja())?c.frameRate:null}getPlayerName(){return _.ra}getVersion(){return"6.18.0-castlabsadapter-js"}getPlayerVersion(){return _.fa}registerListeners(){this.m&&this.a&&(this.g.debug("registering listeners"),
5
+ youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Nf,this.I.bind(this)),this.a.on(this.m,_.r,this.F.bind(this)),this.a.on(this.m,_.gg,this.H.bind(this)),this.a.on(this.m,_.fg,this.G.bind(this)),this.a.on(this.m,_.uc,this.B.bind(this)),this.a.on(this.m,_.Xc,this.C.bind(this)))}unregisterListeners(){this.g.debug(_.Pb);_.ph(this.a)}dispose(){super.dispose()}l(){return this.m.getStats()||_.Jn()}o(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;this.j("state change",c);if(c)switch(c.currentState){case _.Xn:this.o()&&
6
+ this.f();break;case _.Zn:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.Yn:this.o()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.Wn:this.fireBufferEnd();this.fireStop();break;case _.On:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Rn:this.fireBufferBegin();break;default:this.g.debug("Unhandled state",c)}}f(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.m.getDrmInfo();c&&
7
+ (c=c.keySystem,(c=c.startsWith(_.zd)?"Widevine":c.startsWith(_.vd)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.Ne)?"ClearKey":c.startsWith(_.ud)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=Fu(c,this.m,this.g,this))&&c.severity===_.F&&(this.h=!0)}H(){this.m.isEnded()||(this.j(_.Ff),this.f(),this.fireSeekBegin())}G(){this.j(_.Ef);this.fireSeekEnd()}B(c){this.g.debug("adsTimeline",
8
+ c);c=c.adsTimeline;this.w=!!c&&c.sb()}C(c){this.g.debug("Casting",c);this.fireCasted()}j(c,...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var Hu=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.j=this.a=null;this.f=new _.ts;this.g=new _.R("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.Cb(),this.a.Bb(),this.a.qb()));return c}getBitrate(){return this.a&&this.a.qb()}getPlayhead(){const c=this.m.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.eb()){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&&
10
+ this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.Eb()}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("is container visible",c);return c}getPlayerName(){return _.ra}getVersion(){return"6.18.0-castlabsadsadapter-js"}getPlayerVersion(){return _.fa}registerListeners(){this.m&&
11
+ this.f&&(this.f.on(this.m,_.uc,this.N.bind(this)),this.f.on(this.m,_.qc,this.L.bind(this)),this.f.on(this.m,_.mc,this.I.bind(this)),this.f.on(this.m,_.oc,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,_.lc,this.o.bind(this,2)),this.f.on(this.m,_.sc,this.o.bind(this,3)),this.f.on(this.m,_.fc,this.F.bind(this)),this.f.on(this.m,_.pc,this.K.bind(this)),this.f.on(this.m,_.r,this.H.bind(this)),this.f.on(this.m,_.cc,this.A.bind(this)),
12
+ 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,_.nc,this.w.bind(this)))}unregisterListeners(){_.ph(this.f)}dispose(){super.dispose()}N(c){this.g.debug("ad timeline changed",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("ad buffering started");
13
+ this.fireBufferBegin()}w(){this.l&&(this.h("ad buffering ended"),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.Qb();this.g.debug("ad click through url: ",c);this.fireClick(c)}K(){this.h("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.h("ad break start",this.a);this.fireBreakStart()}B(){this.h("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&&Fu(c,this.m,this.g,this)}h(c,...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var Iu=class extends _.Au{constructor(){super();this.a=null;this.g=new _.R(Bu);this.m=null}Ee(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(Gu(this.m)),this.a.setAdsAdapter(Hu(this.m))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;Du(this,a)&&(a=a.getConfiguration().youbora,this.Ee(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(Du(this,a)){a=a.getConfiguration();var c=
15
+ a.youbora;void 0===c[Cu]&&(c[Cu]=b.isLive);void 0===c["content.title"]&&(c["content.title"]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Ee(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return"youbora"}};_.z(Bu,Iu);Iu.prototype.getAdsAdapter=Iu.prototype.getAdsAdapter;Iu.prototype.getAdapter=Iu.prototype.getAdapter;Iu.prototype.setYouboraPlugin=Iu.prototype.Ee;Iu.Id="youbora";_.dp(new class{create(){return new Iu}});};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.17.1",
4
+ "version": "6.18.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/castlabs/prestoplay-web.git"
@@ -26,7 +26,7 @@
26
26
  "@broadpeak/smartlib-all-compatibility": "5.0.1-4c69e21",
27
27
  "@broadpeak/smartlib-analytics": "5.0.1-4c69e21",
28
28
  "mux.js": "^5.14.1",
29
- "youboralib": "6.8.57"
29
+ "youboralib": "6.8.59"
30
30
  },
31
31
  "peerDependenciesMeta": {
32
32
  "mux.js": {
package/typings.d.ts CHANGED
@@ -437,6 +437,12 @@ export namespace clpp {
437
437
  * By default player tries to setup most secure system on given platform.
438
438
  */
439
439
  preferredDrmSystem?: clpp.drm.KeySystem;
440
+ /**
441
+ * The version of the Widevine key system. This option may be used in order
442
+ * to enable experimental versions of the Widevine key system such as
443
+ * "com.widevine.alpha.experiment" or "com.widevine.alpha.experiment2".
444
+ */
445
+ widevineVersion?: string;
440
446
  }
441
447
 
442
448
  /**
@@ -883,6 +889,10 @@ export namespace clpp {
883
889
  * Supported values: `4.0.0.0`, `4.1.0.0`, `4.2.0.0`, `4.3.0.0`.
884
890
  */
885
891
  playreadyVersion: string;
892
+ /**
893
+ * Configuration of the timeline.
894
+ */
895
+ timeline?: clpp.TimelineConfiguration;
886
896
  /**
887
897
  * If true, xlink-related errors will result in a fallback to the tag's
888
898
  * existing contents. If false, xlink-related errors will be propagated
@@ -2321,6 +2331,21 @@ export namespace clpp {
2321
2331
  url: string;
2322
2332
  }
2323
2333
 
2334
+ /**
2335
+ * Configuration of the timeline.
2336
+ */
2337
+ export type TimelineConfiguration = {
2338
+ /**
2339
+ * This option applies only to DASH, otherwise it is ignored.
2340
+ * If type is 'startover' it is possible to seek to the very start of
2341
+ * the stream even though it is live and the timeline
2342
+ * is updated based on the manifest without interpolation.
2343
+ * Note: the 'startover' type is compatible with manifests based on
2344
+ * SegmentTimeline or SegmentList.
2345
+ */
2346
+ type?: string;
2347
+ }
2348
+
2324
2349
  /**
2325
2350
  * Contains information about a cue in the timeline that will cause an event
2326
2351
  * to be raised when the playhead enters or exits it. In DASH this is the
@@ -6183,7 +6208,6 @@ export namespace clpp {
6183
6208
 
6184
6209
  /**
6185
6210
  * DRMtoday Widevine Server Certificates.
6186
- *
6187
6211
  * Use these constants to specify a specific DRMtoday Widevine Server
6188
6212
  * Certificate to be used.
6189
6213
  */
@@ -6197,7 +6221,8 @@ export namespace clpp {
6197
6221
  */
6198
6222
  V1_STAGING = "V1_STAGING",
6199
6223
  /**
6200
- * The DRMtoday widevine certificate version 2
6224
+ * The DRMtoday widevine certificate version 2 (latest version for both
6225
+ * prod and staging)
6201
6226
  */
6202
6227
  V2 = "V2",
6203
6228
  }
@@ -6582,6 +6607,10 @@ export namespace clpp {
6582
6607
  * End time of the interstitial in seconds.
6583
6608
  */
6584
6609
  endTime: number;
6610
+ /**
6611
+ * Placement of the cue.
6612
+ */
6613
+ placement: string;
6585
6614
  /**
6586
6615
  * Duration of the primary content in seconds.
6587
6616
  */
@@ -6656,11 +6685,16 @@ export namespace clpp {
6656
6685
  ITEM_CHANGED = "item-changed",
6657
6686
  /**
6658
6687
  * Triggered when playback started. The content which started playing can
6659
- * either by primary content or an interstitial preroll.
6688
+ * either be primary content or an interstitial preroll.
6660
6689
  * In contrast {@link clpp.interstitial.Event.PRIMARY_STARTED} is triggered
6661
6690
  * when the primary content started playing which can be after a preroll.
6662
6691
  */
6663
6692
  PLAYBACK_STARTED = "playback-started",
6693
+ /**
6694
+ * Triggered when playback ended. The content which ended playing can
6695
+ * either be primary content or an interstitial postroll.
6696
+ */
6697
+ PLAYBACK_ENDED = "playback-ended",
6664
6698
  /**
6665
6699
  * Triggered when primary content playback started.
6666
6700
  */