@amazon/vinyl-mpd-parser 3.2.3-next.20261010160052 → 3.2.3-next.20261013174635

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 (45) hide show
  1. package/dist/index.cjs +124 -14
  2. package/dist/index.cjs.map +4 -4
  3. package/dist/index.js +125 -8
  4. package/dist/index.js.map +4 -4
  5. package/dist/test/benchmark.es5.js +18 -16
  6. package/dist/test/benchmark.js +155 -52
  7. package/dist/test/benchmark.js.map +4 -4
  8. package/dist/types/current/index.d.ts +2 -0
  9. package/dist/types/current/index.d.ts.map +1 -1
  10. package/dist/types/current/index.js +2 -0
  11. package/dist/types/current/manifest/dashManifestXmlRules.d.ts +5 -0
  12. package/dist/types/current/manifest/dashManifestXmlRules.d.ts.map +1 -1
  13. package/dist/types/current/manifest/dashManifestXmlRules.js +30 -5
  14. package/dist/types/current/manifest/dashParser.d.ts +368 -1
  15. package/dist/types/current/manifest/dashParser.d.ts.map +1 -1
  16. package/dist/types/current/manifest/dashParser.js +2 -1
  17. package/dist/types/current/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  18. package/dist/types/current/manifest/ext/events/scte35XmlRules.d.ts.map +1 -0
  19. package/dist/types/current/manifest/ext/events/scte35XmlRules.js +83 -0
  20. package/dist/types/current/tsconfig.tsbuildinfo +1 -1
  21. package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  22. package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts.map +1 -1
  23. package/dist/types/current/xmlns/scte/35/2016.d.ts +73 -0
  24. package/dist/types/current/xmlns/scte/35/2016.d.ts.map +1 -0
  25. package/dist/types/current/xmlns/scte/35/2016.js +13 -0
  26. package/dist/types/ts3.7/index.d.ts +2 -0
  27. package/dist/types/ts3.7/manifest/dashManifestXmlRules.d.ts +5 -0
  28. package/dist/types/ts3.7/manifest/dashParser.d.ts +368 -1
  29. package/dist/types/ts3.7/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  30. package/dist/types/ts3.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  31. package/dist/types/ts3.7/xmlns/scte/35/2016.d.ts +73 -0
  32. package/dist/types/ts4.1/index.d.ts +2 -0
  33. package/dist/types/ts4.1/manifest/dashManifestXmlRules.d.ts +5 -0
  34. package/dist/types/ts4.1/manifest/dashParser.d.ts +368 -1
  35. package/dist/types/ts4.1/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  36. package/dist/types/ts4.1/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  37. package/dist/types/ts4.1/xmlns/scte/35/2016.d.ts +73 -0
  38. package/dist/types/ts4.7/index.d.ts +2 -0
  39. package/dist/types/ts4.7/manifest/dashManifestXmlRules.d.ts +5 -0
  40. package/dist/types/ts4.7/manifest/dashParser.d.ts +368 -1
  41. package/dist/types/ts4.7/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  42. package/dist/types/ts4.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  43. package/dist/types/ts4.7/xmlns/scte/35/2016.d.ts +73 -0
  44. package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +6 -6
@@ -7,10 +7,12 @@ export * from './manifest/ext/drm/cencXmlRules';
7
7
  export * from './manifest/ext/drm/contentProtection';
8
8
  export * from './manifest/ext/drm/ContentProtectionScheme';
9
9
  export * from './manifest/ext/drm/playreadyXmlRules';
10
+ export * from './manifest/ext/events/scte35XmlRules';
10
11
  export * from './media/byteRange';
11
12
  export * from './media/frameRate';
12
13
  export * from './media/ratio';
13
14
  export * from './xmlns/microsoft/playready';
14
15
  export * from './xmlns/mpeg/cenc/2013';
15
16
  export * from './xmlns/mpeg/dash/schema/mpd/2011';
17
+ export * from './xmlns/scte/35/2016';
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sCAAsC,CAAA;AACpD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sCAAsC,CAAA;AACpD,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sCAAsC,CAAA;AACpD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sCAAsC,CAAA;AACpD,cAAc,sCAAsC,CAAA;AACpD,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,sBAAsB,CAAA"}
@@ -7,9 +7,11 @@ export * from './manifest/ext/drm/cencXmlRules';
7
7
  export * from './manifest/ext/drm/contentProtection';
8
8
  export * from './manifest/ext/drm/ContentProtectionScheme';
9
9
  export * from './manifest/ext/drm/playreadyXmlRules';
10
+ export * from './manifest/ext/events/scte35XmlRules';
10
11
  export * from './media/byteRange';
11
12
  export * from './media/frameRate';
12
13
  export * from './media/ratio';
13
14
  export * from './xmlns/microsoft/playready';
14
15
  export * from './xmlns/mpeg/cenc/2013';
15
16
  export * from './xmlns/mpeg/dash/schema/mpd/2011';
17
+ export * from './xmlns/scte/35/2016';
@@ -1,6 +1,11 @@
1
1
  import { type XmlRules } from '@amazon/vinyl-xml';
2
2
  import type { ConditionalUintType, DashManifest, PresentationType, SwitchingTypeType, VideoScanType } from '../xmlns/mpeg/dash/schema/mpd/2011';
3
3
  export declare const dashNamespaceUri = "urn:mpeg:dash:schema:mpd:2011";
4
+ /**
5
+ * The XLink namespace of remote element `xlink:href` and `xlink:actuate`
6
+ * attributes.
7
+ */
8
+ export declare const XLINK_NAMESPACE_URI = "http://www.w3.org/1999/xlink";
4
9
  export declare function dashManifestXmlRules(): XmlRules<DashManifest>;
