@amazon/vinyl-mpd-parser 1.0.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 (138) hide show
  1. package/dist/dashTestAssets/index.js +1559 -0
  2. package/dist/dashTestAssets/index.js.map +7 -0
  3. package/dist/dashTestAssets/types/current/dash_personalizedResponse.d.ts +6 -0
  4. package/dist/dashTestAssets/types/current/dash_personalizedResponse.d.ts.map +1 -0
  5. package/dist/dashTestAssets/types/current/dash_personalizedResponse.js +831 -0
  6. package/dist/dashTestAssets/types/current/dash_segmentBase.d.ts +5 -0
  7. package/dist/dashTestAssets/types/current/dash_segmentBase.d.ts.map +1 -0
  8. package/dist/dashTestAssets/types/current/dash_segmentBase.js +144 -0
  9. package/dist/dashTestAssets/types/current/dash_segmentList.d.ts +6 -0
  10. package/dist/dashTestAssets/types/current/dash_segmentList.d.ts.map +1 -0
  11. package/dist/dashTestAssets/types/current/dash_segmentList.js +107 -0
  12. package/dist/dashTestAssets/types/current/dash_segmentListMediaRange.d.ts +8 -0
  13. package/dist/dashTestAssets/types/current/dash_segmentListMediaRange.d.ts.map +1 -0
  14. package/dist/dashTestAssets/types/current/dash_segmentListMediaRange.js +472 -0
  15. package/dist/dashTestAssets/types/current/dash_segmentTemplate.d.ts +5 -0
  16. package/dist/dashTestAssets/types/current/dash_segmentTemplate.d.ts.map +1 -0
  17. package/dist/dashTestAssets/types/current/dash_segmentTemplate.js +34 -0
  18. package/dist/dashTestAssets/types/current/index.d.ts +7 -0
  19. package/dist/dashTestAssets/types/current/index.d.ts.map +1 -0
  20. package/dist/dashTestAssets/types/current/index.js +6 -0
  21. package/dist/dashTestAssets/types/current/tsconfig.tsbuildinfo +1 -0
  22. package/dist/dashTestAssets/types/ts3.7/dash_personalizedResponse.d.ts +6 -0
  23. package/dist/dashTestAssets/types/ts3.7/dash_segmentBase.d.ts +5 -0
  24. package/dist/dashTestAssets/types/ts3.7/dash_segmentList.d.ts +6 -0
  25. package/dist/dashTestAssets/types/ts3.7/dash_segmentListMediaRange.d.ts +8 -0
  26. package/dist/dashTestAssets/types/ts3.7/dash_segmentTemplate.d.ts +5 -0
  27. package/dist/dashTestAssets/types/ts3.7/index.d.ts +7 -0
  28. package/dist/dashTestAssets/types/ts4.1/dash_personalizedResponse.d.ts +6 -0
  29. package/dist/dashTestAssets/types/ts4.1/dash_segmentBase.d.ts +5 -0
  30. package/dist/dashTestAssets/types/ts4.1/dash_segmentList.d.ts +6 -0
  31. package/dist/dashTestAssets/types/ts4.1/dash_segmentListMediaRange.d.ts +8 -0
  32. package/dist/dashTestAssets/types/ts4.1/dash_segmentTemplate.d.ts +5 -0
  33. package/dist/dashTestAssets/types/ts4.1/index.d.ts +7 -0
  34. package/dist/dashTestAssets/types/ts4.7/dash_personalizedResponse.d.ts +6 -0
  35. package/dist/dashTestAssets/types/ts4.7/dash_segmentBase.d.ts +5 -0
  36. package/dist/dashTestAssets/types/ts4.7/dash_segmentList.d.ts +6 -0
  37. package/dist/dashTestAssets/types/ts4.7/dash_segmentListMediaRange.d.ts +8 -0
  38. package/dist/dashTestAssets/types/ts4.7/dash_segmentTemplate.d.ts +5 -0
  39. package/dist/dashTestAssets/types/ts4.7/index.d.ts +7 -0
  40. package/dist/index.cjs +583 -0
  41. package/dist/index.cjs.map +7 -0
  42. package/dist/index.js +584 -0
  43. package/dist/index.js.map +7 -0
  44. package/dist/test/benchmark.es5.js +566 -0
  45. package/dist/test/benchmark.js +4497 -0
  46. package/dist/test/benchmark.js.map +7 -0
  47. package/dist/types/current/duration/duration.d.ts +34 -0
  48. package/dist/types/current/duration/duration.d.ts.map +1 -0
  49. package/dist/types/current/duration/duration.js +83 -0
  50. package/dist/types/current/error/parsingError.d.ts +2 -0
  51. package/dist/types/current/error/parsingError.d.ts.map +1 -0
  52. package/dist/types/current/error/parsingError.js +8 -0
  53. package/dist/types/current/index.d.ts +16 -0
  54. package/dist/types/current/index.d.ts.map +1 -0
  55. package/dist/types/current/index.js +15 -0
  56. package/dist/types/current/manifest/dashManifestXmlRules.d.ts +65 -0
  57. package/dist/types/current/manifest/dashManifestXmlRules.d.ts.map +1 -0
  58. package/dist/types/current/manifest/dashManifestXmlRules.js +360 -0
  59. package/dist/types/current/manifest/dashParser.d.ts +23 -0
  60. package/dist/types/current/manifest/dashParser.d.ts.map +1 -0
  61. package/dist/types/current/manifest/dashParser.js +28 -0
  62. package/dist/types/current/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
  63. package/dist/types/current/manifest/ext/drm/ContentProtectionScheme.d.ts.map +1 -0
  64. package/dist/types/current/manifest/ext/drm/ContentProtectionScheme.js +34 -0
  65. package/dist/types/current/manifest/ext/drm/cencXmlRules.d.ts +8 -0
  66. package/dist/types/current/manifest/ext/drm/cencXmlRules.d.ts.map +1 -0
  67. package/dist/types/current/manifest/ext/drm/cencXmlRules.js +21 -0
  68. package/dist/types/current/manifest/ext/drm/contentProtection.d.ts +32 -0
  69. package/dist/types/current/manifest/ext/drm/contentProtection.d.ts.map +1 -0
  70. package/dist/types/current/manifest/ext/drm/contentProtection.js +32 -0
  71. package/dist/types/current/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
  72. package/dist/types/current/manifest/ext/drm/playreadyXmlRules.d.ts.map +1 -0
  73. package/dist/types/current/manifest/ext/drm/playreadyXmlRules.js +13 -0
  74. package/dist/types/current/media/byteRange.d.ts +12 -0
  75. package/dist/types/current/media/byteRange.d.ts.map +1 -0
  76. package/dist/types/current/media/byteRange.js +30 -0
  77. package/dist/types/current/media/frameRate.d.ts +14 -0
  78. package/dist/types/current/media/frameRate.d.ts.map +1 -0
  79. package/dist/types/current/media/frameRate.js +25 -0
  80. package/dist/types/current/media/ratio.d.ts +24 -0
  81. package/dist/types/current/media/ratio.d.ts.map +1 -0
  82. package/dist/types/current/media/ratio.js +36 -0
  83. package/dist/types/current/tsconfig.tsbuildinfo +1 -0
  84. package/dist/types/current/xmlns/microsoft/playready.d.ts +12 -0
  85. package/dist/types/current/xmlns/microsoft/playready.d.ts.map +1 -0
  86. package/dist/types/current/xmlns/microsoft/playready.js +11 -0
  87. package/dist/types/current/xmlns/mpeg/cenc/2013.d.ts +19 -0
  88. package/dist/types/current/xmlns/mpeg/cenc/2013.d.ts.map +1 -0
  89. package/dist/types/current/xmlns/mpeg/cenc/2013.js +11 -0
  90. package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
  91. package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts.map +1 -0
  92. package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.js +5 -0
  93. package/dist/types/ts3.7/duration/duration.d.ts +34 -0
  94. package/dist/types/ts3.7/error/parsingError.d.ts +2 -0
  95. package/dist/types/ts3.7/index.d.ts +16 -0
  96. package/dist/types/ts3.7/manifest/dashManifestXmlRules.d.ts +65 -0
  97. package/dist/types/ts3.7/manifest/dashParser.d.ts +23 -0
  98. package/dist/types/ts3.7/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
  99. package/dist/types/ts3.7/manifest/ext/drm/cencXmlRules.d.ts +8 -0
  100. package/dist/types/ts3.7/manifest/ext/drm/contentProtection.d.ts +32 -0
  101. package/dist/types/ts3.7/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
  102. package/dist/types/ts3.7/media/byteRange.d.ts +15 -0
  103. package/dist/types/ts3.7/media/frameRate.d.ts +17 -0
  104. package/dist/types/ts3.7/media/ratio.d.ts +27 -0
  105. package/dist/types/ts3.7/xmlns/microsoft/playready.d.ts +12 -0
  106. package/dist/types/ts3.7/xmlns/mpeg/cenc/2013.d.ts +19 -0
  107. package/dist/types/ts3.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
  108. package/dist/types/ts4.1/duration/duration.d.ts +34 -0
  109. package/dist/types/ts4.1/error/parsingError.d.ts +2 -0
  110. package/dist/types/ts4.1/index.d.ts +16 -0
  111. package/dist/types/ts4.1/manifest/dashManifestXmlRules.d.ts +65 -0
  112. package/dist/types/ts4.1/manifest/dashParser.d.ts +23 -0
  113. package/dist/types/ts4.1/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
  114. package/dist/types/ts4.1/manifest/ext/drm/cencXmlRules.d.ts +8 -0
  115. package/dist/types/ts4.1/manifest/ext/drm/contentProtection.d.ts +32 -0
  116. package/dist/types/ts4.1/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
  117. package/dist/types/ts4.1/media/byteRange.d.ts +15 -0
  118. package/dist/types/ts4.1/media/frameRate.d.ts +17 -0
  119. package/dist/types/ts4.1/media/ratio.d.ts +27 -0
  120. package/dist/types/ts4.1/xmlns/microsoft/playready.d.ts +12 -0
  121. package/dist/types/ts4.1/xmlns/mpeg/cenc/2013.d.ts +19 -0
  122. package/dist/types/ts4.1/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
  123. package/dist/types/ts4.7/duration/duration.d.ts +34 -0
  124. package/dist/types/ts4.7/error/parsingError.d.ts +2 -0
  125. package/dist/types/ts4.7/index.d.ts +16 -0
  126. package/dist/types/ts4.7/manifest/dashManifestXmlRules.d.ts +65 -0
  127. package/dist/types/ts4.7/manifest/dashParser.d.ts +23 -0
  128. package/dist/types/ts4.7/manifest/ext/drm/ContentProtectionScheme.d.ts +31 -0
  129. package/dist/types/ts4.7/manifest/ext/drm/cencXmlRules.d.ts +8 -0
  130. package/dist/types/ts4.7/manifest/ext/drm/contentProtection.d.ts +32 -0
  131. package/dist/types/ts4.7/manifest/ext/drm/playreadyXmlRules.d.ts +4 -0
  132. package/dist/types/ts4.7/media/byteRange.d.ts +15 -0
  133. package/dist/types/ts4.7/media/frameRate.d.ts +17 -0
  134. package/dist/types/ts4.7/media/ratio.d.ts +27 -0
  135. package/dist/types/ts4.7/xmlns/microsoft/playready.d.ts +12 -0
  136. package/dist/types/ts4.7/xmlns/mpeg/cenc/2013.d.ts +19 -0
  137. package/dist/types/ts4.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +918 -0
  138. package/package.json +101 -0
