@svta/cml-cmaf-ham 0.24.7 → 0.24.8

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.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,11 @@
1
1
  import { FAIRPLAY_KEY_SYSTEM, PLAYREADY_KEY_SYSTEM, WIDEVINE_KEY_SYSTEM } from "@svta/cml-drm";
2
2
  import { ValueOf } from "@svta/cml-utils";
3
-
4
3
  //#region src/types/model/AddressableObject.d.ts
5
-
6
4
  /**
7
- * CMAF-HAM Addressable Object type
8
- *
9
- * @alpha
10
- */
5
+ * CMAF-HAM Addressable Object type
6
+ *
7
+ * @alpha
8
+ */
11
9
  type AddressableObject = {
12
10
  url: string;
13
11
  byteRange?: {
@@ -18,67 +16,67 @@ type AddressableObject = {
18
16
  //#endregion
19
17
  //#region src/types/model/Base.d.ts
20
18
  /**
21
- * CMAF-HAM Base type
22
- *
23
- * @alpha
24
- */
19
+ * CMAF-HAM Base type
20
+ *
21
+ * @alpha
22
+ */
25
23
  type Base = {
26
24
  baseUrls: string[];
27
25
  };
28
26
  //#endregion
29
27
  //#region src/types/model/content-protection/KeySystem.d.ts
30
28
  /**
31
- * CMAF-HAM Key System type
32
- *
33
- * @alpha
34
- */
29
+ * CMAF-HAM Key System type
30
+ *
31
+ * @alpha
32
+ */
35
33
  type KeySystem = typeof FAIRPLAY_KEY_SYSTEM | typeof PLAYREADY_KEY_SYSTEM | typeof WIDEVINE_KEY_SYSTEM;
36
34
  //#endregion
37
35
  //#region src/types/model/content-protection/KeySystemMap.d.ts
38
36
  /**
39
- * CMAF-HAM Key System Map type
40
- *
41
- * @alpha
42
- */
37
+ * CMAF-HAM Key System Map type
38
+ *
39
+ * @alpha
40
+ */
43
41
  type KeySystemMap = Record<KeySystem, {
44
42
  pssh: string;
45
43
  }>;
46
44
  //#endregion
47
45
  //#region src/types/model/content-protection/ProtectionScheme.d.ts
48
46
  /**
49
- * CMAF-HAM CENC Protection Scheme
50
- *
51
- * @alpha
52
- */
47
+ * CMAF-HAM CENC Protection Scheme
48
+ *
49
+ * @alpha
50
+ */
53
51
  declare const CENC: "cenc";
54
52
  /**
55
- * CMAF-HAM CBCS Protection Scheme
56
- *
57
- * @alpha
58
- */
53
+ * CMAF-HAM CBCS Protection Scheme
54
+ *
55
+ * @alpha
56
+ */
59
57
  declare const CBCS: "cbcs";
60
58
  /**
61
- * CMAF-HAM Protection Scheme type
62
- *
63
- * @alpha
64
- */
59
+ * CMAF-HAM Protection Scheme type
60
+ *
61
+ * @alpha
62
+ */
65
63
  declare const ProtectionScheme: {
66
64
  readonly CENC: typeof CENC;
67
65
  readonly CBCS: typeof CBCS;
68
66
  };
69
67
  /**
70
- * CMAF-HAM Protection Scheme type
71
- *
72
- * @alpha
73
- */
68
+ * CMAF-HAM Protection Scheme type
69
+ *
70
+ * @alpha
71
+ */
74
72
  type ProtectionScheme = ValueOf<typeof ProtectionScheme>;
75
73
  //#endregion
76
74
  //#region src/types/model/content-protection/Protection.d.ts
77
75
  /**
78
- * CMAF-HAM Protection type
79
- *
80
- * @alpha
81
- */
76
+ * CMAF-HAM Protection type
77
+ *
78
+ * @alpha
79
+ */
82
80
  type Protection = {
83
81
  defaultKid: string;
84
82
  keySystems: KeySystemMap;
@@ -87,66 +85,66 @@ type Protection = {
87
85
  //#endregion
88
86
  //#region src/types/model/Ham.d.ts
89
87
  /**
90
- * CMAF-HAM base HAM type
91
- *
92
- * id - Identifier of the object
93
- *
94
- * @alpha
95
- */
88
+ * CMAF-HAM base HAM type
89
+ *
90
+ * id - Identifier of the object
91
+ *
92
+ * @alpha
93
+ */
96
94
  type Ham = {
97
95
  id: string;
98
96
  };
99
97
  //#endregion
100
98
  //#region src/types/model/Duration.d.ts
101
99
  /**
102
- * CMAF-HAM Duration type
103
- *
104
- * @alpha
105
- */
100
+ * CMAF-HAM Duration type
101
+ *
102
+ * @alpha
103
+ */
106
104
  type Duration = {
107
105
  duration: number;
108
106
  };
109
107
  //#endregion
110
108
  //#region src/types/model/Segment.d.ts
111
109
  /**
112
- * CMAF-HAM Segment type
113
- *
114
- * @alpha
115
- */
110
+ * CMAF-HAM Segment type
111
+ *
112
+ * @alpha
113
+ */
116
114
  type Segment = Ham & AddressableObject & Duration & {
117
115
  startTime: number;
118
116
  };
119
117
  //#endregion
120
118
  //#region src/types/model/TrackType.d.ts
121
119
  /**
122
- * CMAF-HAM Audio Track Type
123
- *
124
- * @alpha
125
- */
120
+ * CMAF-HAM Audio Track Type
121
+ *
122
+ * @alpha
123
+ */
126
124
  declare const AUDIO: "audio";
127
125
  /**
128
- * CMAF-HAM Video Track Type
129
- *
130
- * @alpha
131
- */
126
+ * CMAF-HAM Video Track Type
127
+ *
128
+ * @alpha
129
+ */
132
130
  declare const VIDEO: "video";
133
131
  /**
134
- * CMAF-HAM Text Track Type
135
- *
136
- * @alpha
137
- */
132
+ * CMAF-HAM Text Track Type
133
+ *
134
+ * @alpha
135
+ */
138
136
  declare const TEXT: "text";
139
137
  /**
140
- * CMAF-HAM Image Track Type
141
- *
142
- * @alpha
143
- */
138
+ * CMAF-HAM Image Track Type
139
+ *
140
+ * @alpha
141
+ */
144
142
  declare const IMAGE: "image";
145
143
  /**
146
- * CMAF-HAM Track Type
147
- *
148
- * @alpha
149
- */
144
+ * CMAF-HAM Track Type
145
+ *
146
+ * @alpha
147
+ */
150
148
  declare const TrackType: {
151
149
  readonly AUDIO: typeof AUDIO;
152
150
  readonly VIDEO: typeof VIDEO;
@@ -154,18 +152,18 @@ declare const TrackType: {
154
152
  readonly IMAGE: typeof IMAGE;
155
153
  };
156
154
  /**
157
- * CMAF-HAM Track Type
158
- *
159
- * @alpha
160
- */
155
+ * CMAF-HAM Track Type
156
+ *
157
+ * @alpha
158
+ */
161
159
  type TrackType = ValueOf<typeof TrackType>;
162
160
  //#endregion
163
161
  //#region src/types/model/Track.d.ts
164
162
  /**
165
- * CMAF-HAM Track type
166
- *
167
- * @alpha
168
- */
163
+ * CMAF-HAM Track type
164
+ *
165
+ * @alpha
166
+ */
169
167
  type Track = Ham & Base & Duration & AddressableObject & {
170
168
  type: TrackType;
171
169
  codecs: string[];
@@ -182,10 +180,10 @@ type Track = Ham & Base & Duration & AddressableObject & {
182
180
  //#endregion
183
181
  //#region src/types/model/SwitchingSet.d.ts
184
182
  /**
185
- * CMAF-HAM Switching Set type
186
- *
187
- * @alpha
188
- */
183
+ * CMAF-HAM Switching Set type
184
+ *
185
+ * @alpha
186
+ */
189
187
  type SwitchingSet = Ham & Base & {
190
188
  tracks: Track[];
191
189
  protection?: Protection;
@@ -194,26 +192,26 @@ type SwitchingSet = Ham & Base & {
194
192
  //#endregion
195
193
  //#region src/types/model/AlignedSwitchingSet.d.ts
196
194
  /**
197
- * CMAF-HAM Aligned Switching Set type
198
- *
199
- * @alpha
200
- */
195
+ * CMAF-HAM Aligned Switching Set type
196
+ *
197
+ * @alpha
198
+ */
201
199
  type AlignedSwitchingSet = {
202
200
  switchingSets: SwitchingSet[];
203
201
  };
204
202
  //#endregion
205
203
  //#region src/types/model/AudioTrack.d.ts
206
204
  /**
207
- * CMAF-HAM Audio Track type
208
- *
209
- * sampleRate - The sample rate of the audio track. It defines the number of samples per second in the audio.
210
- * For example, if the sample rate is 44100, it means there are 44100 samples in each second of the audio.
211
- *
212
- * channels - The number of channels in the audio track. It defines the number of separate audio signals that are encoded in the audio.
213
- * For example, if the channels is 2, it means the audio is stereo with a separate signal for left and right.
214
- *
215
- * @alpha
216
- */
205
+ * CMAF-HAM Audio Track type
206
+ *
207
+ * sampleRate - The sample rate of the audio track. It defines the number of samples per second in the audio.
208
+ * For example, if the sample rate is 44100, it means there are 44100 samples in each second of the audio.
209
+ *
210
+ * channels - The number of channels in the audio track. It defines the number of separate audio signals that are encoded in the audio.
211
+ * For example, if the channels is 2, it means the audio is stereo with a separate signal for left and right.
212
+ *
213
+ * @alpha
214
+ */
217
215
  type AudioTrack = Track & {
218
216
  sampleRate: number;
219
217
  channels: number;
@@ -221,14 +219,14 @@ type AudioTrack = Track & {
221
219
  //#endregion
222
220
  //#region src/types/model/FrameRate.d.ts
223
221
  /**
224
- * Video Frame Rate
225
- * Used to express the framerate as numerator and denominator.
226
- *
227
- * frameRateNumerator - Numerator.
228
- * frameRateDenominator - Denominator.
229
- *
230
- * @alpha
231
- */
222
+ * Video Frame Rate
223
+ * Used to express the framerate as numerator and denominator.
224
+ *
225
+ * frameRateNumerator - Numerator.
226
+ * frameRateDenominator - Denominator.
227
+ *
228
+ * @alpha
229
+ */
232
230
  type FrameRate = {
233
231
  frameRateNumerator: number;
234
232
  frameRateDenominator?: number;
@@ -236,39 +234,39 @@ type FrameRate = {
236
234
  //#endregion
237
235
  //#region src/types/model/ManifestType.d.ts
238
236
  /**
239
- * CMAF-HAM Dynamic Manifest Type
240
- *
241
- * @alpha
242
- */
237
+ * CMAF-HAM Dynamic Manifest Type
238
+ *
239
+ * @alpha
240
+ */
243
241
  declare const DYNAMIC: "dynamic";
244
242
  /**
245
- * CMAF-HAM Static Manifest Type
246
- *
247
- * @alpha
248
- */
243
+ * CMAF-HAM Static Manifest Type
244
+ *
245
+ * @alpha
246
+ */
249
247
  declare const STATIC: "static";
250
248
  /**
251
- * CMAF-HAM Static Manifest Type
252
- *
253
- * @alpha
254
- */
249
+ * CMAF-HAM Static Manifest Type
250
+ *
251
+ * @alpha
252
+ */
255
253
  declare const ManifestType: {
256
254
  readonly DYNAMIC: typeof DYNAMIC;
257
255
  readonly STATIC: typeof STATIC;
258
256
  };
259
257
  /**
260
- * CMAF-HAM Manifest Type
261
- *
262
- * @alpha
263
- */
258
+ * CMAF-HAM Manifest Type
259
+ *
260
+ * @alpha
261
+ */
264
262
  type ManifestType = ValueOf<typeof ManifestType>;
265
263
  //#endregion
266
264
  //#region src/types/model/timed-metadata/Event.d.ts
267
265
  /**
268
- * CMAF-HAM Event type
269
- *
270
- * @alpha
271
- */
266
+ * CMAF-HAM Event type
267
+ *
268
+ * @alpha
269
+ */
272
270
  type Event = {
273
271
  messageData: string;
274
272
  duration: number;
@@ -280,10 +278,10 @@ type Event = {
280
278
  //#endregion
281
279
  //#region src/types/model/timed-metadata/EventStream.d.ts
282
280
  /**
283
- * CMAF-HAM Event Stream type
284
- *
285
- * @alpha
286
- */
281
+ * CMAF-HAM Event Stream type
282
+ *
283
+ * @alpha
284
+ */
287
285
  type EventStream = {
288
286
  schemeIdUri: string;
289
287
  timescale: number;
@@ -293,10 +291,10 @@ type EventStream = {
293
291
  //#endregion
294
292
  //#region src/types/model/SelectionSet.d.ts
295
293
  /**
296
- * CMAF-HAM Selection Set type
297
- *
298
- * @alpha
299
- */
294
+ * CMAF-HAM Selection Set type
295
+ *
296
+ * @alpha
297
+ */
300
298
  type SelectionSet = Ham & {
301
299
  switchingSets: SwitchingSet[];
302
300
  alignedSwitchingSets?: AlignedSwitchingSet[];
@@ -305,10 +303,10 @@ type SelectionSet = Ham & {
305
303
  //#endregion
306
304
  //#region src/types/model/Presentation.d.ts
307
305
  /**
308
- * CMAF-HAM Presentation type
309
- *
310
- * @alpha
311
- */
306
+ * CMAF-HAM Presentation type
307
+ *
308
+ * @alpha
309
+ */
312
310
  type Presentation = Ham & Duration & Base & {
313
311
  selectionSets: SelectionSet[];
314
312
  startTime: number;
@@ -318,25 +316,25 @@ type Presentation = Ham & Duration & Base & {
318
316
  //#endregion
319
317
  //#region src/types/model/TextTrack.d.ts
320
318
  /**
321
- * CMAF-HAM Text Track type
322
- *
323
- * @alpha
324
- */
319
+ * CMAF-HAM Text Track type
320
+ *
321
+ * @alpha
322
+ */
325
323
  type TextTrack = Track;
326
324
  //#endregion
327
325
  //#region src/types/model/VideoTrack.d.ts
328
326
  /**
329
- * CMAF-HAM Track type
330
- *
331
- * width - Video width in pixels.
332
- * height - Video height in pixels.
333
- * frameRate - Video framerate in FrameRate type;
334
- * par - Pixel Aspect Ratio of the video track as string.
335
- * sar - Sample Aspect Ratio of the video track in string.
336
- * scanType - The method used to display the video track.
337
- *
338
- * @alpha
339
- */
327
+ * CMAF-HAM Track type
328
+ *
329
+ * width - Video width in pixels.
330
+ * height - Video height in pixels.
331
+ * frameRate - Video framerate in FrameRate type;
332
+ * par - Pixel Aspect Ratio of the video track as string.
333
+ * sar - Sample Aspect Ratio of the video track in string.
334
+ * scanType - The method used to display the video track.
335
+ *
336
+ * @alpha
337
+ */
340
338
  type VideoTrack = Track & {
341
339
  width: number;
342
340
  height: number;
@@ -348,18 +346,18 @@ type VideoTrack = Track & {
348
346
  //#endregion
349
347
  //#region src/types/manifest/ManifestFormat.d.ts
350
348
  /**
351
- * The format of the manifest.
352
- *
353
- * @alpha
354
- */
349
+ * The format of the manifest.
350
+ *
351
+ * @alpha
352
+ */
355
353
  type ManifestFormat = "hls" | "dash";
356
354
  //#endregion
357
355
  //#region src/types/manifest/ManifestFile.d.ts
358
356
  /**
359
- * Manifest object received as an input by the conversion to HAM object
360
- *
361
- * @alpha
362
- */
357
+ * Manifest object received as an input by the conversion to HAM object
358
+ *
359
+ * @alpha
360
+ */
363
361
  type ManifestFile = {
364
362
  type: ManifestFormat;
365
363
  manifest: string;
@@ -370,10 +368,10 @@ type ManifestFile = {
370
368
  //#endregion
371
369
  //#region src/types/mapper/dash/AudioChannelConfiguration.d.ts
372
370
  /**
373
- * DASH Audio Channel Configuration
374
- *
375
- * @alpha
376
- */
371
+ * DASH Audio Channel Configuration
372
+ *
373
+ * @alpha
374
+ */
377
375
  type AudioChannelConfiguration = {
378
376
  $: {
379
377
  schemeIdUri: string;
@@ -383,9 +381,9 @@ type AudioChannelConfiguration = {
383
381
  //#endregion
384
382
  //#region src/types/mapper/dash/ContentComponent.d.ts
385
383
  /**
386
- *
387
- * @alpha
388
- */
384
+ *
385
+ * @alpha
386
+ */
389
387
  type ContentComponent = {
390
388
  $: {
391
389
  contentType: string;
@@ -395,10 +393,10 @@ type ContentComponent = {
395
393
  //#endregion
396
394
  //#region src/types/mapper/dash/Initialization.d.ts
397
395
  /**
398
- * DASH Initialization
399
- *
400
- * @alpha
401
- */
396
+ * DASH Initialization
397
+ *
398
+ * @alpha
399
+ */
402
400
  type Initialization = {
403
401
  $: {
404
402
  range?: string;
@@ -408,10 +406,10 @@ type Initialization = {
408
406
  //#endregion
409
407
  //#region src/types/mapper/dash/SegmentBase.d.ts
410
408
  /**
411
- * DASH Segment Base
412
- *
413
- * @alpha
414
- */
409
+ * DASH Segment Base
410
+ *
411
+ * @alpha
412
+ */
415
413
  type SegmentBase = {
416
414
  $: {
417
415
  indexRange: string;
@@ -423,10 +421,10 @@ type SegmentBase = {
423
421
  //#endregion
424
422
  //#region src/types/mapper/dash/SegmentUrl.d.ts
425
423
  /**
426
- * DASH Segment URL
427
- *
428
- * @alpha
429
- */
424
+ * DASH Segment URL
425
+ *
426
+ * @alpha
427
+ */
430
428
  type SegmentURL = {
431
429
  $: {
432
430
  media?: string;
@@ -435,10 +433,10 @@ type SegmentURL = {
435
433
  //#endregion
436
434
  //#region src/types/mapper/dash/SegmentList.d.ts
437
435
  /**
438
- * DASH Segment List
439
- *
440
- * @alpha
441
- */
436
+ * DASH Segment List
437
+ *
438
+ * @alpha
439
+ */
442
440
  type SegmentList = {
443
441
  $: {
444
442
  duration: string;
@@ -450,12 +448,12 @@ type SegmentList = {
450
448
  //#endregion
451
449
  //#region src/types/mapper/dash/SegmentTemplate.d.ts
452
450
  /**
453
- * DASH Segment template
454
- *
455
- * It is used as a template to create the actual templates
456
- *
457
- * @alpha
458
- */
451
+ * DASH Segment template
452
+ *
453
+ * It is used as a template to create the actual templates
454
+ *
455
+ * @alpha
456
+ */
459
457
  type SegmentTemplate = {
460
458
  $: {
461
459
  duration: string;
@@ -468,10 +466,10 @@ type SegmentTemplate = {
468
466
  //#endregion
469
467
  //#region src/types/mapper/dash/Representation.d.ts
470
468
  /**
471
- * DASH Representation
472
- *
473
- * @alpha
474
- */
469
+ * DASH Representation
470
+ *
471
+ * @alpha
472
+ */
475
473
  type Representation = {
476
474
  $: {
477
475
  audioSamplingRate?: string;
@@ -495,10 +493,10 @@ type Representation = {
495
493
  //#endregion
496
494
  //#region src/types/mapper/dash/Role.d.ts
497
495
  /**
498
- * Role
499
- *
500
- * @alpha
501
- */
496
+ * Role
497
+ *
498
+ * @alpha
499
+ */
502
500
  type Role = {
503
501
  $: {
504
502
  schemeIdUri: string;
@@ -508,10 +506,10 @@ type Role = {
508
506
  //#endregion
509
507
  //#region src/types/mapper/dash/AdaptationSet.d.ts
510
508
  /**
511
- * DASH Adaptation Set
512
- *
513
- * @alpha
514
- */
509
+ * DASH Adaptation Set
510
+ *
511
+ * @alpha
512
+ */
515
513
  type AdaptationSet = {
516
514
  $: {
517
515
  audioSamplingRate?: string;
@@ -544,10 +542,10 @@ type AdaptationSet = {
544
542
  //#endregion
545
543
  //#region src/types/mapper/dash/Period.d.ts
546
544
  /**
547
- * DASH Period
548
- *
549
- * @alpha
550
- */
545
+ * DASH Period
546
+ *
547
+ * @alpha
548
+ */
551
549
  type Period = {
552
550
  $: {
553
551
  duration: string;
@@ -559,10 +557,10 @@ type Period = {
559
557
  //#endregion
560
558
  //#region src/types/mapper/dash/DashManifest.d.ts
561
559
  /**
562
- * Json representation of the DASH Manifest
563
- *
564
- * @alpha
565
- */
560
+ * Json representation of the DASH Manifest
561
+ *
562
+ * @alpha
563
+ */
566
564
  type DashManifest = {
567
565
  MPD: {
568
566
  $?: {
@@ -579,11 +577,11 @@ type DashManifest = {
579
577
  //#endregion
580
578
  //#region src/types/mapper/hls/Byterange.d.ts
581
579
  /**
582
- * Byterange
583
- *
584
- *
585
- * @alpha
586
- */
580
+ * Byterange
581
+ *
582
+ *
583
+ * @alpha
584
+ */
587
585
  type Byterange = {
588
586
  length: number;
589
587
  offset: number;
@@ -591,10 +589,10 @@ type Byterange = {
591
589
  //#endregion
592
590
  //#region src/types/mapper/hls/MediaGroups.d.ts
593
591
  /**
594
- * HLS Media Groups
595
- *
596
- * @alpha
597
- */
592
+ * HLS Media Groups
593
+ *
594
+ * @alpha
595
+ */
598
596
  type MediaGroups = {
599
597
  AUDIO: Record<string, Record<string, {
600
598
  language: string;
@@ -606,10 +604,10 @@ type MediaGroups = {
606
604
  //#endregion
607
605
  //#region src/types/mapper/hls/Playlist.d.ts
608
606
  /**
609
- * HLS Playlist
610
- *
611
- * @alpha
612
- */
607
+ * HLS Playlist
608
+ *
609
+ * @alpha
610
+ */
613
611
  type PlayList = {
614
612
  uri: string;
615
613
  attributes: {
@@ -625,10 +623,10 @@ type PlayList = {
625
623
  //#endregion
626
624
  //#region src/types/mapper/hls/SegmentHls.d.ts
627
625
  /**
628
- * HLS Segments
629
- *
630
- * @alpha
631
- */
626
+ * HLS Segments
627
+ *
628
+ * @alpha
629
+ */
632
630
  type SegmentHls = {
633
631
  title?: string;
634
632
  duration: number;
@@ -643,10 +641,10 @@ type SegmentHls = {
643
641
  //#endregion
644
642
  //#region src/types/mapper/hls/HlsManifest.d.ts
645
643
  /**
646
- * HLS manifest
647
- *
648
- * @alpha
649
- */
644
+ * HLS manifest
645
+ *
646
+ * @alpha
647
+ */
650
648
  type HlsManifest = {
651
649
  playlists: PlayList[];
652
650
  mediaGroups: MediaGroups;
@@ -656,10 +654,10 @@ type HlsManifest = {
656
654
  //#endregion
657
655
  //#region src/types/mapper/Validation.d.ts
658
656
  /**
659
- * CMAF-HAM Validation type
660
- *
661
- * @alpha
662
- */
657
+ * CMAF-HAM Validation type
658
+ *
659
+ * @alpha
660
+ */
663
661
  type Validation = {
664
662
  status: boolean;
665
663
  errorMessages: string[];
@@ -667,835 +665,835 @@ type Validation = {
667
665
  //#endregion
668
666
  //#region src/mapper/dash/mapDashToHam/mapSegmentBase.d.ts
669
667
  /**
670
- * @internal
671
- *
672
- * Maps SegmentBase from dash to Segment list from ham.
673
- *
674
- * @param representation - Representation to get the SegmentBase from
675
- * @param duration - Duration of the segment
676
- * @returns list of ham segments
677
- */
678
- declare function mapSegmentBase(representation: Representation, duration: number): Segment[];
668
+ * @internal
669
+ *
670
+ * Maps SegmentBase from dash to Segment list from ham.
671
+ *
672
+ * @param representation - Representation to get the SegmentBase from
673
+ * @param duration - Duration of the segment
674
+ * @returns list of ham segments
675
+ */
676
+ export declare function mapSegmentBase(representation: Representation, duration: number): Segment[];
679
677
  //#endregion
680
678
  //#region src/mapper/dash/mapDashToHam/mapSegmentList.d.ts
681
679
  /**
682
- * @internal
683
- *
684
- * Maps SegmentList from dash to Segment list from ham.
685
- *
686
- * @param segmentList - SegmentList list from dash
687
- * @returns list of ham segments
688
- */
689
- declare function mapSegmentList(segmentList: SegmentList[]): Segment[];
680
+ * @internal
681
+ *
682
+ * Maps SegmentList from dash to Segment list from ham.
683
+ *
684
+ * @param segmentList - SegmentList list from dash
685
+ * @returns list of ham segments
686
+ */
687
+ export declare function mapSegmentList(segmentList: SegmentList[]): Segment[];
690
688
  //#endregion
691
689
  //#region src/mapper/dash/mapDashToHam/mapSegments.d.ts
692
690
  /**
693
- * @internal
694
- *
695
- * Maps dash segments to ham segment.
696
- *
697
- * Checks the type of dash segments used to map them accordingly.
698
- * @see mapSegmentBase
699
- * @see mapSegmentList
700
- * @see mapSegmentTemplate
701
- *
702
- * @param adaptationSet - AdaptationSet to get the segments from
703
- * @param representation - Representation to get the segments from
704
- * @param duration - Duration of the segments
705
- * @returns list of ham segments
706
- */
707
- declare function mapSegments(adaptationSet: AdaptationSet, representation: Representation, duration: number): Segment[];
691
+ * @internal
692
+ *
693
+ * Maps dash segments to ham segment.
694
+ *
695
+ * Checks the type of dash segments used to map them accordingly.
696
+ * @see mapSegmentBase
697
+ * @see mapSegmentList
698
+ * @see mapSegmentTemplate
699
+ *
700
+ * @param adaptationSet - AdaptationSet to get the segments from
701
+ * @param representation - Representation to get the segments from
702
+ * @param duration - Duration of the segments
703
+ * @returns list of ham segments
704
+ */
705
+ export declare function mapSegments(adaptationSet: AdaptationSet, representation: Representation, duration: number): Segment[];
708
706
  //#endregion
709
707
  //#region src/mapper/dash/mapDashToHam/mapSegmentTemplate.d.ts
710
708
  /**
711
- * @internal
712
- *
713
- * Maps SegmentTemplate from dash to Segment list from ham.
714
- *
715
- * @param representation - Representation to generate the urls
716
- * @param duration - Duration of the segments
717
- * @param segmentTemplate - SegmentTemplate to get the properties from
718
- * @returns list of ham segments
719
- */
720
- declare function mapSegmentTemplate(representation: Representation, duration: number, segmentTemplate: SegmentTemplate): Segment[];
709
+ * @internal
710
+ *
711
+ * Maps SegmentTemplate from dash to Segment list from ham.
712
+ *
713
+ * @param representation - Representation to generate the urls
714
+ * @param duration - Duration of the segments
715
+ * @param segmentTemplate - SegmentTemplate to get the properties from
716
+ * @returns list of ham segments
717
+ */
718
+ export declare function mapSegmentTemplate(representation: Representation, duration: number, segmentTemplate: SegmentTemplate): Segment[];
721
719
  //#endregion
722
720
  //#region src/mapper/dash/mapDashToHam/utils/calculateDuration.d.ts
723
721
  /**
724
- * @internal
725
- *
726
- * Calculates the duration of a segment.
727
- *
728
- * segmentDuration = duration / timescale
729
- *
730
- * @param duration - Duration of the segment
731
- * @param timescale - Timescale of the segment
732
- * @returns Segment duration
733
- */
734
- declare function calculateDuration(duration: string | undefined, timescale: string | undefined): number;
722
+ * @internal
723
+ *
724
+ * Calculates the duration of a segment.
725
+ *
726
+ * segmentDuration = duration / timescale
727
+ *
728
+ * @param duration - Duration of the segment
729
+ * @param timescale - Timescale of the segment
730
+ * @returns Segment duration
731
+ */
732
+ export declare function calculateDuration(duration: string | undefined, timescale: string | undefined): number;
735
733
  //#endregion
736
734
  //#region src/mapper/dash/mapDashToHam/utils/getChannels.d.ts
737
735
  /**
738
- * @internal
739
- *
740
- * Get the channels value (audio). It can be present on adaptationSet or representation.
741
- *
742
- * @param adaptationSet - AdaptationSet to try to get the channels from
743
- * @param representation - Representation to try to get the channels from
744
- * @returns Channels value
745
- */
746
- declare function getChannels(adaptationSet: AdaptationSet, representation: Representation): number;
736
+ * @internal
737
+ *
738
+ * Get the channels value (audio). It can be present on adaptationSet or representation.
739
+ *
740
+ * @param adaptationSet - AdaptationSet to try to get the channels from
741
+ * @param representation - Representation to try to get the channels from
742
+ * @returns Channels value
743
+ */
744
+ export declare function getChannels(adaptationSet: AdaptationSet, representation: Representation): number;
747
745
  //#endregion
748
746
  //#region src/mapper/dash/mapDashToHam/utils/getCodec.d.ts
749
747
  /**
750
- * @internal
751
- *
752
- * Get the codec value (video and audio). It can be present on adaptationSet or representation.
753
- *
754
- * @param adaptationSet - AdaptationSet to try to get the codec from
755
- * @param representation - Representation to try to get the codec from
756
- * @returns Content codec
757
- */
758
- declare function getCodec(adaptationSet: AdaptationSet, representation: Representation): string;
748
+ * @internal
749
+ *
750
+ * Get the codec value (video and audio). It can be present on adaptationSet or representation.
751
+ *
752
+ * @param adaptationSet - AdaptationSet to try to get the codec from
753
+ * @param representation - Representation to try to get the codec from
754
+ * @returns Content codec
755
+ */
756
+ export declare function getCodec(adaptationSet: AdaptationSet, representation: Representation): string;
759
757
  //#endregion
760
758
  //#region src/mapper/dash/mapDashToHam/utils/getContentType.d.ts
761
759
  /**
762
- * @internal
763
- *
764
- * Get the type of the content. It can be obtained directly from AdaptationSet or Representation
765
- * or can be inferred with the existing properties.
766
- *
767
- * @param adaptationSet - AdaptationSet to get the type from
768
- * @param representation - Representation to get the type from
769
- * @returns type of the content
770
- */
771
- declare function getContentType(adaptationSet: AdaptationSet, representation?: Representation): string;
760
+ * @internal
761
+ *
762
+ * Get the type of the content. It can be obtained directly from AdaptationSet or Representation
763
+ * or can be inferred with the existing properties.
764
+ *
765
+ * @param adaptationSet - AdaptationSet to get the type from
766
+ * @param representation - Representation to get the type from
767
+ * @returns type of the content
768
+ */
769
+ export declare function getContentType(adaptationSet: AdaptationSet, representation?: Representation): string;
772
770
  //#endregion
773
771
  //#region src/mapper/dash/mapDashToHam/utils/getFrameRate.d.ts
774
772
  /**
775
- * @internal
776
- *
777
- * Get the frame rate from a dash manifest.
778
- *
779
- * This functions assumes the adaptationSet and representation set are type video
780
- *
781
- * @param adaptationSet - To try to get the frameRate from
782
- * @param representation - To try to get the frameRate from
783
- * @returns object containing numerator and denominator
784
- */
785
- declare function getFrameRate(adaptationSet: AdaptationSet, representation: Representation): FrameRate;
773
+ * @internal
774
+ *
775
+ * Get the frame rate from a dash manifest.
776
+ *
777
+ * This functions assumes the adaptationSet and representation set are type video
778
+ *
779
+ * @param adaptationSet - To try to get the frameRate from
780
+ * @param representation - To try to get the frameRate from
781
+ * @returns object containing numerator and denominator
782
+ */
783
+ export declare function getFrameRate(adaptationSet: AdaptationSet, representation: Representation): FrameRate;
786
784
  //#endregion
787
785
  //#region src/mapper/dash/mapDashToHam/utils/getGroup.d.ts
788
786
  /**
789
- * @internal
790
- */
791
- declare function getGroup(adaptationSet: AdaptationSet): string;
787
+ * @internal
788
+ */
789
+ export declare function getGroup(adaptationSet: AdaptationSet): string;
792
790
  //#endregion
793
791
  //#region src/mapper/dash/mapDashToHam/utils/getLanguage.d.ts
794
792
  /**
795
- * @internal
796
- *
797
- * Get the language from an adaptation set.
798
- *
799
- * @param adaptationSet - AdaptationSet to get the language from
800
- * @returns language of the content
801
- */
802
- declare function getLanguage(adaptationSet: AdaptationSet): string;
793
+ * @internal
794
+ *
795
+ * Get the language from an adaptation set.
796
+ *
797
+ * @param adaptationSet - AdaptationSet to get the language from
798
+ * @returns language of the content
799
+ */
800
+ export declare function getLanguage(adaptationSet: AdaptationSet): string;
803
801
  //#endregion
804
802
  //#region src/mapper/dash/mapDashToHam/utils/getNumberOfSegments.d.ts
805
803
  /**
806
- * @internal
807
- *
808
- * Calculates the number of segments that a track has to use SegmentTemplate.
809
- *
810
- * Equation used:
811
- * segments = total duration / (segment duration / timescale)
812
- *
813
- * **This equation might be wrong, please double-check it**
814
- *
815
- * @param segmentTemplate - SegmentTemplate object
816
- * @param duration - Total duration of the content
817
- * @returns Number of segments
818
- */
819
- declare function getNumberOfSegments(segmentTemplate: SegmentTemplate, duration: number): number;
804
+ * @internal
805
+ *
806
+ * Calculates the number of segments that a track has to use SegmentTemplate.
807
+ *
808
+ * Equation used:
809
+ * segments = total duration / (segment duration / timescale)
810
+ *
811
+ * **This equation might be wrong, please double-check it**
812
+ *
813
+ * @param segmentTemplate - SegmentTemplate object
814
+ * @param duration - Total duration of the content
815
+ * @returns Number of segments
816
+ */
817
+ export declare function getNumberOfSegments(segmentTemplate: SegmentTemplate, duration: number): number;
820
818
  //#endregion
821
819
  //#region src/mapper/dash/mapDashToHam/utils/getPresentationId.d.ts
822
820
  /**
823
- * @internal
824
- *
825
- * Generates a presentation id. It uses the period id as default or creates one
826
- * if none is present.
827
- *
828
- * @param period - Period to try to get the id from
829
- * @param duration - Duration of the content
830
- * @returns Presentation id
831
- */
832
- declare function getPresentationId(period: Period, duration: number): string;
821
+ * @internal
822
+ *
823
+ * Generates a presentation id. It uses the period id as default or creates one
824
+ * if none is present.
825
+ *
826
+ * @param period - Period to try to get the id from
827
+ * @param duration - Duration of the content
828
+ * @returns Presentation id
829
+ */
830
+ export declare function getPresentationId(period: Period, duration: number): string;
833
831
  //#endregion
834
832
  //#region src/mapper/dash/mapDashToHam/utils/getSampleRate.d.ts
835
833
  /**
836
- * @internal
837
- *
838
- * Get sample rate (audio).
839
- *
840
- * @param adaptationSet - AdaptationSet to try to get the sampleRate from
841
- * @param representation - Representation to try to get the sampleRate from
842
- * @returns Sample rate. In case it is not presents, it returns 0.
843
- */
844
- declare function getSampleRate(adaptationSet: AdaptationSet, representation: Representation): number;
834
+ * @internal
835
+ *
836
+ * Get sample rate (audio).
837
+ *
838
+ * @param adaptationSet - AdaptationSet to try to get the sampleRate from
839
+ * @param representation - Representation to try to get the sampleRate from
840
+ * @returns Sample rate. In case it is not presents, it returns 0.
841
+ */
842
+ export declare function getSampleRate(adaptationSet: AdaptationSet, representation: Representation): number;
845
843
  //#endregion
846
844
  //#region src/mapper/dash/mapDashToHam/utils/getSar.d.ts
847
845
  /**
848
- * @internal
849
- *
850
- * Get the sar value. It can be present on adaptationSet or representation.
851
- *
852
- * @param adaptationSet - AdaptationSet to try to get the sar from
853
- * @param representation - AdaptationSet to try to get the sar from
854
- * @returns sar value. In case it is not present, returns empty string.
855
- */
856
- declare function getSar(adaptationSet: AdaptationSet, representation: Representation): string;
846
+ * @internal
847
+ *
848
+ * Get the sar value. It can be present on adaptationSet or representation.
849
+ *
850
+ * @param adaptationSet - AdaptationSet to try to get the sar from
851
+ * @param representation - AdaptationSet to try to get the sar from
852
+ * @returns sar value. In case it is not present, returns empty string.
853
+ */
854
+ export declare function getSar(adaptationSet: AdaptationSet, representation: Representation): string;
857
855
  //#endregion
858
856
  //#region src/mapper/dash/mapDashToHam/utils/getTrackDuration.d.ts
859
857
  /**
860
- * @internal
861
- *
862
- * Calculate the duration of a track.
863
- *
864
- * This is calculated using the sum of the duration of all the segments from the
865
- * track.
866
- *
867
- * An alternative to this could be number of segments * duration of a segment.
868
- *
869
- * @param segments - Segments to calculate the sum of the durations
870
- * @returns Duration of the track
871
- */
872
- declare function getTrackDuration(segments: Segment[]): number;
858
+ * @internal
859
+ *
860
+ * Calculate the duration of a track.
861
+ *
862
+ * This is calculated using the sum of the duration of all the segments from the
863
+ * track.
864
+ *
865
+ * An alternative to this could be number of segments * duration of a segment.
866
+ *
867
+ * @param segments - Segments to calculate the sum of the durations
868
+ * @returns Duration of the track
869
+ */
870
+ export declare function getTrackDuration(segments: Segment[]): number;
873
871
  //#endregion
874
872
  //#region src/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.d.ts
875
873
  /**
876
- * @internal
877
- *
878
- * Create the url from a segment template.
879
- *
880
- * Searches for substrings with the format `$value$` and replaces it with the correct value.
881
- * - RepresentationID: id of the representation
882
- * - Number: id of the segment. `%0Xd` defines the number `X` of digits it needs to have
883
- *
884
- * @param representation - Representation of the template
885
- * @param segmentTemplate - Segment template
886
- * @param segmentId - Segment id
887
- * @returns url from the segment template
888
- */
889
- declare function getUrlFromTemplate(representation: Representation, segmentTemplate: SegmentTemplate, segmentId: number): string;
874
+ * @internal
875
+ *
876
+ * Create the url from a segment template.
877
+ *
878
+ * Searches for substrings with the format `$value$` and replaces it with the correct value.
879
+ * - RepresentationID: id of the representation
880
+ * - Number: id of the segment. `%0Xd` defines the number `X` of digits it needs to have
881
+ *
882
+ * @param representation - Representation of the template
883
+ * @param segmentTemplate - Segment template
884
+ * @param segmentId - Segment id
885
+ * @returns url from the segment template
886
+ */
887
+ export declare function getUrlFromTemplate(representation: Representation, segmentTemplate: SegmentTemplate, segmentId: number): string;
890
888
  //#endregion
891
889
  //#region src/mapper/dash/mapHamToDash/utils/getTimescale.d.ts
892
890
  /**
893
- * @internal
894
- *
895
- * This function tries to recreate the timescale value.
896
- *
897
- * This value is not stored on the ham object, so it is not possible (for now)
898
- * to get the original one.
899
- *
900
- * Just the audio tracks have this value stored on the `sampleRate` key.
901
- *
902
- * @param track - Track to get the timescale from
903
- * @returns Timescale in numbers
904
- */
905
- declare function getTimescale(track: Track): number;
891
+ * @internal
892
+ *
893
+ * This function tries to recreate the timescale value.
894
+ *
895
+ * This value is not stored on the ham object, so it is not possible (for now)
896
+ * to get the original one.
897
+ *
898
+ * Just the audio tracks have this value stored on the `sampleRate` key.
899
+ *
900
+ * @param track - Track to get the timescale from
901
+ * @returns Timescale in numbers
902
+ */
903
+ export declare function getTimescale(track: Track): number;
906
904
  //#endregion
907
905
  //#region src/mapper/hls/mapHamToHls/utils/encodeByteRange.d.ts
908
906
  /**
909
- * Get the byterange in hls format from ham track.
910
- *
911
- * @param track - Track to get the byterange from
912
- * @returns string containing the byterange in the hls format
913
- *
914
- * @alpha
915
- */
916
- declare function encodeByteRange(track: VideoTrack | AudioTrack): string;
907
+ * Get the byterange in hls format from ham track.
908
+ *
909
+ * @param track - Track to get the byterange from
910
+ * @returns string containing the byterange in the hls format
911
+ *
912
+ * @alpha
913
+ */
914
+ export declare function encodeByteRange(track: VideoTrack | AudioTrack): string;
917
915
  //#endregion
918
916
  //#region src/mapper/hls/mapHamToHls/utils/getPlaylistData.d.ts
919
917
  /**
920
- * Get the playlist data in hls format from ham track.
921
- *
922
- * @param track - Track to get the playlist data from
923
- * @returns string containing the playlist data in the hls format
924
- *
925
- * @alpha
926
- */
927
- declare function getPlaylistData(track: AudioTrack | VideoTrack): string;
918
+ * Get the playlist data in hls format from ham track.
919
+ *
920
+ * @param track - Track to get the playlist data from
921
+ * @returns string containing the playlist data in the hls format
922
+ *
923
+ * @alpha
924
+ */
925
+ export declare function getPlaylistData(track: AudioTrack | VideoTrack): string;
928
926
  //#endregion
929
927
  //#region src/mapper/hls/mapHamToHls/utils/getSegments.d.ts
930
928
  /**
931
- * Format the ham segments to hls.
932
- *
933
- * @param segments - Segments to be formatted
934
- * @returns string containing the segments in the hls format
935
- *
936
- * @alpha
937
- */
938
- declare function getSegments(segments: Segment[]): string;
929
+ * Format the ham segments to hls.
930
+ *
931
+ * @param segments - Segments to be formatted
932
+ * @returns string containing the segments in the hls format
933
+ *
934
+ * @alpha
935
+ */
936
+ export declare function getSegments(segments: Segment[]): string;
939
937
  //#endregion
940
938
  //#region src/mapper/hls/mapHamToHls/utils/getUrlInitialization.d.ts
941
939
  /**
942
- * Get url initialization from ham track.
943
- *
944
- * @param track - Track to get the url initialization from
945
- * @returns string containing the url initialization in the hls format
946
- *
947
- * @alpha
948
- */
949
- declare function getUrlInitialization(track: VideoTrack | AudioTrack): string;
940
+ * Get url initialization from ham track.
941
+ *
942
+ * @param track - Track to get the url initialization from
943
+ * @returns string containing the url initialization in the hls format
944
+ *
945
+ * @alpha
946
+ */
947
+ export declare function getUrlInitialization(track: VideoTrack | AudioTrack): string;
950
948
  //#endregion
951
949
  //#region src/mapper/hls/mapHlsToHam/utils/decodeByteRange.d.ts
952
950
  /**
953
- * Get byterange from HLS Manifest.
954
- *
955
- * @param byteRange - Byterange object containing length and offset
956
- * @returns string containing the byterange. If byterange is undefined, it returns undefined
957
- *
958
- * @alpha
959
- */
960
- declare function decodeByteRange(byteRange: Byterange | undefined): string;
951
+ * Get byterange from HLS Manifest.
952
+ *
953
+ * @param byteRange - Byterange object containing length and offset
954
+ * @returns string containing the byterange. If byterange is undefined, it returns undefined
955
+ *
956
+ * @alpha
957
+ */
958
+ export declare function decodeByteRange(byteRange: Byterange | undefined): string;
961
959
  //#endregion
962
960
  //#region src/mapper/hls/mapHlsToHam/utils/formatSegments.d.ts
963
961
  /**
964
- * Format the hls segments into the ham segments.
965
- *
966
- * @param segments - List of HLS segments
967
- * @returns ham formatted list of segments
968
- *
969
- * @alpha
970
- */
971
- declare function formatSegments(segments: SegmentHls[]): Segment[];
962
+ * Format the hls segments into the ham segments.
963
+ *
964
+ * @param segments - List of HLS segments
965
+ * @returns ham formatted list of segments
966
+ *
967
+ * @alpha
968
+ */
969
+ export declare function formatSegments(segments: SegmentHls[]): Segment[];
972
970
  //#endregion
973
971
  //#region src/mapper/hls/mapHlsToHam/utils/getDuration.d.ts
974
972
  /**
975
- * Calculate the duration of a track.
976
- *
977
- * `target duration * number of segments`
978
- *
979
- * @param manifest - Manifest of the track
980
- * @param segments - Array of segments in a track
981
- * @returns duration of a track
982
- *
983
- * @alpha
984
- */
985
- declare function getDuration(manifest: HlsManifest, segments: SegmentHls[]): number | null;
973
+ * Calculate the duration of a track.
974
+ *
975
+ * `target duration * number of segments`
976
+ *
977
+ * @param manifest - Manifest of the track
978
+ * @param segments - Array of segments in a track
979
+ * @returns duration of a track
980
+ *
981
+ * @alpha
982
+ */
983
+ export declare function getDuration(manifest: HlsManifest, segments: SegmentHls[]): number | null;
986
984
  //#endregion
987
985
  //#region src/mapper/hls/mapHlsToHam/utils/getHlsCodec.d.ts
988
986
  /**
989
- * Get the codec for a type of content.
990
- *
991
- * @param type - Type of the content to get the codecs from
992
- * @param codecs - String containing multiple codecs separated with commas
993
- * @returns string containing codec
994
- *
995
- * @alpha
996
- */
997
- declare function getHlsCodec(type: string, codecs?: string): string;
987
+ * Get the codec for a type of content.
988
+ *
989
+ * @param type - Type of the content to get the codecs from
990
+ * @param codecs - String containing multiple codecs separated with commas
991
+ * @returns string containing codec
992
+ *
993
+ * @alpha
994
+ */
995
+ export declare function getHlsCodec(type: string, codecs?: string): string;
998
996
  //#endregion
999
997
  //#region src/services/converters/dashToHam.d.ts
1000
998
  /**
1001
- * Convert dash manifest into a ham object.
1002
- *
1003
- * @example
1004
- * Example on how to import the cmaf module and convert the dash `manifest`
1005
- * into the ham manifest.
1006
- * ```ts
1007
- * import cmaf from '@svta/common-media-library/cmaf-ham';
1008
- *
1009
- * const manifest = cmaf.dashToHam(dashManifest);
1010
- * ```
1011
- *
1012
- * @param manifest - String of the XML Dash manifest
1013
- * @returns List of presentations from ham
1014
- *
1015
- * @alpha
1016
- */
1017
- declare function dashToHam(manifest: string): Presentation[];
999
+ * Convert dash manifest into a ham object.
1000
+ *
1001
+ * @example
1002
+ * Example on how to import the cmaf module and convert the dash `manifest`
1003
+ * into the ham manifest.
1004
+ * ```ts
1005
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
1006
+ *
1007
+ * const manifest = cmaf.dashToHam(dashManifest);
1008
+ * ```
1009
+ *
1010
+ * @param manifest - String of the XML Dash manifest
1011
+ * @returns List of presentations from ham
1012
+ *
1013
+ * @alpha
1014
+ */
1015
+ export declare function dashToHam(manifest: string): Presentation[];
1018
1016
  //#endregion
1019
1017
  //#region src/services/converters/hamToDash.d.ts
1020
1018
  /**
1021
- * Convert HAM object into Dash Manifest.
1022
- *
1023
- * @example
1024
- * Example on how to import the cmaf module and convert the ham `presentations`
1025
- * array into the dash manifest.
1026
- * ```ts
1027
- * import cmaf from '@svta/common-media-library/cmaf-ham';
1028
- *
1029
- * const manifest = cmaf.hamToDash(presentations);
1030
- * ```
1031
- *
1032
- * @param presentation - List of presentations from ham
1033
- * @returns Manifest object containing the Dash manifest as string
1034
- *
1035
- * @alpha
1036
- */
1037
- declare function hamToDash(presentation: Presentation[]): ManifestFile;
1019
+ * Convert HAM object into Dash Manifest.
1020
+ *
1021
+ * @example
1022
+ * Example on how to import the cmaf module and convert the ham `presentations`
1023
+ * array into the dash manifest.
1024
+ * ```ts
1025
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
1026
+ *
1027
+ * const manifest = cmaf.hamToDash(presentations);
1028
+ * ```
1029
+ *
1030
+ * @param presentation - List of presentations from ham
1031
+ * @returns Manifest object containing the Dash manifest as string
1032
+ *
1033
+ * @alpha
1034
+ */
1035
+ export declare function hamToDash(presentation: Presentation[]): ManifestFile;
1038
1036
  //#endregion
1039
1037
  //#region src/services/converters/hamToHls.d.ts
1040
1038
  /**
1041
- * Convert ham object into a hls manifest.
1042
- *
1043
- * @example
1044
- * Example on how to import the cmaf module and convert the ham `presentations`
1045
- * array into the hls manifest.
1046
- * ```ts
1047
- * import cmaf from '@svta/common-media-library/cmaf-ham';
1048
- *
1049
- * const manifest = cmaf.hamToHls(presentations);
1050
- * ```
1051
- *
1052
- * @param presentation - List of presentations from ham
1053
- * @returns Manifest object containing the Hls manifest as string and its playlists
1054
- *
1055
- * @alpha
1056
- */
1057
- declare function hamToHls(presentation: Presentation[]): ManifestFile;
1039
+ * Convert ham object into a hls manifest.
1040
+ *
1041
+ * @example
1042
+ * Example on how to import the cmaf module and convert the ham `presentations`
1043
+ * array into the hls manifest.
1044
+ * ```ts
1045
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
1046
+ *
1047
+ * const manifest = cmaf.hamToHls(presentations);
1048
+ * ```
1049
+ *
1050
+ * @param presentation - List of presentations from ham
1051
+ * @returns Manifest object containing the Hls manifest as string and its playlists
1052
+ *
1053
+ * @alpha
1054
+ */
1055
+ export declare function hamToHls(presentation: Presentation[]): ManifestFile;
1058
1056
  //#endregion
1059
1057
  //#region src/services/converters/hlsToHam.d.ts
1060
1058
  /**
1061
- * Convert hls manifest into a ham object.
1062
- *
1063
- * @example
1064
- * Example on how to import the cmaf module and convert the hls `manifest` and
1065
- * `ancillaryManifests` array into the ham manifest.
1066
- * ```ts
1067
- * import cmaf from '@svta/common-media-library/cmaf-ham';
1068
- *
1069
- * const manifest = cmaf.hlsToHam(hlsManifest);
1070
- * ```
1071
- *
1072
- * @param manifest - String of the Main manifest
1073
- * @param ancillaryManifests - Ancillary Manifests . Must be in order, first audio, subtitle and video
1074
- * @returns List of presentations from ham
1075
- *
1076
- * @alpha
1077
- */
1078
- declare function hlsToHam(manifest: string, ancillaryManifests: string[]): Presentation[];
1059
+ * Convert hls manifest into a ham object.
1060
+ *
1061
+ * @example
1062
+ * Example on how to import the cmaf module and convert the hls `manifest` and
1063
+ * `ancillaryManifests` array into the ham manifest.
1064
+ * ```ts
1065
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
1066
+ *
1067
+ * const manifest = cmaf.hlsToHam(hlsManifest);
1068
+ * ```
1069
+ *
1070
+ * @param manifest - String of the Main manifest
1071
+ * @param ancillaryManifests - Ancillary Manifests . Must be in order, first audio, subtitle and video
1072
+ * @returns List of presentations from ham
1073
+ *
1074
+ * @alpha
1075
+ */
1076
+ export declare function hlsToHam(manifest: string, ancillaryManifests: string[]): Presentation[];
1079
1077
  //#endregion
1080
1078
  //#region src/services/getters/getTracksFromPresentation.d.ts
1081
1079
  /**
1082
- * Get a list of Tracks contained on a Presentation
1083
- *
1084
- * @param presentation - Presentation object from HAM
1085
- * @param predicate - Filtering function
1086
- * @returns Track[]
1087
- *
1088
- * @alpha
1089
- */
1090
- declare function getTracksFromPresentation(presentation: Presentation, predicate?: (track: Track) => boolean): Track[];
1080
+ * Get a list of Tracks contained on a Presentation
1081
+ *
1082
+ * @param presentation - Presentation object from HAM
1083
+ * @param predicate - Filtering function
1084
+ * @returns Track[]
1085
+ *
1086
+ * @alpha
1087
+ */
1088
+ export declare function getTracksFromPresentation(presentation: Presentation, predicate?: (track: Track) => boolean): Track[];
1091
1089
  //#endregion
1092
1090
  //#region src/services/getters/getTracksFromSelectionSet.d.ts
1093
1091
  /**
1094
- * Get a list of Tracks contained on a SelectionSet
1095
- *
1096
- * @param selectionSet - SelectionSet object from HAM
1097
- * @param predicate - Filtering function
1098
- * @returns Track[]
1099
- *
1100
- * @alpha
1101
- */
1102
- declare function getTracksFromSelectionSet(selectionSet: SelectionSet, predicate?: (track: Track) => boolean): Track[];
1092
+ * Get a list of Tracks contained on a SelectionSet
1093
+ *
1094
+ * @param selectionSet - SelectionSet object from HAM
1095
+ * @param predicate - Filtering function
1096
+ * @returns Track[]
1097
+ *
1098
+ * @alpha
1099
+ */
1100
+ export declare function getTracksFromSelectionSet(selectionSet: SelectionSet, predicate?: (track: Track) => boolean): Track[];
1103
1101
  //#endregion
1104
1102
  //#region src/services/getters/getTracksFromSwitchingSet.d.ts
1105
1103
  /**
1106
- * Get a list of Tracks contained on a SwitchingSet
1107
- *
1108
- * @param switchingSet - SwitchingSet object from HAM
1109
- * @param predicate - Filtering function
1110
- * @returns Track[]
1111
- *
1112
- * @alpha
1113
- */
1114
- declare function getTracksFromSwitchingSet(switchingSet: SwitchingSet, predicate?: (track: Track) => boolean): Track[];
1104
+ * Get a list of Tracks contained on a SwitchingSet
1105
+ *
1106
+ * @param switchingSet - SwitchingSet object from HAM
1107
+ * @param predicate - Filtering function
1108
+ * @returns Track[]
1109
+ *
1110
+ * @alpha
1111
+ */
1112
+ export declare function getTracksFromSwitchingSet(switchingSet: SwitchingSet, predicate?: (track: Track) => boolean): Track[];
1115
1113
  //#endregion
1116
1114
  //#region src/services/validators/validatePresentation.d.ts
1117
1115
  /**
1118
- * Validate a presentation.
1119
- * It validates in cascade, calling each child validation method.
1120
- *
1121
- * Validations:
1122
- * - Presentation has id
1123
- *
1124
- * @example
1125
- * ```ts
1126
- * import cmaf, { Presentation } from '@svta/common-media-library/cmaf-ham';
1127
- * ...
1128
- *
1129
- * // const presentation: Presentation = ...;
1130
- *
1131
- * const validation = cmaf.validatePresentation(presentation);
1132
- * ```
1133
- *
1134
- * Example output: `{ status: true|false, errorMessages: [...] }`
1135
- *
1136
- * @param presentation - Presentation from cmaf ham model
1137
- * @returns Validation
1138
- *
1139
- * @alpha
1140
- *
1141
- */
1142
- declare function validatePresentation(presentation: Presentation): Validation;
1116
+ * Validate a presentation.
1117
+ * It validates in cascade, calling each child validation method.
1118
+ *
1119
+ * Validations:
1120
+ * - Presentation has id
1121
+ *
1122
+ * @example
1123
+ * ```ts
1124
+ * import cmaf, { Presentation } from '@svta/common-media-library/cmaf-ham';
1125
+ * ...
1126
+ *
1127
+ * // const presentation: Presentation = ...;
1128
+ *
1129
+ * const validation = cmaf.validatePresentation(presentation);
1130
+ * ```
1131
+ *
1132
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1133
+ *
1134
+ * @param presentation - Presentation from cmaf ham model
1135
+ * @returns Validation
1136
+ *
1137
+ * @alpha
1138
+ *
1139
+ */
1140
+ export declare function validatePresentation(presentation: Presentation): Validation;
1143
1141
  //#endregion
1144
1142
  //#region src/services/validators/validateSegment.d.ts
1145
1143
  /**
1146
- * Validate a segment.
1147
- *
1148
- * Validations:
1149
- * - segment has duration
1150
- * - segment has url
1151
- *
1152
- * @param segment - Segment from cmaf ham model
1153
- * @param trackId - Optional: parent track id
1154
- * @param prevValidation - Optional: validation object from parent previous validate method call
1155
- * @returns Validation
1156
- *
1157
- * @alpha
1158
- */
1159
- declare function validateSegment(segment: Segment, trackId?: string, prevValidation?: Validation): Validation;
1144
+ * Validate a segment.
1145
+ *
1146
+ * Validations:
1147
+ * - segment has duration
1148
+ * - segment has url
1149
+ *
1150
+ * @param segment - Segment from cmaf ham model
1151
+ * @param trackId - Optional: parent track id
1152
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1153
+ * @returns Validation
1154
+ *
1155
+ * @alpha
1156
+ */
1157
+ export declare function validateSegment(segment: Segment, trackId?: string, prevValidation?: Validation): Validation;
1160
1158
  //#endregion
1161
1159
  //#region src/services/validators/validateSegments.d.ts
1162
1160
  /**
1163
- * Validate a list of segments.
1164
- *
1165
- * @example
1166
- * ```ts
1167
- * import cmaf, { Segment } from '@svta/common-media-library/cmaf-ham';
1168
- * ...
1169
- *
1170
- * // const segments: Segment[] = ...;
1171
- *
1172
- * const validation = cmaf.validateSegments(segments);
1173
- * ```
1174
- *
1175
- * Example output: `{ status: true|false, errorMessages: [...] }`
1176
- *
1177
- * @param segments - List of Segment from cmaf ham model
1178
- * @param trackId - Optional: parent track id
1179
- * @param prevValidation - Optional: validation object from parent previous validate method call
1180
- * @returns Validation
1181
- *
1182
- * @alpha
1183
- *
1184
- */
1185
- declare function validateSegments(segments: Segment[], trackId?: string, prevValidation?: Validation): Validation;
1161
+ * Validate a list of segments.
1162
+ *
1163
+ * @example
1164
+ * ```ts
1165
+ * import cmaf, { Segment } from '@svta/common-media-library/cmaf-ham';
1166
+ * ...
1167
+ *
1168
+ * // const segments: Segment[] = ...;
1169
+ *
1170
+ * const validation = cmaf.validateSegments(segments);
1171
+ * ```
1172
+ *
1173
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1174
+ *
1175
+ * @param segments - List of Segment from cmaf ham model
1176
+ * @param trackId - Optional: parent track id
1177
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1178
+ * @returns Validation
1179
+ *
1180
+ * @alpha
1181
+ *
1182
+ */
1183
+ export declare function validateSegments(segments: Segment[], trackId?: string, prevValidation?: Validation): Validation;
1186
1184
  //#endregion
1187
1185
  //#region src/services/validators/validateSelectionSet.d.ts
1188
1186
  /**
1189
- * Validate a selection set.
1190
- * It validates in cascade, calling each child validation method.
1191
- *
1192
- * Validations:
1193
- * - SelectionSet has id
1194
- *
1195
- * @example
1196
- * ```ts
1197
- * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1198
- * ...
1199
- *
1200
- * // const selectionSet: SelectionSet = ...;
1201
- *
1202
- * const validation = cmaf.validateSelectionSet(selectionSet);
1203
- * ```
1204
- *
1205
- * Example output: `{ status: true|false, errorMessages: [...] }`
1206
- *
1207
- * @param selectionSet - SelectionSet from cmaf ham model
1208
- * @param presentationId - Optional: parent presentation id
1209
- * @param prevValidation - Optional: validation object from parent previous validate method call
1210
- * @returns Validation
1211
- *
1212
- * @alpha
1213
- *
1214
- */
1215
- declare function validateSelectionSet(selectionSet: SelectionSet, presentationId?: string, prevValidation?: Validation): Validation;
1187
+ * Validate a selection set.
1188
+ * It validates in cascade, calling each child validation method.
1189
+ *
1190
+ * Validations:
1191
+ * - SelectionSet has id
1192
+ *
1193
+ * @example
1194
+ * ```ts
1195
+ * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1196
+ * ...
1197
+ *
1198
+ * // const selectionSet: SelectionSet = ...;
1199
+ *
1200
+ * const validation = cmaf.validateSelectionSet(selectionSet);
1201
+ * ```
1202
+ *
1203
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1204
+ *
1205
+ * @param selectionSet - SelectionSet from cmaf ham model
1206
+ * @param presentationId - Optional: parent presentation id
1207
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1208
+ * @returns Validation
1209
+ *
1210
+ * @alpha
1211
+ *
1212
+ */
1213
+ export declare function validateSelectionSet(selectionSet: SelectionSet, presentationId?: string, prevValidation?: Validation): Validation;
1216
1214
  //#endregion
1217
1215
  //#region src/services/validators/validateSelectionSets.d.ts
1218
1216
  /**
1219
- * Validate a list of selection set.
1220
- * It validates in cascade, calling each child validation method.
1221
- *
1222
- * @example
1223
- * ```ts
1224
- * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1225
- * ...
1226
- *
1227
- * // const selectionSets: SelectionSet[] = ...;
1228
- *
1229
- * const validation = cmaf.validateSelectionSets(selectionSets);
1230
- * ```
1231
- *
1232
- * Example output: `{ status: true|false, errorMessages: [...] }`
1233
- *
1234
- * @param selectionSets - List of SelectionSet from cmaf ham model
1235
- * @param presentationId - Optional: parent presentation id
1236
- * @param prevValidation - Optional: validation object from parent previous validate method call
1237
- * @returns Validation
1238
- *
1239
- * @alpha
1240
- *
1241
- */
1242
- declare function validateSelectionSets(selectionSets: SelectionSet[], presentationId?: string, prevValidation?: Validation): Validation;
1217
+ * Validate a list of selection set.
1218
+ * It validates in cascade, calling each child validation method.
1219
+ *
1220
+ * @example
1221
+ * ```ts
1222
+ * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1223
+ * ...
1224
+ *
1225
+ * // const selectionSets: SelectionSet[] = ...;
1226
+ *
1227
+ * const validation = cmaf.validateSelectionSets(selectionSets);
1228
+ * ```
1229
+ *
1230
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1231
+ *
1232
+ * @param selectionSets - List of SelectionSet from cmaf ham model
1233
+ * @param presentationId - Optional: parent presentation id
1234
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1235
+ * @returns Validation
1236
+ *
1237
+ * @alpha
1238
+ *
1239
+ */
1240
+ export declare function validateSelectionSets(selectionSets: SelectionSet[], presentationId?: string, prevValidation?: Validation): Validation;
1243
1241
  //#endregion
1244
1242
  //#region src/services/validators/validateSwitchingSet.d.ts
1245
1243
  /**
1246
- * Validate a switching set.
1247
- * It validates in cascade, calling each child validation method.
1248
- *
1249
- * Validations:
1250
- * - SwitchingSet has id
1251
- *
1252
- * @example
1253
- * ```ts
1254
- * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1255
- * ...
1256
- *
1257
- * // const switchingSet: SwitchingSet = ...;
1258
- *
1259
- * const validation = cmaf.validateSwitchingSet(switchingSet);
1260
- * ```
1261
- *
1262
- * Example output: `{ status: true|false, errorMessages: [...] }`
1263
- *
1264
- * @param switchingSet - SwitchingSet from cmaf ham model
1265
- * @param selectionSetId - Optional: parent selection set id
1266
- * @param prevValidation - Optional: validation object from parent previous validate method call
1267
- * @returns Validation
1268
- *
1269
- * @alpha
1270
- *
1271
- */
1272
- declare function validateSwitchingSet(switchingSet: SwitchingSet, selectionSetId?: string, prevValidation?: Validation): Validation;
1244
+ * Validate a switching set.
1245
+ * It validates in cascade, calling each child validation method.
1246
+ *
1247
+ * Validations:
1248
+ * - SwitchingSet has id
1249
+ *
1250
+ * @example
1251
+ * ```ts
1252
+ * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1253
+ * ...
1254
+ *
1255
+ * // const switchingSet: SwitchingSet = ...;
1256
+ *
1257
+ * const validation = cmaf.validateSwitchingSet(switchingSet);
1258
+ * ```
1259
+ *
1260
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1261
+ *
1262
+ * @param switchingSet - SwitchingSet from cmaf ham model
1263
+ * @param selectionSetId - Optional: parent selection set id
1264
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1265
+ * @returns Validation
1266
+ *
1267
+ * @alpha
1268
+ *
1269
+ */
1270
+ export declare function validateSwitchingSet(switchingSet: SwitchingSet, selectionSetId?: string, prevValidation?: Validation): Validation;
1273
1271
  //#endregion
1274
1272
  //#region src/services/validators/validateSwitchingSets.d.ts
1275
1273
  /**
1276
- * Validate a list of switching set.
1277
- * It validates in cascade, calling each child validation method.
1278
- *
1279
- * @example
1280
- * ```ts
1281
- * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1282
- * ...
1283
- *
1284
- * // const switchingSets: SwitchingSet[] = ...;
1285
- *
1286
- * const validation = cmaf.validateSwitchingSets(switchingSets);
1287
- * ```
1288
- *
1289
- * Example output: `{ status: true|false, errorMessages: [...] }`
1290
- *
1291
- * @param switchingSets - List of SwitchingSets from cmaf ham model
1292
- * @param selectionSetId - Optional: parent selection set id
1293
- * @param prevValidation - Optional: validation object from parent previous validate method call
1294
- * @returns Validation
1295
- *
1296
- * @alpha
1297
- *
1298
- */
1299
- declare function validateSwitchingSets(switchingSets: SwitchingSet[], selectionSetId?: string, prevValidation?: Validation): Validation;
1274
+ * Validate a list of switching set.
1275
+ * It validates in cascade, calling each child validation method.
1276
+ *
1277
+ * @example
1278
+ * ```ts
1279
+ * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1280
+ * ...
1281
+ *
1282
+ * // const switchingSets: SwitchingSet[] = ...;
1283
+ *
1284
+ * const validation = cmaf.validateSwitchingSets(switchingSets);
1285
+ * ```
1286
+ *
1287
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1288
+ *
1289
+ * @param switchingSets - List of SwitchingSets from cmaf ham model
1290
+ * @param selectionSetId - Optional: parent selection set id
1291
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1292
+ * @returns Validation
1293
+ *
1294
+ * @alpha
1295
+ *
1296
+ */
1297
+ export declare function validateSwitchingSets(switchingSets: SwitchingSet[], selectionSetId?: string, prevValidation?: Validation): Validation;
1300
1298
  //#endregion
1301
1299
  //#region src/services/validators/validateTrack.d.ts
1302
1300
  /**
1303
- * Validate a track.
1304
- * It validates in cascade, calling each child validation method.
1305
- *
1306
- * Validations:
1307
- * - track has id
1308
- * - Invokes specific audio, video and text validations
1309
- *
1310
- * @example
1311
- * ```ts
1312
- * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1313
- * ...
1314
- *
1315
- * // const track: Track = ...;
1316
- *
1317
- * const validation = cmaf.validateTrack(track);
1318
- * ```
1319
- *
1320
- * Example output: `{ status: true|false, errorMessages: [...] }`
1321
- *
1322
- * @param track - Track from cmaf ham model
1323
- * @param switchingSetId - Optional: parent switching set id
1324
- * @param prevValidation - Optional: validation object from parent previous validate method call
1325
- * @returns Validation
1326
- *
1327
- * @alpha
1328
- *
1329
- */
1330
- declare function validateTrack(track: Track, switchingSetId?: string, prevValidation?: Validation): Validation;
1301
+ * Validate a track.
1302
+ * It validates in cascade, calling each child validation method.
1303
+ *
1304
+ * Validations:
1305
+ * - track has id
1306
+ * - Invokes specific audio, video and text validations
1307
+ *
1308
+ * @example
1309
+ * ```ts
1310
+ * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1311
+ * ...
1312
+ *
1313
+ * // const track: Track = ...;
1314
+ *
1315
+ * const validation = cmaf.validateTrack(track);
1316
+ * ```
1317
+ *
1318
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1319
+ *
1320
+ * @param track - Track from cmaf ham model
1321
+ * @param switchingSetId - Optional: parent switching set id
1322
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1323
+ * @returns Validation
1324
+ *
1325
+ * @alpha
1326
+ *
1327
+ */
1328
+ export declare function validateTrack(track: Track, switchingSetId?: string, prevValidation?: Validation): Validation;
1331
1329
  //#endregion
1332
1330
  //#region src/services/validators/validateTracks.d.ts
1333
1331
  /**
1334
- * Validate a list of tracks.
1335
- * It validates in cascade, calling each child validation method.
1336
- *
1337
- * @example
1338
- * ```ts
1339
- * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1340
- * ...
1341
- *
1342
- * // const tracks: Track[] = ...;
1343
- *
1344
- * const validation = cmaf.validateTracks(tracks);
1345
- * ```
1346
- *
1347
- * Example output: `{ status: true|false, errorMessages: [...] }`
1348
- *
1349
- * @param tracks - List of Track from cmaf ham model
1350
- * @param switchingSetId - Optional: parent switching set id
1351
- * @param prevValidation - Optional: validation object from parent previous validate method call
1352
- * @returns Validation
1353
- *
1354
- * @alpha
1355
- *
1356
- */
1357
- declare function validateTracks(tracks: Track[], switchingSetId?: string, prevValidation?: Validation): Validation;
1332
+ * Validate a list of tracks.
1333
+ * It validates in cascade, calling each child validation method.
1334
+ *
1335
+ * @example
1336
+ * ```ts
1337
+ * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1338
+ * ...
1339
+ *
1340
+ * // const tracks: Track[] = ...;
1341
+ *
1342
+ * const validation = cmaf.validateTracks(tracks);
1343
+ * ```
1344
+ *
1345
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1346
+ *
1347
+ * @param tracks - List of Track from cmaf ham model
1348
+ * @param switchingSetId - Optional: parent switching set id
1349
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1350
+ * @returns Validation
1351
+ *
1352
+ * @alpha
1353
+ *
1354
+ */
1355
+ export declare function validateTracks(tracks: Track[], switchingSetId?: string, prevValidation?: Validation): Validation;
1358
1356
  //#endregion
1359
1357
  //#region src/utils/byteRange.d.ts
1360
1358
  /**
1361
- * ByteRange utility functions for converting between different formats
1362
- * @alpha
1363
- */
1364
- type ByteRangeObject = {
1359
+ * ByteRange utility functions for converting between different formats
1360
+ * @alpha
1361
+ */
1362
+ export type ByteRangeObject = {
1365
1363
  start: number;
1366
1364
  end: number;
1367
1365
  };
1368
1366
  /**
1369
- * Parses a byteRange string in either HLS format (length@offset) or DASH format (start-end)
1370
- * and converts it to an object with start and end properties.
1371
- *
1372
- * @param byteRangeString - String in format "length@offset" or "start-end"
1373
- * @returns Object with start and end properties, or undefined if input is invalid
1374
- *
1375
- * @example
1376
- * ```ts
1377
- * parseByteRangeString("1234@0") // { start: 0, end: 1233 }
1378
- * parseByteRangeString("0-1233") // { start: 0, end: 1233 }
1379
- * ```
1380
- *
1381
- * @alpha
1382
- */
1383
- declare function parseByteRangeString(byteRangeString: string | undefined): ByteRangeObject | undefined;
1384
- /**
1385
- * Converts a ByteRangeObject to HLS format string (length@offset)
1386
- *
1387
- * @param byteRange - Object with start and end properties
1388
- * @returns String in format "length@offset"
1389
- *
1390
- * @example
1391
- * ```ts
1392
- * byteRangeToHlsString({ start: 0, end: 1233 }) // "1234@0"
1393
- * ```
1394
- *
1395
- * @alpha
1396
- */
1397
- declare function byteRangeToHlsString(byteRange: ByteRangeObject | undefined): string;
1398
- /**
1399
- * Converts a ByteRangeObject to DASH format string (start-end)
1400
- *
1401
- * @param byteRange - Object with start and end properties
1402
- * @returns String in format "start-end"
1403
- *
1404
- * @example
1405
- * ```ts
1406
- * byteRangeToDashString({ start: 0, end: 1233 }) // "0-1233"
1407
- * ```
1408
- *
1409
- * @alpha
1410
- */
1411
- declare function byteRangeToDashString(byteRange: ByteRangeObject | undefined): string;
1412
- /**
1413
- * Converts HLS Byterange object (with length and offset) to ByteRangeObject
1414
- *
1415
- * @param byterange - Object with length and offset properties (from HLS parser)
1416
- * @returns Object with start and end properties
1417
- *
1418
- * @example
1419
- * ```ts
1420
- * hlsByterangeToByteRangeObject({ length: 1234, offset: 0 }) // { start: 0, end: 1233 }
1421
- * ```
1422
- *
1423
- * @alpha
1424
- */
1425
- declare function hlsByterangeToByteRangeObject(byterange: {
1367
+ * Parses a byteRange string in either HLS format (`length@offset`) or DASH format (`start-end`)
1368
+ * and converts it to an object with start and end properties.
1369
+ *
1370
+ * @param byteRangeString - String in format `length@offset` or `start-end`
1371
+ * @returns Object with start and end properties, or undefined if input is invalid
1372
+ *
1373
+ * @example
1374
+ * ```ts
1375
+ * parseByteRangeString("1234@0") // { start: 0, end: 1233 }
1376
+ * parseByteRangeString("0-1233") // { start: 0, end: 1233 }
1377
+ * ```
1378
+ *
1379
+ * @alpha
1380
+ */
1381
+ export declare function parseByteRangeString(byteRangeString: string | undefined): ByteRangeObject | undefined;
1382
+ /**
1383
+ * Converts a ByteRangeObject to HLS format string (`length@offset`)
1384
+ *
1385
+ * @param byteRange - Object with start and end properties
1386
+ * @returns String in format `length@offset`
1387
+ *
1388
+ * @example
1389
+ * ```ts
1390
+ * byteRangeToHlsString({ start: 0, end: 1233 }) // "1234@0"
1391
+ * ```
1392
+ *
1393
+ * @alpha
1394
+ */
1395
+ export declare function byteRangeToHlsString(byteRange: ByteRangeObject | undefined): string;
1396
+ /**
1397
+ * Converts a ByteRangeObject to DASH format string (start-end)
1398
+ *
1399
+ * @param byteRange - Object with start and end properties
1400
+ * @returns String in format "start-end"
1401
+ *
1402
+ * @example
1403
+ * ```ts
1404
+ * byteRangeToDashString({ start: 0, end: 1233 }) // "0-1233"
1405
+ * ```
1406
+ *
1407
+ * @alpha
1408
+ */
1409
+ export declare function byteRangeToDashString(byteRange: ByteRangeObject | undefined): string;
1410
+ /**
1411
+ * Converts HLS Byterange object (with length and offset) to ByteRangeObject
1412
+ *
1413
+ * @param byterange - Object with length and offset properties (from HLS parser)
1414
+ * @returns Object with start and end properties
1415
+ *
1416
+ * @example
1417
+ * ```ts
1418
+ * hlsByterangeToByteRangeObject({ length: 1234, offset: 0 }) // { start: 0, end: 1233 }
1419
+ * ```
1420
+ *
1421
+ * @alpha
1422
+ */
1423
+ export declare function hlsByterangeToByteRangeObject(byterange: {
1426
1424
  length: number;
1427
1425
  offset: number;
1428
1426
  } | undefined): ByteRangeObject | undefined;
1429
1427
  //#endregion
1430
1428
  //#region src/utils/dash/iso8601DurationToNumber.d.ts
1431
1429
  /**
1432
- * @internal
1433
- */
1434
- declare function iso8601DurationToNumber(isoDuration: string): number;
1430
+ * @internal
1431
+ */
1432
+ export declare function iso8601DurationToNumber(isoDuration: string): number;
1435
1433
  //#endregion
1436
1434
  //#region src/utils/dash/numberToIso8601Duration.d.ts
1437
1435
  /**
1438
- * @internal
1439
- */
1440
- declare function numberToIso8601Duration(duration: number): string;
1436
+ * @internal
1437
+ */
1438
+ export declare function numberToIso8601Duration(duration: number): string;
1441
1439
  //#endregion
1442
1440
  //#region src/utils/dash/parseDashManifest.d.ts
1443
1441
  /**
1444
- * @internal
1445
- */
1446
- type DashParser = (raw: string) => DashManifest;
1442
+ * @internal
1443
+ */
1444
+ export type DashParser = (raw: string) => DashManifest;
1447
1445
  /**
1448
- * @internal
1449
- */
1450
- declare function setDashParser(parser: DashParser): void;
1446
+ * @internal
1447
+ */
1448
+ export declare function setDashParser(parser: DashParser): void;
1451
1449
  /**
1452
- * @internal
1453
- */
1454
- declare function getDashParser(): DashParser;
1450
+ * @internal
1451
+ */
1452
+ export declare function getDashParser(): DashParser;
1455
1453
  /**
1456
- * @internal
1457
- * Parse XML to Json
1458
- *
1459
- * @param raw - Raw string containing the xml from the Dash Manifest
1460
- * @returns json with the Dash Manifest structure
1461
- */
1462
- declare function parseDashManifest(raw: string): DashManifest;
1454
+ * @internal
1455
+ * Parse XML to Json
1456
+ *
1457
+ * @param raw - Raw string containing the xml from the Dash Manifest
1458
+ * @returns json with the Dash Manifest structure
1459
+ */
1460
+ export declare function parseDashManifest(raw: string): DashManifest;
1463
1461
  //#endregion
1464
1462
  //#region src/utils/dash/serializeDashManifest.d.ts
1465
1463
  /**
1466
- * @internal
1467
- */
1468
- type DashSerializer = (json: DashManifest) => string;
1464
+ * @internal
1465
+ */
1466
+ export type DashSerializer = (json: DashManifest) => string;
1469
1467
  /**
1470
- * @internal
1471
- */
1472
- declare function setDashSerializer(serializer: DashSerializer): void;
1468
+ * @internal
1469
+ */
1470
+ export declare function setDashSerializer(serializer: DashSerializer): void;
1473
1471
  /**
1474
- * @internal
1475
- */
1476
- declare function getDashSerializer(): DashSerializer;
1472
+ * @internal
1473
+ */
1474
+ export declare function getDashSerializer(): DashSerializer;
1477
1475
  /**
1478
- * @internal
1479
- */
1480
- declare function serializeDashManifest(json: DashManifest): string;
1476
+ * @internal
1477
+ */
1478
+ export declare function serializeDashManifest(json: DashManifest): string;
1481
1479
  //#endregion
1482
1480
  //#region src/utils/hls/parseHlsManifest.d.ts
1483
1481
  /**
1484
- * @internal
1485
- */
1486
- type HlsParser = (text: string) => HlsManifest;
1482
+ * @internal
1483
+ */
1484
+ export type HlsParser = (text: string) => HlsManifest;
1487
1485
  /**
1488
- * @internal
1489
- */
1490
- declare function setHlsParser(parser: HlsParser): void;
1486
+ * @internal
1487
+ */
1488
+ export declare function setHlsParser(parser: HlsParser): void;
1491
1489
  /**
1492
- * @internal
1493
- */
1494
- declare function getHlsParser(): HlsParser;
1490
+ * @internal
1491
+ */
1492
+ export declare function getHlsParser(): HlsParser;
1495
1493
  /**
1496
- * @internal
1497
- */
1498
- declare function parseHlsManifest(text?: string): HlsManifest;
1494
+ * @internal
1495
+ */
1496
+ export declare function parseHlsManifest(text?: string): HlsManifest;
1499
1497
  //#endregion
1500
- export { AUDIO, AdaptationSet, AddressableObject, AlignedSwitchingSet, AudioChannelConfiguration, AudioTrack, Base, ByteRangeObject, Byterange, CBCS, CENC, ContentComponent, DYNAMIC, DashManifest, DashParser, DashSerializer, Duration, Event, EventStream, FrameRate, Ham, HlsManifest, HlsParser, IMAGE, Initialization, KeySystem, KeySystemMap, ManifestFile, ManifestFormat, ManifestType, MediaGroups, Period, PlayList, Presentation, Protection, ProtectionScheme, Representation, Role, STATIC, Segment, SegmentBase, SegmentHls, SegmentList, SegmentTemplate, SegmentURL, SelectionSet, SwitchingSet, TEXT, TextTrack, Track, TrackType, VIDEO, Validation, VideoTrack, byteRangeToDashString, byteRangeToHlsString, calculateDuration, dashToHam, decodeByteRange, encodeByteRange, formatSegments, getChannels, getCodec, getContentType, getDashParser, getDashSerializer, getDuration, getFrameRate, getGroup, getHlsCodec, getHlsParser, getLanguage, getNumberOfSegments, getPlaylistData, getPresentationId, getSampleRate, getSar, getSegments, getTimescale, getTrackDuration, getTracksFromPresentation, getTracksFromSelectionSet, getTracksFromSwitchingSet, getUrlFromTemplate, getUrlInitialization, hamToDash, hamToHls, hlsByterangeToByteRangeObject, hlsToHam, iso8601DurationToNumber, mapSegmentBase, mapSegmentList, mapSegmentTemplate, mapSegments, numberToIso8601Duration, parseByteRangeString, parseDashManifest, parseHlsManifest, serializeDashManifest, setDashParser, setDashSerializer, setHlsParser, validatePresentation, validateSegment, validateSegments, validateSelectionSet, validateSelectionSets, validateSwitchingSet, validateSwitchingSets, validateTrack, validateTracks };
1498
+ export type { AUDIO, AdaptationSet, AddressableObject, AlignedSwitchingSet, AudioChannelConfiguration, AudioTrack, Base, Byterange, CBCS, CENC, ContentComponent, DYNAMIC, DashManifest, Duration, Event, EventStream, FrameRate, Ham, HlsManifest, IMAGE, Initialization, KeySystem, KeySystemMap, ManifestFile, ManifestFormat, ManifestType, MediaGroups, Period, PlayList, Presentation, Protection, ProtectionScheme, Representation, Role, STATIC, Segment, SegmentBase, SegmentHls, SegmentList, SegmentTemplate, SegmentURL, SelectionSet, SwitchingSet, TEXT, TextTrack, Track, TrackType, VIDEO, Validation, VideoTrack };
1501
1499
  //# sourceMappingURL=index.d.ts.map