5
10
  /**
6
11
  * Parses a comma delimited list of profiles.
@@ -1 +1 @@
1
- {"version":3,"file":"dashManifestXmlRules.d.ts","sourceRoot":"","sources":["../../../../src/manifest/dashManifestXmlRules.ts"],"names":[],"mappings":"AAaA,OAAO,EAWH,KAAK,QAAQ,EAChB,MAAM,mBAAmB,CAAA;AAO1B,OAAO,KAAK,EAGR,mBAAmB,EAEnB,YAAY,EAQZ,gBAAgB,EAchB,iBAAiB,EAEjB,aAAa,EAChB,MAAM,oCAAoC,CAAA;AAE3C,eAAO,MAAM,gBAAgB,kCAAkC,CAAA;AAE/D,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,YAAY,CAAC,CAkR7D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAElE;AAQD;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAGzD;AAOD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAGrE;AAID;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA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;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAGrE;AAID;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI5C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEnE;AAQD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAGvE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAUrE"}
@@ -10,10 +10,17 @@ import { parseByteRange, stringifyByteRange } from '../media/byteRange';
10
10
  import { parseRatio, stringifyRatio } from '../media/ratio';
11
11
  import { parseFrameRate, stringifyFrameRate } from '../media/frameRate';
12
12
  export const dashNamespaceUri = 'urn:mpeg:dash:schema:mpd:2011';
13
+ /**
14
+ * The XLink namespace of remote element `xlink:href` and `xlink:actuate`
15
+ * attributes.
16
+ */
17
+ export const XLINK_NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
13
18
  export function dashManifestXmlRules() {
14
19
  const attrActuateType = attr(assertActuateEnum, stringify, {
15
20
  default: 'onRequest',
21
+ namespaceUri: XLINK_NAMESPACE_URI,
16
22
  });
23
+ const attrHref = attrString({ namespaceUri: XLINK_NAMESPACE_URI });
17
24
  const descriptorType = {
18
25
  id: attrString,
19
26
  schemeIdUri: attrString({ required: true }),
@@ -76,7 +83,7 @@ export function dashManifestXmlRules() {
76
83
  const segmentListType = {
77
84
  ...multipleSegmentBaseType,
78
85
  actuate: attrActuateType,
79
- href: attrString,
86
+ href: attrHref,
80
87
  SegmentURL: elements(segmentURLType),
81
88
  };
82
89
  const segmentTemplateType = {
@@ -90,19 +97,32 @@ export function dashManifestXmlRules() {
90
97
  contains: attr(parseIntVector, stringifyIntVector, { required: true }),
91
98
  id: attrString,
92
99
  };
100
+ const alternativePresentationType = {
101
+ uri: attrString,
102
+ maxDuration: attrInt,
103
+ earliestResolutionTimeOffset: attrInt,
104
+ returnOffset: attrInt,
105
+ clip: attrBoolean,
106
+ startWithOffset: attrBoolean,
107
+ };
93
108
  const eventType = {
94
109
  duration: attrInt,
95
110
  id: attrInt,
96
111
  messageData: attrString,
97
112
  presentationTime: attrInt({ default: 0 }),
113
+ contentEncoding: attrString,
114
+ _content: charactersString,
115
+ InsertPresentation: element(alternativePresentationType),
116
+ ReplacePresentation: element(alternativePresentationType),
98
117
  };
99
118
  const eventStreamType = {
100
119
  Event: elements(eventType),
101
120
  actuate: attrActuateType,
102
- href: attrString,
121
+ href: attrHref,
103
122
  messageData: attrString,
104
123
  schemeIdUri: attrString({ required: true }),
105
124
  timescale: attrInt,
125
+ presentationTimeOffset: attrInt,
106
126
  value: attrString,
107
127
  };
108
128
  const switchingType = {
@@ -169,7 +189,7 @@ export function dashManifestXmlRules() {
169
189
  bitstreamSwitching: attrBoolean,
170
190
  contentType: attrString,
171
191
  group: attrInt,
172
- href: attrString,
192
+ href: attrHref,
173
193
  id: attrInt,
174
194
  lang: attrString,
175
195
  maxBandwidth: attrInt,
@@ -201,6 +221,10 @@ export function dashManifestXmlRules() {
201
221
  Range: elements(rangeType),
202
222
  Reporting: elements(descriptorType, { minOccurs: 1 }),
203
223
  };
224
+ const importedMpdType = {
225
+ earliestResolutionTimeOffset: attrFloat,
226
+ _content: charactersString,
227
+ };
204
228
  const periodType = {
205
229
  BaseURL: elements(baseURLType),
206
230
  SegmentBase: element(segmentBaseType),
@@ -211,10 +235,11 @@ export function dashManifestXmlRules() {
211
235
  AdaptationSet: elements(adaptationSetType),
212
236
  Subset: elements(subsetType),
213
237
  SupplementalProperty: elements(descriptorType),
238
+ ImportedMPD: element(importedMpdType),
214
239
  actuate: attrActuateType,
215
240
  bitstreamSwitching: attrBoolean({ default: false }),
216
241
  duration: attr(parseDuration, stringifyDuration),
217
- href: attrString,
242
+ href: attrHref,
218
243
  id: attrString,
219
244
  start: attr(parseDuration, stringifyDuration),
220
245
  };
@@ -333,7 +358,7 @@ export function parseIntVector(str) {
333
358
  export function stringifyIntVector(value) {
334
359
  return value.join(' ');
335
360
  }
336
- const presentationTypeValidator = isOneOf('static', 'dynamic');
361
+ const presentationTypeValidator = isOneOf('static', 'dynamic', 'list');
337
362
  /**
338
363
  * Asserts that the given string is one of the {@link PresentationType} enumerated values.
339
364
  * @param str