@@ -0,0 +1,918 @@
1
+ import type { actuateType, Uri, UriType } from '@amazon/vinyl-xml';
2
+ import type { ReadonlyDate } from '@amazon/vinyl-util';
3
+ import type { ByteRange } from '../../../../../media/byteRange';
4
+ import type { Ratio } from '../../../../../media/ratio';
5
+ import type { Duration } from '../../../../../duration/duration';
6
+ import type { FrameRate } from '../../../../../media/frameRate';
7
+ /**
8
+ * Represents an adaptation set in a DASH Media Presentation. An adaptation set groups
9
+ * multiple representations that offer the same content but in different qualities, codecs,
10
+ * or other characteristics, allowing adaptive streaming based on network conditions or user
11
+ * preferences.
12
+ */
13
+ export interface AdaptationSetType extends RepresentationBaseType {
14
+ /**
15
+ * The parent Period.
16
+ */
17
+ readonly parent: PeriodType;
18
+ /**
19
+ * Specifies the actuation mechanism for this adaptation set, defining how it should be
20
+ * activated or selected.
21
+ */
22
+ readonly actuate: actuateType;
23
+ /**
24
+ * Indicates whether bitstream switching is supported, allowing seamless switches between representations
25
+ * without the need for reinitializing the decoder.
26
+ */
27
+ readonly bitstreamSwitching?: boolean;
28
+ /**
29
+ * The type of content (e.g., video, audio, text) this adaptation set represents.
30
+ */
31
+ readonly contentType?: string;
32
+ /**
33
+ * Specifies the selection priority for the described data structures, i.e. the one described by the containing
34
+ * element. In the absence of other information, higher numbers are the preferred selection to lower numbers.
35
+ */
36
+ readonly selectionPriority: number;
37
+ /**
38
+ * A group identifier, indicates a group of AdaptationSet elements that are related in some way.
39
+ * For example, an audio and video adaptation set that should be synchronized can be part of the same group.
40
+ */
41
+ readonly group?: number;
42
+ /**
43
+ * An optional URL reference providing additional information or data relevant to this adaptation set.
44
+ */
45
+ readonly href?: string;
46
+ /**
47
+ * A unique identifier for this adaptation set within the scope of the DASH manifest.
48
+ */
49
+ readonly id?: number;
50
+ /**
51
+ * Specifies the language of the content, using a code as defined by RFC 5646.
52
+ */
53
+ readonly lang?: string;
54
+ /**
55
+ * The maximum bandwidth in bits per second of all representations in this adaptation set.
56
+ */
57
+ readonly maxBandwidth?: number;
58
+ /**
59
+ * The maximum frame rate of all video representations in this adaptation set.
60
+ */
61
+ readonly maxFrameRate?: FrameRate;
62
+ /**
63
+ * The maximum height in pixels of all video representations in this adaptation set.
64
+ */
65
+ readonly maxHeight?: number;
66
+ /**
67
+ * The maximum width in pixels of all video representations in this adaptation set.
68
+ */
69
+ readonly maxWidth?: number;
70
+ /**
71
+ * The minimum bandwidth in bits per second of all representations in this adaptation set.
72
+ */
73
+ readonly minBandwidth?: number;
74
+ /**
75
+ * The minimum frame rate of all video representations in this adaptation set.
76
+ */
77
+ readonly minFrameRate?: FrameRate;
78
+ /**
79
+ * The minimum height in pixels of all video representations in this adaptation set.
80
+ */
81
+ readonly minHeight?: number;
82
+ /**
83
+ * The minimum width in pixels of all video representations in this adaptation set.
84
+ */
85
+ readonly minWidth?: number;
86
+ /**
87
+ * The display aspect ratio (for video representations) within this adaptation set, specifying
88
+ * the width to height ratio of the video.
89
+ */
90
+ readonly par?: Ratio;
91
+ /**
92
+ * Specifies if the segments within the representations are aligned, allowing for optimized switching and buffering.
93
+ */
94
+ readonly segmentAlignment: ConditionalUintType;
95
+ /**
96
+ * Indicates if subsegments within the representations are aligned, further optimizing switching and buffering
97
+ * efficiencies.
98
+ */
99
+ readonly subsegmentAlignment: ConditionalUintType;
100
+ /**
101
+ * Specifies the SAP (Segment Alignment Point) type, indicating the alignment of segment starts with SAPs.
102
+ */
103
+ readonly subsegmentStartsWithSAP: SAPType;
104
+ /**
105
+ * Descriptors providing accessibility information, such as captions or sign language interpretations.
106
+ */
107
+ readonly Accessibility?: readonly DescriptorType[];
108
+ /**
109
+ * Base URLs for segment retrieval, providing alternative paths or locations for accessing content.
110
+ */
111
+ readonly BaseURL?: readonly BaseURLType[];
112
+ /**
113
+ * Defines content components within the adaptation set, such as different audio languages or video angles.
114
+ */
115
+ readonly ContentComponent?: readonly ContentComponentType[];
116
+ /**
117
+ * Rating descriptors providing content rating information, which may influence content selection.
118
+ */
119
+ readonly Rating?: readonly DescriptorType[];
120
+ /**
121
+ * The representations available within this adaptation set, offering various qualities or formats of the content.
122
+ */
123
+ readonly Representation?: readonly RepresentationType[];
124
+ /**
125
+ * Role descriptors defining the role or function of the content, such as main, alternative, or supplementary.
126
+ */
127
+ readonly Role?: readonly DescriptorType[];
128
+ /**
129
+ * Specifies segment base information, defining access to media segments using a base URL
130
+ */
131
+ readonly SegmentBase?: SegmentBaseType;
132
+ /**
133
+ * Provides a list of media segments, allowing time-based access to content without requiring individual segment
134
+ * URLs.
135
+ */
136
+ readonly SegmentList?: SegmentListType;
137
+ /**
138
+ * Defines templates for generating media segment URLs, optimizing manifest size and segment access efficiency.
139
+ */
140
+ readonly SegmentTemplate?: SegmentTemplateType;
141
+ /**
142
+ * Viewpoint descriptors providing information about the narrative or visual perspective of the content.
143
+ */
144
+ readonly Viewpoint?: readonly DescriptorType[];
145
+ }
146
+ /**
147
+ * Extends the basic URI type with properties specific to DASH streaming, offering enhanced control over the
148
+ * availability and access of content.
149
+ *
150
+ * According to ISO_IEC 23009-1_2022 -
151
+ * 5.6.5 Alternative base URLs
152
+ * If alternative base URLs are provided through the BaseURL element at any level, identical Segments shall
153
+ * be accessible at multiple locations. In the absence of other criteria, the DASH Client may use the first
154
+ * BaseURL element as "base URI". The DASH Client may use base URLs provided in the BaseURL element
155
+ * as "base URI" and may implement any suitable algorithm to determine which URLs it uses for requests.
156
+ * If a BaseURL element containing an absolute URL is present on any level, it overwrites any BaseURL
157
+ * information present on a higher level.
158
+ */
159
+ export interface BaseURLType extends UriType {
160
+ /**
161
+ * Indicates whether the content pointed to by this BaseURL is completely available at the time of the request.
162
+ */
163
+ readonly availabilityTimeComplete?: boolean;
164
+ /**
165
+ * Specifies a time offset, in seconds, that should be considered for the content's availability start time.
166
+ *
167
+ * If the value is present in SegmentBase then this attribute is additive to the one in SegmentBase.
168
+ */
169
+ readonly availabilityTimeOffset?: number;
170
+ /**
171
+ * If present, specifies HTTP partial GET requests may alternatively be issued by adding the byte range into a
172
+ * regular HTTP-URL based on the value of this attribute and the construction rules in E.2. If not present, HTTP
173
+ * partial GET requests may not be converted into regular GET requests.
174
+ *
175
+ * Substitution tokens:
176
+ * $$ - escape sequence for $
177
+ * $base$ - The identifier shall be substituted by the scheme of the original URL.
178
+ * $query$ - The identifier shall be substituted by the query part of the original URL.
179
+ * $first$ - The identifier shall be substituted by the byte offset of the first byte in a range.
180
+ * $last$ The identifier is substituted by the byte offset of the last byte in the range.
181
+ *
182
+ * **Not supported** - No clients are currently supported that do not support range requests.
183
+ */
184
+ readonly byteRange?: string;
185
+ /**
186
+ * This attribute specifies a relationship between Base URLs such that BaseURL elements with the
187
+ * same `serviceLocation` value are likely to have their URLs resolve to services at a common network location, for
188
+ * example a common Content Delivery Network. If not present, no relationship to any other Base URL is known.
189
+ */
190
+ readonly serviceLocation?: string;
191
+ }
192
+ /**
193
+ * Allows for a value to be either a boolean or a number, offering flexibility in defining conditional or
194
+ * quantitative properties.
195
+ */
196
+ export type ConditionalUintType = boolean | number;
197
+ /**
198
+ * Describes a component of the content, such as audio or video track, including optional identifiers and
199
+ * descriptors for accessibility, rating, role, and viewpoint.
200
+ */
201
+ export interface ContentComponentType {
202
+ /**
203
+ * The MIME type of the content component (e.g., video/mp4).
204
+ */
205
+ readonly contentType?: string;
206
+ /**
207
+ * A unique identifier for this component.
208
+ */
209
+ readonly id?: number;
210
+ /**
211
+ * The language of the content component, using BCP 47 language tags.
212
+ */
213
+ readonly lang?: string;
214
+ /**
215
+ * The aspect ratio of the video component, if applicable.
216
+ */
217
+ readonly par?: Ratio;
218
+ /**
219
+ * Descriptors to provide accessibility information about the content component.
220
+ */
221
+ readonly Accessibility?: readonly DescriptorType[];
222
+ /**
223
+ * Descriptors to provide rating information about the content component.
224
+ */
225
+ readonly Rating?: readonly DescriptorType[];
226
+ /**
227
+ * Descriptors to define the role of the content component within the presentation.
228
+ */
229
+ readonly Role?: readonly DescriptorType[];
230
+ /**
231
+ * Descriptors to provide viewpoint information, enhancing the descriptive richness of the content component.
232
+ */
233
+ readonly Viewpoint?: readonly DescriptorType[];
234
+ }
235
+ /**
236
+ * A generic descriptor type that defines additional information about a content or component, specified by an ID, a
237
+ * scheme, and an optional value.
238
+ */
239
+ export interface DescriptorType {
240
+ /**
241
+ * An optional unique identifier for the descriptor.
242
+ */
243
+ readonly id?: string;
244
+ /**
245
+ * The URI identifying the scheme or namespace of the descriptor.
246
+ */
247
+ readonly schemeIdUri: Uri;
248
+ /**
249
+ * An optional value associated with the descriptor, whose interpretation depends on the scheme.
250
+ */
251
+ readonly value?: string;
252
+ }
253
+ /**
254
+ * Represents an event stream, potentially external, associated with a DASH presentation, including timing and
255
+ * scheme information.
256
+ */
257
+ export interface EventStreamType {
258
+ /**
259
+ * Specifies the condition under which the related URL (defined by `href`)
260
+ * is actuated.
261
+ */
262
+ readonly actuate: actuateType;
263
+ /**
264
+ * A URL referencing additional information or an external event stream.
265
+ */
266
+ readonly href?: string;
267
+ /**
268
+ * An optional URI pointing to message data associated with the event stream.
269
+ */
270
+ readonly messageData?: Uri;
271
+ /**
272
+ * The URI identifying the scheme or namespace of the event stream.
273
+ */
274
+ readonly schemeIdUri: Uri;
275
+ /**
276
+ * The timescale in units per second used for timing properties within the event stream.
277
+ */
278
+ readonly timescale?: number;
279
+ /**
280
+ * An optional value associated with the event stream, whose interpretation depends on the scheme.
281
+ */
282
+ readonly value?: string;
283
+ /**
284
+ * An array of events, each with its own timing, duration, and optional message data.
285
+ */
286
+ readonly Event?: readonly EventType[];
287
+ }
288
+ /**
289
+ * Defines a single event within an EventStream, including its timing, duration, and optional message data.
290
+ */
291
+ export interface EventType {
292
+ /**
293
+ * The duration of the event, in timescale units.
294
+ */
295
+ readonly duration?: number;
296
+ /**
297
+ * A unique identifier for the event.
298
+ */
299
+ readonly id?: number;
300
+ /**
301
+ * An optional string containing message data associated with the event.
302
+ */
303
+ readonly messageData?: string;
304
+ /**
305
+ * The presentation time of the event, in timescale units, relative to the start of the presentation.
306
+ */
307
+ readonly presentationTime: number;
308
+ }
309
+ /**
310
+ * Defines a structure for specifying metrics related to the consumption or delivery of media content. This includes
311
+ * identifying the type of metrics being collected, the time ranges for which these metrics apply, and the reporting
312
+ * mechanisms or descriptors that detail how and where these metrics should be reported.
313
+ */
314
+ export interface MetricsType {
315
+ /**
316
+ * A string identifier for the type of metrics being described. This could represent various aspects of media
317
+ * consumption or delivery, such as buffering events, playback errors, or network throughput measurements,
318
+ * providing a flexible way to categorize and manage different sets of metrics.
319
+ */
320
+ readonly metrics: string;
321
+ /**
322
+ * An optional array of `RangeType` objects, each specifying a time range for which the described metrics are
323
+ * relevant. This allows for the association of metrics with specific segments of the content, enabling detailed
324
+ * analysis and reporting of performance or consumption patterns over the duration of the media presentation.
325
+ */
326
+ readonly Range?: readonly RangeType[];
327
+ /**
328
+ * An array of `DescriptorType` objects, specifying how and where the metrics should be reported.
329
+ */
330
+ readonly Reporting: readonly DescriptorType[];
331
+ }
332
+ /**
333
+ * Represents a Media Presentation Description (MPD) object for DASH (Dynamic Adaptive Streaming over HTTP).
334
+ * This object contains information about the multimedia content, such as its availability, duration, and structure.
335
+ */
336
+ export interface MPDtype {
337
+ /**
338
+ * The end time after which the media presentation is no longer available for consumption.
339
+ */
340
+ readonly availabilityEndTime?: ReadonlyDate;
341
+ /**
342
+ * The start time from which the media presentation is available for consumption.
343
+ */
344
+ readonly availabilityStartTime?: ReadonlyDate;
345
+ /**
346
+ * A unique identifier for the media presentation.
347
+ */
348
+ readonly id?: string;
349
+ /**
350
+ * The maximum duration of any media segment in the presentation.
351
+ */
352
+ readonly maxSegmentDuration?: Duration;
353
+ /**
354
+ * The maximum duration of any sub-segment in the presentation.
355
+ */
356
+ readonly maxSubsegmentDuration?: Duration;
357
+ /**
358
+ * The total duration of the media presentation.
359
+ */
360
+ readonly mediaPresentationDuration?: Duration;
361
+ /**
362
+ * The minimum duration of the buffer that a client should maintain for uninterrupted playback.
363
+ */
364
+ readonly minBufferTime: Duration;
365
+ /**
366
+ * The minimum period between potential updates to the MPD.
367
+ */
368
+ readonly minimumUpdatePeriod?: Duration;
369
+ /**
370
+ * The DASH profiles to which this presentation conforms.
371
+ */
372
+ readonly profiles: readonly string[];
373
+ /**
374
+ * The time at which the MPD was last published or updated.
375
+ */
376
+ readonly publishTime?: ReadonlyDate;
377
+ /**
378
+ * The suggested delay of the presentation time from the live edge for live presentations.
379
+ */
380
+ readonly suggestedPresentationDelay?: Duration;
381
+ /**
382
+ * The depth of the time-shift buffer for live presentations, allowing clients to access past segments.
383
+ */
384
+ readonly timeShiftBufferDepth?: Duration;
385
+ /**
386
+ * The type of presentation, either 'static' or 'dynamic' (live).
387
+ */
388
+ readonly type?: PresentationType;
389
+ /**
390
+ * The base URL(s) that can be used to construct the URLs for the segments.
391
+ */
392
+ readonly BaseURL?: readonly BaseURLType[];
393
+ /**
394
+ * Properties that are considered essential for the presentation. If not understood, the presentation should not be
395
+ * played.
396
+ */
397
+ readonly EssentialProperty?: readonly DescriptorType[];
398
+ /**
399
+ * The location(s) of more information or alternate MPD files.
400
+ */
401
+ readonly Location?: readonly UriType[];
402
+ /**
403
+ * Metrics about the presentation or its usage for reporting.
404
+ */
405
+ readonly Metrics?: readonly MetricsType[];
406
+ /**
407
+ * The periods of the presentation, representing a sequence of playable segments.
408
+ */
409
+ readonly Period: readonly PeriodType[];
410
+ /**
411
+ * Information about the program, such as title, language, and more.
412
+ */
413
+ readonly ProgramInformation?: readonly ProgramInformationType[];
414
+ /**
415
+ * Supplemental properties that provide additional information about the presentation.
416
+ */
417
+ readonly SupplementalProperty?: readonly DescriptorType[];
418
+ /**
419
+ * Information for synchronizing the presentation's timeline to real-world time.
420
+ */
421
+ readonly UTCTiming?: readonly DescriptorType[];
422
+ }
423
+ /**
424
+ * Extends `SegmentBaseType` to support scenarios involving multiple segments within a media presentation, such as
425
+ * adaptive streaming. This type incorporates properties that describe the overall structure and sequencing of the
426
+ * segments, providing essential information for efficient content delivery and playback.
427
+ */
428
+ export interface MultipleSegmentBaseType extends SegmentBaseType {
429
+ /**
430
+ * The duration of each segment within the sequence, specified in the timescale units.
431
+ */
432
+ readonly duration?: number;
433
+ /**
434
+ * The number of the first segment in the sequence.
435
+ */
436
+ readonly startNumber?: number;
437
+ /**
438
+ * An optional URL pointing to a bitstream switching segment. This segment contains data that enables the
439
+ * decoder to seamlessly switch between different bitrates or representations without the need for a full
440
+ * reinitialization. Using this property can significantly improve the user experience in adaptive streaming
441
+ * scenarios by reducing the latency and buffering times associated with bitrate switches.
442
+ */
443
+ readonly BitstreamSwitching?: URLType;
444
+ /**
445
+ * An optional `SegmentTimeline` that provides a detailed breakdown of the segments' timing and duration within
446
+ * the content.
447
+ */
448
+ readonly SegmentTimeline?: SegmentTimelineType;
449
+ }
450
+ /**
451
+ * Represents a single period within an MPD, defining a specific portion of the content with its own set of
452
+ * adaptation sets and resources.
453
+ */
454
+ export interface PeriodType {
455
+ /**
456
+ * The parent MPD.
457
+ */
458
+ readonly parent: MPDtype;
459
+ /**
460
+ * Specifies the condition under which the related URL (defined by the `href` property) is actuated.
461
+ * May be 'onLoad' or 'onRequest'
462
+ */
463
+ readonly actuate: actuateType;
464
+ /**
465
+ * Indicates whether bitstream switching is supported within the period. This allows seamless switches between
466
+ * different bitrates without needing a new initialization segment for the new bitrate stream.
467
+ */
468
+ readonly bitstreamSwitching: boolean;
469
+ /**
470
+ * The duration of the period, in seconds.
471
+ */
472
+ readonly duration?: Duration;
473
+ /**
474
+ * A URL referencing additional information or an external adaptation set that should be considered part of
475
+ * this period.
476
+ */
477
+ readonly href?: string;
478
+ /**
479
+ * A unique identifier for this period.
480
+ */
481
+ readonly id?: string;
482
+ /**
483
+ * The start time of this period, in seconds relative to the beginning of the presentation.
484
+ */
485
+ readonly start?: Duration;
486
+ /**
487
+ * The adaptation sets within this period. Each adaptation set represents a group of interchangeable
488
+ * representations.
489
+ */
490
+ readonly AdaptationSet?: readonly AdaptationSetType[];
491
+ /**
492
+ * An identifier for the content assets within this period.
493
+ */
494
+ readonly AssetIdentifier?: DescriptorType;
495
+ /**
496
+ * The base URL(s) for this period, which can be used to resolve relative URLs within this period.
497
+ */
498
+ readonly BaseURL?: readonly BaseURLType[];
499
+ /**
500
+ * Event streams associated with this period for signaling in-band events, such as SCTE-35 markers.
501
+ */
502
+ readonly EventStream?: readonly EventStreamType[];
503
+ /**
504
+ * Segment base information, specifying the default base URL and byte range for the media segments within this
505
+ * period.
506
+ */
507
+ readonly SegmentBase?: SegmentBaseType;
508
+ /**
509
+ * A list of media segments available within this period, typically used for presentations without live-streaming.
510
+ */
511
+ readonly SegmentList?: SegmentListType;
512
+ /**
513
+ * Template information for generating media segment URLs within this period.
514
+ */
515
+ readonly SegmentTemplate?: SegmentTemplateType;
516
+ /**
517
+ * Subsets of adaptation sets, allowing for more complex grouping of representations.
518
+ */
519
+ readonly Subset?: readonly SubsetType[];
520
+ /**
521
+ * Supplemental properties for this period, providing additional descriptors that may enhance the presentation
522
+ * or setup.
523
+ */
524
+ readonly SupplementalProperty?: readonly DescriptorType[];
525
+ }
526
+ export type PresentationType = 'static' | 'dynamic';
527
+ /**
528
+ * Provides metadata about the program or content represented in a DASH Media Presentation Description (MPD) or
529
+ * similar context. This includes information such as the language, title, and copyrights.
530
+ */
531
+ export interface ProgramInformationType {
532
+ /**
533
+ * The language of the program information, represented as a BCP 47 language tag.
534
+ */
535
+ readonly lang?: string;
536
+ /**
537
+ * A URL pointing to a web page that provides more information about the program.
538
+ */
539
+ readonly moreInformationURL?: Uri;
540
+ /**
541
+ * Copyright notice for the content or program.
542
+ */
543
+ readonly Copyright?: string;
544
+ /**
545
+ * The source of the content or program, potentially including the content creator or distributor.
546
+ */
547
+ readonly Source?: string;
548
+ /**
549
+ * The title of the content or program.
550
+ */
551
+ readonly Title?: string;
552
+ }
553
+ /**
554
+ * Represents a time range within media content, specifying the duration and/or start time of a segment or period.
555
+ * This is particularly useful in scenarios where specific sections of content are being referenced or manipulated.
556
+ */
557
+ export interface RangeType {
558
+ /**
559
+ * The duration of the range, in seconds.
560
+ */
561
+ readonly duration?: Duration;
562
+ /**
563
+ * The start time of the range, in seconds relative to the beginning of the content or an enclosing period.
564
+ * This enables precise referencing of content segments.
565
+ */
566
+ readonly starttime?: Duration;
567
+ }
568
+ /**
569
+ * Defines the base attributes common to all representation types within a DASH Media Presentation.
570
+ */
571
+ export interface RepresentationBaseType {
572
+ /**
573
+ * Audio sampling rate(s) in samples per second.
574
+ * An array of either one or two decimal integer values. If there are two elements this represents a minimum and
575
+ * maximum sampling rate of the audio media.
576
+ */
577
+ readonly audioSamplingRate?: readonly number[];
578
+ /**
579
+ * Optional string specifying the codec(s) used for this representation. The format follows the RFC 6381 codec
580
+ * string format.
581
+ */
582
+ readonly codecs?: string;
583
+ /**
584
+ * Indicates whether the coding of media frames within the representation depends on other frames. A value of
585
+ * true means there is a dependency, which affects adaptation logic.
586
+ */
587
+ readonly codingDependency?: boolean;
588
+ /**
589
+ * Frame rate for video representations, specified either as a ratio of integers, e.g. [30000, 1001]
590
+ */
591
+ readonly frameRate?: FrameRate;
592
+ /**
593
+ * Height of the video in pixels for video representations.
594
+ */
595
+ readonly height?: number;
596
+ /**
597
+ * The maximum Segment Access Point (SAP) period in seconds. It indicates the maximum distance in playback time
598
+ * between random access points, aiding in efficient seeking and buffering strategies.
599
+ */
600
+ readonly maximumSAPPeriod?: number;
601
+ /**
602
+ * Maximum playout rate, indicating the maximum speed at which the representation can be played without
603
+ * affecting normal audio pitch and video appearance.
604
+ */
605
+ readonly maxPlayoutRate?: number;
606
+ /**
607
+ * MIME type of the representation, indicating the media type and potentially the codec information.
608
+ */
609
+ readonly mimeType?: string;
610
+ /**
611
+ * An array of profile identifiers indicating compliance with specific codec profiles, facilitating
612
+ * compatibility and quality assurance across devices and players.
613
+ */
614
+ readonly profiles?: readonly string[];
615
+ /**
616
+ * Sample aspect ratio for video representations, specifying the aspect ratio of the pixels themselves.
617
+ */
618
+ readonly sar?: Ratio;
619
+ /**
620
+ * Scan type for video content, indicating whether the video is progressive or interlaced.
621
+ */
622
+ readonly scanType?: VideoScanType;
623
+ /**
624
+ * Optional segment profiles supported by the representation, further defining the
625
+ * characteristics of the segments within the representation.
626
+ */
627
+ readonly segmentProfiles?: string;
628
+ /**
629
+ * Indicates the type of Stream Access Points (SAP) that the segments start with.
630
+ */
631
+ readonly startWithSAP?: SAPType;
632
+ /**
633
+ * Optional width of the video in pixels for video representations.
634
+ */
635
+ readonly width?: number;
636
+ /**
637
+ * Descriptors for audio channel configurations, providing detailed information about the audio channels
638
+ * included in the representation.
639
+ */
640
+ readonly AudioChannelConfiguration?: readonly DescriptorType[];
641
+ /**
642
+ * Descriptors for content protection schemes applied to the representation, facilitating
643
+ * the implementation of DRM and other content protection mechanisms.
644
+ */
645
+ readonly ContentProtection?: readonly DescriptorType[];
646
+ /**
647
+ * Descriptors for essential properties of the representation that are not defined by
648
+ * other attributes or elements in the DASH manifest.
649
+ */
650
+ readonly EssentialProperty?: readonly DescriptorType[];
651
+ /**
652
+ * Descriptors for frame packing arrangements in video representations, relevant for
653
+ * stereoscopic 3D content.
654
+ */
655
+ readonly FramePacking?: readonly DescriptorType[];
656
+ /**
657
+ * Array of in-band event streams, specifying events such as subtitles or metadata that
658
+ * are embedded within the media content of the representation.
659
+ */
660
+ readonly InbandEventStream?: readonly EventStreamType[];
661
+ /**
662
+ * Descriptors for supplemental properties of the representation, providing additional
663
+ * information that may enhance playback or presentation.
664
+ */
665
+ readonly SupplementalProperty?: readonly DescriptorType[];
666
+ /**
667
+ * Descriptors for switching information, indicating conditions or recommendations for
668
+ * switching from this representation to another.
669
+ */
670
+ readonly Switching?: readonly SwitchingType[];
671
+ }
672
+ /**
673
+ * Represents a single representation within a DASH Media Presentation. Representations are
674
+ * versions of an adaptation set that differ in quality, bitrate, or other characteristics.
675
+ */
676
+ export interface RepresentationType extends RepresentationBaseType {
677
+ /**
678
+ * The parent Adaptation Set.
679
+ */
680
+ readonly parent: AdaptationSetType;
681
+ /**
682
+ * The average bandwidth in bits per second required for playing this representation.
683
+ */
684
+ readonly bandwidth: number;
685
+ /**
686
+ * Specifies the bitrate of the representation, in bits per second.
687
+ */
688
+ readonly bitrate?: number;
689
+ /**
690
+ * Optional identifiers for other representations that this representation depends on.
691
+ * Dependency is typically used for representations that cannot be decoded independently,
692
+ * such as enhanced layers in scalable video coding.
693
+ */
694
+ readonly dependencyId?: StringVectorType;
695
+ /**
696
+ * A unique identifier for this representation within the scope of its adaptation set.
697
+ */
698
+ readonly id: string;
699
+ /**
700
+ * Optional identifiers for media stream structure elements, such as segments, that this
701
+ * representation is associated with.
702
+ */
703
+ readonly mediaStreamStructureId?: StringVectorType;
704
+ /**
705
+ * Specifies a quality ranking of the Representation relative to other Representations in the same Adaptation
706
+ * Set. Lower values represent higher quality
707
+ */
708
+ readonly qualityRanking?: number;
709
+ /**
710
+ * An array of BaseURL elements that specify base URLs for segment fetching. BaseURLs can
711
+ * provide alternative locations or addressable paths for accessing media segments.
712
+ */
713
+ readonly BaseURL?: readonly BaseURLType[];
714
+ /**
715
+ * An optional SegmentBase element that specifies how to access media segments for this
716
+ * representation using a single URL and optional byte range.
717
+ */
718
+ readonly SegmentBase?: SegmentBaseType;
719
+ /**
720
+ * An optional SegmentList element that provides a list of media segments through URLs and
721
+ * duration information, allowing for time-based access to segments.
722
+ */
723
+ readonly SegmentList?: SegmentListType;
724
+ /**
725
+ * An optional SegmentTemplate element that specifies how to generate segment URLs using
726
+ * template patterns, enabling efficient access to segments without needing an explicit list.
727
+ */
728
+ readonly SegmentTemplate?: SegmentTemplateType;
729
+ /**
730
+ * An optional array of SubRepresentation elements, which are subsets of this representation
731
+ * that may differ in certain characteristics like bitrate or resolution to support more
732
+ * granular adaptation.
733
+ */
734
+ readonly SubRepresentation?: readonly SubRepresentationType[];
735
+ }
736
+ /**
737
+ * Must be between 0 and 6.
738
+ */
739
+ export type SAPType = number;
740
+ /**
741
+ * Defines base properties for a segment within a media presentation, which are applicable to single segments.
742
+ */
743
+ export interface SegmentBaseType {
744
+ /**
745
+ * Indicates whether the availability time for the segment is complete.
746
+ */
747
+ readonly availabilityTimeComplete?: boolean;
748
+ /**
749
+ * Specifies a time offset, in seconds, from the availability start time of the content.
750
+ */
751
+ readonly availabilityTimeOffset?: number;
752
+ /**
753
+ * Specifies the byte range for the segment index within the media file, if applicable.
754
+ */
755
+ readonly indexRange?: ByteRange;
756
+ /**
757
+ * Indicates whether the `indexRange` is exact, providing precise byte range information for segment indexing.
758
+ */
759
+ readonly indexRangeExact: boolean;
760
+ /**
761
+ * Specifies a presentation time offset in the media timeline relative to the start of the Period, in timescale
762
+ * units, used to adjust the timing of media presentation.
763
+ */
764
+ readonly presentationTimeOffset?: number;
765
+ /**
766
+ * The timescale in units per second used for timing properties within the segment.
767
+ */
768
+ readonly timescale?: number;
769
+ /**
770
+ * The URL to the initialization segment required for decoding the media segments.
771
+ */
772
+ readonly Initialization?: URLType;
773
+ /**
774
+ * The URL to the segment index providing information about segment locations within the media stream.
775
+ */
776
+ readonly RepresentationIndex?: URLType;
777
+ }
778
+ /**
779
+ * Extends `MultipleSegmentBaseType` with additional properties specific to lists of segments.
780
+ */
781
+ export interface SegmentListType extends MultipleSegmentBaseType {
782
+ /**
783
+ * Specifies the condition under which the related URL (defined by the `href` property) is actuated.
784
+ */
785
+ readonly actuate: actuateType;
786
+ /**
787
+ * A URL referencing additional information or an external segment list that should be considered part of this
788
+ * presentation.
789
+ */
790
+ readonly href?: string;
791
+ /**
792
+ * An array of URLs for the individual segments available within the list.
793
+ */
794
+ readonly SegmentURL?: readonly SegmentURLType[];
795
+ }
796
+ /**
797
+ * Extends `MultipleSegmentBaseType` with template properties for generating segment URLs.
798
+ */
799
+ export interface SegmentTemplateType extends MultipleSegmentBaseType {
800
+ /**
801
+ * A template for bitstream switching segment URLs, if bitstream switching is supported.
802
+ */
803
+ readonly bitstreamSwitching?: string;
804
+ /**
805
+ * A template for generating segment index URLs.
806
+ */
807
+ readonly index?: string;
808
+ /**
809
+ * A template for generating initialization segment URLs.
810
+ */
811
+ readonly initialization?: string;
812
+ /**
813
+ * A template for generating media segment URLs.
814
+ */
815
+ readonly media?: string;
816
+ }
817
+ /**
818
+ * Defines a timeline of segments.
819
+ */
820
+ export interface SegmentTimelineType {
821
+ /**
822
+ * An array of timeline segments, each specifying duration and repeat count.
823
+ */
824
+ readonly S?: readonly SegmentTimelineTypeSType[];
825
+ }
826
+ /**
827
+ * Represents a single timeline segment in a DASH presentation's segment timeline.
828
+ */
829
+ export interface SegmentTimelineTypeSType {
830
+ /**
831
+ * The duration of the segment, in timescale units.
832
+ */
833
+ readonly d: number;
834
+ /**
835
+ * The sequence number of the segment, optional and used if segments are numbered.
836
+ */
837
+ readonly n?: number;
838
+ /**
839
+ * The repeat count for the segment.
840
+ * This value is zero-based (e.g. a value of three means four Segments in the contiguous series.)
841
+ */
842
+ readonly r: number;
843
+ /**
844
+ * The start time of the segment, in timescale units.
845
+ */
846
+ readonly t?: number;
847
+ }
848
+ /**
849
+ * Represents a URL reference to a media segment, including optional range information for byte-serving.
850
+ */
851
+ export interface SegmentURLType {
852
+ /**
853
+ * The URL to the index of the segment, if separate from the media URL.
854
+ */
855
+ readonly index?: Uri;
856
+ /**
857
+ * The byte range of the index within the media file, if applicable.
858
+ */
859
+ readonly indexRange?: ByteRange;
860
+ /**
861
+ * The URL to the media segment itself.
862
+ */
863
+ readonly media?: Uri;
864
+ /**
865
+ * The byte range of the media within the media file, allowing for partial retrieval.
866
+ */
867
+ readonly mediaRange?: ByteRange;
868
+ }
869
+ export type StringVectorType = readonly string[];
870
+ /**
871
+ * Extends `RepresentationBaseType` to define a sub-representation, which is a subset of a representation often used
872
+ * for adaptive streaming. This includes details like bandwidth and dependencies on other components or levels
873
+ * within the content hierarchy.
874
+ */
875
+ export interface SubRepresentationType extends RepresentationBaseType {
876
+ /**
877
+ * The bandwidth requirement for this sub-representation, specified in bits per second. This indicates the
878
+ * network throughput needed to consume this content without interruptions.
879
+ */
880
+ readonly bandwidth?: number;
881
+ /**
882
+ * Identifies the content components associated with this sub-representation, expressed as a vector of strings.
883
+ * Each string in the vector represents a content component ID, allowing this sub-representation to be associated
884
+ * with specific audio, video, or other types of media streams within the content.
885
+ */
886
+ readonly contentComponent?: StringVectorType;
887
+ /**
888
+ * A vector of unsigned integers specifying the levels of dependency this sub-representation has on other
889
+ * representations. Each number in the vector refers to a level in the content hierarchy, indicating this
890
+ * sub-representation relies on components or data at those specified levels for proper playback or functionality.
891
+ */
892
+ readonly dependencyLevel?: UIntVectorType;
893
+ /**
894
+ * An optional level indicator for this sub-representation, which could denote a quality level, spatial layer,
895
+ * or other hierarchical level within a multi-layered or scalable content structure. This helps in adaptive
896
+ * streaming decisions and content selection based on capabilities or preferences.
897
+ */
898
+ readonly level?: number;
899
+ }
900
+ export interface SubsetType {
901
+ readonly contains: UIntVectorType;
902
+ readonly id?: string;
903
+ }
904
+ export interface SwitchingType {
905
+ readonly interval: number;
906
+ readonly type?: SwitchingTypeType;
907
+ }
908
+ export type SwitchingTypeType = 'media' | 'bitstream';
909
+ export type UIntVectorType = readonly number[];
910
+ export interface URLType {
911
+ readonly range?: ByteRange;
912
+ readonly sourceURL?: Uri;
913
+ }
914
+ export type VideoScanType = 'progressive' | 'interlaced' | 'unknown';
915
+ export interface DashManifest {
916
+ readonly MPD: MPDtype;
917
+ }
918
+ //# sourceMappingURL=2011.d.ts.map