@svta/cml-iso-bmff 0.23.1 → 1.0.0-alpha.1

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,20 +1,27 @@
1
- //#region src/boxes/Fields.d.ts
1
+ //#region src/boxes/AdditionalMetadataContainerBox.d.ts
2
2
  /**
3
- * Utility type to get just the fields of a box
3
+ * Child boxes of Additional Metadata Container Box
4
4
  *
5
+ * @public
6
+ */
7
+ type AdditionalMetadataContainerBoxChild = any;
8
+ /**
9
+ * Additional Metadata Container Box - 'meta' - Container
5
10
  *
6
- * @beta
11
+ * @public
7
12
  */
8
- type Fields<T$1> = Omit<T$1, Exclude<keyof Box, "data"> | "boxes">;
13
+ type AdditionalMetadataContainerBox = {
14
+ type: "meta";
15
+ boxes: AdditionalMetadataContainerBoxChild[];
16
+ };
9
17
  //#endregion
10
18
  //#region src/boxes/FullBox.d.ts
11
19
  /**
12
20
  * Full Box Type (has version and flags)
13
21
  *
14
- *
15
- * @beta
22
+ * @public
16
23
  */
17
- type FullBox = Box & {
24
+ type FullBox = {
18
25
  version: number;
19
26
  flags: number;
20
27
  };
@@ -23,8 +30,7 @@ type FullBox = Box & {
23
30
  /**
24
31
  * ISO/IEC 14496-12:202x - 12.2.8 Audio rendering indication box
25
32
  *
26
- *
27
- * @beta
33
+ * @public
28
34
  */
29
35
  type AudioRenderingIndicationBox = FullBox & {
30
36
  type: "ardi";
@@ -35,10 +41,9 @@ type AudioRenderingIndicationBox = FullBox & {
35
41
  /**
36
42
  * ISO/IEC 14496-12:2015 - 8.5.2.2 Sample Entry
37
43
  *
38
- *
39
- * @beta
44
+ * @public
40
45
  */
41
- type SampleEntryBox = Box & {
46
+ type SampleEntryBox = {
42
47
  reserved1: number[];
43
48
  dataReferenceIndex: number;
44
49
  };
@@ -47,8 +52,7 @@ type SampleEntryBox = Box & {
47
52
  /**
48
53
  * ISO/IEC 14496-12:2012 - 8.5.2.2 mp4a box (use AudioSampleEntry definition and naming)
49
54
  *
50
- *
51
- * @beta
55
+ * @public
52
56
  */
53
57
  type AudioSampleEntryBox<T$1 extends "mp4a" | "enca" = "mp4a" | "enca"> = SampleEntryBox & {
54
58
  type: T$1;
@@ -65,21 +69,24 @@ type AudioSampleEntryBox<T$1 extends "mp4a" | "enca" = "mp4a" | "enca"> = Sample
65
69
  /**
66
70
  * Chunk Large Offset Box - 'co64'
67
71
  *
68
- *
69
- * @beta
72
+ * @public
70
73
  */
71
74
  type ChunkLargeOffsetBox = FullBox & {
72
75
  type: "co64";
73
76
  entryCount: number;
74
77
  chunkOffset: number[];
75
78
  };
79
+ /**
80
+ * @public
81
+ */
82
+ type co64 = ChunkLargeOffsetBox;
76
83
  //#endregion
77
84
  //#region src/boxes/ChunkOffsetBox.d.ts
78
85
  /**
79
86
  * Chunk Offset Box - 'stco'
80
87
  *
81
88
  *
82
- * @beta
89
+ * @public
83
90
  */
84
91
  type ChunkOffsetBox = FullBox & {
85
92
  type: "stco";
@@ -91,8 +98,7 @@ type ChunkOffsetBox = FullBox & {
91
98
  /**
92
99
  * Compact Sample Size Box - 'stz2'
93
100
  *
94
- *
95
- * @beta
101
+ * @public
96
102
  */
97
103
  type CompactSampleSizeBox = FullBox & {
98
104
  type: "stz2";
@@ -100,13 +106,16 @@ type CompactSampleSizeBox = FullBox & {
100
106
  sampleCount: number;
101
107
  entrySize: number[];
102
108
  };
109
+ /**
110
+ * @public
111
+ */
112
+ type stz2 = CompactSampleSizeBox;
103
113
  //#endregion
104
114
  //#region src/boxes/CompositionTimeToSampleEntry.d.ts
105
115
  /**
106
116
  * A Composition Time To Sample Entry
107
117
  *
108
- *
109
- * @beta
118
+ * @public
110
119
  */
111
120
  type CompositionTimeToSampleEntry = {
112
121
  sampleCount: number;
@@ -117,8 +126,7 @@ type CompositionTimeToSampleEntry = {
117
126
  /**
118
127
  * ISO/IEC 14496-12:2012 - 8.6.1.3 Composition Time To Sample Box
119
128
  *
120
- *
121
- * @beta
129
+ * @public
122
130
  */
123
131
  type CompositionTimeToSampleBox = FullBox & {
124
132
  type: "ctts";
@@ -130,33 +138,38 @@ type CompositionTimeToSampleBox = FullBox & {
130
138
  /**
131
139
  * Data Entry Url Box - 'url '
132
140
  *
133
- *
134
- * @beta
141
+ * @public
135
142
  */
136
143
  type DataEntryUrlBox = FullBox & {
137
144
  type: "url ";
138
- location?: string;
145
+ location: string;
139
146
  };
147
+ /**
148
+ * @public
149
+ */
150
+ type url = DataEntryUrlBox;
140
151
  //#endregion
141
152
  //#region src/boxes/DataEntryUrnBox.d.ts
142
153
  /**
143
154
  * Data Entry Urn Box - 'urn '
144
155
  *
145
- *
146
- * @beta
156
+ * @public
147
157
  */
148
158
  type DataEntryUrnBox = FullBox & {
149
159
  type: "urn ";
150
- name?: string;
151
- location?: string;
160
+ name: string;
161
+ location: string;
152
162
  };
163
+ /**
164
+ * @public
165
+ */
166
+ type urn = DataEntryUrnBox;
153
167
  //#endregion
154
168
  //#region src/boxes/DataReferenceBox.d.ts
155
169
  /**
156
170
  * ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box
157
171
  *
158
- *
159
- * @beta
172
+ * @public
160
173
  */
161
174
  type DataReferenceBox = FullBox & {
162
175
  type: "dref";
@@ -164,12 +177,28 @@ type DataReferenceBox = FullBox & {
164
177
  entries: (DataEntryUrlBox | DataEntryUrnBox)[];
165
178
  };
166
179
  //#endregion
180
+ //#region src/boxes/DataInformationBox.d.ts
181
+ /**
182
+ * Child boxes of Data Information Box
183
+ *
184
+ * @public
185
+ */
186
+ type DataInformationBoxChild = DataReferenceBox;
187
+ /**
188
+ * Data Information Box - 'dinf' - Container
189
+ *
190
+ * @public
191
+ */
192
+ type DataInformationBox = {
193
+ type: "dinf";
194
+ boxes: DataInformationBoxChild[];
195
+ };
196
+ //#endregion
167
197
  //#region src/boxes/DecodingTimeSample.d.ts
168
198
  /**
169
199
  * Decoding time sample
170
200
  *
171
- *
172
- * @beta
201
+ * @public
173
202
  */
174
203
  type DecodingTimeSample = {
175
204
  /** A 32-bit integer that specifies the number of consecutive samples that have the same decoding time delta. */
@@ -182,8 +211,7 @@ type DecodingTimeSample = {
182
211
  /**
183
212
  * ISO/IEC 14496-12:2012 - 8.6.1.2 Decoding Time To Sample Box
184
213
  *
185
- *
186
- * @beta
214
+ * @public
187
215
  */
188
216
  type DecodingTimeToSampleBox = FullBox & {
189
217
  type: "stts";
@@ -197,8 +225,7 @@ type DecodingTimeToSampleBox = FullBox & {
197
225
  /**
198
226
  * Degradation Priority Box - 'stdp'
199
227
  *
200
- *
201
- * @beta
228
+ * @public
202
229
  */
203
230
  type DegradationPriorityBox = FullBox & {
204
231
  type: "stdp";
@@ -209,8 +236,7 @@ type DegradationPriorityBox = FullBox & {
209
236
  /**
210
237
  * An edit list entry.
211
238
  *
212
- *
213
- * @beta
239
+ * @public
214
240
  */
215
241
  type EditListEntry = {
216
242
  segmentDuration: number;
@@ -223,8 +249,7 @@ type EditListEntry = {
223
249
  /**
224
250
  * ISO/IEC 14496-12:2012 - 8.6.6 Edit List Box
225
251
  *
226
- *
227
- * @beta
252
+ * @public
228
253
  */
229
254
  type EditListBox = FullBox & {
230
255
  type: "elst";
@@ -232,12 +257,28 @@ type EditListBox = FullBox & {
232
257
  entries: EditListEntry[];
233
258
  };
234
259
  //#endregion
260
+ //#region src/boxes/EditBox.d.ts
261
+ /**
262
+ * Child boxes of Edit Box
263
+ *
264
+ * @public
265
+ */
266
+ type EditBoxChild = EditListBox;
267
+ /**
268
+ * Edit Box - 'edts' - Container
269
+ *
270
+ * @public
271
+ */
272
+ type EditBox = {
273
+ type: "edts";
274
+ boxes: EditBoxChild[];
275
+ };
276
+ //#endregion
235
277
  //#region src/boxes/EventMessageBox.d.ts
236
278
  /**
237
279
  * ISO/IEC 23009-1:2014 - 5.10.3.3 Event Message Box
238
280
  *
239
- *
240
- * @beta
281
+ * @public
241
282
  */
242
283
  type EventMessageBox = FullBox & {
243
284
  type: "emsg";
@@ -255,20 +296,31 @@ type EventMessageBox = FullBox & {
255
296
  /**
256
297
  * ISO/IEC 14496-12:202x - 8.4.6 Extended language tag
257
298
  *
258
- *
259
- * @beta
299
+ * @public
260
300
  */
261
301
  type ExtendedLanguageBox = FullBox & {
262
302
  type: "elng";
263
303
  extendedLanguage: string;
264
304
  };
265
305
  //#endregion
306
+ //#region src/boxes/TypeBox.d.ts
307
+ /**
308
+ * Utility TypeBox
309
+ *
310
+ * @public
311
+ */
312
+ type TypeBox<T$1> = {
313
+ type: T$1;
314
+ majorBrand: string;
315
+ minorVersion: number;
316
+ compatibleBrands: string[];
317
+ };
318
+ //#endregion
266
319
  //#region src/boxes/FileTypeBox.d.ts
267
320
  /**
268
321
  * ISO/IEC 14496-12:2012 - 4.3 File Type Box
269
322
  *
270
- *
271
- * @beta
323
+ * @public
272
324
  */
273
325
  type FileTypeBox = TypeBox<"ftyp">;
274
326
  //#endregion
@@ -276,20 +328,35 @@ type FileTypeBox = TypeBox<"ftyp">;
276
328
  /**
277
329
  * ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box
278
330
  *
279
- *
280
- * @beta
331
+ * @public
281
332
  */
282
- type FreeSpaceBox<T$1 extends "free" | "skip" = "free"> = Box & {
333
+ type FreeSpaceBox<T$1 extends "free" | "skip" = "free"> = {
283
334
  type: T$1;
284
335
  data: Uint8Array;
285
336
  };
286
337
  //#endregion
338
+ //#region src/boxes/GroupsListBox.d.ts
339
+ /**
340
+ * Child boxes of Groups List Box
341
+ *
342
+ * @public
343
+ */
344
+ type GroupsListBoxChild = any;
345
+ /**
346
+ * Groups List Box - 'grpl' - Container
347
+ *
348
+ * @public
349
+ */
350
+ type GroupsListBox = {
351
+ type: "grpl";
352
+ boxes: GroupsListBoxChild[];
353
+ };
354
+ //#endregion
287
355
  //#region src/boxes/HandlerReferenceBox.d.ts
288
356
  /**
289
357
  * ISO/IEC 14496-12:2012 - 8.4.3 Handler Reference Box
290
358
  *
291
- *
292
- * @beta
359
+ * @public
293
360
  */
294
361
  type HandlerReferenceBox = FullBox & {
295
362
  type: "hdlr";
@@ -303,8 +370,7 @@ type HandlerReferenceBox = FullBox & {
303
370
  /**
304
371
  * Hint Media Header Box - 'hmhd'
305
372
  *
306
- *
307
- * @beta
373
+ * @public
308
374
  */
309
375
  type HintMediaHeaderBox = FullBox & {
310
376
  type: "hmhd";
@@ -318,10 +384,9 @@ type HintMediaHeaderBox = FullBox & {
318
384
  /**
319
385
  * ISO/IEC 14496-12:2012 - 9.1.4.1 Identified media data box
320
386
  *
321
- *
322
- * @beta
387
+ * @public
323
388
  */
324
- type IdentifiedMediaDataBox = Box & {
389
+ type IdentifiedMediaDataBox = {
325
390
  type: "imda";
326
391
  imdaIdentifier: number;
327
392
  data: Uint8Array;
@@ -331,8 +396,7 @@ type IdentifiedMediaDataBox = Box & {
331
396
  /**
332
397
  * IPMP Info Box - 'imif'
333
398
  *
334
- *
335
- * @beta
399
+ * @public
336
400
  */
337
401
  type IpmpInfoBox = FullBox & {
338
402
  type: "imif";
@@ -343,8 +407,7 @@ type IpmpInfoBox = FullBox & {
343
407
  /**
344
408
  * Item Info Entry - 'infe'
345
409
  *
346
- *
347
- * @beta
410
+ * @public
348
411
  */
349
412
  type ItemInfoEntry = FullBox & {
350
413
  type: "infe";
@@ -356,12 +419,29 @@ type ItemInfoEntry = FullBox & {
356
419
  extensionType?: string;
357
420
  };
358
421
  //#endregion
422
+ //#region src/boxes/ItemInfoBox.d.ts
423
+ /**
424
+ * Child boxes of Item Info Box
425
+ *
426
+ * @public
427
+ */
428
+ type ItemInfoBoxChild = ItemInfoEntry;
429
+ /**
430
+ * Item Info Box - 'iinf' - Container
431
+ *
432
+ * @public
433
+ */
434
+ type ItemInfoBox = {
435
+ type: "iinf";
436
+ boxes: ItemInfoBoxChild[];
437
+ entryCount: number;
438
+ };
439
+ //#endregion
359
440
  //#region src/boxes/ItemExtent.d.ts
360
441
  /**
361
442
  * Item Extent
362
443
  *
363
- *
364
- * @beta
444
+ * @public
365
445
  */
366
446
  type ItemExtent = {
367
447
  extentIndex?: number;
@@ -373,8 +453,7 @@ type ItemExtent = {
373
453
  /**
374
454
  * Item Location
375
455
  *
376
- *
377
- * @beta
456
+ * @public
378
457
  */
379
458
  type ItemLocation = {
380
459
  itemId: number;
@@ -388,8 +467,7 @@ type ItemLocation = {
388
467
  /**
389
468
  * Item Location Box - 'iloc'
390
469
  *
391
- *
392
- * @beta
470
+ * @public
393
471
  */
394
472
  type ItemLocationBox = FullBox & {
395
473
  type: "iloc";
@@ -401,311 +479,198 @@ type ItemLocationBox = FullBox & {
401
479
  items: ItemLocation[];
402
480
  };
403
481
  //#endregion
404
- //#region src/boxes/LabelBox.d.ts
482
+ //#region src/boxes/OriginalFormatBox.d.ts
405
483
  /**
406
- * ISO/IEC 14496-12:202x - 8.10.5 Label box
484
+ * ISO/IEC 14496-12:2012 - 8.12.2 Original Format Box
407
485
  *
486
+ * @public
487
+ */
488
+ type OriginalFormatBox = {
489
+ type: "frma";
490
+ dataFormat: number;
491
+ };
492
+ //#endregion
493
+ //#region src/boxes/TrackEncryptionBox.d.ts
494
+ /**
495
+ * ISO/IEC 23001-7:2011 - 8.2 Track Encryption Box
408
496
  *
409
- * @beta
497
+ * @public
410
498
  */
411
- type LabelBox = FullBox & {
412
- type: "labl";
413
- isGroupLabel: boolean;
414
- labelId: number;
415
- language: string;
416
- label: string;
499
+ type TrackEncryptionBox = FullBox & {
500
+ type: "tenc";
501
+ defaultIsEncrypted: number;
502
+ defaultIvSize: number;
503
+ defaultKid: number[];
417
504
  };
418
505
  //#endregion
419
- //#region src/boxes/MediaDataBox.d.ts
506
+ //#region src/boxes/SchemeInformationBox.d.ts
420
507
  /**
421
- * ISO/IEC 14496-12:2012 - 8.1.1 Media Data Box
508
+ * Child boxes of Scheme Information Box
422
509
  *
510
+ * @public
511
+ */
512
+ type SchemeInformationBoxChild = TrackEncryptionBox;
513
+ /**
514
+ * Scheme Information Box - 'schi' - Container
423
515
  *
424
- * @beta
516
+ * @public
425
517
  */
426
- type MediaDataBox = Box & {
427
- type: "mdat";
428
- data: Uint8Array<ArrayBuffer>;
518
+ type SchemeInformationBox = {
519
+ type: "schi";
520
+ boxes: SchemeInformationBoxChild[];
429
521
  };
430
522
  //#endregion
431
- //#region src/boxes/MediaHeaderBox.d.ts
523
+ //#region src/boxes/SchemeTypeBox.d.ts
432
524
  /**
433
- * ISO/IEC 14496-12:2012 - 8.4.2 Media Header Box
434
- *
525
+ * ISO/IEC 14496-12:2012 - 8.12.5 Scheme Type Box
435
526
  *
436
- * @beta
527
+ * @public
437
528
  */
438
- type MediaHeaderBox = FullBox & {
439
- type: "mdhd";
440
- /** A 32-bit integer that specifies the creation time of the media in this track. */
441
- creationTime: number;
442
- /** A 32-bit integer that specifies the most recent time the media in this track was modified. */
443
- modificationTime: number;
444
- /** A time value that indicates the time-scale for this media; this is the number of time units that pass in one second. */
445
- timescale: number;
446
- /** A time value that indicates the duration of this media. */
447
- duration: number;
448
- /** A 16-bit integer that specifies the language code for this media. */
449
- language: string;
450
- /** A 16-bit value that is reserved for use in other specifications. */
451
- preDefined: number;
529
+ type SchemeTypeBox = FullBox & {
530
+ type: "schm";
531
+ schemeType: number;
532
+ schemeVersion: number;
533
+ schemeUri?: string;
452
534
  };
453
535
  //#endregion
454
- //#region src/boxes/MovieExtendsHeaderBox.d.ts
536
+ //#region src/boxes/ProtectionSchemeInformationBox.d.ts
455
537
  /**
456
- * ISO/IEC 14496-12:2012 - 8.8.2 Movie Extends Header Box
538
+ * Child boxes of Protection Scheme Information Box
457
539
  *
540
+ * @public
541
+ */
542
+ type ProtectionSchemeInformationBoxChild = OriginalFormatBox | IpmpInfoBox | SchemeTypeBox | SchemeInformationBox;
543
+ /**
544
+ * Protection Scheme Information Box - 'sinf' - Container
458
545
  *
459
- * @beta
546
+ * @public
460
547
  */
461
- type MovieExtendsHeaderBox = FullBox & {
462
- type: "mehd";
463
- fragmentDuration: number;
548
+ type ProtectionSchemeInformationBox = {
549
+ type: "sinf";
550
+ boxes: ProtectionSchemeInformationBoxChild[];
464
551
  };
465
552
  //#endregion
466
- //#region src/boxes/MovieFragmentHeaderBox.d.ts
553
+ //#region src/boxes/ItemProtectionBox.d.ts
467
554
  /**
468
- * ISO/IEC 14496-12:2012 - 8.8.5 Movie Fragment Header Box
555
+ * Child boxes of Item Protection Box
469
556
  *
557
+ * @public
558
+ */
559
+ type ItemProtectionBoxChild = ProtectionSchemeInformationBox;
560
+ /**
561
+ * Item Protection Box - 'ipro' - Container
470
562
  *
471
- * @beta
563
+ * @public
472
564
  */
473
- type MovieFragmentHeaderBox = FullBox & {
474
- type: "mfhd";
475
- sequenceNumber: number;
565
+ type ItemProtectionBox = {
566
+ type: "ipro";
567
+ boxes: ItemProtectionBoxChild[];
568
+ protectionCount: number;
476
569
  };
477
570
  //#endregion
478
- //#region src/boxes/MovieFragmentRandomAccessOffsetBox.d.ts
571
+ //#region src/boxes/SingleItemTypeReferenceBox.d.ts
479
572
  /**
480
- * ISO/IEC 14496-12:2012 - 8.8.11 Movie Fragment Random Access Box
573
+ * Single Item Type Reference Box
574
+ *
575
+ * @public
576
+ */
577
+ type SingleItemTypeReferenceBox = {
578
+ fromItemId: number;
579
+ referenceCount: number;
580
+ toItemId: number[];
581
+ };
582
+ //#endregion
583
+ //#region src/boxes/ItemReferenceBox.d.ts
584
+ /**
585
+ * Child boxes of Item Reference Box
481
586
  *
587
+ * @public
588
+ */
589
+ type ItemReferenceBoxChild = SingleItemTypeReferenceBox;
590
+ /**
591
+ * Item Reference Box - 'iref' - Container
482
592
  *
483
- * @beta
593
+ * @public
484
594
  */
485
- type MovieFragmentRandomAccessOffsetBox = FullBox & {
486
- type: "mfro";
487
- mfraSize: number;
595
+ type ItemReferenceBox = {
596
+ type: "iref";
597
+ boxes: ItemReferenceBoxChild[];
488
598
  };
489
599
  //#endregion
490
- //#region src/boxes/MovieHeaderBox.d.ts
600
+ //#region src/boxes/LabelBox.d.ts
491
601
  /**
492
- * ISO/IEC 14496-12:2012 - 8.2.2 Movie Header Box
602
+ * ISO/IEC 14496-12:202x - 8.10.5 Label box
493
603
  *
604
+ * @public
605
+ */
606
+ type LabelBox = FullBox & {
607
+ type: "labl";
608
+ isGroupLabel: boolean;
609
+ labelId: number;
610
+ language: string;
611
+ label: string;
612
+ };
613
+ //#endregion
614
+ //#region src/boxes/MediaHeaderBox.d.ts
615
+ /**
616
+ * ISO/IEC 14496-12:2012 - 8.4.2 Media Header Box
494
617
  *
495
- * @beta
618
+ * @public
496
619
  */
497
- type MovieHeaderBox = FullBox & {
498
- type: "mvhd";
620
+ type MediaHeaderBox = FullBox & {
621
+ type: "mdhd";
622
+ /** A 32-bit integer that specifies the creation time of the media in this track. */
499
623
  creationTime: number;
624
+ /** A 32-bit integer that specifies the most recent time the media in this track was modified. */
500
625
  modificationTime: number;
626
+ /** A time value that indicates the time-scale for this media; this is the number of time units that pass in one second. */
501
627
  timescale: number;
628
+ /** A time value that indicates the duration of this media. */
502
629
  duration: number;
503
- rate: number;
504
- volume: number;
505
- reserved1: number;
506
- reserved2: number[];
507
- matrix: number[];
508
- preDefined: number[];
509
- nextTrackId: number;
630
+ /** A 16-bit integer that specifies the language code for this media. */
631
+ language: string;
632
+ /** A 16-bit value that is reserved for use in other specifications. */
633
+ preDefined: number;
510
634
  };
511
635
  //#endregion
512
636
  //#region src/boxes/NullMediaHeaderBox.d.ts
513
637
  /**
514
638
  * Null Media Header Box - 'nmhd'
515
639
  *
516
- *
517
- * @beta
640
+ * @public
518
641
  */
519
642
  type NullMediaHeaderBox = FullBox & {
520
643
  type: "nmhd";
521
644
  };
522
645
  //#endregion
523
- //#region src/boxes/OriginalFormatBox.d.ts
646
+ //#region src/boxes/SampleDependencyTypeBox.d.ts
524
647
  /**
525
- * ISO/IEC 14496-12:2012 - 8.12.2 Original Format Box
526
- *
648
+ * ISO/IEC 14496-12:2012 - 8.6.4.1 Sample Dependency Type box
527
649
  *
528
- * @beta
650
+ * @public
529
651
  */
530
- type OriginalFormatBox = Box & {
531
- type: "frma";
532
- dataFormat: number;
652
+ type SampleDependencyTypeBox = FullBox & {
653
+ type: "sdtp";
654
+ sampleDependencyTable: number[];
533
655
  };
534
656
  //#endregion
535
- //#region src/boxes/Entity.d.ts
657
+ //#region src/boxes/SampleDescriptionBox.d.ts
536
658
  /**
537
- * Entity
538
- *
659
+ * ISO/IEC 14496-12:2012 - 8.5.2 Sample Description Box
539
660
  *
540
- * @beta
661
+ * @public
541
662
  */
542
- type Entity = {
543
- /** Entity ID */
544
- entityId: number;
663
+ type SampleDescriptionBox<E extends SampleEntryBox = SampleEntryBox> = FullBox & {
664
+ type: "stsd";
665
+ entryCount: number;
666
+ entries: E[];
545
667
  };
546
668
  //#endregion
547
- //#region src/boxes/PreselectionGroupBox.d.ts
669
+ //#region src/boxes/SampleGroupDescriptionBox.d.ts
548
670
  /**
549
- * ISO/IEC 14496-12:202x - 8.18.4.1 Preselection group box
550
- *
671
+ * Sample Group Description Box - 'sgpd'
551
672
  *
552
- * @beta
553
- */
554
- type PreselectionGroupBox = FullBox & {
555
- type: "prsl";
556
- /** Group ID */
557
- groupId: number;
558
- /** Number of entities in group */
559
- numEntitiesInGroup: number;
560
- /** Entities */
561
- entities: Entity[];
562
- preselectionTag?: string;
563
- selectionPriority?: number;
564
- interleavingTag?: string;
565
- };
566
- //#endregion
567
- //#region src/boxes/PrimaryItemBox.d.ts
568
- /**
569
- * Primary Item Box - 'pitm'
570
- *
571
- *
572
- * @beta
573
- */
574
- type PrimaryItemBox = FullBox & {
575
- type: "pitm";
576
- itemId: number;
577
- };
578
- //#endregion
579
- //#region src/boxes/ProducerReferenceTimeBox.d.ts
580
- /**
581
- * ISO/IEC 14496-12:2012 - 8.16.5 Producer Reference Time
582
- *
583
- *
584
- * @beta
585
- */
586
- type ProducerReferenceTimeBox = FullBox & {
587
- type: "prft";
588
- referenceTrackId: number;
589
- ntpTimestampSec: number;
590
- ntpTimestampFrac: number;
591
- mediaTime: number;
592
- };
593
- //#endregion
594
- //#region src/boxes/ProtectionSystemSpecificHeaderBox.d.ts
595
- /**
596
- * ISO/IEC 23001-7:2011 - 8.1 Protection System Specific Header Box
597
- *
598
- *
599
- * @beta
600
- */
601
- type ProtectionSystemSpecificHeaderBox = FullBox & {
602
- type: "pssh";
603
- systemId: number[];
604
- kidCount: number;
605
- kid: number[];
606
- dataSize: number;
607
- data: number[];
608
- };
609
- //#endregion
610
- //#region src/boxes/SampleAuxiliaryInformationOffsetsBox.d.ts
611
- /**
612
- * Sample Auxiliary Information Offsets Box - 'saio'
613
- *
614
- *
615
- * @beta
616
- */
617
- type SampleAuxiliaryInformationOffsetsBox = FullBox & {
618
- type: "saio";
619
- auxInfoType?: number;
620
- auxInfoTypeParameter?: number;
621
- entryCount: number;
622
- offset: number[];
623
- };
624
- //#endregion
625
- //#region src/boxes/SampleAuxiliaryInformationSizesBox.d.ts
626
- /**
627
- * Sample Auxiliary Information Sizes Box - 'saiz'
628
- *
629
- *
630
- * @beta
631
- */
632
- type SampleAuxiliaryInformationSizesBox = FullBox & {
633
- type: "saiz";
634
- auxInfoType?: number;
635
- auxInfoTypeParameter?: number;
636
- defaultSampleInfoSize: number;
637
- sampleCount: number;
638
- sampleInfoSize?: number[];
639
- };
640
- //#endregion
641
- //#region src/boxes/SampleDependencyTypeBox.d.ts
642
- /**
643
- * ISO/IEC 14496-12:2012 - 8.6.4.1 Sample Dependency Type box
644
- *
645
- *
646
- * @beta
647
- */
648
- type SampleDependencyTypeBox = FullBox & {
649
- type: "sdtp";
650
- sampleDependencyTable: number[];
651
- };
652
- //#endregion
653
- //#region src/boxes/SampleDescriptionBox.d.ts
654
- /**
655
- * ISO/IEC 14496-12:2012 - 8.5.2 Sample Description Box
656
- *
657
- *
658
- * @beta
659
- */
660
- type SampleDescriptionBox<E extends SampleEntryBox = SampleEntryBox> = FullBox & {
661
- type: "stsd";
662
- entryCount: number;
663
- entries: E[];
664
- };
665
- //#endregion
666
- //#region src/boxes/SubsampleEncryption.d.ts
667
- /**
668
- * Subsample Encryption
669
- *
670
- *
671
- * @beta
672
- */
673
- type SubsampleEncryption = {
674
- bytesOfClearData: number;
675
- bytesOfProtectedData: number;
676
- };
677
- //#endregion
678
- //#region src/boxes/EncryptedSample.d.ts
679
- /**
680
- * Encrypted Sample
681
- *
682
- *
683
- * @beta
684
- */
685
- type EncryptedSample = {
686
- initializationVector?: Uint8Array;
687
- subsampleEncryption?: SubsampleEncryption[];
688
- };
689
- //#endregion
690
- //#region src/boxes/SampleEncryptionBox.d.ts
691
- /**
692
- * Sample Encryption Box - 'senc'
693
- *
694
- *
695
- * @beta
696
- */
697
- type SampleEncryptionBox = FullBox & {
698
- type: "senc";
699
- sampleCount: number;
700
- samples: EncryptedSample[];
701
- };
702
- //#endregion
703
- //#region src/boxes/SampleGroupDescriptionBox.d.ts
704
- /**
705
- * Sample Group Description Box - 'sgpd'
706
- *
707
- *
708
- * @beta
673
+ * @public
709
674
  */
710
675
  type SampleGroupDescriptionBox = FullBox & {
711
676
  type: "sgpd";
@@ -719,8 +684,7 @@ type SampleGroupDescriptionBox = FullBox & {
719
684
  /**
720
685
  * Sample Size Box - 'stsz'
721
686
  *
722
- *
723
- * @beta
687
+ * @public
724
688
  */
725
689
  type SampleSizeBox = FullBox & {
726
690
  type: "stsz";
@@ -733,8 +697,7 @@ type SampleSizeBox = FullBox & {
733
697
  /**
734
698
  * Sample to Chunk Entry
735
699
  *
736
- *
737
- * @beta
700
+ * @public
738
701
  */
739
702
  type SampleToChunkEntry = {
740
703
  firstChunk: number;
@@ -746,8 +709,7 @@ type SampleToChunkEntry = {
746
709
  /**
747
710
  * Sample to Chunk Box - 'stsc'
748
711
  *
749
- *
750
- * @beta
712
+ * @public
751
713
  */
752
714
  type SampleToChunkBox = FullBox & {
753
715
  type: "stsc";
@@ -759,8 +721,7 @@ type SampleToChunkBox = FullBox & {
759
721
  /**
760
722
  * Sample to Group Entry
761
723
  *
762
- *
763
- * @beta
724
+ * @public
764
725
  */
765
726
  type SampleToGroupEntry = {
766
727
  sampleCount: number;
@@ -771,8 +732,7 @@ type SampleToGroupEntry = {
771
732
  /**
772
733
  * Sample to Group Box - 'sbgp'
773
734
  *
774
- *
775
- * @beta
735
+ * @public
776
736
  */
777
737
  type SampleToGroupBox = FullBox & {
778
738
  type: "sbgp";
@@ -782,108 +742,73 @@ type SampleToGroupBox = FullBox & {
782
742
  entries: SampleToGroupEntry[];
783
743
  };
784
744
  //#endregion
785
- //#region src/boxes/SchemeTypeBox.d.ts
745
+ //#region src/boxes/ShadowSyncEntry.d.ts
786
746
  /**
787
- * ISO/IEC 14496-12:2012 - 8.12.5 Scheme Type Box
788
- *
747
+ * Shadow Sync Entry
789
748
  *
790
- * @beta
749
+ * @public
791
750
  */
792
- type SchemeTypeBox = FullBox & {
793
- type: "schm";
794
- schemeType: number;
795
- schemeVersion: number;
796
- schemeUri?: string;
751
+ type ShadowSyncEntry = {
752
+ shadowedSampleNumber: number;
753
+ syncSampleNumber: number;
797
754
  };
798
755
  //#endregion
799
- //#region src/boxes/SegmentIndexReference.d.ts
756
+ //#region src/boxes/ShadowSyncSampleBox.d.ts
800
757
  /**
801
- * Segment index reference
802
- *
758
+ * Shadow Sync Sample Box - 'stsh'
803
759
  *
804
- * @beta
760
+ * @public
805
761
  */
806
- type SegmentIndexReference = {
807
- reference: number;
808
- subsegmentDuration: number;
809
- sap: number;
810
- referenceType: number;
811
- referencedSize: number;
812
- startsWithSap: number;
813
- sapType: number;
814
- sapDeltaTime: number;
762
+ type ShadowSyncSampleBox = FullBox & {
763
+ type: "stsh";
764
+ entryCount: number;
765
+ entries: ShadowSyncEntry[];
815
766
  };
816
767
  //#endregion
817
- //#region src/boxes/SegmentIndexBox.d.ts
768
+ //#region src/boxes/SyncSample.d.ts
818
769
  /**
819
- * ISO/IEC 14496-12:2012 - 8.16.3 Segment Index Box
820
- *
770
+ * Sync sample
821
771
  *
822
- * @beta
772
+ * @public
823
773
  */
824
- type SegmentIndexBox = FullBox & {
825
- type: "sidx";
826
- referenceId: number;
827
- timescale: number;
828
- earliestPresentationTime: number;
829
- firstOffset: number;
830
- reserved: number;
831
- references: SegmentIndexReference[];
774
+ type SyncSample = {
775
+ sampleNumber: number;
832
776
  };
833
777
  //#endregion
834
- //#region src/boxes/SegmentTypeBox.d.ts
835
- /**
836
- * ISO/IEC 14496-12:2012 - 8.16.2 Segment Type Box
837
- *
838
- *
839
- * @beta
840
- */
841
- type SegmentTypeBox = TypeBox<"styp">;
842
- //#endregion
843
- //#region src/boxes/ShadowSyncEntry.d.ts
778
+ //#region src/boxes/SyncSampleBox.d.ts
844
779
  /**
845
- * Shadow Sync Entry
846
- *
780
+ * ISO/IEC 14496-12:2015 - 8.6.2 Sync Sample Box
847
781
  *
848
- * @beta
782
+ * @public
849
783
  */
850
- type ShadowSyncEntry = {
851
- shadowedSampleNumber: number;
852
- syncSampleNumber: number;
784
+ type SyncSampleBox = FullBox & {
785
+ type: "stss";
786
+ entryCount: number;
787
+ entries: SyncSample[];
853
788
  };
854
789
  //#endregion
855
- //#region src/boxes/ShadowSyncSampleBox.d.ts
790
+ //#region src/boxes/SampleTableBox.d.ts
856
791
  /**
857
- * Shadow Sync Sample Box - 'stsh'
858
- *
792
+ * Child boxes of Sample Table Box
859
793
  *
860
- * @beta
794
+ * @public
861
795
  */
862
- type ShadowSyncSampleBox = FullBox & {
863
- type: "stsh";
864
- entryCount: number;
865
- entries: ShadowSyncEntry[];
866
- };
867
- //#endregion
868
- //#region src/boxes/SingleItemTypeReferenceBox.d.ts
796
+ type SampleTableBoxChild = SampleDescriptionBox | DecodingTimeToSampleBox | CompositionTimeToSampleBox | SampleToChunkBox | SampleSizeBox | ChunkOffsetBox | SyncSampleBox | ShadowSyncSampleBox | DegradationPriorityBox | SampleDependencyTypeBox | SampleToGroupBox | SampleGroupDescriptionBox;
869
797
  /**
870
- * Single Item Type Reference Box
871
- *
798
+ * Sample Table Box - 'stbl' - Container
872
799
  *
873
- * @beta
800
+ * @public
874
801
  */
875
- type SingleItemTypeReferenceBox = Box & {
876
- fromItemId: number;
877
- referenceCount: number;
878
- toItemId: number[];
802
+ type SampleTableBox = {
803
+ type: "stbl";
804
+ boxes: SampleTableBoxChild[];
879
805
  };
880
806
  //#endregion
881
807
  //#region src/boxes/SoundMediaHeaderBox.d.ts
882
808
  /**
883
809
  * ISO/IEC 14496-12:2012 - 8.4.5.3 Sound Media Header Box
884
810
  *
885
- *
886
- * @beta
811
+ * @public
887
812
  */
888
813
  type SoundMediaHeaderBox = FullBox & {
889
814
  type: "smhd";
@@ -891,138 +816,117 @@ type SoundMediaHeaderBox = FullBox & {
891
816
  reserved: number;
892
817
  };
893
818
  //#endregion
894
- //#region src/boxes/Subsample.d.ts
819
+ //#region src/boxes/SubtitleMediaHeaderBox.d.ts
895
820
  /**
896
- * Sub sample
897
- *
821
+ * ISO/IEC 14496-12:2015 - 12.6.2 Subtitle media header Box
898
822
  *
899
- * @beta
823
+ * @public
900
824
  */
901
- type Subsample = {
902
- subsampleSize: number;
903
- subsamplePriority: number;
904
- discardable: number;
905
- codecSpecificParameters: number;
825
+ type SubtitleMediaHeaderBox = FullBox & {
826
+ type: "sthd";
906
827
  };
907
828
  //#endregion
908
- //#region src/boxes/SubsampleEntry.d.ts
829
+ //#region src/boxes/VideoMediaHeaderBox.d.ts
909
830
  /**
910
- * Sub sample entry
911
- *
831
+ * ISO/IEC 14496-12:2012 - 8.4.5.2 Video Media Header Box
912
832
  *
913
- * @beta
833
+ * @public
914
834
  */
915
- type SubsampleEntry = {
916
- sampleDelta: number;
917
- subsampleCount: number;
918
- subsamples: Subsample[];
835
+ type VideoMediaHeaderBox = FullBox & {
836
+ type: "vmhd";
837
+ graphicsmode: number;
838
+ opcolor: number[];
919
839
  };
920
840
  //#endregion
921
- //#region src/boxes/SubsampleInformationBox.d.ts
841
+ //#region src/boxes/MediaInformationBox.d.ts
922
842
  /**
923
- * ISO/IEC 14496-12:2015 - 8.7.7 Sub-Sample Information Box
924
- *
843
+ * Child boxes of Media Information Box
925
844
  *
926
- * @beta
845
+ * @public
927
846
  */
928
- type SubsampleInformationBox = FullBox & {
929
- type: "subs";
930
- entryCount: number;
931
- entries: SubsampleEntry[];
932
- };
933
- //#endregion
934
- //#region src/boxes/SubsegmentRange.d.ts
847
+ type MediaInformationBoxChild = VideoMediaHeaderBox | SoundMediaHeaderBox | HintMediaHeaderBox | NullMediaHeaderBox | DataInformationBox | SampleTableBox | SubtitleMediaHeaderBox;
935
848
  /**
936
- * Subsegment range
937
- *
849
+ * Media Information Box - 'minf' - Container
938
850
  *
939
- * @beta
851
+ * @public
940
852
  */
941
- type SubsegmentRange = {
942
- level: number;
943
- rangeSize: number;
853
+ type MediaInformationBox = {
854
+ type: "minf";
855
+ boxes: MediaInformationBoxChild[];
944
856
  };
945
857
  //#endregion
946
- //#region src/boxes/Subsegment.d.ts
858
+ //#region src/boxes/MediaBox.d.ts
947
859
  /**
948
- * Subsegment
949
- *
860
+ * Child boxes of Media Box
950
861
  *
951
- * @beta
862
+ * @public
952
863
  */
953
- type Subsegment = {
954
- rangesCount: number;
955
- ranges: SubsegmentRange[];
956
- };
957
- //#endregion
958
- //#region src/boxes/SubsegmentIndexBox.d.ts
864
+ type MediaBoxChild = MediaHeaderBox | HandlerReferenceBox | MediaInformationBox;
959
865
  /**
960
- * ISO/IEC 14496-12:2012 - 8.16.4 Subsegment Index Box
961
- *
866
+ * Media Box - 'mdia' - Container
962
867
  *
963
- * @beta
868
+ * @public
964
869
  */
965
- type SubsegmentIndexBox = FullBox & {
966
- type: "ssix";
967
- subsegmentCount: number;
968
- subsegments: Subsegment[];
870
+ type MediaBox = {
871
+ type: "mdia";
872
+ boxes: MediaBoxChild[];
969
873
  };
970
874
  //#endregion
971
- //#region src/boxes/SubtitleMediaHeaderBox.d.ts
875
+ //#region src/boxes/MediaDataBox.d.ts
972
876
  /**
973
- * ISO/IEC 14496-12:2015 - 12.6.2 Subtitle media header Box
974
- *
877
+ * ISO/IEC 14496-12:2012 - 8.1.1 Media Data Box
975
878
  *
976
- * @beta
879
+ * @public
977
880
  */
978
- type SubtitleMediaHeaderBox = FullBox & {
979
- type: "sthd";
881
+ type MediaDataBox = {
882
+ type: "mdat";
883
+ data: Uint8Array<ArrayBuffer>;
980
884
  };
981
885
  //#endregion
982
- //#region src/boxes/SyncSample.d.ts
886
+ //#region src/boxes/PrimaryItemBox.d.ts
983
887
  /**
984
- * Sync sample
985
- *
888
+ * Primary Item Box - 'pitm'
986
889
  *
987
- * @beta
890
+ * @public
988
891
  */
989
- type SyncSample = {
990
- sampleNumber: number;
892
+ type PrimaryItemBox = FullBox & {
893
+ type: "pitm";
894
+ itemId: number;
991
895
  };
992
896
  //#endregion
993
- //#region src/boxes/SyncSampleBox.d.ts
897
+ //#region src/boxes/MetaBox.d.ts
994
898
  /**
995
- * ISO/IEC 14496-12:2015 - 8.6.2 Sync Sample Box
899
+ * Child boxes of Meta Box
996
900
  *
901
+ * @public
902
+ */
903
+ type MetaBoxChild = HandlerReferenceBox | PrimaryItemBox | DataInformationBox | ItemLocationBox | ItemProtectionBox | ItemInfoBox | ItemReferenceBox | GroupsListBox;
904
+ /**
905
+ * ISO/IEC 14496-12:202x - 8.11.1 Meta box
997
906
  *
998
- * @beta
907
+ * @public
999
908
  */
1000
- type SyncSampleBox = FullBox & {
1001
- type: "stss";
1002
- entryCount: number;
1003
- entries: SyncSample[];
909
+ type MetaBox = FullBox & {
910
+ type: "meta";
911
+ boxes: MetaBoxChild[];
1004
912
  };
1005
913
  //#endregion
1006
- //#region src/boxes/TrackEncryptionBox.d.ts
914
+ //#region src/boxes/MovieExtendsHeaderBox.d.ts
1007
915
  /**
1008
- * ISO/IEC 23001-7:2011 - 8.2 Track Encryption Box
1009
- *
916
+ * ISO/IEC 14496-12:2012 - 8.8.2 Movie Extends Header Box
1010
917
  *
1011
- * @beta
918
+ * @public
1012
919
  */
1013
- type TrackEncryptionBox = FullBox & {
1014
- type: "tenc";
1015
- defaultIsEncrypted: number;
1016
- defaultIvSize: number;
1017
- defaultKid: number[];
920
+ type MovieExtendsHeaderBox = FullBox & {
921
+ type: "mehd";
922
+ fragmentDuration: number;
1018
923
  };
1019
924
  //#endregion
1020
925
  //#region src/boxes/TrackExtendsBox.d.ts
1021
926
  /**
1022
927
  * ISO/IEC 14496-12:2012 - 8.8.3 Track Extends Box
1023
928
  *
1024
- *
1025
- * @beta
929
+ * @public
1026
930
  */
1027
931
  type TrackExtendsBox = FullBox & {
1028
932
  type: "trex";
@@ -1033,74 +937,49 @@ type TrackExtendsBox = FullBox & {
1033
937
  defaultSampleFlags: number;
1034
938
  };
1035
939
  //#endregion
1036
- //#region src/boxes/TrackFragmentBaseMediaDecodeTimeBox.d.ts
1037
- /**
1038
- * ISO/IEC 14496-12:2012 - 8.8.12 Track Fragment Decode Time
1039
- *
1040
- *
1041
- * @beta
1042
- */
1043
- type TrackFragmentBaseMediaDecodeTimeBox = FullBox & {
1044
- type: "tfdt";
1045
- baseMediaDecodeTime: number;
1046
- };
1047
- //#endregion
1048
- //#region src/boxes/TrackFragmentHeaderBox.d.ts
940
+ //#region src/boxes/MovieExtendsBox.d.ts
1049
941
  /**
1050
- * ISO/IEC 14496-12:2012 - 8.8.7 Track Fragment Header Box
942
+ * Child boxes of Movie Extends Box
1051
943
  *
1052
- *
1053
- * @beta
944
+ * @public
1054
945
  */
1055
- type TrackFragmentHeaderBox = FullBox & {
1056
- type: "tfhd";
1057
- trackId: number;
1058
- baseDataOffset?: number;
1059
- sampleDescriptionIndex?: number;
1060
- defaultSampleDuration?: number;
1061
- defaultSampleSize?: number;
1062
- defaultSampleFlags?: number;
1063
- };
1064
- //#endregion
1065
- //#region src/boxes/TrackFragmentRandomAccessEntry.d.ts
946
+ type MovieExtendsBoxChild = MovieExtendsHeaderBox | TrackExtendsBox;
1066
947
  /**
1067
- * Track fragment random access entry
1068
- *
948
+ * Movie Extends Box - 'mvex' - Container
1069
949
  *
1070
- * @beta
950
+ * @public
1071
951
  */
1072
- type TrackFragmentRandomAccessEntry = {
1073
- time: number;
1074
- moofOffset: number;
1075
- trafNumber: number;
1076
- trunNumber: number;
1077
- sampleNumber: number;
952
+ type MovieExtendsBox = {
953
+ type: "mvex";
954
+ boxes: MovieExtendsBoxChild[];
1078
955
  };
1079
956
  //#endregion
1080
- //#region src/boxes/TrackFragmentRandomAccessBox.d.ts
957
+ //#region src/boxes/MovieHeaderBox.d.ts
1081
958
  /**
1082
- * ISO/IEC 14496-12:2012 - 8.8.10 Track Fragment Random Access Box
1083
- *
959
+ * ISO/IEC 14496-12:2012 - 8.2.2 Movie Header Box
1084
960
  *
1085
- * @beta
961
+ * @public
1086
962
  */
1087
- type TrackFragmentRandomAccessBox = FullBox & {
1088
- type: "tfra";
1089
- trackId: number;
1090
- reserved: number;
1091
- numberOfEntry: number;
1092
- lengthSizeOfTrafNum: number;
1093
- lengthSizeOfTrunNum: number;
1094
- lengthSizeOfSampleNum: number;
1095
- entries: TrackFragmentRandomAccessEntry[];
963
+ type MovieHeaderBox = FullBox & {
964
+ type: "mvhd";
965
+ creationTime: number;
966
+ modificationTime: number;
967
+ timescale: number;
968
+ duration: number;
969
+ rate: number;
970
+ volume: number;
971
+ reserved1: number;
972
+ reserved2: number[];
973
+ matrix: number[];
974
+ preDefined: number[];
975
+ nextTrackId: number;
1096
976
  };
1097
977
  //#endregion
1098
978
  //#region src/boxes/TrackHeaderBox.d.ts
1099
979
  /**
1100
980
  * ISO/IEC 14496-12:2012 - 8.3.2 Track Header Box
1101
981
  *
1102
- *
1103
- * @beta
982
+ * @public
1104
983
  */
1105
984
  type TrackHeaderBox = FullBox & {
1106
985
  type: "tkhd";
@@ -1119,487 +998,773 @@ type TrackHeaderBox = FullBox & {
1119
998
  height: number;
1120
999
  };
1121
1000
  //#endregion
1122
- //#region src/boxes/TrackKindBox.d.ts
1001
+ //#region src/boxes/TrackReferenceTypeBox.d.ts
1123
1002
  /**
1124
- * ISO/IEC 14496-12:202x - 8.10.4 Track kind box
1125
- *
1003
+ * Track Reference Type Box
1126
1004
  *
1127
- * @beta
1005
+ * @public
1128
1006
  */
1129
- type TrackKindBox = FullBox & {
1130
- type: "kind";
1131
- schemeUri: string;
1132
- value: string;
1007
+ type TrackReferenceTypeBox = {
1008
+ type: "tref";
1009
+ trackIds: number[];
1133
1010
  };
1134
1011
  //#endregion
1135
- //#region src/boxes/TrackRunSample.d.ts
1012
+ //#region src/boxes/TrackReferenceBox.d.ts
1136
1013
  /**
1137
- * Track run sample
1014
+ * Child boxes of Track Reference Box
1138
1015
  *
1139
- *
1140
- * @beta
1016
+ * @public
1141
1017
  */
1142
- type TrackRunSample = {
1143
- sampleDuration?: number;
1144
- sampleSize?: number;
1145
- sampleFlags?: number;
1146
- sampleCompositionTimeOffset?: number;
1147
- };
1148
- //#endregion
1149
- //#region src/boxes/TrackRunBox.d.ts
1018
+ type TrackReferenceBoxChild = TrackReferenceTypeBox;
1150
1019
  /**
1151
- * ISO/IEC 14496-12:2012 - 8.8.8 Track Run Box
1152
- *
1153
- * Note: the 'trun' box has a direct relation to the 'tfhd' box for defaults.
1154
- * These defaults are not set explicitly here, but are left to resolve for the user.
1155
- *
1020
+ * Track Reference Box - 'tref' - Container
1156
1021
  *
1157
- * @beta
1022
+ * @public
1158
1023
  */
1159
- type TrackRunBox = FullBox & {
1160
- type: "trun";
1161
- sampleCount: number;
1162
- dataOffset?: number;
1163
- firstSampleFlags?: number;
1164
- samples: TrackRunSample[];
1024
+ type TrackReferenceBox = {
1025
+ type: "tref";
1026
+ boxes: TrackReferenceBoxChild[];
1165
1027
  };
1166
1028
  //#endregion
1167
- //#region src/boxes/UrlBox.d.ts
1029
+ //#region src/boxes/UserDataBox.d.ts
1168
1030
  /**
1169
- * ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box
1031
+ * Child boxes of User Data Box
1170
1032
  *
1171
- *
1172
- * @beta
1033
+ * @public
1173
1034
  */
1174
- type UrlBox = FullBox & {
1175
- type: "url";
1176
- location: string;
1177
- };
1178
- //#endregion
1179
- //#region src/boxes/UrnBox.d.ts
1035
+ type UserDataBoxChild = any;
1180
1036
  /**
1181
- * ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box
1182
- *
1037
+ * User Data Box - 'udta' - Container
1183
1038
  *
1184
- * @beta
1039
+ * @public
1185
1040
  */
1186
- type UrnBox = FullBox & {
1187
- type: "urn";
1188
- name: string;
1189
- location: string;
1041
+ type UserDataBox = {
1042
+ type: "udta";
1043
+ boxes: UserDataBoxChild[];
1190
1044
  };
1191
1045
  //#endregion
1192
- //#region src/boxes/VideoMediaHeaderBox.d.ts
1046
+ //#region src/boxes/TrackBox.d.ts
1193
1047
  /**
1194
- * ISO/IEC 14496-12:2012 - 8.4.5.2 Video Media Header Box
1048
+ * Child boxes of Track Box
1195
1049
  *
1050
+ * @public
1051
+ */
1052
+ type TrackBoxChild = TrackHeaderBox | TrackReferenceBox | EditBox | MediaBox | UserDataBox;
1053
+ /**
1054
+ * Track Box - 'trak' - Container
1196
1055
  *
1197
- * @beta
1056
+ * @public
1198
1057
  */
1199
- type VideoMediaHeaderBox = FullBox & {
1200
- type: "vmhd";
1201
- graphicsmode: number;
1202
- opcolor: number[];
1058
+ type TrackBox = {
1059
+ type: "trak";
1060
+ boxes: TrackBoxChild[];
1203
1061
  };
1204
1062
  //#endregion
1205
- //#region src/boxes/VisualSampleEntryBox.d.ts
1063
+ //#region src/boxes/MovieBox.d.ts
1206
1064
  /**
1207
- * ISO/IEC 14496-15:2014 - 12.1.3.1 avc1/2/3/4, hev1, hvc1, encv
1065
+ * Child boxes of Movie Box
1208
1066
  *
1067
+ * @public
1068
+ */
1069
+ type MovieBoxChild = MovieHeaderBox | TrackBox | MovieExtendsBox | UserDataBox;
1070
+ /**
1071
+ * Movie Box - 'moov' - Container
1209
1072
  *
1210
- * @beta
1073
+ * @public
1211
1074
  */
1212
- type VisualSampleEntryBox<T$1 extends "avc1" | "avc2" | "avc3" | "avc4" | "hev1" | "hvc1" | "encv" = "avc1" | "avc2" | "avc3" | "avc4" | "hev1" | "hvc1" | "encv"> = SampleEntryBox & {
1213
- type: T$1;
1214
- preDefined1: number;
1215
- reserved2: number;
1216
- preDefined2: number[];
1217
- width: number;
1218
- height: number;
1219
- horizresolution: number;
1220
- vertresolution: number;
1221
- reserved3: number;
1222
- frameCount: number;
1223
- compressorName: number[];
1224
- depth: number;
1225
- preDefined3: number;
1226
- config: Uint8Array;
1075
+ type MovieBox = {
1076
+ type: "moov";
1077
+ boxes: MovieBoxChild[];
1227
1078
  };
1228
1079
  //#endregion
1229
- //#region src/boxes/WebVttConfigurationBox.d.ts
1080
+ //#region src/boxes/MovieFragmentHeaderBox.d.ts
1230
1081
  /**
1231
- * ISO/IEC 14496-30:2014 - WebVTT Configuration Box
1232
- *
1082
+ * ISO/IEC 14496-12:2012 - 8.8.5 Movie Fragment Header Box
1233
1083
  *
1234
- * @beta
1084
+ * @public
1235
1085
  */
1236
- type WebVttConfigurationBox = Box & {
1237
- type: "vttC";
1238
- config: string;
1086
+ type MovieFragmentHeaderBox = FullBox & {
1087
+ type: "mfhd";
1088
+ sequenceNumber: number;
1239
1089
  };
1240
1090
  //#endregion
1241
- //#region src/boxes/WebVttCueIdBox.d.ts
1091
+ //#region src/boxes/SampleAuxiliaryInformationOffsetsBox.d.ts
1242
1092
  /**
1243
- * ISO/IEC 14496-30:2014 - WebVTT Cue Id Box.
1244
- *
1093
+ * Sample Auxiliary Information Offsets Box - 'saio'
1245
1094
  *
1246
- * @beta
1095
+ * @public
1247
1096
  */
1248
- type WebVttCueIdBox = Box & {
1249
- type: "iden";
1250
- cueId: string;
1097
+ type SampleAuxiliaryInformationOffsetsBox = FullBox & {
1098
+ type: "saio";
1099
+ auxInfoType?: number;
1100
+ auxInfoTypeParameter?: number;
1101
+ entryCount: number;
1102
+ offset: number[];
1251
1103
  };
1252
1104
  //#endregion
1253
- //#region src/boxes/WebVttCuePayloadBox.d.ts
1105
+ //#region src/boxes/SampleAuxiliaryInformationSizesBox.d.ts
1254
1106
  /**
1255
- * ISO/IEC 14496-30:2014 - WebVTT Cue Payload Box.
1256
- *
1107
+ * Sample Auxiliary Information Sizes Box - 'saiz'
1257
1108
  *
1258
- * @beta
1109
+ * @public
1259
1110
  */
1260
- type WebVttCuePayloadBox = Box & {
1261
- type: "payl";
1262
- cueText: string;
1111
+ type SampleAuxiliaryInformationSizesBox = FullBox & {
1112
+ type: "saiz";
1113
+ auxInfoType?: number;
1114
+ auxInfoTypeParameter?: number;
1115
+ defaultSampleInfoSize: number;
1116
+ sampleCount: number;
1117
+ sampleInfoSize?: number[];
1263
1118
  };
1264
1119
  //#endregion
1265
- //#region src/boxes/WebVttEmptySampleBox.d.ts
1120
+ //#region src/boxes/SubsampleEncryption.d.ts
1266
1121
  /**
1267
- * ISO/IEC 14496-30:2014 - WebVTT Empty Sample Box
1268
- *
1122
+ * Subsample Encryption
1269
1123
  *
1270
- * @beta
1124
+ * @public
1271
1125
  */
1272
- type WebVttEmptySampleBox = Box & {
1273
- type: "vtte";
1126
+ type SubsampleEncryption = {
1127
+ bytesOfClearData: number;
1128
+ bytesOfProtectedData: number;
1274
1129
  };
1275
1130
  //#endregion
1276
- //#region src/boxes/WebVttSettingsBox.d.ts
1131
+ //#region src/boxes/EncryptedSample.d.ts
1277
1132
  /**
1278
- * ISO/IEC 14496-30:2014 - WebVTT Cue Settings Box.
1279
- *
1133
+ * Encrypted Sample
1280
1134
  *
1281
- * @beta
1135
+ * @public
1282
1136
  */
1283
- type WebVttSettingsBox = Box & {
1284
- type: "sttg";
1285
- settings: string;
1137
+ type EncryptedSample = {
1138
+ initializationVector?: Uint8Array;
1139
+ subsampleEncryption?: SubsampleEncryption[];
1286
1140
  };
1287
1141
  //#endregion
1288
- //#region src/boxes/WebVttSourceLabelBox.d.ts
1142
+ //#region src/boxes/SampleEncryptionBox.d.ts
1289
1143
  /**
1290
- * ISO/IEC 14496-30:2014 - WebVTT Source Label Box
1291
- *
1144
+ * Sample Encryption Box - 'senc'
1292
1145
  *
1293
- * @beta
1146
+ * @public
1294
1147
  */
1295
- type WebVttSourceLabelBox = Box & {
1296
- type: "vlab";
1297
- sourceLabel: string;
1148
+ type SampleEncryptionBox = FullBox & {
1149
+ type: "senc";
1150
+ sampleCount: number;
1151
+ samples: EncryptedSample[];
1298
1152
  };
1299
1153
  //#endregion
1300
- //#region src/boxes/IsoBox.d.ts
1154
+ //#region src/boxes/Subsample.d.ts
1301
1155
  /**
1302
- * Non-container Box types
1303
- *
1156
+ * Sub sample
1304
1157
  *
1305
- * @beta
1158
+ * @public
1306
1159
  */
1307
- type IsoBox = AudioRenderingIndicationBox | AudioSampleEntryBox<"enca"> | AudioSampleEntryBox<"mp4a"> | ChunkLargeOffsetBox | ChunkOffsetBox | CompactSampleSizeBox | CompositionTimeToSampleBox | DataEntryUrlBox | DataEntryUrnBox | DataReferenceBox | DecodingTimeToSampleBox | DegradationPriorityBox | EditListBox | EventMessageBox | ExtendedLanguageBox | FileTypeBox | FreeSpaceBox<"free"> | FreeSpaceBox<"skip"> | HandlerReferenceBox | HintMediaHeaderBox | IdentifiedMediaDataBox | IpmpInfoBox | ItemInfoEntry | ItemLocationBox | LabelBox | MediaDataBox | MediaHeaderBox | MovieExtendsHeaderBox | MovieFragmentHeaderBox | MovieFragmentRandomAccessOffsetBox | MovieHeaderBox | NullMediaHeaderBox | OriginalFormatBox | PrimaryItemBox | PreselectionGroupBox | ProducerReferenceTimeBox | ProtectionSystemSpecificHeaderBox | SampleAuxiliaryInformationOffsetsBox | SampleAuxiliaryInformationSizesBox | SampleDependencyTypeBox | SampleDescriptionBox | SampleEncryptionBox | SampleGroupDescriptionBox | SampleSizeBox | SampleToChunkBox | SampleToGroupBox | SchemeTypeBox | SegmentIndexBox | SegmentTypeBox | ShadowSyncSampleBox | SingleItemTypeReferenceBox | SoundMediaHeaderBox | SubsampleInformationBox | SubsegmentIndexBox | SubtitleMediaHeaderBox | SyncSampleBox | TrackEncryptionBox | TrackExtendsBox | TrackFragmentBaseMediaDecodeTimeBox | TrackFragmentHeaderBox | TrackFragmentRandomAccessBox | TrackHeaderBox | TrackKindBox | TrackRunBox | UrlBox | UrnBox | VideoMediaHeaderBox | VisualSampleEntryBox<"avc1"> | VisualSampleEntryBox<"avc2"> | VisualSampleEntryBox<"avc3"> | VisualSampleEntryBox<"avc4"> | VisualSampleEntryBox<"encv"> | VisualSampleEntryBox<"hev1"> | VisualSampleEntryBox<"hvc1"> | WebVttConfigurationBox | WebVttCueIdBox | WebVttCuePayloadBox | WebVttEmptySampleBox | WebVttSettingsBox | WebVttSourceLabelBox;
1160
+ type Subsample = {
1161
+ subsampleSize: number;
1162
+ subsamplePriority: number;
1163
+ discardable: number;
1164
+ codecSpecificParameters: number;
1165
+ };
1308
1166
  //#endregion
1309
- //#region src/boxes/ContainerBox.d.ts
1167
+ //#region src/boxes/SubsampleEntry.d.ts
1310
1168
  /**
1311
- * Container Box
1312
- *
1169
+ * Sub sample entry
1313
1170
  *
1314
- * @beta
1171
+ * @public
1315
1172
  */
1316
- type ContainerBox<T$1> = Box & {
1317
- boxes: T$1[];
1173
+ type SubsampleEntry = {
1174
+ sampleDelta: number;
1175
+ subsampleCount: number;
1176
+ subsamples: Subsample[];
1318
1177
  };
1319
1178
  //#endregion
1320
- //#region src/boxes/DataInformationBox.d.ts
1179
+ //#region src/boxes/SubsampleInformationBox.d.ts
1321
1180
  /**
1322
- * Data Information Box - 'dinf' - Container
1323
- *
1181
+ * ISO/IEC 14496-12:2015 - 8.7.7 Sub-Sample Information Box
1324
1182
  *
1325
- * @beta
1183
+ * @public
1326
1184
  */
1327
- type DataInformationBox = ContainerBox<DataReferenceBox> & {
1328
- type: "dinf";
1185
+ type SubsampleInformationBox = FullBox & {
1186
+ type: "subs";
1187
+ entryCount: number;
1188
+ entries: SubsampleEntry[];
1329
1189
  };
1330
1190
  //#endregion
1331
- //#region src/boxes/EditBox.d.ts
1191
+ //#region src/boxes/TrackFragmentBaseMediaDecodeTimeBox.d.ts
1332
1192
  /**
1333
- * Edit Box - 'edts' - Container
1334
- *
1193
+ * ISO/IEC 14496-12:2012 - 8.8.12 Track Fragment Decode Time
1335
1194
  *
1336
- * @beta
1195
+ * @public
1337
1196
  */
1338
- type EditBox = ContainerBox<EditListBox> & {
1339
- type: "edts";
1197
+ type TrackFragmentBaseMediaDecodeTimeBox = FullBox & {
1198
+ type: "tfdt";
1199
+ baseMediaDecodeTime: number;
1340
1200
  };
1341
1201
  //#endregion
1342
- //#region src/boxes/ItemInfoBox.d.ts
1202
+ //#region src/boxes/TrackFragmentHeaderBox.d.ts
1343
1203
  /**
1344
- * Item Info Box - 'iinf' - Container
1345
- *
1204
+ * ISO/IEC 14496-12:2012 - 8.8.7 Track Fragment Header Box
1346
1205
  *
1347
- * @beta
1206
+ * @public
1348
1207
  */
1349
- type ItemInfoBox = ContainerBox<ItemInfoEntry> & {
1350
- type: "iinf";
1351
- entryCount: number;
1208
+ type TrackFragmentHeaderBox = FullBox & {
1209
+ type: "tfhd";
1210
+ trackId: number;
1211
+ baseDataOffset?: number;
1212
+ sampleDescriptionIndex?: number;
1213
+ defaultSampleDuration?: number;
1214
+ defaultSampleSize?: number;
1215
+ defaultSampleFlags?: number;
1352
1216
  };
1353
1217
  //#endregion
1354
- //#region src/boxes/SchemeInformationBox.d.ts
1218
+ //#region src/boxes/TrackRunSample.d.ts
1355
1219
  /**
1356
- * Scheme Information Box - 'schi' - Container
1357
- *
1220
+ * Track run sample
1358
1221
  *
1359
- * @beta
1222
+ * @public
1360
1223
  */
1361
- type SchemeInformationBox = ContainerBox<TrackEncryptionBox | Box> & {
1362
- type: "schi";
1224
+ type TrackRunSample = {
1225
+ sampleDuration?: number;
1226
+ sampleSize?: number;
1227
+ sampleFlags?: number;
1228
+ sampleCompositionTimeOffset?: number;
1363
1229
  };
1364
1230
  //#endregion
1365
- //#region src/boxes/ProtectionSchemeInformationBox.d.ts
1231
+ //#region src/boxes/TrackRunBox.d.ts
1366
1232
  /**
1367
- * Protection Scheme Information Box - 'sinf' - Container
1233
+ * ISO/IEC 14496-12:2012 - 8.8.8 Track Run Box
1368
1234
  *
1235
+ * Note: the 'trun' box has a direct relation to the 'tfhd' box for defaults.
1236
+ * These defaults are not set explicitly here, but are left to resolve for the user.
1369
1237
  *
1370
- * @beta
1238
+ * @public
1371
1239
  */
1372
- type ProtectionSchemeInformationBox = ContainerBox<OriginalFormatBox | IpmpInfoBox | SchemeTypeBox | SchemeInformationBox> & {
1373
- type: "sinf";
1240
+ type TrackRunBox = FullBox & {
1241
+ type: "trun";
1242
+ sampleCount: number;
1243
+ dataOffset?: number;
1244
+ firstSampleFlags?: number;
1245
+ samples: TrackRunSample[];
1374
1246
  };
1375
1247
  //#endregion
1376
- //#region src/boxes/ItemProtectionBox.d.ts
1248
+ //#region src/boxes/TrackFragmentBox.d.ts
1377
1249
  /**
1378
- * Item Protection Box - 'ipro' - Container
1250
+ * Child boxes of Track Fragment Box
1379
1251
  *
1380
- *
1381
- * @beta
1252
+ * @public
1382
1253
  */
1383
- type ItemProtectionBox = ContainerBox<ProtectionSchemeInformationBox> & {
1384
- type: "ipro";
1385
- protectionCount: number;
1386
- };
1387
- //#endregion
1388
- //#region src/boxes/ItemReferenceBox.d.ts
1254
+ type TrackFragmentBoxChild = TrackFragmentHeaderBox | TrackFragmentBaseMediaDecodeTimeBox | TrackRunBox | SampleAuxiliaryInformationSizesBox | SampleAuxiliaryInformationOffsetsBox | SampleEncryptionBox | SubsampleInformationBox;
1389
1255
  /**
1390
- * Item Reference Box - 'iref' - Container
1391
- *
1256
+ * Track Fragment Box - 'traf' - Container
1392
1257
  *
1393
- * @beta
1258
+ * @public
1394
1259
  */
1395
- type ItemReferenceBox = ContainerBox<SingleItemTypeReferenceBox> & {
1396
- type: "iref";
1260
+ type TrackFragmentBox = {
1261
+ type: "traf";
1262
+ boxes: TrackFragmentBoxChild[];
1397
1263
  };
1398
1264
  //#endregion
1399
- //#region src/boxes/SampleTableBox.d.ts
1265
+ //#region src/boxes/MovieFragmentBox.d.ts
1400
1266
  /**
1401
- * Sample Table Box - 'stbl' - Container
1267
+ * Child boxes of Movie Fragment Box
1402
1268
  *
1403
- *
1404
- * @beta
1269
+ * @public
1405
1270
  */
1406
- type SampleTableBox = ContainerBox<SampleDescriptionBox | DecodingTimeToSampleBox | CompositionTimeToSampleBox | SampleToChunkBox | SampleSizeBox | ChunkOffsetBox | SyncSampleBox | ShadowSyncSampleBox | DegradationPriorityBox | SampleDependencyTypeBox | SampleToGroupBox | SampleGroupDescriptionBox> & {
1407
- type: "stbl";
1408
- };
1409
- //#endregion
1410
- //#region src/boxes/MediaInformationBox.d.ts
1271
+ type MovieFragmentBoxChild = MovieFragmentHeaderBox | TrackFragmentBox;
1411
1272
  /**
1412
- * Media Information Box - 'minf' - Container
1413
- *
1273
+ * Movie Fragment Box - 'moof' - Container
1414
1274
  *
1415
- * @beta
1275
+ * @public
1416
1276
  */
1417
- type MediaInformationBox = ContainerBox<VideoMediaHeaderBox | SoundMediaHeaderBox | HintMediaHeaderBox | NullMediaHeaderBox | DataInformationBox | SampleTableBox> & {
1418
- type: "minf";
1277
+ type MovieFragmentBox = {
1278
+ type: "moof";
1279
+ boxes: MovieFragmentBoxChild[];
1419
1280
  };
1420
1281
  //#endregion
1421
- //#region src/boxes/MediaBox.d.ts
1282
+ //#region src/boxes/MovieFragmentRandomAccessOffsetBox.d.ts
1422
1283
  /**
1423
- * Media Box - 'mdia' - Container
1424
- *
1284
+ * ISO/IEC 14496-12:2012 - 8.8.11 Movie Fragment Random Access Box
1425
1285
  *
1426
- * @beta
1286
+ * @public
1427
1287
  */
1428
- type MediaBox = ContainerBox<MediaHeaderBox | HandlerReferenceBox | MediaInformationBox> & {
1429
- type: "mdia";
1288
+ type MovieFragmentRandomAccessOffsetBox = FullBox & {
1289
+ type: "mfro";
1290
+ mfraSize: number;
1430
1291
  };
1431
1292
  //#endregion
1432
- //#region src/boxes/MetaBox.d.ts
1293
+ //#region src/boxes/TrackFragmentRandomAccessEntry.d.ts
1433
1294
  /**
1434
- * ISO/IEC 14496-12:202x - 8.11.1 Meta box
1435
- *
1295
+ * Track fragment random access entry
1436
1296
  *
1437
- * @beta
1297
+ * @public
1438
1298
  */
1439
- type MetaBox = FullBox & ContainerBox<HandlerReferenceBox | PrimaryItemBox | DataInformationBox | ItemLocationBox | ItemProtectionBox | ItemInfoBox | ItemReferenceBox> & {
1440
- type: "meta";
1299
+ type TrackFragmentRandomAccessEntry = {
1300
+ time: number;
1301
+ moofOffset: number;
1302
+ trafNumber: number;
1303
+ trunNumber: number;
1304
+ sampleNumber: number;
1441
1305
  };
1442
1306
  //#endregion
1443
- //#region src/boxes/MovieExtendsBox.d.ts
1307
+ //#region src/boxes/TrackFragmentRandomAccessBox.d.ts
1444
1308
  /**
1445
- * Movie Extends Box - 'mvex' - Container
1446
- *
1309
+ * ISO/IEC 14496-12:2012 - 8.8.10 Track Fragment Random Access Box
1447
1310
  *
1448
- * @beta
1311
+ * @public
1449
1312
  */
1450
- type MovieExtendsBox = ContainerBox<MovieExtendsHeaderBox | TrackExtendsBox> & {
1451
- type: "mvex";
1313
+ type TrackFragmentRandomAccessBox = FullBox & {
1314
+ type: "tfra";
1315
+ trackId: number;
1316
+ reserved: number;
1317
+ numberOfEntry: number;
1318
+ lengthSizeOfTrafNum: number;
1319
+ lengthSizeOfTrunNum: number;
1320
+ lengthSizeOfSampleNum: number;
1321
+ entries: TrackFragmentRandomAccessEntry[];
1452
1322
  };
1453
1323
  //#endregion
1454
- //#region src/boxes/TrackReferenceTypeBox.d.ts
1324
+ //#region src/boxes/MovieFragmentRandomAccessBox.d.ts
1455
1325
  /**
1456
- * Track Reference Type Box
1326
+ * Child boxes of Movie Fragment Random Access Box
1457
1327
  *
1328
+ * @public
1329
+ */
1330
+ type MovieFragmentRandomAccessBoxChild = TrackFragmentRandomAccessBox | MovieFragmentRandomAccessOffsetBox;
1331
+ /**
1332
+ * Movie Fragment Random Access Box - 'mfra' - Container
1458
1333
  *
1459
- * @beta
1334
+ * @public
1460
1335
  */
1461
- type TrackReferenceTypeBox = Box & {
1462
- type: "tref";
1463
- trackIds: number[];
1336
+ type MovieFragmentRandomAccessBox = {
1337
+ type: "mfra";
1338
+ boxes: MovieFragmentRandomAccessBoxChild[];
1464
1339
  };
1465
1340
  //#endregion
1466
- //#region src/boxes/TrackReferenceBox.d.ts
1341
+ //#region src/boxes/Entity.d.ts
1467
1342
  /**
1468
- * Track Reference Box - 'tref' - Container
1469
- *
1343
+ * Entity
1470
1344
  *
1471
- * @beta
1345
+ * @public
1472
1346
  */
1473
- type TrackReferenceBox = ContainerBox<TrackReferenceTypeBox> & {
1474
- type: "tref";
1347
+ type Entity = {
1348
+ /** Entity ID */
1349
+ entityId: number;
1475
1350
  };
1476
1351
  //#endregion
1477
- //#region src/boxes/UserDataBox.d.ts
1352
+ //#region src/boxes/PreselectionGroupBox.d.ts
1478
1353
  /**
1479
- * User Data Box - 'udta' - Container
1480
- *
1354
+ * ISO/IEC 14496-12:202x - 8.18.4.1 Preselection group box
1481
1355
  *
1482
- * @beta
1356
+ * @public
1483
1357
  */
1484
- type UserDataBox = ContainerBox<Box> & {
1485
- type: "udta";
1358
+ type PreselectionGroupBox = FullBox & {
1359
+ type: "prsl";
1360
+ /** Group ID */
1361
+ groupId: number;
1362
+ /** Number of entities in group */
1363
+ numEntitiesInGroup: number;
1364
+ /** Entities */
1365
+ entities: Entity[];
1366
+ preselectionTag?: string;
1367
+ selectionPriority?: number;
1368
+ interleavingTag?: string;
1486
1369
  };
1487
1370
  //#endregion
1488
- //#region src/boxes/TrackBox.d.ts
1371
+ //#region src/boxes/ProducerReferenceTimeBox.d.ts
1489
1372
  /**
1490
- * Track Box - 'trak' - Container
1491
- *
1373
+ * ISO/IEC 14496-12:2012 - 8.16.5 Producer Reference Time
1492
1374
  *
1493
- * @beta
1375
+ * @public
1494
1376
  */
1495
- type TrackBox = ContainerBox<TrackHeaderBox | TrackReferenceBox | EditBox | MediaBox | UserDataBox> & {
1496
- type: "trak";
1377
+ type ProducerReferenceTimeBox = FullBox & {
1378
+ type: "prft";
1379
+ referenceTrackId: number;
1380
+ ntpTimestampSec: number;
1381
+ ntpTimestampFrac: number;
1382
+ mediaTime: number;
1497
1383
  };
1498
1384
  //#endregion
1499
- //#region src/boxes/MovieBox.d.ts
1385
+ //#region src/boxes/ProtectionSystemSpecificHeaderBox.d.ts
1500
1386
  /**
1501
- * Movie Box - 'moov' - Container
1502
- *
1387
+ * ISO/IEC 23001-7:2011 - 8.1 Protection System Specific Header Box
1503
1388
  *
1504
- * @beta
1389
+ * @public
1505
1390
  */
1506
- type MovieBox = ContainerBox<MovieHeaderBox | TrackBox | MovieExtendsBox | UserDataBox> & {
1507
- type: "moov";
1391
+ type ProtectionSystemSpecificHeaderBox = FullBox & {
1392
+ type: "pssh";
1393
+ systemId: number[];
1394
+ kidCount: number;
1395
+ kid: number[];
1396
+ dataSize: number;
1397
+ data: number[];
1508
1398
  };
1509
1399
  //#endregion
1510
- //#region src/boxes/TrackFragmentBox.d.ts
1400
+ //#region src/boxes/SegmentIndexReference.d.ts
1511
1401
  /**
1512
- * Track Fragment Box - 'traf' - Container
1513
- *
1402
+ * Segment index reference
1514
1403
  *
1515
- * @beta
1404
+ * @public
1516
1405
  */
1517
- type TrackFragmentBox = ContainerBox<TrackFragmentHeaderBox | TrackFragmentBaseMediaDecodeTimeBox | TrackRunBox | SampleAuxiliaryInformationSizesBox | SampleAuxiliaryInformationOffsetsBox | SampleEncryptionBox> & {
1518
- type: "traf";
1406
+ type SegmentIndexReference = {
1407
+ reference: number;
1408
+ subsegmentDuration: number;
1409
+ sap: number;
1410
+ referenceType: number;
1411
+ referencedSize: number;
1412
+ startsWithSap: number;
1413
+ sapType: number;
1414
+ sapDeltaTime: number;
1519
1415
  };
1520
1416
  //#endregion
1521
- //#region src/boxes/MovieFragmentBox.d.ts
1417
+ //#region src/boxes/SegmentIndexBox.d.ts
1522
1418
  /**
1523
- * Movie Fragment Box - 'moof' - Container
1524
- *
1419
+ * ISO/IEC 14496-12:2012 - 8.16.3 Segment Index Box
1525
1420
  *
1526
- * @beta
1421
+ * @public
1527
1422
  */
1528
- type MovieFragmentBox = ContainerBox<MovieFragmentHeaderBox | TrackFragmentBox> & {
1529
- type: "moof";
1423
+ type SegmentIndexBox = FullBox & {
1424
+ type: "sidx";
1425
+ referenceId: number;
1426
+ timescale: number;
1427
+ earliestPresentationTime: number;
1428
+ firstOffset: number;
1429
+ reserved: number;
1430
+ references: SegmentIndexReference[];
1530
1431
  };
1531
1432
  //#endregion
1532
- //#region src/boxes/MovieFragmentRandomAccessBox.d.ts
1433
+ //#region src/boxes/SegmentTypeBox.d.ts
1533
1434
  /**
1534
- * Movie Fragment Random Access Box - 'mfra' - Container
1435
+ * ISO/IEC 14496-12:2012 - 8.16.2 Segment Type Box
1535
1436
  *
1437
+ * @public
1438
+ */
1439
+ type SegmentTypeBox = TypeBox<"styp">;
1440
+ //#endregion
1441
+ //#region src/boxes/SubsegmentRange.d.ts
1442
+ /**
1443
+ * Subsegment range
1536
1444
  *
1537
- * @beta
1445
+ * @public
1538
1446
  */
1539
- type MovieFragmentRandomAccessBox = ContainerBox<TrackFragmentRandomAccessBox | MovieFragmentRandomAccessOffsetBox> & {
1540
- type: "mfra";
1447
+ type SubsegmentRange = {
1448
+ level: number;
1449
+ rangeSize: number;
1541
1450
  };
1542
1451
  //#endregion
1543
- //#region src/boxes/IsoContainerBox.d.ts
1452
+ //#region src/boxes/Subsegment.d.ts
1544
1453
  /**
1545
- * Container boxes that can contain other boxes
1454
+ * Subsegment
1546
1455
  *
1456
+ * @public
1457
+ */
1458
+ type Subsegment = {
1459
+ rangesCount: number;
1460
+ ranges: SubsegmentRange[];
1461
+ };
1462
+ //#endregion
1463
+ //#region src/boxes/SubsegmentIndexBox.d.ts
1464
+ /**
1465
+ * ISO/IEC 14496-12:2012 - 8.16.4 Subsegment Index Box
1547
1466
  *
1548
- * @beta
1467
+ * @public
1549
1468
  */
1550
- type IsoContainerBox = DataInformationBox | EditBox | ItemInfoBox | ItemProtectionBox | ItemReferenceBox | MediaBox | MediaInformationBox | MetaBox | MovieBox | MovieExtendsBox | MovieFragmentBox | MovieFragmentRandomAccessBox | ProtectionSchemeInformationBox | SampleTableBox | SchemeInformationBox | TrackBox | TrackFragmentBox | TrackReferenceBox | UserDataBox;
1469
+ type SubsegmentIndexBox = FullBox & {
1470
+ type: "ssix";
1471
+ subsegmentCount: number;
1472
+ subsegments: Subsegment[];
1473
+ };
1551
1474
  //#endregion
1552
- //#region src/boxes/IsoBmffBox.d.ts
1475
+ //#region src/boxes/SubTrackBox.d.ts
1553
1476
  /**
1554
- * Utility type for all ISO BMFF boxes
1477
+ * Child boxes of Sub Track Box
1555
1478
  *
1479
+ * @public
1480
+ */
1481
+ type SubTrackBoxChild = any;
1482
+ /**
1483
+ * Sub track box - 'strk'
1556
1484
  *
1557
- * @beta
1485
+ * @public
1558
1486
  */
1559
- type IsoBmffBox = IsoBox | IsoContainerBox;
1487
+ type SubTrackBox = {
1488
+ type: "strk";
1489
+ boxes: SubTrackBoxChild[];
1490
+ };
1560
1491
  //#endregion
1561
- //#region src/BoxParser.d.ts
1492
+ //#region src/boxes/TrackKindBox.d.ts
1562
1493
  /**
1563
- * Box parser
1494
+ * ISO/IEC 14496-12:202x - 8.10.4 Track kind box
1564
1495
  *
1496
+ * @public
1497
+ */
1498
+ type TrackKindBox = FullBox & {
1499
+ type: "kind";
1500
+ schemeUri: string;
1501
+ value: string;
1502
+ };
1503
+ //#endregion
1504
+ //#region src/boxes/VisualSampleEntryType.d.ts
1505
+ /**
1506
+ * The type of visual sample entry box.
1565
1507
  *
1566
- * @beta
1508
+ * @public
1567
1509
  */
1568
- type BoxParser<V = IsoBox> = (view: IsoView, config?: IsoViewConfig) => Fields<V>;
1510
+ type VisualSampleEntryType = "avc1" | "avc2" | "avc3" | "avc4" | "hev1" | "hvc1" | "encv";
1569
1511
  //#endregion
1570
- //#region src/BoxParserMap.d.ts
1512
+ //#region src/boxes/VisualSampleEntryBox.d.ts
1571
1513
  /**
1572
- * A map of box parsers to their box types
1514
+ * ISO/IEC 14496-15:2014 - 12.1.3.1 avc1/2/3/4, hev1, hvc1, encv
1515
+ *
1516
+ * @public
1517
+ */
1518
+ type VisualSampleEntryBox<T$1 extends VisualSampleEntryType> = SampleEntryBox & {
1519
+ type: T$1;
1520
+ preDefined1: number;
1521
+ reserved2: number;
1522
+ preDefined2: number[];
1523
+ width: number;
1524
+ height: number;
1525
+ horizresolution: number;
1526
+ vertresolution: number;
1527
+ reserved3: number;
1528
+ frameCount: number;
1529
+ compressorName: number[];
1530
+ depth: number;
1531
+ preDefined3: number;
1532
+ config: Uint8Array;
1533
+ };
1534
+ //#endregion
1535
+ //#region src/boxes/WebVttConfigurationBox.d.ts
1536
+ /**
1537
+ * ISO/IEC 14496-30:2014 - WebVTT Configuration Box
1538
+ *
1539
+ * @public
1540
+ */
1541
+ type WebVttConfigurationBox = {
1542
+ type: "vttC";
1543
+ config: string;
1544
+ };
1545
+ //#endregion
1546
+ //#region src/boxes/WebVttCueIdBox.d.ts
1547
+ /**
1548
+ * ISO/IEC 14496-30:2014 - WebVTT Cue Id Box.
1549
+ *
1550
+ * @public
1551
+ */
1552
+ type WebVttCueIdBox = {
1553
+ type: "iden";
1554
+ cueId: string;
1555
+ };
1556
+ //#endregion
1557
+ //#region src/boxes/WebVttCuePayloadBox.d.ts
1558
+ /**
1559
+ * ISO/IEC 14496-30:2014 - WebVTT Cue Payload Box.
1560
+ *
1561
+ * @public
1562
+ */
1563
+ type WebVttCuePayloadBox = {
1564
+ type: "payl";
1565
+ cueText: string;
1566
+ };
1567
+ //#endregion
1568
+ //#region src/boxes/WebVttCueBox.d.ts
1569
+ /**
1570
+ * Child boxes of WebVttCueBox
1571
+ *
1572
+ * @public
1573
+ */
1574
+ type WebVttCueChild = WebVttCueIdBox | WebVttCuePayloadBox;
1575
+ /**
1576
+ * WebVttCueBox - 'vttc' - Container
1577
+ *
1578
+ * @public
1579
+ */
1580
+ type WebVttCueBox = {
1581
+ type: "vttc";
1582
+ boxes: WebVttCueChild[];
1583
+ };
1584
+ //#endregion
1585
+ //#region src/boxes/WebVttEmptySampleBox.d.ts
1586
+ /**
1587
+ * ISO/IEC 14496-30:2014 - WebVTT Empty Sample Box
1588
+ *
1589
+ * @public
1590
+ */
1591
+ type WebVttEmptySampleBox = {
1592
+ type: "vtte";
1593
+ };
1594
+ //#endregion
1595
+ //#region src/boxes/WebVttSettingsBox.d.ts
1596
+ /**
1597
+ * ISO/IEC 14496-30:2014 - WebVTT Cue Settings Box.
1598
+ *
1599
+ * @public
1600
+ */
1601
+ type WebVttSettingsBox = {
1602
+ type: "sttg";
1603
+ settings: string;
1604
+ };
1605
+ //#endregion
1606
+ //#region src/boxes/WebVttSourceLabelBox.d.ts
1607
+ /**
1608
+ * ISO/IEC 14496-30:2014 - WebVTT Source Label Box
1609
+ *
1610
+ * @public
1611
+ */
1612
+ type WebVttSourceLabelBox = {
1613
+ type: "vlab";
1614
+ sourceLabel: string;
1615
+ };
1616
+ //#endregion
1617
+ //#region src/IsoBoxMap.d.ts
1618
+ /**
1619
+ * Comprehensive mapping from box type strings to their corresponding TypeScript interfaces
1620
+ *
1621
+ * @public
1622
+ */
1623
+ type IsoBoxMap = {
1624
+ ardi: AudioRenderingIndicationBox;
1625
+ avc1: VisualSampleEntryBox<"avc1">;
1626
+ avc2: VisualSampleEntryBox<"avc2">;
1627
+ avc3: VisualSampleEntryBox<"avc3">;
1628
+ avc4: VisualSampleEntryBox<"avc4">;
1629
+ co64: ChunkLargeOffsetBox;
1630
+ ctts: CompositionTimeToSampleBox;
1631
+ dinf: DataInformationBox;
1632
+ dref: DataReferenceBox;
1633
+ edts: EditBox;
1634
+ elng: ExtendedLanguageBox;
1635
+ elst: EditListBox;
1636
+ emsg: EventMessageBox;
1637
+ enca: AudioSampleEntryBox<"enca">;
1638
+ encv: VisualSampleEntryBox<"encv">;
1639
+ free: FreeSpaceBox<"free">;
1640
+ frma: OriginalFormatBox;
1641
+ ftyp: FileTypeBox;
1642
+ grpl: GroupsListBox;
1643
+ hdlr: HandlerReferenceBox;
1644
+ hev1: VisualSampleEntryBox<"hev1">;
1645
+ hmhd: HintMediaHeaderBox;
1646
+ hvc1: VisualSampleEntryBox<"hvc1">;
1647
+ iden: WebVttCueIdBox;
1648
+ iinf: ItemInfoBox;
1649
+ iloc: ItemLocationBox;
1650
+ imda: IdentifiedMediaDataBox;
1651
+ imif: IpmpInfoBox;
1652
+ infe: ItemInfoEntry;
1653
+ ipro: ItemProtectionBox;
1654
+ iref: ItemReferenceBox;
1655
+ kind: TrackKindBox;
1656
+ labl: LabelBox;
1657
+ mdat: MediaDataBox;
1658
+ mdhd: MediaHeaderBox;
1659
+ mdia: MediaBox;
1660
+ meco: AdditionalMetadataContainerBox;
1661
+ mehd: MovieExtendsHeaderBox;
1662
+ meta: MetaBox;
1663
+ mfhd: MovieFragmentHeaderBox;
1664
+ mfra: MovieFragmentRandomAccessBox;
1665
+ mfro: MovieFragmentRandomAccessOffsetBox;
1666
+ minf: MediaInformationBox;
1667
+ moof: MovieFragmentBox;
1668
+ moov: MovieBox;
1669
+ mp4a: AudioSampleEntryBox<"mp4a">;
1670
+ mvex: MovieExtendsBox;
1671
+ mvhd: MovieHeaderBox;
1672
+ nmhd: NullMediaHeaderBox;
1673
+ payl: WebVttCuePayloadBox;
1674
+ pitm: PrimaryItemBox;
1675
+ prft: ProducerReferenceTimeBox;
1676
+ prsl: PreselectionGroupBox;
1677
+ pssh: ProtectionSystemSpecificHeaderBox;
1678
+ saio: SampleAuxiliaryInformationOffsetsBox;
1679
+ saiz: SampleAuxiliaryInformationSizesBox;
1680
+ sbgp: SampleToGroupBox;
1681
+ schi: SchemeInformationBox;
1682
+ schm: SchemeTypeBox;
1683
+ sdtp: SampleDependencyTypeBox;
1684
+ senc: SampleEncryptionBox;
1685
+ sgpd: SampleGroupDescriptionBox;
1686
+ sidx: SegmentIndexBox;
1687
+ sinf: ProtectionSchemeInformationBox;
1688
+ skip: FreeSpaceBox<"skip">;
1689
+ smhd: SoundMediaHeaderBox;
1690
+ ssix: SubsegmentIndexBox;
1691
+ stbl: SampleTableBox;
1692
+ stco: ChunkOffsetBox;
1693
+ stdp: DegradationPriorityBox;
1694
+ sthd: SubtitleMediaHeaderBox;
1695
+ strk: SubTrackBox;
1696
+ stsc: SampleToChunkBox;
1697
+ stsd: SampleDescriptionBox;
1698
+ stsh: ShadowSyncSampleBox;
1699
+ stss: SyncSampleBox;
1700
+ stsz: SampleSizeBox;
1701
+ sttg: WebVttSettingsBox;
1702
+ stts: DecodingTimeToSampleBox;
1703
+ styp: SegmentTypeBox;
1704
+ subs: SubsampleInformationBox;
1705
+ stz2: CompactSampleSizeBox;
1706
+ tenc: TrackEncryptionBox;
1707
+ tfdt: TrackFragmentBaseMediaDecodeTimeBox;
1708
+ tfhd: TrackFragmentHeaderBox;
1709
+ tfra: TrackFragmentRandomAccessBox;
1710
+ tkhd: TrackHeaderBox;
1711
+ traf: TrackFragmentBox;
1712
+ trak: TrackBox;
1713
+ tref: TrackReferenceBox;
1714
+ trex: TrackExtendsBox;
1715
+ trun: TrackRunBox;
1716
+ udta: UserDataBox;
1717
+ "url ": DataEntryUrlBox;
1718
+ "urn ": DataEntryUrnBox;
1719
+ vlab: WebVttSourceLabelBox;
1720
+ vmhd: VideoMediaHeaderBox;
1721
+ vttc: WebVttCueBox;
1722
+ vttC: WebVttConfigurationBox;
1723
+ vtte: WebVttEmptySampleBox;
1724
+ };
1725
+ //#endregion
1726
+ //#region src/IsoBox.d.ts
1727
+ /**
1728
+ * Utility type for all ISO BMFF boxes
1573
1729
  *
1730
+ * @public
1731
+ */
1732
+ type IsoBox = IsoBoxMap[keyof IsoBoxMap];
1733
+ //#endregion
1734
+ //#region src/IsoBoxReader.d.ts
1735
+ /**
1736
+ * ISO BMFF box reader
1574
1737
  *
1575
- * @beta
1738
+ * @public
1576
1739
  */
1577
- type BoxParserMap = Record<string, BoxParser>;
1740
+ type IsoBoxReader<B$1 extends IsoBox> = (view: IsoBoxReadView) => B$1;
1578
1741
  //#endregion
1579
- //#region src/IsoViewConfig.d.ts
1742
+ //#region src/IsoBoxReaderMap.d.ts
1580
1743
  /**
1581
- * ISO View configuration
1744
+ * A map of box parsers to their box types
1582
1745
  *
1746
+ * @public
1747
+ */
1748
+ type IsoBoxReaderMap = Partial<{ [P in IsoBox["type"]]: IsoBoxReader<Extract<IsoBox, Record<"type", P>>> }>;
1749
+ //#endregion
1750
+ //#region src/IsoBoxReadViewConfig.d.ts
1751
+ /**
1752
+ * ISO Box Read View configuration
1583
1753
  *
1584
- * @beta
1754
+ * @public
1585
1755
  */
1586
- type IsoViewConfig = {
1756
+ type IsoBoxReadViewConfig<R extends IsoBoxReaderMap = IsoBoxReaderMap> = {
1587
1757
  /**
1588
1758
  * A map of box parsers to their box types
1589
1759
  */
1590
- parsers?: BoxParserMap;
1591
- /**
1592
- * Whether to parse boxes recursively
1593
- */
1594
- recursive?: boolean;
1760
+ readers?: R;
1595
1761
  };
1596
1762
  //#endregion
1597
- //#region src/readers/IsoFieldTypeMap.d.ts
1763
+ //#region src/IsoFieldTypeMap.d.ts
1598
1764
  /**
1599
1765
  * IsoFieldTypeMap is a map of ISO BMFF field types to their corresponding JavaScript types.
1600
1766
  *
1601
- *
1602
- * @beta
1767
+ * @public
1603
1768
  */
1604
1769
  type IsoFieldTypeMap = {
1605
1770
  uint: number;
@@ -1611,28 +1776,30 @@ type IsoFieldTypeMap = {
1611
1776
  utf8string: string;
1612
1777
  };
1613
1778
  //#endregion
1614
- //#region src/IsoView.d.ts
1779
+ //#region src/IsoParsedBox.d.ts
1615
1780
  /**
1616
- * Raw ISO BMFF data box.
1781
+ * Iso Parsed Box Type
1617
1782
  *
1783
+ * @public
1784
+ */
1785
+ type IsoParsedBox<T$1 extends IsoBox = IsoBox> = T$1 & Omit<Box, "type">;
1786
+ //#endregion
1787
+ //#region src/ParsedBox.d.ts
1788
+ /**
1789
+ * Parsed Box Type
1618
1790
  *
1619
- * @beta
1791
+ * @public
1620
1792
  */
1621
- type RawBox = {
1622
- type: string;
1623
- size: number;
1624
- largesize?: number;
1625
- usertype?: number[];
1626
- data: IsoView;
1627
- };
1793
+ type ParsedBox = IsoParsedBox | Box;
1794
+ //#endregion
1795
+ //#region src/IsoBoxReadView.d.ts
1628
1796
  /**
1629
1797
  * ISO BMFF data view. Similar to DataView, but with additional methods for reading ISO BMFF data.
1630
1798
  * It implements the iterator protocol, so it can be used in a for...of loop.
1631
1799
  *
1632
- *
1633
- * @beta
1800
+ * @public
1634
1801
  */
1635
- declare class IsoView {
1802
+ declare class IsoBoxReadView<R extends IsoBoxReaderMap = IsoBoxReaderMap> {
1636
1803
  private dataView;
1637
1804
  private offset;
1638
1805
  private config;
@@ -1645,7 +1812,19 @@ declare class IsoView {
1645
1812
  * @param raw - The raw data to view.
1646
1813
  * @param config - The configuration for the IsoView.
1647
1814
  */
1648
- constructor(raw: ArrayBuffer | DataView<ArrayBuffer> | Uint8Array<ArrayBuffer>, config?: IsoViewConfig);
1815
+ constructor(raw: ArrayBuffer | ArrayBufferView<ArrayBuffer>, config?: IsoBoxReadViewConfig<R>);
1816
+ /**
1817
+ * The buffer of the data view.
1818
+ */
1819
+ get buffer(): ArrayBuffer;
1820
+ /**
1821
+ * The byte offset of the data view.
1822
+ */
1823
+ get byteOffset(): number;
1824
+ /**
1825
+ * The byte length of the data view.
1826
+ */
1827
+ get byteLength(): number;
1649
1828
  /**
1650
1829
  * The current byteoffset in the data view.
1651
1830
  */
@@ -1664,7 +1843,7 @@ declare class IsoView {
1664
1843
  * @param size - The size of the slice.
1665
1844
  * @returns A new IsoView instance.
1666
1845
  */
1667
- slice: (size: number) => IsoView;
1846
+ slice: (offset: number, size: number) => IsoBoxReadView<R>;
1668
1847
  private read;
1669
1848
  /**
1670
1849
  * Reads a unsigned integer from the data view.
@@ -1713,7 +1892,7 @@ declare class IsoView {
1713
1892
  *
1714
1893
  * @returns The full box.
1715
1894
  */
1716
- readFullBox: () => Fields<FullBox>;
1895
+ readFullBox: () => FullBox;
1717
1896
  /**
1718
1897
  * Reads an array of values from the data view.
1719
1898
  *
@@ -1724,18 +1903,24 @@ declare class IsoView {
1724
1903
  */
1725
1904
  readArray: <T extends keyof IsoFieldTypeMap>(type: T, size: number, length: number) => IsoFieldTypeMap[T][];
1726
1905
  /**
1906
+ * Skips a number of bytes in the view.
1907
+ *
1908
+ * @param size - The number of bytes to skip.
1909
+ */
1910
+ jump: (size: number) => void;
1911
+ /**
1727
1912
  * Reads a raw box from the data view.
1728
1913
  *
1729
1914
  * @returns The box.
1730
1915
  */
1731
- readBox: () => RawBox;
1916
+ readBox: () => Box;
1732
1917
  /**
1733
1918
  * Reads a number of boxes from the data view.
1734
1919
  *
1735
1920
  * @param length - The number of boxes to read.
1736
1921
  * @returns The boxes.
1737
1922
  */
1738
- readBoxes: <T = IsoBmffBox>(length: number) => T[];
1923
+ readBoxes: <T = IsoBox>(length?: number) => T[];
1739
1924
  /**
1740
1925
  * Reads a number of entries from the data view.
1741
1926
  *
@@ -1749,76 +1934,28 @@ declare class IsoView {
1749
1934
  *
1750
1935
  * @returns A generator of boxes.
1751
1936
  */
1752
- [Symbol.iterator](): Generator<IsoBmffBox>;
1937
+ [Symbol.iterator](): Generator<ParsedBox>;
1753
1938
  }
1754
1939
  //#endregion
1755
1940
  //#region src/boxes/Box.d.ts
1756
1941
  /**
1757
1942
  * Base Box Type
1758
1943
  *
1759
- *
1760
- * @beta
1944
+ * @public
1761
1945
  */
1762
1946
  type Box = {
1763
- type: string;
1947
+ type: "";
1764
1948
  size: number;
1765
- view: IsoView;
1949
+ view: IsoBoxReadView;
1766
1950
  largesize?: number;
1767
1951
  usertype?: number[];
1768
1952
  };
1769
1953
  //#endregion
1770
- //#region src/boxes/TypeBox.d.ts
1771
- /**
1772
- * Utility TypeBox
1773
- *
1774
- *
1775
- * @beta
1776
- */
1777
- type TypeBox<T$1> = Box & {
1778
- type: T$1;
1779
- majorBrand: string;
1780
- minorVersion: number;
1781
- compatibleBrands: string[];
1782
- };
1783
- //#endregion
1784
- //#region src/BoxFilter.d.ts
1785
- /**
1786
- * Box filter function
1787
- *
1788
- *
1789
- * @beta
1790
- */
1791
- type BoxFilter<T$1 extends IsoBmffBox> = ((box: IsoBmffBox) => boolean) | ((box: IsoBmffBox) => box is T$1);
1792
- //#endregion
1793
- //#region src/IsoData.d.ts
1794
- /**
1795
- * ISO data
1796
- *
1797
- *
1798
- * @beta
1799
- */
1800
- type IsoData = ArrayBuffer | DataView<ArrayBuffer> | Uint8Array<ArrayBuffer>;
1801
- //#endregion
1802
- //#region src/createIsoView.d.ts
1803
- /**
1804
- * Create an IsoView from a raw ISO data.
1805
- *
1806
- * @param raw - The raw ISO data
1807
- * @param config - The configuration for the IsoView
1808
- *
1809
- * @returns The created IsoView
1810
- *
1811
- *
1812
- * @beta
1813
- */
1814
- declare function createIsoView(raw: IsoData, config?: IsoViewConfig): IsoView;
1815
- //#endregion
1816
1954
  //#region src/fields/DATA.d.ts
1817
1955
  /**
1818
1956
  * The data field type
1819
1957
  *
1820
- *
1821
- * @beta
1958
+ * @public
1822
1959
  */
1823
1960
  declare const DATA = "data";
1824
1961
  //#endregion
@@ -1826,8 +1963,7 @@ declare const DATA = "data";
1826
1963
  /**
1827
1964
  * The integer field type
1828
1965
  *
1829
- *
1830
- * @beta
1966
+ * @public
1831
1967
  */
1832
1968
  declare const INT = "int";
1833
1969
  //#endregion
@@ -1835,8 +1971,7 @@ declare const INT = "int";
1835
1971
  /**
1836
1972
  * The string field type
1837
1973
  *
1838
- *
1839
- * @beta
1974
+ * @public
1840
1975
  */
1841
1976
  declare const STRING = "string";
1842
1977
  //#endregion
@@ -1844,8 +1979,7 @@ declare const STRING = "string";
1844
1979
  /**
1845
1980
  * The template field type
1846
1981
  *
1847
- *
1848
- * @beta
1982
+ * @public
1849
1983
  */
1850
1984
  declare const TEMPLATE = "template";
1851
1985
  //#endregion
@@ -1853,8 +1987,7 @@ declare const TEMPLATE = "template";
1853
1987
  /**
1854
1988
  * The unsigned integer field type
1855
1989
  *
1856
- *
1857
- * @beta
1990
+ * @public
1858
1991
  */
1859
1992
  declare const UINT = "uint";
1860
1993
  //#endregion
@@ -1862,966 +1995,1845 @@ declare const UINT = "uint";
1862
1995
  /**
1863
1996
  * The UTF8 field type
1864
1997
  *
1865
- *
1866
- * @beta
1998
+ * @public
1867
1999
  */
1868
2000
  declare const UTF8 = "utf8";
1869
2001
  //#endregion
1870
- //#region src/filterBoxes.d.ts
2002
+ //#region src/IsoBoxContainerMap.d.ts
1871
2003
  /**
1872
- * Filters boxes based on the given filter function.
2004
+ * Map of container box types to their allowed child box types
1873
2005
  *
1874
- * @param raw - The raw boxes to filter.
1875
- * @param config - The box parser configuration.
1876
- * @param fn - The filter function.
1877
- * @returns The filtered boxes.
1878
- *
1879
- * @beta
1880
- */
1881
- declare function filterBoxes<T$1 extends IsoBmffBox = IsoBmffBox>(raw: IsoData | Iterable<IsoBmffBox>, fn: BoxFilter<T$1>, config?: IsoViewConfig): T$1[];
1882
- //#endregion
1883
- //#region src/boxes/IsoBmffBoxMap.d.ts
1884
- /**
1885
- * Comprehensive mapping from box type strings to their corresponding TypeScript interfaces
1886
- *
1887
- *
1888
- * @beta
2006
+ * @public
1889
2007
  */
1890
- type IsoBmffBoxMap = {
1891
- ardi: AudioRenderingIndicationBox;
1892
- avc1: VisualSampleEntryBox<"avc1">;
1893
- avc2: VisualSampleEntryBox<"avc2">;
1894
- avc3: VisualSampleEntryBox<"avc3">;
1895
- avc4: VisualSampleEntryBox<"avc4">;
1896
- co64: ChunkLargeOffsetBox;
1897
- ctts: CompositionTimeToSampleBox;
2008
+ type IsoBoxContainerMap = {
1898
2009
  dinf: DataInformationBox;
1899
- dref: DataReferenceBox;
1900
2010
  edts: EditBox;
1901
- elng: ExtendedLanguageBox;
1902
- elst: EditListBox;
1903
- emsg: EventMessageBox;
1904
- enca: AudioSampleEntryBox<"enca">;
1905
- encv: VisualSampleEntryBox<"encv">;
1906
- free: FreeSpaceBox<"free">;
1907
- frma: OriginalFormatBox;
1908
- ftyp: FileTypeBox;
1909
- hdlr: HandlerReferenceBox;
1910
- hev1: VisualSampleEntryBox<"hev1">;
1911
- hmhd: HintMediaHeaderBox;
1912
- hvc1: VisualSampleEntryBox<"hvc1">;
1913
- iden: WebVttCueIdBox;
1914
- iinf: ItemInfoBox;
1915
- iloc: ItemLocationBox;
1916
- imda: IdentifiedMediaDataBox;
1917
- imif: IpmpInfoBox;
1918
- infe: ItemInfoEntry;
1919
- ipro: ItemProtectionBox;
1920
- iref: ItemReferenceBox;
1921
- kind: TrackKindBox;
1922
- labl: LabelBox;
1923
- mdat: MediaDataBox;
1924
- mdhd: MediaHeaderBox;
2011
+ grpl: GroupsListBox;
1925
2012
  mdia: MediaBox;
1926
- mehd: MovieExtendsHeaderBox;
2013
+ meco: AdditionalMetadataContainerBox;
1927
2014
  meta: MetaBox;
1928
- mfhd: MovieFragmentHeaderBox;
1929
2015
  mfra: MovieFragmentRandomAccessBox;
1930
- mfro: MovieFragmentRandomAccessOffsetBox;
1931
2016
  minf: MediaInformationBox;
1932
2017
  moof: MovieFragmentBox;
1933
2018
  moov: MovieBox;
1934
- mp4a: AudioSampleEntryBox<"mp4a">;
1935
2019
  mvex: MovieExtendsBox;
1936
- mvhd: MovieHeaderBox;
1937
- nmhd: NullMediaHeaderBox;
1938
- payl: WebVttCuePayloadBox;
1939
- pitm: PrimaryItemBox;
1940
- prft: ProducerReferenceTimeBox;
1941
- prsl: PreselectionGroupBox;
1942
- pssh: ProtectionSystemSpecificHeaderBox;
1943
- saio: SampleAuxiliaryInformationOffsetsBox;
1944
- saiz: SampleAuxiliaryInformationSizesBox;
1945
- sbgp: SampleToGroupBox;
1946
2020
  schi: SchemeInformationBox;
1947
- schm: SchemeTypeBox;
1948
- sdtp: SampleDependencyTypeBox;
1949
- senc: SampleEncryptionBox;
1950
- sgpd: SampleGroupDescriptionBox;
1951
- sidx: SegmentIndexBox;
1952
2021
  sinf: ProtectionSchemeInformationBox;
1953
- skip: FreeSpaceBox<"skip">;
1954
- smhd: SoundMediaHeaderBox;
1955
- ssix: SubsegmentIndexBox;
1956
2022
  stbl: SampleTableBox;
1957
- stco: ChunkOffsetBox;
1958
- stdp: DegradationPriorityBox;
1959
- sthd: SubtitleMediaHeaderBox;
1960
- stsc: SampleToChunkBox;
1961
- stsd: SampleDescriptionBox;
1962
- stsh: ShadowSyncSampleBox;
1963
- stss: SyncSampleBox;
1964
- stsz: SampleSizeBox;
1965
- sttg: WebVttSettingsBox;
1966
- stts: DecodingTimeToSampleBox;
1967
- styp: SegmentTypeBox;
1968
- subs: SubsampleInformationBox;
1969
- stz2: CompactSampleSizeBox;
1970
- tenc: TrackEncryptionBox;
1971
- tfdt: TrackFragmentBaseMediaDecodeTimeBox;
1972
- tfhd: TrackFragmentHeaderBox;
1973
- tfra: TrackFragmentRandomAccessBox;
1974
- tkhd: TrackHeaderBox;
2023
+ strk: SubTrackBox;
1975
2024
  traf: TrackFragmentBox;
1976
2025
  trak: TrackBox;
1977
2026
  tref: TrackReferenceBox;
1978
- trex: TrackExtendsBox;
1979
- trun: TrackRunBox;
1980
2027
  udta: UserDataBox;
1981
- url: DataEntryUrlBox;
1982
- urn: DataEntryUrnBox;
1983
- vlab: WebVttSourceLabelBox;
1984
- vmhd: VideoMediaHeaderBox;
1985
- vttC: WebVttConfigurationBox;
1986
- vtte: WebVttEmptySampleBox;
2028
+ vttc: WebVttCueBox;
2029
+ };
2030
+ //#endregion
2031
+ //#region src/IsoBoxContainer.d.ts
2032
+ /**
2033
+ * Iso Box Container Type
2034
+ *
2035
+ * @public
2036
+ */
2037
+ type IsoBoxContainer = IsoBoxContainerMap[keyof IsoBoxContainerMap];
2038
+ //#endregion
2039
+ //#region src/IsoBoxData.d.ts
2040
+ /**
2041
+ * ISO data
2042
+ *
2043
+ * @public
2044
+ */
2045
+ type IsoBoxData = ArrayBuffer | DataView<ArrayBuffer> | Uint8Array<ArrayBuffer>;
2046
+ //#endregion
2047
+ //#region src/IsoBoxWriter.d.ts
2048
+ /**
2049
+ * ISO box writer.
2050
+ *
2051
+ * @public
2052
+ */
2053
+ type IsoBoxWriter<B$1> = (box: B$1) => ArrayBufferView;
2054
+ //#endregion
2055
+ //#region src/IsoBoxWriterMap.d.ts
2056
+ /**
2057
+ * A map of box writers to their box types
2058
+ *
2059
+ * @public
2060
+ */
2061
+ type IsoBoxWriterMap = Partial<{ [P in IsoBox["type"]]: IsoBoxWriter<Extract<IsoBox, Record<"type", P>>> }>;
2062
+ //#endregion
2063
+ //#region src/IsoBoxReadableStreamConfig.d.ts
2064
+ /**
2065
+ * Configuration for the IsoBoxReadableStream.
2066
+ *
2067
+ * @public
2068
+ */
2069
+ type IsoBoxReadableStreamConfig = {
2070
+ /**
2071
+ * A map of box writers to their box types
2072
+ */
2073
+ writers?: IsoBoxWriterMap;
1987
2074
  };
1988
2075
  //#endregion
1989
- //#region src/filterBoxesByType.d.ts
2076
+ //#region src/IsoBoxReaderReturn.d.ts
2077
+ /**
2078
+ * Return type for a box reader.
2079
+ *
2080
+ * @public
2081
+ */
2082
+ type BoxReturn<T$1 extends IsoBoxReaderMap> = IsoParsedBox<{ [K in keyof T$1]: T$1[K] extends IsoBoxReader<infer B> ? B : never }[keyof T$1]>;
2083
+ /**
2084
+ * Return type for a container reader
2085
+ *
2086
+ * @public
2087
+ */
2088
+ type ContainerReturn = IsoParsedBox<IsoBoxContainer>;
2089
+ /**
2090
+ * Return type for the ISO box reader
2091
+ *
2092
+ * @public
2093
+ */
2094
+ type IsoBoxReaderReturn<T$1 extends IsoBoxReaderMap> = BoxReturn<T$1> | ContainerReturn | ParsedBox;
2095
+ //#endregion
2096
+ //#region src/IsoBoxStreamable.d.ts
2097
+ /**
2098
+ * A type that represents a streamable ISO BMFF box or array buffer view.
2099
+ *
2100
+ * @public
2101
+ */
2102
+ type IsoBoxStreamable = IsoBox | Box | ArrayBufferView;
2103
+ //#endregion
2104
+ //#region src/IsoBoxWriteView.d.ts
2105
+ /**
2106
+ * A view for writing ISO BMFF data.
2107
+ *
2108
+ * @public
2109
+ */
2110
+ declare class IsoBoxWriteView {
2111
+ private dataView;
2112
+ private cursor;
2113
+ /**
2114
+ * Constructs a new IsoBoxWriteView.
2115
+ *
2116
+ * @param size - The size of the data view.
2117
+ */
2118
+ constructor(type: string, size: number);
2119
+ /**
2120
+ * The buffer of the data view.
2121
+ *
2122
+ * @returns The buffer of the data view.
2123
+ */
2124
+ get buffer(): ArrayBuffer;
2125
+ /**
2126
+ * The length of the data view.
2127
+ *
2128
+ * @returns The length of the data view.
2129
+ */
2130
+ get byteLength(): number;
2131
+ /**
2132
+ * The offset of the data view.
2133
+ *
2134
+ * @returns The offset of the data view.
2135
+ */
2136
+ get byteOffset(): number;
2137
+ /**
2138
+ * Writes a uint to the data view.
2139
+ *
2140
+ * @param value - The value to write.
2141
+ * @param size - The size, in bytes, of the value.
2142
+ */
2143
+ writeUint: (value: number, size: number) => void;
2144
+ /**
2145
+ * Writes an int to the data view.
2146
+ *
2147
+ * @param value - The value to write.
2148
+ * @param size - The size, in bytes, of the value.
2149
+ */
2150
+ writeInt: (value: number, size: number) => void;
2151
+ /**
2152
+ * Writes a string to the data view.
2153
+ *
2154
+ * @param value - The value to write.
2155
+ */
2156
+ writeString: (value: string) => void;
2157
+ /**
2158
+ * Writes a null terminated string to the data view.
2159
+ *
2160
+ * @param value - The value to write.
2161
+ */
2162
+ writeTerminatedString: (value: string) => void;
2163
+ /**
2164
+ * Writes a UTF-8 null terminated string to the data view.
2165
+ *
2166
+ * @param value - The value to write.
2167
+ */
2168
+ writeUtf8TerminatedString: (value: string) => void;
2169
+ /**
2170
+ * Writes a Uint8Array to the data view.
2171
+ *
2172
+ * @param data - The data to write.
2173
+ */
2174
+ writeBytes: (data: Uint8Array) => void;
2175
+ /**
2176
+ * Writes an array of numbers to the data view.
2177
+ *
2178
+ * @param data - The data to write.
2179
+ * @param type - The type of the data.
2180
+ * @param size - The size, in bytes, of each data value.
2181
+ */
2182
+ writeArray: <T extends keyof IsoFieldTypeMap>(data: number[], type: T, size: number) => void;
2183
+ /**
2184
+ * Writes a template to the data view.
2185
+ *
2186
+ * @param value - The value to write.
2187
+ * @param size - The size, in bytes, of the template.
2188
+ */
2189
+ writeTemplate: (value: number, size: number) => void;
2190
+ /**
2191
+ * Writes a box header to the data view.
2192
+ *
2193
+ * @param type - The type of the box.
2194
+ * @param size - The size, in bytes, of the box.
2195
+ */
2196
+ writeBoxHeader: (type: string, size: number) => void;
2197
+ /**
2198
+ * Writes a full box header to the data view.
2199
+ *
2200
+ * @param version - The version of the full box.
2201
+ * @param flags - The flags of the full box.
2202
+ */
2203
+ writeFullBox(version: number, flags: number): void;
2204
+ }
2205
+ //#endregion
2206
+ //#region src/IsoTypedParsedBox.d.ts
2207
+ /**
2208
+ * Typed Parsed Box Type
2209
+ *
2210
+ * @public
2211
+ */
2212
+ type IsoTypedParsedBox<T$1 extends keyof IsoBoxMap> = IsoBoxMap[T$1] & Omit<Box, "type">;
2213
+ //#endregion
2214
+ //#region src/createIsoBoxReadableStream.d.ts
2215
+ /**
2216
+ * Creates a ReadableStream of ISO BMFF boxes as Uint8Arrays.
2217
+ *
2218
+ * @param boxes - The boxes to stream.
2219
+ * @param config - The configuration for the stream.
2220
+ *
2221
+ * @returns A new IsoBoxReadableStream.
2222
+ *
2223
+ * @example
2224
+ * {@includeCode ../test/createIsoBoxReadableStream.test.ts#example}
2225
+ *
2226
+ * @public
2227
+ */
2228
+ declare function createIsoBoxReadableStream(boxes: Iterable<IsoBoxStreamable>, config?: IsoBoxReadableStreamConfig): ReadableStream<Uint8Array>;
2229
+ //#endregion
2230
+ //#region src/IsoBoxReadableStream.d.ts
2231
+ /**
2232
+ * A readable stream of ISO BMFF boxes as Uint8Arrays.
2233
+ *
2234
+ * @public
2235
+ */
2236
+ declare class IsoBoxReadableStream extends ReadableStream<Uint8Array> {
2237
+ /**
2238
+ * Constructs a new IsoBoxReadableStream.
2239
+ *
2240
+ * @param boxes - The boxes to stream.
2241
+ * @param config - The configuration for the stream.
2242
+ */
2243
+ constructor(boxes: Iterable<IsoBoxStreamable>, config?: IsoBoxReadableStreamConfig);
2244
+ }
2245
+ //#endregion
2246
+ //#region src/readers/readArdi.d.ts
2247
+ /**
2248
+ * Parse a AudioRenderingIndicationBox from an IsoView
2249
+ *
2250
+ * @param view - The IsoView to read data from
2251
+ *
2252
+ * @returns A parsed AudioRenderingIndicationBox
2253
+ *
2254
+ * @public
2255
+ */
2256
+ declare function readArdi(view: IsoBoxReadView): AudioRenderingIndicationBox;
2257
+ //#endregion
2258
+ //#region src/readers/readAvc1.d.ts
2259
+ /**
2260
+ * Parse a VisualSampleEntryBox from an IsoView
2261
+ *
2262
+ * @param view - The IsoView to read data from
2263
+ *
2264
+ * @returns A parsed VisualSampleEntryBox
2265
+ *
2266
+ * @public
2267
+ */
2268
+ declare function readAvc1(view: IsoBoxReadView): VisualSampleEntryBox<"avc1">;
2269
+ //#endregion
2270
+ //#region src/readers/readAvc2.d.ts
2271
+ /**
2272
+ * Parse a VisualSampleEntryBox from an IsoView
2273
+ *
2274
+ * @param view - The IsoView to read data from
2275
+ *
2276
+ * @returns A parsed VisualSampleEntryBox
2277
+ *
2278
+ * @public
2279
+ */
2280
+ declare function readAvc2(view: IsoBoxReadView): VisualSampleEntryBox<"avc2">;
2281
+ //#endregion
2282
+ //#region src/readers/readAvc3.d.ts
2283
+ /**
2284
+ * Parse a VisualSampleEntryBox from an IsoView
2285
+ *
2286
+ * @param view - The IsoView to read data from
2287
+ *
2288
+ * @returns A parsed VisualSampleEntryBox
2289
+ *
2290
+ * @public
2291
+ */
2292
+ declare function readAvc3(view: IsoBoxReadView): VisualSampleEntryBox<"avc3">;
2293
+ //#endregion
2294
+ //#region src/readers/readAvc4.d.ts
2295
+ /**
2296
+ * Parse a VisualSampleEntryBox from an IsoView
2297
+ *
2298
+ * @param view - The IsoView to read data from
2299
+ *
2300
+ * @returns A parsed VisualSampleEntryBox
2301
+ *
2302
+ * @public
2303
+ */
2304
+ declare function readAvc4(view: IsoBoxReadView): VisualSampleEntryBox<"avc4">;
2305
+ //#endregion
2306
+ //#region src/readers/readCtts.d.ts
2307
+ /**
2308
+ * Parse a CompositionTimeToSampleBox from an IsoView
2309
+ *
2310
+ * @param view - The IsoView to read data from
2311
+ *
2312
+ * @returns A parsed CompositionTimeToSampleBox
2313
+ *
2314
+ * @public
2315
+ */
2316
+ declare function readCtts(view: IsoBoxReadView): CompositionTimeToSampleBox;
2317
+ //#endregion
2318
+ //#region src/readers/readDref.d.ts
2319
+ /**
2320
+ * Parse a DataReferenceBox from an IsoView
2321
+ *
2322
+ * @param view - The IsoView to read data from
2323
+ *
2324
+ * @returns A parsed DataReferenceBox
2325
+ *
2326
+ * @public
2327
+ */
2328
+ declare function readDref(view: IsoBoxReadView): DataReferenceBox;
2329
+ //#endregion
2330
+ //#region src/readers/readElng.d.ts
2331
+ /**
2332
+ * Parse a ExtendedLanguageBox from an IsoView
2333
+ *
2334
+ * @param view - The IsoView to read data from
2335
+ *
2336
+ * @returns A parsed ExtendedLanguageBox
2337
+ *
2338
+ * @public
2339
+ */
2340
+ declare function readElng(view: IsoBoxReadView): ExtendedLanguageBox;
2341
+ //#endregion
2342
+ //#region src/readers/readElst.d.ts
2343
+ /**
2344
+ * Parse a Box from an IsoView
2345
+ *
2346
+ * @param view - The IsoView to read data from
2347
+ *
2348
+ * @returns A parsed Box
2349
+ *
2350
+ * @public
2351
+ */
2352
+ declare function readElst(view: IsoBoxReadView): EditListBox;
2353
+ //#endregion
2354
+ //#region src/readers/readEmsg.d.ts
2355
+ /**
2356
+ * Parse an EventMessageBox from an IsoView
2357
+ *
2358
+ * @param view - The IsoView to read data from
2359
+ *
2360
+ * @returns A parsed EventMessageBox
2361
+ *
2362
+ * @public
2363
+ */
2364
+ declare function readEmsg(view: IsoBoxReadView): EventMessageBox;
2365
+ //#endregion
2366
+ //#region src/readers/readEnca.d.ts
2367
+ /**
2368
+ * Parse an AudioSampleEntry from an IsoView
2369
+ *
2370
+ * @param view - The IsoView to read data from
2371
+ *
2372
+ * @returns A parsed AudioSampleEntry
2373
+ *
2374
+ * @public
2375
+ */
2376
+ declare function readEnca(view: IsoBoxReadView): AudioSampleEntryBox<"enca">;
2377
+ //#endregion
2378
+ //#region src/readers/readEncv.d.ts
2379
+ /**
2380
+ * Parse a VisualSampleEntryBox from an IsoView
2381
+ *
2382
+ * @param view - The IsoView to read data from
2383
+ *
2384
+ * @returns A parsed VisualSampleEntryBox
2385
+ *
2386
+ * @public
2387
+ */
2388
+ declare function readEncv(view: IsoBoxReadView): VisualSampleEntryBox<"encv">;
2389
+ //#endregion
2390
+ //#region src/readers/readFree.d.ts
2391
+ /**
2392
+ * Parse a Box from an IsoView
2393
+ *
2394
+ * @param view - The IsoView to read data from
2395
+ *
2396
+ * @returns A parsed Box
2397
+ *
2398
+ * @public
2399
+ */
2400
+ declare function readFree(view: IsoBoxReadView): FreeSpaceBox;
2401
+ //#endregion
2402
+ //#region src/readers/readFrma.d.ts
2403
+ /**
2404
+ * Parse an OriginalFormatBox from an IsoView
2405
+ *
2406
+ * @param view - The IsoView to read data from
2407
+ *
2408
+ * @returns A parsed OriginalFormatBox
2409
+ *
2410
+ * @public
2411
+ */
2412
+ declare function readFrma(view: IsoBoxReadView): OriginalFormatBox;
2413
+ //#endregion
2414
+ //#region src/readers/readFtyp.d.ts
2415
+ /**
2416
+ * Parse a FileTypeBox from an IsoView
2417
+ *
2418
+ * @param view - The IsoView to read data from
2419
+ *
2420
+ * @returns A parsed FileTypeBox
2421
+ *
2422
+ * @public
2423
+ */
2424
+ declare function readFtyp(view: IsoBoxReadView): FileTypeBox;
2425
+ //#endregion
2426
+ //#region src/readers/readHdlr.d.ts
2427
+ /**
2428
+ * Parse a HandlerReferenceBox from an IsoView
2429
+ *
2430
+ * @param view - The IsoView to read data from
2431
+ *
2432
+ * @returns A parsed HandlerReferenceBox
2433
+ *
2434
+ * @public
2435
+ */
2436
+ declare function readHdlr(view: IsoBoxReadView): HandlerReferenceBox;
2437
+ //#endregion
2438
+ //#region src/readers/readHev1.d.ts
2439
+ /**
2440
+ * Parse a VisualSampleEntryBox from an IsoView
2441
+ *
2442
+ * @param view - The IsoView to read data from
2443
+ *
2444
+ * @returns A parsed VisualSampleEntryBox
2445
+ *
2446
+ * @public
2447
+ */
2448
+ declare function readHev1(view: IsoBoxReadView): VisualSampleEntryBox<"hev1">;
2449
+ //#endregion
2450
+ //#region src/readers/readHvc1.d.ts
2451
+ /**
2452
+ * Parse a VisualSampleEntryBox from an IsoView
2453
+ *
2454
+ * @param view - The IsoView to read data from
2455
+ *
2456
+ * @returns A parsed VisualSampleEntryBox
2457
+ *
2458
+ * @public
2459
+ */
2460
+ declare function readHvc1(view: IsoBoxReadView): VisualSampleEntryBox<"hvc1">;
2461
+ //#endregion
2462
+ //#region src/readers/readIden.d.ts
2463
+ /**
2464
+ * Parse a WebVTTCueIdBox from an IsoView
2465
+ *
2466
+ * @param view - The IsoView to read data from
2467
+ *
2468
+ * @returns A parsed WebVTTCueIdBox
2469
+ *
2470
+ * @public
2471
+ */
2472
+ declare function readIden(view: IsoBoxReadView): WebVttCueIdBox;
2473
+ //#endregion
2474
+ //#region src/readers/readImda.d.ts
2475
+ /**
2476
+ * Parse a IdentifiedMediaDataBox from an IsoView
2477
+ *
2478
+ * @param view - The IsoView to read data from
2479
+ *
2480
+ * @returns A parsed IdentifiedMediaDataBox
2481
+ *
2482
+ * @public
2483
+ */
2484
+ declare function readImda(view: IsoBoxReadView): IdentifiedMediaDataBox;
2485
+ //#endregion
2486
+ //#region src/readers/readKind.d.ts
2487
+ /**
2488
+ * Parse a TrackKinBox from an IsoView
2489
+ *
2490
+ * @param view - The IsoView to read data from
2491
+ *
2492
+ * @returns A parsed TrackKindBox
2493
+ *
2494
+ * @public
2495
+ */
2496
+ declare function readKind(view: IsoBoxReadView): TrackKindBox;
2497
+ //#endregion
2498
+ //#region src/readers/readLabl.d.ts
2499
+ /**
2500
+ * Parse a LabelBox from an IsoView
2501
+ *
2502
+ * @param view - The IsoView to read data from
2503
+ *
2504
+ * @returns A parsed LabelBox
2505
+ *
2506
+ * @public
2507
+ */
2508
+ declare function readLabl(view: IsoBoxReadView): LabelBox;
2509
+ //#endregion
2510
+ //#region src/readers/readMdat.d.ts
2511
+ /**
2512
+ * Parse a MediaDataBox from an IsoView
2513
+ *
2514
+ * @param view - The IsoView to read data from
2515
+ *
2516
+ * @returns A parsed MediaDataBox
2517
+ *
2518
+ * @public
2519
+ */
2520
+ declare function readMdat(view: IsoBoxReadView): MediaDataBox;
2521
+ //#endregion
2522
+ //#region src/readers/readMdhd.d.ts
2523
+ /**
2524
+ * Parse a MediaHeaderBox from an IsoView
2525
+ *
2526
+ * @param view - The IsoView to read data from
2527
+ *
2528
+ * @returns A parsed MediaHeaderBox
2529
+ *
2530
+ * @public
2531
+ */
2532
+ declare function readMdhd(view: IsoBoxReadView): MediaHeaderBox;
2533
+ //#endregion
2534
+ //#region src/readers/readMehd.d.ts
2535
+ /**
2536
+ * Parse a MovieExtendsHeaderBox from an IsoView
2537
+ *
2538
+ * @param view - The IsoView to read data from
2539
+ *
2540
+ * @returns A parsed MovieExtendsHeaderBox
2541
+ *
2542
+ * @public
2543
+ */
2544
+ declare function readMehd(view: IsoBoxReadView): MovieExtendsHeaderBox;
2545
+ //#endregion
2546
+ //#region src/readers/readMeta.d.ts
2547
+ /**
2548
+ * Parse a MetaBox from an IsoView
2549
+ *
2550
+ * @param view - The IsoView to read data from
2551
+ *
2552
+ * @returns A parsed MetaBox
2553
+ *
2554
+ * @public
2555
+ */
2556
+ declare function readMeta(view: IsoBoxReadView): MetaBox;
2557
+ //#endregion
2558
+ //#region src/readers/readMfhd.d.ts
2559
+ /**
2560
+ * Parse a MovieFragmentHeaderBox from an IsoView
2561
+ *
2562
+ * @param view - The IsoView to read data from
2563
+ *
2564
+ * @returns A parsed MovieFragmentHeaderBox
2565
+ *
2566
+ * @public
2567
+ */
2568
+ declare function readMfhd(view: IsoBoxReadView): MovieFragmentHeaderBox;
2569
+ //#endregion
2570
+ //#region src/readers/readMfro.d.ts
2571
+ /**
2572
+ * Parse a MovieFragmentRandomAccessBox from an IsoView
2573
+ *
2574
+ * @param view - The IsoView to read data from
2575
+ *
2576
+ * @returns A parsed MovieFragmentRandomAccessBox
2577
+ *
2578
+ * @public
2579
+ */
2580
+ declare function readMfro(view: IsoBoxReadView): MovieFragmentRandomAccessOffsetBox;
2581
+ //#endregion
2582
+ //#region src/readers/readMp4a.d.ts
2583
+ /**
2584
+ * Parse an AudioSampleEntry from an IsoView
2585
+ *
2586
+ * @param view - The IsoView to read data from
2587
+ *
2588
+ * @returns A parsed AudioSampleEntry
2589
+ *
2590
+ * @public
2591
+ */
2592
+ declare function readMp4a(view: IsoBoxReadView): AudioSampleEntryBox<"mp4a">;
2593
+ //#endregion
2594
+ //#region src/readers/readMvhd.d.ts
2595
+ /**
2596
+ * Parse a Box from an IsoView
2597
+ *
2598
+ * @param view - The IsoView to read data from
2599
+ *
2600
+ * @returns A parsed Box
2601
+ *
2602
+ * @public
2603
+ */
2604
+ declare function readMvhd(view: IsoBoxReadView): MovieHeaderBox;
2605
+ //#endregion
2606
+ //#region src/readers/readPayl.d.ts
2607
+ /**
2608
+ * Parse a WebVTTCuePayloadBox from an IsoView
2609
+ *
2610
+ * @param view - The IsoView to read data from
2611
+ *
2612
+ * @returns A parsed WebVTTCuePayloadBox
2613
+ *
2614
+ * @public
2615
+ */
2616
+ declare function readPayl(view: IsoBoxReadView): WebVttCuePayloadBox;
2617
+ //#endregion
2618
+ //#region src/readers/readPrft.d.ts
2619
+ /**
2620
+ * Parse a ProducerReferenceTimeBox from an IsoView
2621
+ *
2622
+ * @param view - The IsoView to read data from
2623
+ *
2624
+ * @returns A parsed ProducerReferenceTimeBox
2625
+ *
2626
+ * @public
2627
+ */
2628
+ declare function readPrft(view: IsoBoxReadView): ProducerReferenceTimeBox;
2629
+ //#endregion
2630
+ //#region src/readers/readPrsl.d.ts
2631
+ /**
2632
+ * Parse a PreselectionGroupBox from an IsoView
2633
+ *
2634
+ * @param view - The IsoView to read data from
2635
+ *
2636
+ * @returns A parsed PreselectionGroupBox
2637
+ *
2638
+ * @public
2639
+ */
2640
+ declare function readPrsl(view: IsoBoxReadView): PreselectionGroupBox;
2641
+ //#endregion
2642
+ //#region src/readers/readPssh.d.ts
2643
+ /**
2644
+ * Parse a ProtectionSystemSpecificHeaderBox from an IsoView
2645
+ *
2646
+ * @param view - The IsoView to read data from
2647
+ *
2648
+ * @returns A parsed ProtectionSystemSpecificHeaderBox
2649
+ *
2650
+ * @public
2651
+ */
2652
+ declare function readPssh(view: IsoBoxReadView): ProtectionSystemSpecificHeaderBox;
2653
+ //#endregion
2654
+ //#region src/readers/readSchm.d.ts
2655
+ /**
2656
+ * Parse a SchemeTypeBox from an IsoView
2657
+ *
2658
+ * @param view - The IsoView to read data from
2659
+ *
2660
+ * @returns A parsed SchemeTypeBox
2661
+ *
2662
+ * @public
2663
+ */
2664
+ declare function readSchm(view: IsoBoxReadView): SchemeTypeBox;
2665
+ //#endregion
2666
+ //#region src/readers/readSdtp.d.ts
2667
+ /**
2668
+ * Parse a SampleDependencyTypeBox from an IsoView
2669
+ *
2670
+ * @param view - The IsoView to read data from
2671
+ *
2672
+ * @returns A parsed SampleDependencyTypeBox
2673
+ *
2674
+ * @public
2675
+ */
2676
+ declare function readSdtp(view: IsoBoxReadView): SampleDependencyTypeBox;
2677
+ //#endregion
2678
+ //#region src/readers/readSidx.d.ts
2679
+ /**
2680
+ * Parse a SegmentIndexBox from an IsoView
2681
+ *
2682
+ * @param view - The IsoView to read data from
2683
+ *
2684
+ * @returns A parsed SegmentIndexBox
2685
+ *
2686
+ * @public
2687
+ */
2688
+ declare function readSidx(view: IsoBoxReadView): SegmentIndexBox;
2689
+ //#endregion
2690
+ //#region src/readers/readSkip.d.ts
2691
+ /**
2692
+ * Parse a FreeSpaceBox from an IsoView
2693
+ *
2694
+ * @param view - The IsoView to read data from
2695
+ *
2696
+ * @returns A parsed FreeSpaceBox
2697
+ *
2698
+ * @public
2699
+ */
2700
+ declare function readSkip(view: IsoBoxReadView): FreeSpaceBox<"skip">;
2701
+ //#endregion
2702
+ //#region src/readers/readSmhd.d.ts
2703
+ /**
2704
+ * Parse a SoundMediaHeaderBox from an IsoView
2705
+ *
2706
+ * @param view - The IsoView to read data from
2707
+ *
2708
+ * @returns A parsed SoundMediaHeaderBox
2709
+ *
2710
+ * @public
2711
+ */
2712
+ declare function readSmhd(view: IsoBoxReadView): SoundMediaHeaderBox;
2713
+ //#endregion
2714
+ //#region src/readers/readSsix.d.ts
2715
+ /**
2716
+ * Parse a SubsegmentIndexBox from an IsoView
2717
+ *
2718
+ * @param view - The IsoView to read data from
2719
+ *
2720
+ * @returns A parsed SubsegmentIndexBox
2721
+ *
2722
+ * @public
2723
+ */
2724
+ declare function readSsix(view: IsoBoxReadView): SubsegmentIndexBox;
2725
+ //#endregion
2726
+ //#region src/readers/readSthd.d.ts
2727
+ /**
2728
+ * Parse a SubtitleMediaHeaderBox from an IsoView
2729
+ *
2730
+ * @param view - The IsoView to read data from
2731
+ *
2732
+ * @returns A parsed SubtitleMediaHeaderBox
2733
+ *
2734
+ * @public
2735
+ */
2736
+ declare function readSthd(view: IsoBoxReadView): SubtitleMediaHeaderBox;
2737
+ //#endregion
2738
+ //#region src/readers/readStsd.d.ts
2739
+ /**
2740
+ * Parse a SampleDescriptionBox from an IsoView
2741
+ *
2742
+ * @param view - The IsoView to read data from
2743
+ *
2744
+ * @returns A parsed SampleDescriptionBox
2745
+ *
2746
+ * @public
2747
+ */
2748
+ declare function readStsd<E extends SampleEntryBox = SampleEntryBox>(view: IsoBoxReadView): SampleDescriptionBox<E>;
2749
+ //#endregion
2750
+ //#region src/readers/readStss.d.ts
2751
+ /**
2752
+ * Parse a SyncSampleBox from an IsoView
2753
+ *
2754
+ * @param view - The IsoView to read data from
2755
+ *
2756
+ * @returns A parsed SyncSampleBox
2757
+ *
2758
+ * @public
2759
+ */
2760
+ declare function readStss(view: IsoBoxReadView): SyncSampleBox;
2761
+ //#endregion
2762
+ //#region src/readers/readSttg.d.ts
2763
+ /**
2764
+ * Parse a WebVTTSettingsBox from an IsoView
2765
+ *
2766
+ * @param view - The IsoView to read data from
2767
+ *
2768
+ * @returns A parsed WebVTTSettingsBox
2769
+ *
2770
+ * @public
2771
+ */
2772
+ declare function readSttg(view: IsoBoxReadView): WebVttSettingsBox;
2773
+ //#endregion
2774
+ //#region src/readers/readStts.d.ts
2775
+ /**
2776
+ * Parse a DecodingTimeToSampleBox from an IsoView
2777
+ *
2778
+ * @param view - The IsoView to read data from
2779
+ *
2780
+ * @returns A parsed DecodingTimeToSampleBox
2781
+ *
2782
+ * @public
2783
+ */
2784
+ declare function readStts(view: IsoBoxReadView): DecodingTimeToSampleBox;
2785
+ //#endregion
2786
+ //#region src/readers/readStyp.d.ts
2787
+ /**
2788
+ * Parse a SegmentTypeBox from an IsoView
2789
+ *
2790
+ * @param view - The IsoView to read data from
2791
+ *
2792
+ * @returns A parsed SegmentTypeBox
2793
+ *
2794
+ * @public
2795
+ */
2796
+ declare function readStyp(view: IsoBoxReadView): SegmentTypeBox;
2797
+ //#endregion
2798
+ //#region src/readers/readSubs.d.ts
2799
+ /**
2800
+ * Parse a SubSampleInformationBox from an IsoView
2801
+ *
2802
+ * @param view - The IsoView to read data from
2803
+ *
2804
+ * @returns A parsed SubSampleInformationBox
2805
+ *
2806
+ * @public
2807
+ */
2808
+ declare function readSubs(view: IsoBoxReadView): SubsampleInformationBox;
2809
+ //#endregion
2810
+ //#region src/readers/readTenc.d.ts
2811
+ /**
2812
+ * Parse a TrackEncryptionBox from an IsoView
2813
+ *
2814
+ * @param view - The IsoView to read data from
2815
+ *
2816
+ * @returns A parsed TrackEncryptionBox
2817
+ *
2818
+ * @public
2819
+ */
2820
+ declare function readTenc(view: IsoBoxReadView): TrackEncryptionBox;
2821
+ //#endregion
2822
+ //#region src/readers/readTfdt.d.ts
2823
+ /**
2824
+ * Parse a TrackFragmentDecodeTimeBox from an IsoView
2825
+ *
2826
+ * @param view - The IsoView to read data from
2827
+ *
2828
+ * @returns A parsed TrackFragmentDecodeTimeBox
2829
+ *
2830
+ * @public
2831
+ */
2832
+ declare function readTfdt(view: IsoBoxReadView): TrackFragmentBaseMediaDecodeTimeBox;
2833
+ //#endregion
2834
+ //#region src/readers/readTfhd.d.ts
2835
+ /**
2836
+ * Parse a TrackFragmentHeaderBox from an IsoView
2837
+ *
2838
+ * @param view - The IsoView to read data from
2839
+ *
2840
+ * @returns A parsed TrackFragmentHeaderBox
2841
+ *
2842
+ * @public
2843
+ */
2844
+ declare function readTfhd(view: IsoBoxReadView): TrackFragmentHeaderBox;
2845
+ //#endregion
2846
+ //#region src/readers/readTfra.d.ts
2847
+ /**
2848
+ * Parse a TrackFragmentRandomAccessBox from an IsoView
2849
+ *
2850
+ * @param view - The IsoView to read data from
2851
+ *
2852
+ * @returns A parsed TrackFragmentRandomAccessBox
2853
+ *
2854
+ * @public
2855
+ */
2856
+ declare function readTfra(view: IsoBoxReadView): TrackFragmentRandomAccessBox;
2857
+ //#endregion
2858
+ //#region src/readers/readTkhd.d.ts
2859
+ /**
2860
+ * Parse a TrackHeaderBox from an IsoView
2861
+ *
2862
+ * @param view - The IsoView to read data from
2863
+ *
2864
+ * @returns A parsed TrackHeaderBox
2865
+ *
2866
+ * @public
2867
+ */
2868
+ declare function readTkhd(view: IsoBoxReadView): TrackHeaderBox;
2869
+ //#endregion
2870
+ //#region src/readers/readTrex.d.ts
2871
+ /**
2872
+ * Parse a TrackExtendsBox from an IsoView
2873
+ *
2874
+ * @param view - The IsoView to read data from
2875
+ *
2876
+ * @returns A parsed TrackExtendsBox
2877
+ *
2878
+ * @public
2879
+ */
2880
+ declare function readTrex(view: IsoBoxReadView): TrackExtendsBox;
2881
+ //#endregion
2882
+ //#region src/readers/readTrun.d.ts
2883
+ /**
2884
+ * Parse a TrackRunBox from an IsoView
2885
+ *
2886
+ * @param view - The IsoView to read data from
2887
+ *
2888
+ * @returns A parsed TrackRunBox
2889
+ *
2890
+ * @public
2891
+ */
2892
+ declare function readTrun(view: IsoBoxReadView): TrackRunBox;
2893
+ //#endregion
2894
+ //#region src/readers/readUrl.d.ts
2895
+ /**
2896
+ * Parse a UrlBox from an IsoView
2897
+ *
2898
+ * @param view - The IsoView to read data from
2899
+ *
2900
+ * @returns A parsed UrlBox
2901
+ *
2902
+ * @public
2903
+ */
2904
+ declare function readUrl(view: IsoBoxReadView): DataEntryUrlBox;
2905
+ //#endregion
2906
+ //#region src/readers/readUrn.d.ts
2907
+ /**
2908
+ * Parse a UrnBox from an IsoView
2909
+ *
2910
+ * @param view - The IsoView to read data from
2911
+ *
2912
+ * @returns A parsed UrnBox
2913
+ *
2914
+ * @public
2915
+ */
2916
+ declare function readUrn(view: IsoBoxReadView): DataEntryUrnBox;
2917
+ //#endregion
2918
+ //#region src/readers/readVlab.d.ts
1990
2919
  /**
1991
- * Filter boxes by type from an IsoView
1992
- *
1993
- * @param type - The type(s) of boxes to filter
1994
- * @param raw - The raw ISO data
1995
- * @param config - The configuration for the IsoView
2920
+ * Parse a WebVTTSourceLabelBox from an IsoView
1996
2921
  *
1997
- * @returns The filtered boxes
2922
+ * @param view - The IsoView to read data from
1998
2923
  *
2924
+ * @returns A parsed WebVTTSourceLabelBox
1999
2925
  *
2000
- * @beta
2926
+ * @public
2001
2927
  */
2002
- declare function filterBoxesByType<T$1 extends keyof IsoBmffBoxMap>(raw: IsoData, type: T$1 | T$1[], config?: IsoViewConfig): IsoBmffBoxMap[T$1][];
2928
+ declare function readVlab(view: IsoBoxReadView): WebVttSourceLabelBox;
2003
2929
  //#endregion
2004
- //#region src/findBox.d.ts
2930
+ //#region src/readers/readVmhd.d.ts
2005
2931
  /**
2006
- * Find a box from an IsoView that matches a filter function
2007
- *
2008
- * @param raw - The raw ISO data
2009
- * @param config - The configuration for the IsoView
2010
- * @param fn - The filter function
2932
+ * Parse a VideoMediaHeaderBox from an IsoView
2011
2933
  *
2012
- * @returns The first box that matches the filter function
2934
+ * @param view - The IsoView to read data from
2013
2935
  *
2936
+ * @returns A parsed VideoMediaHeaderBox
2014
2937
  *
2015
- * @beta
2938
+ * @public
2016
2939
  */
2017
- declare function findBox<T$1 extends IsoBmffBox = IsoBmffBox>(raw: IsoData | Iterable<IsoBmffBox>, fn: BoxFilter<T$1>, config?: IsoViewConfig): T$1 | null;
2940
+ declare function readVmhd(view: IsoBoxReadView): VideoMediaHeaderBox;
2018
2941
  //#endregion
2019
- //#region src/findBoxByType.d.ts
2942
+ //#region src/readers/readVttC.d.ts
2020
2943
  /**
2021
- * Find a box from an IsoView that matches a given type
2944
+ * Parse a WebVTTConfigurationBox from an IsoView
2022
2945
  *
2023
- * @param type - The type of box to find
2024
- * @param raw - The raw ISO data
2025
- * @param config - The configuration for the IsoView
2946
+ * @param view - The IsoView to read data from
2026
2947
  *
2027
- * @returns The first box that matches the type
2948
+ * @returns A parsed WebVttConfigurationBox
2949
+ *
2950
+ * @public
2951
+ */
2952
+ declare function readVttC(view: IsoBoxReadView): WebVttConfigurationBox;
2953
+ //#endregion
2954
+ //#region src/readers/readVtte.d.ts
2955
+ /**
2956
+ * Parse a WebVTT Empty Sample Box from an IsoView
2028
2957
  *
2958
+ * @returns A parsed WebVTT Empty Sample Box
2029
2959
  *
2030
- * @beta
2960
+ * @public
2031
2961
  */
2032
- declare function findBoxByType<T$1 extends keyof IsoBmffBoxMap>(raw: IsoData, type: T$1, config?: IsoViewConfig): IsoBmffBoxMap[T$1] | null;
2962
+ declare function readVtte(_: IsoBoxReadView): WebVttEmptySampleBox;
2033
2963
  //#endregion
2034
- //#region src/parseBoxes.d.ts
2964
+ //#region src/readIsoBoxes.d.ts
2035
2965
  /**
2036
- * Parse boxes from an IsoView
2966
+ * Reads ISO boxes from a data source.
2037
2967
  *
2038
2968
  * @param raw - The raw ISO data
2039
2969
  * @param config - The configuration for the IsoView
2040
2970
  *
2041
2971
  * @returns The parsed boxes
2042
2972
  *
2973
+ * @example
2974
+ * {@includeCode ../test/readIsoBoxes.test.ts#example}
2043
2975
  *
2044
- * @beta
2976
+ * @public
2045
2977
  */
2046
- declare function parseBoxes(raw: IsoData, config?: IsoViewConfig): IsoBmffBox[];
2978
+ declare function readIsoBoxes<R extends IsoBoxReaderMap>(raw: IsoBoxData, config?: IsoBoxReadViewConfig<R>): IsoBoxReaderReturn<R>[];
2047
2979
  //#endregion
2048
- //#region src/parsers/ardi.d.ts
2980
+ //#region src/traverseIsoBoxes.d.ts
2049
2981
  /**
2050
- * Parse a AudioRenderingIndicationBox from an IsoView
2982
+ * Traverse ISO boxes
2051
2983
  *
2052
- * @param view - The IsoView to read data from
2984
+ * @param boxes - The boxes to traverse
2985
+ * @param depthFirst - Whether to traverse the boxes depth-first or breadth-first
2986
+ * @param maxDepth - The maximum depth to traverse. A value of 0 will only traverse the root boxes.
2053
2987
  *
2054
- * @returns A parsed AudioRenderingIndicationBox
2988
+ * @returns A generator of boxes
2055
2989
  *
2990
+ * @example
2991
+ * {@includeCode ../test/traverseIsoBoxes.test.ts#example}
2056
2992
  *
2057
- * @beta
2993
+ * @public
2058
2994
  */
2059
- declare function ardi(view: IsoView): Fields<AudioRenderingIndicationBox>;
2995
+ declare function traverseIsoBoxes(boxes: Iterable<ParsedBox>, depthFirst?: boolean, maxDepth?: number): Generator<ParsedBox>;
2060
2996
  //#endregion
2061
- //#region src/parsers/avc1.d.ts
2997
+ //#region src/utils/isContainer.d.ts
2062
2998
  /**
2063
- * Parse a VisualSampleEntryBox from an IsoView
2064
- *
2065
- * @param view - The IsoView to read data from
2999
+ * Check if a box is a container
2066
3000
  *
2067
- * @returns A parsed VisualSampleEntryBox
3001
+ * @param box - The box to check
2068
3002
  *
3003
+ * @returns `true` if the box is a container, `false` otherwise
2069
3004
  *
2070
- * @beta
3005
+ * @public
2071
3006
  */
2072
- declare function avc1(view: IsoView): Fields<VisualSampleEntryBox<"avc1">>;
3007
+ declare function isContainer(box: IsoBox | Box): box is IsoBoxContainer;
2073
3008
  //#endregion
2074
- //#region src/parsers/avc2.d.ts
3009
+ //#region src/utils/isFullBox.d.ts
2075
3010
  /**
2076
- * Parse a VisualSampleEntryBox from an IsoView
3011
+ * Check if a box is a full box
2077
3012
  *
2078
- * @param view - The IsoView to read data from
3013
+ * @param box - The box to check
2079
3014
  *
2080
- * @returns A parsed VisualSampleEntryBox
3015
+ * @returns `true` if the box is a full box, `false` otherwise
3016
+ *
3017
+ * @public
3018
+ */
3019
+ declare function isFullBox(box: any): box is FullBox;
3020
+ //#endregion
3021
+ //#region src/writeIsoBox.d.ts
3022
+ /**
3023
+ * Write an ISO box to a Uint8Array.
2081
3024
  *
3025
+ * @param box - The box to write
3026
+ * @param writers - The writers to use
3027
+ * @returns The written box
2082
3028
  *
2083
- * @beta
3029
+ * @public
2084
3030
  */
2085
- declare function avc2(view: IsoView): Fields<VisualSampleEntryBox<"avc2">>;
3031
+ declare function writeIsoBox(box: IsoBoxStreamable, writers: IsoBoxWriterMap): Uint8Array;
2086
3032
  //#endregion
2087
- //#region src/parsers/avc3.d.ts
3033
+ //#region src/writeIsoBoxes.d.ts
2088
3034
  /**
2089
- * Parse a VisualSampleEntryBox from an IsoView
3035
+ * Writes ISO boxes to a readable stream.
2090
3036
  *
2091
- * @param view - The IsoView to read data from
3037
+ * @param boxes - The boxes to write
3038
+ * @param config - The configuration for the readable stream
2092
3039
  *
2093
- * @returns A parsed VisualSampleEntryBox
3040
+ * @returns A readable stream of the written boxes
2094
3041
  *
3042
+ * @example
3043
+ * {@includeCode ../test/writeIsoBoxes.test.ts#example}
2095
3044
  *
2096
- * @beta
3045
+ * @public
2097
3046
  */
2098
- declare function avc3(view: IsoView): Fields<VisualSampleEntryBox<"avc3">>;
3047
+ declare function writeIsoBoxes(boxes: Iterable<IsoBoxStreamable>, config?: IsoBoxReadableStreamConfig): Uint8Array[];
2099
3048
  //#endregion
2100
- //#region src/parsers/avc4.d.ts
3049
+ //#region src/writers/writeArdi.d.ts
2101
3050
  /**
2102
- * Parse a VisualSampleEntryBox from an IsoView
2103
- *
2104
- * @param view - The IsoView to read data from
3051
+ * Write an AudioRenderingIndicationBox to an IsoDataWriter.
2105
3052
  *
2106
- * @returns A parsed VisualSampleEntryBox
3053
+ * @param box - The AudioRenderingIndicationBox fields to write
2107
3054
  *
3055
+ * @returns An IsoDataWriter containing the encoded box
2108
3056
  *
2109
- * @beta
3057
+ * @public
2110
3058
  */
2111
- declare function avc4(view: IsoView): Fields<VisualSampleEntryBox<"avc4">>;
3059
+ declare function writeArdi(box: AudioRenderingIndicationBox): IsoBoxWriteView;
2112
3060
  //#endregion
2113
- //#region src/parsers/ctts.d.ts
3061
+ //#region src/writers/writeAvc1.d.ts
2114
3062
  /**
2115
- * Parse a CompositionTimeToSampleBox from an IsoView
3063
+ * Write a VisualSampleEntryBox to an IsoDataWriter.
2116
3064
  *
2117
- * @param view - The IsoView to read data from
3065
+ * ISO/IEC 14496-12:2012 - 12.1.3 Visual Sample Entry
2118
3066
  *
2119
- * @returns A parsed CompositionTimeToSampleBox
3067
+ * @param box - The VisualSampleEntryBox fields to write
2120
3068
  *
3069
+ * @returns An IsoDataWriter containing the encoded box
2121
3070
  *
2122
- * @beta
3071
+ * @public
2123
3072
  */
2124
- declare function ctts(view: IsoView): Fields<CompositionTimeToSampleBox>;
3073
+ declare function writeAvc1(box: VisualSampleEntryBox<"avc1">): IsoBoxWriteView;
2125
3074
  //#endregion
2126
- //#region src/parsers/dref.d.ts
3075
+ //#region src/writers/writeAvc2.d.ts
2127
3076
  /**
2128
- * Parse a DataReferenceBox from an IsoView
3077
+ * Write a VisualSampleEntryBox (avc2) to an IsoDataWriter.
2129
3078
  *
2130
- * @param view - The IsoView to read data from
2131
- *
2132
- * @returns A parsed DataReferenceBox
3079
+ * @param box - The VisualSampleEntryBox fields to write
2133
3080
  *
3081
+ * @returns An IsoDataWriter containing the encoded box
2134
3082
  *
2135
- * @beta
3083
+ * @public
2136
3084
  */
2137
- declare function dref(view: IsoView): Fields<DataReferenceBox>;
3085
+ declare function writeAvc2(box: VisualSampleEntryBox<"avc2">): IsoBoxWriteView;
2138
3086
  //#endregion
2139
- //#region src/parsers/elng.d.ts
3087
+ //#region src/writers/writeAvc3.d.ts
2140
3088
  /**
2141
- * Parse a ExtendedLanguageBox from an IsoView
3089
+ * Write a VisualSampleEntryBox (avc3) to an IsoDataWriter.
2142
3090
  *
2143
- * @param view - The IsoView to read data from
2144
- *
2145
- * @returns A parsed ExtendedLanguageBox
3091
+ * @param box - The VisualSampleEntryBox fields to write
2146
3092
  *
3093
+ * @returns An IsoDataWriter containing the encoded box
2147
3094
  *
2148
- * @beta
3095
+ * @public
2149
3096
  */
2150
- declare function elng(view: IsoView): Fields<ExtendedLanguageBox>;
3097
+ declare function writeAvc3(box: VisualSampleEntryBox<"avc3">): IsoBoxWriteView;
2151
3098
  //#endregion
2152
- //#region src/parsers/elst.d.ts
3099
+ //#region src/writers/writeAvc4.d.ts
2153
3100
  /**
2154
- * Parse a Box from an IsoView
3101
+ * Write a VisualSampleEntryBox (avc4) to an IsoDataWriter.
2155
3102
  *
2156
- * @param view - The IsoView to read data from
2157
- *
2158
- * @returns A parsed Box
3103
+ * @param box - The VisualSampleEntryBox fields to write
2159
3104
  *
3105
+ * @returns An IsoDataWriter containing the encoded box
2160
3106
  *
2161
- * @beta
3107
+ * @public
2162
3108
  */
2163
- declare function elst(view: IsoView): Fields<EditListBox>;
3109
+ declare function writeAvc4(box: VisualSampleEntryBox<"avc4">): IsoBoxWriteView;
2164
3110
  //#endregion
2165
- //#region src/parsers/emsg.d.ts
3111
+ //#region src/writers/writeCtts.d.ts
2166
3112
  /**
2167
- * Parse an EventMessageBox from an IsoView
3113
+ * Write a CompositionTimeToSampleBox to an IsoDataWriter.
2168
3114
  *
2169
- * @param view - The IsoView to read data from
3115
+ * ISO/IEC 14496-12:2012 - 8.6.1.3 Composition Time to Sample Box
2170
3116
  *
2171
- * @returns A parsed EventMessageBox
3117
+ * @param box - The CompositionTimeToSampleBox fields to write
2172
3118
  *
3119
+ * @returns An IsoDataWriter containing the encoded box
2173
3120
  *
2174
- * @beta
3121
+ * @public
2175
3122
  */
2176
- declare function emsg(view: IsoView): Fields<EventMessageBox>;
3123
+ declare function writeCtts(box: CompositionTimeToSampleBox): IsoBoxWriteView;
2177
3124
  //#endregion
2178
- //#region src/parsers/enca.d.ts
3125
+ //#region src/writers/writeElng.d.ts
2179
3126
  /**
2180
- * Parse an AudioSampleEntry from an IsoView
3127
+ * Write an ExtendedLanguageBox to an IsoDataWriter.
2181
3128
  *
2182
- * @param view - The IsoView to read data from
3129
+ * ISO/IEC 14496-12:2012 - 8.4.6 Extended Language Tag
2183
3130
  *
2184
- * @returns A parsed AudioSampleEntry
3131
+ * @param box - The ExtendedLanguageBox fields to write
2185
3132
  *
3133
+ * @returns An IsoDataWriter containing the encoded box
2186
3134
  *
2187
- * @beta
3135
+ * @public
2188
3136
  */
2189
- declare function enca(view: IsoView): Fields<AudioSampleEntryBox<"enca">>;
3137
+ declare function writeElng(box: ExtendedLanguageBox): IsoBoxWriteView;
2190
3138
  //#endregion
2191
- //#region src/parsers/encv.d.ts
3139
+ //#region src/writers/writeElst.d.ts
2192
3140
  /**
2193
- * Parse a VisualSampleEntryBox from an IsoView
3141
+ * Write an EditListBox to an IsoDataWriter.
2194
3142
  *
2195
- * @param view - The IsoView to read data from
3143
+ * ISO/IEC 14496-12:2012 - 8.6.6 Edit List Box
2196
3144
  *
2197
- * @returns A parsed VisualSampleEntryBox
3145
+ * @param box - The EditListBox fields to write
2198
3146
  *
3147
+ * @returns An IsoDataWriter containing the encoded box
2199
3148
  *
2200
- * @beta
3149
+ * @public
2201
3150
  */
2202
- declare function encv(view: IsoView): Fields<VisualSampleEntryBox<"encv">>;
3151
+ declare function writeElst(box: EditListBox): IsoBoxWriteView;
2203
3152
  //#endregion
2204
- //#region src/parsers/free.d.ts
3153
+ //#region src/writers/writeEmsg.d.ts
2205
3154
  /**
2206
- * Parse a Box from an IsoView
3155
+ * Write an EventMessageBox to an IsoDataWriter.
2207
3156
  *
2208
- * @param view - The IsoView to read data from
3157
+ * ISO/IEC 23009-1 - 5.10.3.3 Event Message Box
2209
3158
  *
2210
- * @returns A parsed Box
3159
+ * @param box - The EventMessageBox fields to write
2211
3160
  *
3161
+ * @returns An IsoDataWriter containing the encoded box
2212
3162
  *
2213
- * @beta
3163
+ * @public
2214
3164
  */
2215
- declare function free(view: IsoView): Fields<FreeSpaceBox>;
3165
+ declare function writeEmsg(box: EventMessageBox): IsoBoxWriteView;
2216
3166
  //#endregion
2217
- //#region src/parsers/frma.d.ts
3167
+ //#region src/writers/writeEnca.d.ts
2218
3168
  /**
2219
- * Parse an OriginalFormatBox from an IsoView
2220
- *
2221
- * @param view - The IsoView to read data from
3169
+ * Write an AudioSampleEntryBox (enca) to an IsoDataWriter.
2222
3170
  *
2223
- * @returns A parsed OriginalFormatBox
3171
+ * @param box - The AudioSampleEntryBox fields to write
2224
3172
  *
3173
+ * @returns An IsoDataWriter containing the encoded box
2225
3174
  *
2226
- * @beta
3175
+ * @public
2227
3176
  */
2228
- declare function frma(view: IsoView): Fields<OriginalFormatBox>;
3177
+ declare function writeEnca(box: AudioSampleEntryBox<"enca">): IsoBoxWriteView;
2229
3178
  //#endregion
2230
- //#region src/parsers/ftyp.d.ts
3179
+ //#region src/writers/writeEncv.d.ts
2231
3180
  /**
2232
- * Parse a FileTypeBox from an IsoView
2233
- *
2234
- * @param view - The IsoView to read data from
3181
+ * Write a VisualSampleEntryBox (encv) to an IsoDataWriter.
2235
3182
  *
2236
- * @returns A parsed FileTypeBox
3183
+ * @param box - The VisualSampleEntryBox fields to write
2237
3184
  *
3185
+ * @returns An IsoDataWriter containing the encoded box
2238
3186
  *
2239
- * @beta
3187
+ * @public
2240
3188
  */
2241
- declare function ftyp(view: IsoView): Fields<FileTypeBox>;
3189
+ declare function writeEncv(box: VisualSampleEntryBox<"encv">): IsoBoxWriteView;
2242
3190
  //#endregion
2243
- //#region src/parsers/hdlr.d.ts
3191
+ //#region src/writers/writeFree.d.ts
2244
3192
  /**
2245
- * Parse a HandlerReferenceBox from an IsoView
3193
+ * Write a FreeSpaceBox to an IsoDataWriter.
2246
3194
  *
2247
- * @param view - The IsoView to read data from
3195
+ * ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box
2248
3196
  *
2249
- * @returns A parsed HandlerReferenceBox
3197
+ * @param box - The FreeSpaceBox fields to write
2250
3198
  *
3199
+ * @returns An IsoDataWriter containing the encoded box
2251
3200
  *
2252
- * @beta
3201
+ * @public
2253
3202
  */
2254
- declare function hdlr(view: IsoView): Fields<HandlerReferenceBox>;
3203
+ declare function writeFree(box: FreeSpaceBox<"free">): IsoBoxWriteView;
2255
3204
  //#endregion
2256
- //#region src/parsers/hev1.d.ts
3205
+ //#region src/writers/writeFrma.d.ts
2257
3206
  /**
2258
- * Parse a VisualSampleEntryBox from an IsoView
3207
+ * Write an OriginalFormatBox to an IsoDataWriter.
2259
3208
  *
2260
- * @param view - The IsoView to read data from
3209
+ * ISO/IEC 14496-12:2012 - 8.12.2 Original Format Box
2261
3210
  *
2262
- * @returns A parsed VisualSampleEntryBox
3211
+ * @param box - The OriginalFormatBox fields to write
2263
3212
  *
3213
+ * @returns An IsoDataWriter containing the encoded box
2264
3214
  *
2265
- * @beta
3215
+ * @public
2266
3216
  */
2267
- declare function hev1(view: IsoView): Fields<VisualSampleEntryBox<"hev1">>;
3217
+ declare function writeFrma(box: OriginalFormatBox): IsoBoxWriteView;
2268
3218
  //#endregion
2269
- //#region src/parsers/hvc1.d.ts
3219
+ //#region src/writers/writeFtyp.d.ts
2270
3220
  /**
2271
- * Parse a VisualSampleEntryBox from an IsoView
3221
+ * Write a FileTypeBox to an IsoDataWriter.
2272
3222
  *
2273
- * @param view - The IsoView to read data from
3223
+ * ISO/IEC 14496-12:2012 - 4.3 File Type Box
2274
3224
  *
2275
- * @returns A parsed VisualSampleEntryBox
3225
+ * @param box - The FileTypeBox fields to write
2276
3226
  *
3227
+ * @returns An IsoDataWriter containing the encoded box
2277
3228
  *
2278
- * @beta
3229
+ * @public
2279
3230
  */
2280
- declare function hvc1(view: IsoView): Fields<VisualSampleEntryBox<"avc1">>;
3231
+ declare function writeFtyp(box: FileTypeBox): IsoBoxWriteView;
2281
3232
  //#endregion
2282
- //#region src/parsers/iden.d.ts
3233
+ //#region src/writers/writeHdlr.d.ts
2283
3234
  /**
2284
- * Parse a WebVTTCueIdBox from an IsoView
3235
+ * Write a HandlerReferenceBox to an IsoDataWriter.
2285
3236
  *
2286
- * @param view - The IsoView to read data from
3237
+ * ISO/IEC 14496-12:2012 - 8.4.3 Handler Reference Box
2287
3238
  *
2288
- * @returns A parsed WebVTTCueIdBox
3239
+ * @param box - The HandlerReferenceBox fields to write
2289
3240
  *
3241
+ * @returns An IsoDataWriter containing the encoded box
2290
3242
  *
2291
- * @beta
3243
+ * @public
2292
3244
  */
2293
- declare function iden(view: IsoView): Fields<WebVttCueIdBox>;
3245
+ declare function writeHdlr(box: HandlerReferenceBox): IsoBoxWriteView;
2294
3246
  //#endregion
2295
- //#region src/parsers/imda.d.ts
3247
+ //#region src/writers/writeHev1.d.ts
2296
3248
  /**
2297
- * Parse a IdentifiedMediaDataBox from an IsoView
2298
- *
2299
- * @param view - The IsoView to read data from
3249
+ * Write a VisualSampleEntryBox (hev1) to an IsoDataWriter.
2300
3250
  *
2301
- * @returns A parsed IdentifiedMediaDataBox
3251
+ * @param box - The VisualSampleEntryBox fields to write
2302
3252
  *
3253
+ * @returns An IsoDataWriter containing the encoded box
2303
3254
  *
2304
- * @beta
3255
+ * @public
2305
3256
  */
2306
- declare function imda(view: IsoView): Fields<IdentifiedMediaDataBox>;
3257
+ declare function writeHev1(box: VisualSampleEntryBox<"hev1">): IsoBoxWriteView;
2307
3258
  //#endregion
2308
- //#region src/parsers/kind.d.ts
3259
+ //#region src/writers/writeHvc1.d.ts
2309
3260
  /**
2310
- * Parse a TrackKinBox from an IsoView
2311
- *
2312
- * @param view - The IsoView to read data from
3261
+ * Write a VisualSampleEntryBox (hvc1) to an IsoDataWriter.
2313
3262
  *
2314
- * @returns A parsed TrackKindBox
3263
+ * @param box - The VisualSampleEntryBox fields to write
2315
3264
  *
3265
+ * @returns An IsoDataWriter containing the encoded box
2316
3266
  *
2317
- * @beta
3267
+ * @public
2318
3268
  */
2319
- declare function kind(view: IsoView): Fields<TrackKindBox>;
3269
+ declare function writeHvc1(box: VisualSampleEntryBox<"hvc1">): IsoBoxWriteView;
2320
3270
  //#endregion
2321
- //#region src/parsers/labl.d.ts
3271
+ //#region src/writers/writeIden.d.ts
2322
3272
  /**
2323
- * Parse a LabelBox from an IsoView
3273
+ * Write a WebVttCueIdBox to an IsoDataWriter.
2324
3274
  *
2325
- * @param view - The IsoView to read data from
3275
+ * @param box - The WebVttCueIdBox fields to write
2326
3276
  *
2327
- * @returns A parsed LabelBox
3277
+ * @returns An IsoDataWriter containing the encoded box
3278
+ *
3279
+ * @public
3280
+ */
3281
+ declare function writeIden(box: WebVttCueIdBox): IsoBoxWriteView;
3282
+ //#endregion
3283
+ //#region src/writers/writeImda.d.ts
3284
+ /**
3285
+ * Write an IdentifiedMediaDataBox to an IsoDataWriter.
3286
+ *
3287
+ * @param box - The IdentifiedMediaDataBox fields to write
2328
3288
  *
3289
+ * @returns An IsoDataWriter containing the encoded box
2329
3290
  *
2330
- * @beta
3291
+ * @public
2331
3292
  */
2332
- declare function labl(view: IsoView): Fields<LabelBox>;
3293
+ declare function writeImda(box: IdentifiedMediaDataBox): IsoBoxWriteView;
2333
3294
  //#endregion
2334
- //#region src/parsers/mdat.d.ts
3295
+ //#region src/writers/writeKind.d.ts
2335
3296
  /**
2336
- * Parse a MediaDataBox from an IsoView
3297
+ * Write a TrackKindBox to an IsoDataWriter.
2337
3298
  *
2338
- * @param view - The IsoView to read data from
3299
+ * @param box - The TrackKindBox fields to write
2339
3300
  *
2340
- * @returns A parsed MediaDataBox
3301
+ * @returns An IsoDataWriter containing the encoded box
3302
+ *
3303
+ * @public
3304
+ */
3305
+ declare function writeKind(box: TrackKindBox): IsoBoxWriteView;
3306
+ //#endregion
3307
+ //#region src/writers/writeLabl.d.ts
3308
+ /**
3309
+ * Write a LabelBox to an IsoDataWriter.
3310
+ *
3311
+ * @param box - The LabelBox fields to write
2341
3312
  *
3313
+ * @returns An IsoDataWriter containing the encoded box
2342
3314
  *
2343
- * @beta
3315
+ * @public
2344
3316
  */
2345
- declare function mdat(view: IsoView): Fields<MediaDataBox>;
3317
+ declare function writeLabl(box: LabelBox): IsoBoxWriteView;
2346
3318
  //#endregion
2347
- //#region src/parsers/mdhd.d.ts
3319
+ //#region src/writers/writeMdat.d.ts
2348
3320
  /**
2349
- * Parse a MediaHeaderBox from an IsoView
3321
+ * Write a MediaDataBox to an IsoDataWriter.
2350
3322
  *
2351
- * @param view - The IsoView to read data from
3323
+ * ISO/IEC 14496-12:2012 - 8.1.1 Media Data Box
2352
3324
  *
2353
- * @returns A parsed MediaHeaderBox
3325
+ * @param box - The MediaDataBox fields to write
2354
3326
  *
3327
+ * @returns An IsoDataWriter containing the encoded box
2355
3328
  *
2356
- * @beta
3329
+ * @public
2357
3330
  */
2358
- declare function mdhd(view: IsoView): Fields<MediaHeaderBox>;
3331
+ declare function writeMdat(box: MediaDataBox): IsoBoxWriteView;
2359
3332
  //#endregion
2360
- //#region src/parsers/mehd.d.ts
3333
+ //#region src/writers/writeMdhd.d.ts
2361
3334
  /**
2362
- * Parse a MovieExtendsHeaderBox from an IsoView
3335
+ * Write a MediaHeaderBox to an IsoDataWriter.
2363
3336
  *
2364
- * @param view - The IsoView to read data from
3337
+ * ISO/IEC 14496-12:2012 - 8.4.2 Media Header Box
2365
3338
  *
2366
- * @returns A parsed MovieExtendsHeaderBox
3339
+ * @param box - The MediaHeaderBox fields to write
2367
3340
  *
3341
+ * @returns An IsoDataWriter containing the encoded box
2368
3342
  *
2369
- * @beta
3343
+ * @public
2370
3344
  */
2371
- declare function mehd(view: IsoView): Fields<MovieExtendsHeaderBox>;
3345
+ declare function writeMdhd(box: MediaHeaderBox): IsoBoxWriteView;
2372
3346
  //#endregion
2373
- //#region src/parsers/meta.d.ts
3347
+ //#region src/writers/writeMehd.d.ts
2374
3348
  /**
2375
- * Parse a MetaBox from an IsoView
3349
+ * Write a MovieExtendsHeaderBox to an IsoDataWriter.
2376
3350
  *
2377
- * @param view - The IsoView to read data from
3351
+ * ISO/IEC 14496-12:2012 - 8.8.2 Movie Extends Header Box
2378
3352
  *
2379
- * @returns A parsed MetaBox
3353
+ * @param box - The MovieExtendsHeaderBox fields to write
2380
3354
  *
3355
+ * @returns An IsoDataWriter containing the encoded box
2381
3356
  *
2382
- * @beta
3357
+ * @public
2383
3358
  */
2384
- declare function meta(view: IsoView): Fields<MetaBox>;
3359
+ declare function writeMehd(box: MovieExtendsHeaderBox): IsoBoxWriteView;
2385
3360
  //#endregion
2386
- //#region src/parsers/mfhd.d.ts
3361
+ //#region src/writers/writeMeta.d.ts
2387
3362
  /**
2388
- * Parse a MovieFragmentHeaderBox from an IsoView
3363
+ * Write a MetaBox to an IsoDataWriter.
2389
3364
  *
2390
- * @param view - The IsoView to read data from
3365
+ * ISO/IEC 14496-12:2012 - 8.11.1 Meta Box
2391
3366
  *
2392
- * @returns A parsed MovieFragmentHeaderBox
3367
+ * @param box - The MetaBox fields to write
2393
3368
  *
3369
+ * @returns An IsoDataWriter containing the encoded box
2394
3370
  *
2395
- * @beta
3371
+ * @public
2396
3372
  */
2397
- declare function mfhd(view: IsoView): Fields<MovieFragmentHeaderBox>;
3373
+ declare function writeMeta(box: MetaBox): IsoBoxWriteView;
2398
3374
  //#endregion
2399
- //#region src/parsers/mfro.d.ts
3375
+ //#region src/writers/writeMfhd.d.ts
2400
3376
  /**
2401
- * Parse a MovieFragmentRandomAccessBox from an IsoView
3377
+ * Write a MovieFragmentHeaderBox to an IsoDataWriter.
2402
3378
  *
2403
- * @param view - The IsoView to read data from
3379
+ * ISO/IEC 14496-12:2012 - 8.8.5 Movie Fragment Header Box
2404
3380
  *
2405
- * @returns A parsed MovieFragmentRandomAccessBox
3381
+ * @param box - The MovieFragmentHeaderBox fields to write
2406
3382
  *
3383
+ * @returns An IsoDataWriter containing the encoded box
2407
3384
  *
2408
- * @beta
3385
+ * @public
2409
3386
  */
2410
- declare function mfro(view: IsoView): Fields<MovieFragmentRandomAccessOffsetBox>;
3387
+ declare function writeMfhd(box: MovieFragmentHeaderBox): IsoBoxWriteView;
2411
3388
  //#endregion
2412
- //#region src/parsers/mp4a.d.ts
3389
+ //#region src/writers/writeMfro.d.ts
2413
3390
  /**
2414
- * Parse an AudioSampleEntry from an IsoView
3391
+ * Write a MovieFragmentRandomAccessOffsetBox to an IsoDataWriter.
2415
3392
  *
2416
- * @param view - The IsoView to read data from
3393
+ * ISO/IEC 14496-12:2012 - 8.8.11 Movie Fragment Random Access Offset Box
2417
3394
  *
2418
- * @returns A parsed AudioSampleEntry
3395
+ * @param box - The MovieFragmentRandomAccessOffsetBox fields to write
2419
3396
  *
3397
+ * @returns An IsoDataWriter containing the encoded box
2420
3398
  *
2421
- * @beta
3399
+ * @public
2422
3400
  */
2423
- declare function mp4a(view: IsoView): Fields<AudioSampleEntryBox<"mp4a">>;
3401
+ declare function writeMfro(box: MovieFragmentRandomAccessOffsetBox): IsoBoxWriteView;
2424
3402
  //#endregion
2425
- //#region src/parsers/mvhd.d.ts
3403
+ //#region src/writers/writeMp4a.d.ts
2426
3404
  /**
2427
- * Parse a Box from an IsoView
3405
+ * Write an AudioSampleEntryBox to an IsoDataWriter.
2428
3406
  *
2429
- * @param view - The IsoView to read data from
3407
+ * ISO/IEC 14496-12:2012 - 12.2.3 Audio Sample Entry
2430
3408
  *
2431
- * @returns A parsed Box
3409
+ * @param box - The AudioSampleEntryBox fields to write
2432
3410
  *
3411
+ * @returns An IsoDataWriter containing the encoded box
2433
3412
  *
2434
- * @beta
3413
+ * @public
2435
3414
  */
2436
- declare function mvhd(view: IsoView): Fields<MovieHeaderBox>;
3415
+ declare function writeMp4a(box: AudioSampleEntryBox<"mp4a">): IsoBoxWriteView;
2437
3416
  //#endregion
2438
- //#region src/parsers/payl.d.ts
3417
+ //#region src/writers/writeMvhd.d.ts
2439
3418
  /**
2440
- * Parse a WebVTTCuePayloadBox from an IsoView
3419
+ * Write a MovieHeaderBox to an IsoDataWriter.
2441
3420
  *
2442
- * @param view - The IsoView to read data from
3421
+ * ISO/IEC 14496-12:2012 - 8.2.2 Movie Header Box
2443
3422
  *
2444
- * @returns A parsed WebVTTCuePayloadBox
3423
+ * @param box - The MovieHeaderBox fields to write
2445
3424
  *
3425
+ * @returns An IsoDataWriter containing the encoded box
2446
3426
  *
2447
- * @beta
3427
+ * @public
2448
3428
  */
2449
- declare function payl(view: IsoView): Fields<WebVttCuePayloadBox>;
3429
+ declare function writeMvhd(box: MovieHeaderBox): IsoBoxWriteView;
2450
3430
  //#endregion
2451
- //#region src/parsers/prft.d.ts
3431
+ //#region src/writers/writePayl.d.ts
2452
3432
  /**
2453
- * Parse a ProducerReferenceTimeBox from an IsoView
2454
- *
2455
- * @param view - The IsoView to read data from
3433
+ * Write a WebVttCuePayloadBox to an IsoDataWriter.
2456
3434
  *
2457
- * @returns A parsed ProducerReferenceTimeBox
3435
+ * @param box - The WebVttCuePayloadBox fields to write
2458
3436
  *
3437
+ * @returns An IsoDataWriter containing the encoded box
2459
3438
  *
2460
- * @beta
3439
+ * @public
2461
3440
  */
2462
- declare function prft(view: IsoView): Fields<ProducerReferenceTimeBox>;
3441
+ declare function writePayl(box: WebVttCuePayloadBox): IsoBoxWriteView;
2463
3442
  //#endregion
2464
- //#region src/parsers/prsl.d.ts
3443
+ //#region src/writers/writePrft.d.ts
2465
3444
  /**
2466
- * Parse a PreselectionGroupBox from an IsoView
3445
+ * Write a ProducerReferenceTimeBox to an IsoDataWriter.
2467
3446
  *
2468
- * @param view - The IsoView to read data from
3447
+ * ISO/IEC 14496-12:2012 - 8.16.5 Producer Reference Time Box
2469
3448
  *
2470
- * @returns A parsed PreselectionGroupBox
3449
+ * @param box - The ProducerReferenceTimeBox fields to write
2471
3450
  *
3451
+ * @returns An IsoDataWriter containing the encoded box
2472
3452
  *
2473
- * @beta
3453
+ * @public
2474
3454
  */
2475
- declare function prsl(view: IsoView): Fields<PreselectionGroupBox>;
3455
+ declare function writePrft(box: ProducerReferenceTimeBox): IsoBoxWriteView;
2476
3456
  //#endregion
2477
- //#region src/parsers/pssh.d.ts
3457
+ //#region src/writers/writePrsl.d.ts
2478
3458
  /**
2479
- * Parse a ProtectionSystemSpecificHeaderBox from an IsoView
2480
- *
2481
- * @param view - The IsoView to read data from
3459
+ * Write a PreselectionGroupBox to an IsoDataWriter.
2482
3460
  *
2483
- * @returns A parsed ProtectionSystemSpecificHeaderBox
3461
+ * @param box - The PreselectionGroupBox fields to write
2484
3462
  *
3463
+ * @returns An IsoDataWriter containing the encoded box
2485
3464
  *
2486
- * @beta
3465
+ * @public
2487
3466
  */
2488
- declare function pssh(view: IsoView): Fields<ProtectionSystemSpecificHeaderBox>;
3467
+ declare function writePrsl(box: PreselectionGroupBox): IsoBoxWriteView;
2489
3468
  //#endregion
2490
- //#region src/parsers/schm.d.ts
3469
+ //#region src/writers/writePssh.d.ts
2491
3470
  /**
2492
- * Parse a SchemeTypeBox from an IsoView
3471
+ * Write a ProtectionSystemSpecificHeaderBox to an IsoDataWriter.
2493
3472
  *
2494
- * @param view - The IsoView to read data from
3473
+ * ISO/IEC 23001-7 - 8.1 Protection System Specific Header Box
2495
3474
  *
2496
- * @returns A parsed SchemeTypeBox
3475
+ * @param box - The ProtectionSystemSpecificHeaderBox fields to write
2497
3476
  *
3477
+ * @returns An IsoDataWriter containing the encoded box
2498
3478
  *
2499
- * @beta
3479
+ * @public
2500
3480
  */
2501
- declare function schm(view: IsoView): Fields<SchemeTypeBox>;
3481
+ declare function writePssh(box: ProtectionSystemSpecificHeaderBox): IsoBoxWriteView;
2502
3482
  //#endregion
2503
- //#region src/parsers/sdtp.d.ts
3483
+ //#region src/writers/writeSchm.d.ts
2504
3484
  /**
2505
- * Parse a SampleDependencyTypeBox from an IsoView
3485
+ * Write a SchemeTypeBox to an IsoDataWriter.
2506
3486
  *
2507
- * @param view - The IsoView to read data from
3487
+ * ISO/IEC 14496-12:2012 - 8.12.5 Scheme Type Box
2508
3488
  *
2509
- * @returns A parsed SampleDependencyTypeBox
3489
+ * @param box - The SchemeTypeBox fields to write
2510
3490
  *
3491
+ * @returns An IsoDataWriter containing the encoded box
2511
3492
  *
2512
- * @beta
3493
+ * @public
2513
3494
  */
2514
- declare function sdtp(view: IsoView): Fields<SampleDependencyTypeBox>;
3495
+ declare function writeSchm(box: SchemeTypeBox): IsoBoxWriteView;
2515
3496
  //#endregion
2516
- //#region src/parsers/sidx.d.ts
3497
+ //#region src/writers/writeSdtp.d.ts
2517
3498
  /**
2518
- * Parse a SegmentIndexBox from an IsoView
3499
+ * Write a SampleDependencyTypeBox to an IsoDataWriter.
2519
3500
  *
2520
- * @param view - The IsoView to read data from
3501
+ * ISO/IEC 14496-12:2012 - 8.6.4 Independent and Disposable Samples Box
2521
3502
  *
2522
- * @returns A parsed SegmentIndexBox
3503
+ * @param box - The SampleDependencyTypeBox fields to write
2523
3504
  *
3505
+ * @returns An IsoDataWriter containing the encoded box
2524
3506
  *
2525
- * @beta
3507
+ * @public
2526
3508
  */
2527
- declare function sidx(view: IsoView): Fields<SegmentIndexBox>;
3509
+ declare function writeSdtp(box: SampleDependencyTypeBox): IsoBoxWriteView;
2528
3510
  //#endregion
2529
- //#region src/parsers/skip.d.ts
3511
+ //#region src/writers/writeSidx.d.ts
2530
3512
  /**
2531
- * Parse a FreeSpaceBox from an IsoView
3513
+ * Write a SegmentIndexBox to an IsoDataWriter.
2532
3514
  *
2533
- * @param view - The IsoView to read data from
3515
+ * ISO/IEC 14496-12:2012 - 8.16.3 Segment Index Box
2534
3516
  *
2535
- * @returns A parsed FreeSpaceBox
3517
+ * @param box - The SegmentIndexBox fields to write
2536
3518
  *
3519
+ * @returns An IsoDataWriter containing the encoded box
2537
3520
  *
2538
- * @beta
3521
+ * @public
2539
3522
  */
2540
- declare function skip(view: IsoView): Fields<FreeSpaceBox<"skip">>;
3523
+ declare function writeSidx(box: SegmentIndexBox): IsoBoxWriteView;
2541
3524
  //#endregion
2542
- //#region src/parsers/smhd.d.ts
3525
+ //#region src/writers/writeSkip.d.ts
2543
3526
  /**
2544
- * Parse a SoundMediaHeaderBox from an IsoView
3527
+ * Write a FreeSpaceBox (skip variant) to an IsoDataWriter.
2545
3528
  *
2546
- * @param view - The IsoView to read data from
3529
+ * ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box
2547
3530
  *
2548
- * @returns A parsed SoundMediaHeaderBox
3531
+ * @param box - The FreeSpaceBox fields to write
2549
3532
  *
3533
+ * @returns An IsoDataWriter containing the encoded box
2550
3534
  *
2551
- * @beta
3535
+ * @public
2552
3536
  */
2553
- declare function smhd(view: IsoView): Fields<SoundMediaHeaderBox>;
3537
+ declare function writeSkip(box: FreeSpaceBox<"skip">): IsoBoxWriteView;
2554
3538
  //#endregion
2555
- //#region src/parsers/ssix.d.ts
3539
+ //#region src/writers/writeSmhd.d.ts
2556
3540
  /**
2557
- * Parse a SubsegmentIndexBox from an IsoView
3541
+ * Write a SoundMediaHeaderBox to an IsoDataWriter.
2558
3542
  *
2559
- * @param view - The IsoView to read data from
3543
+ * ISO/IEC 14496-12:2012 - 12.2.2 Sound Media Header Box
2560
3544
  *
2561
- * @returns A parsed SubsegmentIndexBox
3545
+ * @param box - The SoundMediaHeaderBox fields to write
2562
3546
  *
3547
+ * @returns An IsoDataWriter containing the encoded box
2563
3548
  *
2564
- * @beta
3549
+ * @public
2565
3550
  */
2566
- declare function ssix(view: IsoView): Fields<SubsegmentIndexBox>;
3551
+ declare function writeSmhd(box: SoundMediaHeaderBox): IsoBoxWriteView;
2567
3552
  //#endregion
2568
- //#region src/parsers/sthd.d.ts
3553
+ //#region src/writers/writeSsix.d.ts
2569
3554
  /**
2570
- * Parse a SubtitleMediaHeaderBox from an IsoView
3555
+ * Write a SubsegmentIndexBox to an IsoDataWriter.
2571
3556
  *
2572
- * @param view - The IsoView to read data from
3557
+ * ISO/IEC 14496-12:2012 - 8.16.4 Subsegment Index Box
2573
3558
  *
2574
- * @returns A parsed SubtitleMediaHeaderBox
3559
+ * @param box - The SubsegmentIndexBox fields to write
2575
3560
  *
3561
+ * @returns An IsoDataWriter containing the encoded box
2576
3562
  *
2577
- * @beta
3563
+ * @public
2578
3564
  */
2579
- declare function sthd(view: IsoView): Fields<SubtitleMediaHeaderBox>;
3565
+ declare function writeSsix(box: SubsegmentIndexBox): IsoBoxWriteView;
2580
3566
  //#endregion
2581
- //#region src/parsers/stsd.d.ts
3567
+ //#region src/writers/writeSthd.d.ts
2582
3568
  /**
2583
- * Parse a SampleDescriptionBox from an IsoView
3569
+ * Write a SubtitleMediaHeaderBox to an IsoDataWriter.
2584
3570
  *
2585
- * @param view - The IsoView to read data from
3571
+ * ISO/IEC 14496-12:2012 - 12.6.2 Subtitle Media Header Box
2586
3572
  *
2587
- * @returns A parsed SampleDescriptionBox
3573
+ * @param box - The SubtitleMediaHeaderBox fields to write
2588
3574
  *
3575
+ * @returns An IsoDataWriter containing the encoded box
2589
3576
  *
2590
- * @beta
3577
+ * @public
2591
3578
  */
2592
- declare function stsd<E extends SampleEntryBox = SampleEntryBox>(view: IsoView): Fields<SampleDescriptionBox<E>>;
3579
+ declare function writeSthd(box: SubtitleMediaHeaderBox): IsoBoxWriteView;
2593
3580
  //#endregion
2594
- //#region src/parsers/stss.d.ts
3581
+ //#region src/writers/writeStss.d.ts
2595
3582
  /**
2596
- * Parse a SyncSampleBox from an IsoView
3583
+ * Write a SyncSampleBox to an IsoDataWriter.
2597
3584
  *
2598
- * @param view - The IsoView to read data from
3585
+ * ISO/IEC 14496-12:2012 - 8.6.2 Sync Sample Box
2599
3586
  *
2600
- * @returns A parsed SyncSampleBox
3587
+ * @param box - The SyncSampleBox fields to write
2601
3588
  *
3589
+ * @returns An IsoDataWriter containing the encoded box
2602
3590
  *
2603
- * @beta
3591
+ * @public
2604
3592
  */
2605
- declare function stss(view: IsoView): Fields<SyncSampleBox>;
3593
+ declare function writeStss(box: SyncSampleBox): IsoBoxWriteView;
2606
3594
  //#endregion
2607
- //#region src/parsers/sttg.d.ts
3595
+ //#region src/writers/writeSttg.d.ts
2608
3596
  /**
2609
- * Parse a WebVTTSettingsBox from an IsoView
3597
+ * Write a WebVttSettingsBox to an IsoDataWriter.
2610
3598
  *
2611
- * @param view - The IsoView to read data from
2612
- *
2613
- * @returns A parsed WebVTTSettingsBox
3599
+ * @param box - The WebVttSettingsBox fields to write
2614
3600
  *
3601
+ * @returns An IsoDataWriter containing the encoded box
2615
3602
  *
2616
- * @beta
3603
+ * @public
2617
3604
  */
2618
- declare function sttg(view: IsoView): Fields<WebVttSettingsBox>;
3605
+ declare function writeSttg(box: WebVttSettingsBox): IsoBoxWriteView;
2619
3606
  //#endregion
2620
- //#region src/parsers/stts.d.ts
3607
+ //#region src/writers/writeStts.d.ts
2621
3608
  /**
2622
- * Parse a DecodingTimeToSampleBox from an IsoView
3609
+ * Write a DecodingTimeToSampleBox to an IsoDataWriter.
2623
3610
  *
2624
- * @param view - The IsoView to read data from
3611
+ * ISO/IEC 14496-12:2012 - 8.6.1.2 Decoding Time to Sample Box
2625
3612
  *
2626
- * @returns A parsed DecodingTimeToSampleBox
3613
+ * @param box - The DecodingTimeToSampleBox fields to write
2627
3614
  *
3615
+ * @returns An IsoDataWriter containing the encoded box
2628
3616
  *
2629
- * @beta
3617
+ * @public
2630
3618
  */
2631
- declare function stts(view: IsoView): Fields<DecodingTimeToSampleBox>;
3619
+ declare function writeStts(box: DecodingTimeToSampleBox): IsoBoxWriteView;
2632
3620
  //#endregion
2633
- //#region src/parsers/styp.d.ts
3621
+ //#region src/writers/writeStyp.d.ts
2634
3622
  /**
2635
- * Parse a SegmentTypeBox from an IsoView
3623
+ * Write a SegmentTypeBox to an IsoDataWriter.
2636
3624
  *
2637
- * @param view - The IsoView to read data from
3625
+ * ISO/IEC 14496-12:2012 - 8.16.2 Segment Type Box
2638
3626
  *
2639
- * @returns A parsed SegmentTypeBox
3627
+ * @param box - The SegmentTypeBox fields to write
2640
3628
  *
3629
+ * @returns An IsoDataWriter containing the encoded box
2641
3630
  *
2642
- * @beta
3631
+ * @public
2643
3632
  */
2644
- declare function styp(view: IsoView): Fields<SegmentTypeBox>;
3633
+ declare function writeStyp(box: SegmentTypeBox): IsoBoxWriteView;
2645
3634
  //#endregion
2646
- //#region src/parsers/subs.d.ts
3635
+ //#region src/writers/writeSubs.d.ts
2647
3636
  /**
2648
- * Parse a SubSampleInformationBox from an IsoView
3637
+ * Write a SubsampleInformationBox to an IsoDataWriter.
2649
3638
  *
2650
- * @param view - The IsoView to read data from
3639
+ * ISO/IEC 14496-12:2012 - 8.7.7 Sub-Sample Information Box
2651
3640
  *
2652
- * @returns A parsed SubSampleInformationBox
3641
+ * @param box - The SubsampleInformationBox fields to write
2653
3642
  *
3643
+ * @returns An IsoDataWriter containing the encoded box
2654
3644
  *
2655
- * @beta
3645
+ * @public
2656
3646
  */
2657
- declare function subs(view: IsoView): Fields<SubsampleInformationBox>;
3647
+ declare function writeSubs(box: SubsampleInformationBox): IsoBoxWriteView;
2658
3648
  //#endregion
2659
- //#region src/parsers/tenc.d.ts
3649
+ //#region src/writers/writeTenc.d.ts
2660
3650
  /**
2661
- * Parse a TrackEncryptionBox from an IsoView
3651
+ * Write a TrackEncryptionBox to an IsoDataWriter.
2662
3652
  *
2663
- * @param view - The IsoView to read data from
3653
+ * ISO/IEC 23001-7 - 8.2 Track Encryption Box
2664
3654
  *
2665
- * @returns A parsed TrackEncryptionBox
3655
+ * @param box - The TrackEncryptionBox fields to write
2666
3656
  *
3657
+ * @returns An IsoDataWriter containing the encoded box
2667
3658
  *
2668
- * @beta
3659
+ * @public
2669
3660
  */
2670
- declare function tenc(view: IsoView): Fields<TrackEncryptionBox>;
3661
+ declare function writeTenc(box: TrackEncryptionBox): IsoBoxWriteView;
2671
3662
  //#endregion
2672
- //#region src/parsers/tfdt.d.ts
3663
+ //#region src/writers/writeTfdt.d.ts
2673
3664
  /**
2674
- * Parse a TrackFragmentDecodeTimeBox from an IsoView
3665
+ * Write a TrackFragmentBaseMediaDecodeTimeBox to an IsoDataWriter.
2675
3666
  *
2676
- * @param view - The IsoView to read data from
3667
+ * ISO/IEC 14496-12:2012 - 8.8.12 Track Fragment Base Media Decode Time Box
2677
3668
  *
2678
- * @returns A parsed TrackFragmentDecodeTimeBox
3669
+ * @param box - The TrackFragmentBaseMediaDecodeTimeBox fields to write
2679
3670
  *
3671
+ * @returns An IsoDataWriter containing the encoded box
2680
3672
  *
2681
- * @beta
3673
+ * @public
2682
3674
  */
2683
- declare function tfdt(view: IsoView): Fields<TrackFragmentBaseMediaDecodeTimeBox>;
3675
+ declare function writeTfdt(box: TrackFragmentBaseMediaDecodeTimeBox): IsoBoxWriteView;
2684
3676
  //#endregion
2685
- //#region src/parsers/tfhd.d.ts
3677
+ //#region src/writers/writeTfhd.d.ts
2686
3678
  /**
2687
- * Parse a TrackFragmentHeaderBox from an IsoView
3679
+ * Write a TrackFragmentHeaderBox to an IsoDataWriter.
2688
3680
  *
2689
- * @param view - The IsoView to read data from
3681
+ * ISO/IEC 14496-12:2012 - 8.8.7 Track Fragment Header Box
2690
3682
  *
2691
- * @returns A parsed TrackFragmentHeaderBox
3683
+ * @param box - The TrackFragmentHeaderBox fields to write
2692
3684
  *
3685
+ * @returns An IsoDataWriter containing the encoded box
2693
3686
  *
2694
- * @beta
3687
+ * @public
2695
3688
  */
2696
- declare function tfhd(view: IsoView): Fields<TrackFragmentHeaderBox>;
3689
+ declare function writeTfhd(box: TrackFragmentHeaderBox): IsoBoxWriteView;
2697
3690
  //#endregion
2698
- //#region src/parsers/tfra.d.ts
3691
+ //#region src/writers/writeTfra.d.ts
2699
3692
  /**
2700
- * Parse a TrackFragmentRandomAccessBox from an IsoView
3693
+ * Write a TrackFragmentRandomAccessBox to an IsoDataWriter.
2701
3694
  *
2702
- * @param view - The IsoView to read data from
3695
+ * ISO/IEC 14496-12:2012 - 8.8.10 Track Fragment Random Access Box
2703
3696
  *
2704
- * @returns A parsed TrackFragmentRandomAccessBox
3697
+ * @param box - The TrackFragmentRandomAccessBox fields to write
2705
3698
  *
3699
+ * @returns An IsoDataWriter containing the encoded box
2706
3700
  *
2707
- * @beta
3701
+ * @public
2708
3702
  */
2709
- declare function tfra(view: IsoView): Fields<TrackFragmentRandomAccessBox>;
3703
+ declare function writeTfra(box: TrackFragmentRandomAccessBox): IsoBoxWriteView;
2710
3704
  //#endregion
2711
- //#region src/parsers/tkhd.d.ts
3705
+ //#region src/writers/writeTkhd.d.ts
2712
3706
  /**
2713
- * Parse a TrackHeaderBox from an IsoView
3707
+ * Write a TrackHeaderBox to an IsoDataWriter.
2714
3708
  *
2715
- * @param view - The IsoView to read data from
3709
+ * ISO/IEC 14496-12:2012 - 8.3.2 Track Header Box
2716
3710
  *
2717
- * @returns A parsed TrackHeaderBox
3711
+ * @param box - The TrackHeaderBox fields to write
2718
3712
  *
3713
+ * @returns An IsoDataWriter containing the encoded box
2719
3714
  *
2720
- * @beta
3715
+ * @public
2721
3716
  */
2722
- declare function tkhd(view: IsoView): Fields<TrackHeaderBox>;
3717
+ declare function writeTkhd(box: TrackHeaderBox): IsoBoxWriteView;
2723
3718
  //#endregion
2724
- //#region src/parsers/trex.d.ts
3719
+ //#region src/writers/writeTrex.d.ts
2725
3720
  /**
2726
- * Parse a TrackExtendsBox from an IsoView
3721
+ * Write a TrackExtendsBox to an IsoDataWriter.
2727
3722
  *
2728
- * @param view - The IsoView to read data from
3723
+ * ISO/IEC 14496-12:2012 - 8.8.3 Track Extends Box
2729
3724
  *
2730
- * @returns A parsed TrackExtendsBox
3725
+ * @param box - The TrackExtendsBox fields to write
2731
3726
  *
3727
+ * @returns An IsoDataWriter containing the encoded box
2732
3728
  *
2733
- * @beta
3729
+ * @public
2734
3730
  */
2735
- declare function trex(view: IsoView): Fields<TrackExtendsBox>;
3731
+ declare function writeTrex(box: TrackExtendsBox): IsoBoxWriteView;
2736
3732
  //#endregion
2737
- //#region src/parsers/trun.d.ts
3733
+ //#region src/writers/writeTrun.d.ts
2738
3734
  /**
2739
- * Parse a TrackRunBox from an IsoView
3735
+ * Write a TrackRunBox to an IsoDataWriter.
2740
3736
  *
2741
- * @param view - The IsoView to read data from
3737
+ * ISO/IEC 14496-12:2012 - 8.8.8 Track Run Box
2742
3738
  *
2743
- * @returns A parsed TrackRunBox
3739
+ * @param box - The TrackRunBox fields to write
2744
3740
  *
3741
+ * @returns An IsoDataWriter containing the encoded box
2745
3742
  *
2746
- * @beta
3743
+ * @public
2747
3744
  */
2748
- declare function trun(view: IsoView): Fields<TrackRunBox>;
3745
+ declare function writeTrun(box: TrackRunBox): IsoBoxWriteView;
2749
3746
  //#endregion
2750
- //#region src/parsers/url.d.ts
3747
+ //#region src/writers/writeUrl.d.ts
2751
3748
  /**
2752
- * Parse a UrlBox from an IsoView
3749
+ * Write a UrlBox to an IsoDataWriter.
2753
3750
  *
2754
- * @param view - The IsoView to read data from
3751
+ * ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box
2755
3752
  *
2756
- * @returns A parsed UrlBox
3753
+ * @param box - The UrlBox fields to write
2757
3754
  *
3755
+ * @returns An IsoDataWriter containing the encoded box
2758
3756
  *
2759
- * @beta
3757
+ * @public
2760
3758
  */
2761
- declare function url(view: IsoView): Fields<UrlBox>;
3759
+ declare function writeUrl(box: DataEntryUrlBox): IsoBoxWriteView;
2762
3760
  //#endregion
2763
- //#region src/parsers/urn.d.ts
3761
+ //#region src/writers/writeUrn.d.ts
2764
3762
  /**
2765
- * Parse a UrnBox from an IsoView
3763
+ * Write a UrnBox to an IsoDataWriter.
2766
3764
  *
2767
- * @param view - The IsoView to read data from
3765
+ * ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box
2768
3766
  *
2769
- * @returns A parsed UrnBox
3767
+ * @param box - The UrnBox fields to write
2770
3768
  *
3769
+ * @returns An IsoDataWriter containing the encoded box
2771
3770
  *
2772
- * @beta
3771
+ * @public
2773
3772
  */
2774
- declare function urn(view: IsoView): Fields<UrnBox>;
3773
+ declare function writeUrn(box: DataEntryUrnBox): IsoBoxWriteView;
2775
3774
  //#endregion
2776
- //#region src/parsers/vlab.d.ts
3775
+ //#region src/writers/writeVisualSampleEntryBox.d.ts
2777
3776
  /**
2778
- * Parse a WebVTTSourceLabelBox from an IsoView
3777
+ * Write a VisualSampleEntryBox to an IsoDataWriter.
2779
3778
  *
2780
- * @param view - The IsoView to read data from
3779
+ * ISO/IEC 14496-12:2012 - 12.1.3 Visual Sample Entry
2781
3780
  *
2782
- * @returns A parsed WebVTTSourceLabelBox
3781
+ * @param box - The VisualSampleEntryBox fields to write
3782
+ * @param type - The box type
2783
3783
  *
3784
+ * @returns An IsoDataWriter containing the encoded box
2784
3785
  *
2785
- * @beta
3786
+ * @public
2786
3787
  */
2787
- declare function vlab(view: IsoView): Fields<WebVttSourceLabelBox>;
3788
+ declare function writeVisualSampleEntryBox<T$1 extends VisualSampleEntryType>(box: VisualSampleEntryBox<T$1>, type: T$1): IsoBoxWriteView;
2788
3789
  //#endregion
2789
- //#region src/parsers/vmhd.d.ts
3790
+ //#region src/writers/writeVlab.d.ts
2790
3791
  /**
2791
- * Parse a VideoMediaHeaderBox from an IsoView
2792
- *
2793
- * @param view - The IsoView to read data from
3792
+ * Write a WebVttSourceLabelBox to an IsoDataWriter.
2794
3793
  *
2795
- * @returns A parsed VideoMediaHeaderBox
3794
+ * @param box - The WebVttSourceLabelBox fields to write
2796
3795
  *
3796
+ * @returns An IsoDataWriter containing the encoded box
2797
3797
  *
2798
- * @beta
3798
+ * @public
2799
3799
  */
2800
- declare function vmhd(view: IsoView): Fields<VideoMediaHeaderBox>;
3800
+ declare function writeVlab(box: WebVttSourceLabelBox): IsoBoxWriteView;
2801
3801
  //#endregion
2802
- //#region src/parsers/vttC.d.ts
3802
+ //#region src/writers/writeVmhd.d.ts
2803
3803
  /**
2804
- * Parse a WebVTTConfigurationBox from an IsoView
3804
+ * Write a VideoMediaHeaderBox to an IsoDataWriter.
2805
3805
  *
2806
- * @param view - The IsoView to read data from
3806
+ * ISO/IEC 14496-12:2012 - 12.1.2 Video Media Header Box
2807
3807
  *
2808
- * @returns A parsed WebVttConfigurationBox
3808
+ * @param box - The VideoMediaHeaderBox fields to write
2809
3809
  *
3810
+ * @returns An IsoDataWriter containing the encoded box
2810
3811
  *
2811
- * @beta
3812
+ * @public
2812
3813
  */
2813
- declare function vttC(view: IsoView): Fields<WebVttConfigurationBox>;
3814
+ declare function writeVmhd(box: VideoMediaHeaderBox): IsoBoxWriteView;
2814
3815
  //#endregion
2815
- //#region src/parsers/vtte.d.ts
3816
+ //#region src/writers/writeVttC.d.ts
2816
3817
  /**
2817
- * Parse a WebVTT Empty Sample Box from an IsoView
3818
+ * Write a WebVttConfigurationBox to an IsoDataWriter.
2818
3819
  *
2819
- * @returns A parsed WebVTT Empty Sample Box
3820
+ * @param box - The WebVttConfigurationBox fields to write
3821
+ *
3822
+ * @returns An IsoDataWriter containing the encoded box
3823
+ *
3824
+ * @public
3825
+ */
3826
+ declare function writeVttC(box: WebVttConfigurationBox): IsoBoxWriteView;
3827
+ //#endregion
3828
+ //#region src/writers/writeVtte.d.ts
3829
+ /**
3830
+ * Write a WebVttEmptySampleBox to an IsoDataWriter.
2820
3831
  *
3832
+ * @returns An IsoDataWriter containing the encoded box
2821
3833
  *
2822
- * @beta
3834
+ * @public
2823
3835
  */
2824
- declare function vtte(): Fields<WebVttEmptySampleBox>;
3836
+ declare function writeVtte(_: WebVttEmptySampleBox): IsoBoxWriteView;
2825
3837
  //#endregion
2826
- export { AudioRenderingIndicationBox, AudioSampleEntryBox, Box, BoxFilter, BoxParser, BoxParserMap, ChunkLargeOffsetBox, ChunkOffsetBox, CompactSampleSizeBox, CompositionTimeToSampleBox, CompositionTimeToSampleEntry, ContainerBox, DATA, DataEntryUrlBox, DataEntryUrnBox, DataInformationBox, DataReferenceBox, DecodingTimeSample, DecodingTimeToSampleBox, DegradationPriorityBox, EditBox, EditListBox, EditListEntry, EncryptedSample, Entity, EventMessageBox, ExtendedLanguageBox, Fields, FileTypeBox, FreeSpaceBox, FullBox, HandlerReferenceBox, HintMediaHeaderBox, INT, IdentifiedMediaDataBox, IpmpInfoBox, IsoBmffBox, IsoBmffBoxMap, IsoBox, IsoContainerBox, IsoData, IsoFieldTypeMap, IsoView, IsoViewConfig, ItemExtent, ItemInfoBox, ItemInfoEntry, ItemLocation, ItemLocationBox, ItemProtectionBox, ItemReferenceBox, LabelBox, MediaBox, MediaDataBox, MediaHeaderBox, MediaInformationBox, MetaBox, MovieBox, MovieExtendsBox, MovieExtendsHeaderBox, MovieFragmentBox, MovieFragmentHeaderBox, MovieFragmentRandomAccessBox, MovieFragmentRandomAccessOffsetBox, MovieHeaderBox, NullMediaHeaderBox, OriginalFormatBox, PreselectionGroupBox, PrimaryItemBox, ProducerReferenceTimeBox, ProtectionSchemeInformationBox, ProtectionSystemSpecificHeaderBox, RawBox, STRING, SampleAuxiliaryInformationOffsetsBox, SampleAuxiliaryInformationSizesBox, SampleDependencyTypeBox, SampleDescriptionBox, SampleEncryptionBox, SampleEntryBox, SampleGroupDescriptionBox, SampleSizeBox, SampleTableBox, SampleToChunkBox, SampleToChunkEntry, SampleToGroupBox, SampleToGroupEntry, SchemeInformationBox, SchemeTypeBox, SegmentIndexBox, SegmentIndexReference, SegmentTypeBox, ShadowSyncEntry, ShadowSyncSampleBox, SingleItemTypeReferenceBox, SoundMediaHeaderBox, Subsample, SubsampleEncryption, SubsampleEntry, SubsampleInformationBox, Subsegment, SubsegmentIndexBox, SubsegmentRange, SubtitleMediaHeaderBox, SyncSample, SyncSampleBox, TEMPLATE, TrackBox, TrackEncryptionBox, TrackExtendsBox, TrackFragmentBaseMediaDecodeTimeBox, TrackFragmentBox, TrackFragmentHeaderBox, TrackFragmentRandomAccessBox, TrackFragmentRandomAccessEntry, TrackHeaderBox, TrackKindBox, TrackReferenceBox, TrackReferenceTypeBox, TrackRunBox, TrackRunSample, TypeBox, UINT, UTF8, UrlBox, UrnBox, UserDataBox, VideoMediaHeaderBox, VisualSampleEntryBox, WebVttConfigurationBox, WebVttCueIdBox, WebVttCuePayloadBox, WebVttEmptySampleBox, WebVttSettingsBox, WebVttSourceLabelBox, ardi, avc1, avc2, avc3, avc4, createIsoView, ctts, dref, elng, elst, emsg, enca, encv, filterBoxes, filterBoxesByType, findBox, findBoxByType, free, frma, ftyp, hdlr, hev1, hvc1, iden, imda, kind, labl, mdat, mdhd, mehd, meta, mfhd, mfro, mp4a, mvhd, parseBoxes, payl, prft, prsl, pssh, schm, sdtp, sidx, skip, smhd, ssix, sthd, stsd, stss, sttg, stts, styp, subs, tenc, tfdt, tfhd, tfra, tkhd, trex, trun, url, urn, vlab, vmhd, vttC, vtte };
3838
+ export { AdditionalMetadataContainerBox, AdditionalMetadataContainerBoxChild, AudioRenderingIndicationBox, AudioSampleEntryBox, Box, BoxReturn, ChunkLargeOffsetBox, ChunkOffsetBox, CompactSampleSizeBox, CompositionTimeToSampleBox, CompositionTimeToSampleEntry, ContainerReturn, DATA, DataEntryUrlBox, DataEntryUrnBox, DataInformationBox, DataInformationBoxChild, DataReferenceBox, DecodingTimeSample, DecodingTimeToSampleBox, DegradationPriorityBox, EditBox, EditBoxChild, EditListBox, EditListEntry, EncryptedSample, Entity, EventMessageBox, ExtendedLanguageBox, FileTypeBox, FreeSpaceBox, FullBox, GroupsListBox, GroupsListBoxChild, HandlerReferenceBox, HintMediaHeaderBox, INT, IdentifiedMediaDataBox, IpmpInfoBox, IsoBox, IsoBoxContainer, IsoBoxContainerMap, IsoBoxData, IsoBoxMap, IsoBoxReadView, IsoBoxReadViewConfig, IsoBoxReadableStream, IsoBoxReadableStreamConfig, IsoBoxReader, IsoBoxReaderMap, IsoBoxReaderReturn, IsoBoxStreamable, IsoBoxWriteView, IsoBoxWriter, IsoBoxWriterMap, IsoFieldTypeMap, IsoParsedBox, IsoTypedParsedBox, ItemExtent, ItemInfoBox, ItemInfoBoxChild, ItemInfoEntry, ItemLocation, ItemLocationBox, ItemProtectionBox, ItemProtectionBoxChild, ItemReferenceBox, ItemReferenceBoxChild, LabelBox, MediaBox, MediaBoxChild, MediaDataBox, MediaHeaderBox, MediaInformationBox, MediaInformationBoxChild, MetaBox, MetaBoxChild, MovieBox, MovieBoxChild, MovieExtendsBox, MovieExtendsBoxChild, MovieExtendsHeaderBox, MovieFragmentBox, MovieFragmentBoxChild, MovieFragmentHeaderBox, MovieFragmentRandomAccessBox, MovieFragmentRandomAccessBoxChild, MovieFragmentRandomAccessOffsetBox, MovieHeaderBox, NullMediaHeaderBox, OriginalFormatBox, ParsedBox, PreselectionGroupBox, PrimaryItemBox, ProducerReferenceTimeBox, ProtectionSchemeInformationBox, ProtectionSchemeInformationBoxChild, ProtectionSystemSpecificHeaderBox, STRING, SampleAuxiliaryInformationOffsetsBox, SampleAuxiliaryInformationSizesBox, SampleDependencyTypeBox, SampleDescriptionBox, SampleEncryptionBox, SampleEntryBox, SampleGroupDescriptionBox, SampleSizeBox, SampleTableBox, SampleTableBoxChild, SampleToChunkBox, SampleToChunkEntry, SampleToGroupBox, SampleToGroupEntry, SchemeInformationBox, SchemeInformationBoxChild, SchemeTypeBox, SegmentIndexBox, SegmentIndexReference, SegmentTypeBox, ShadowSyncEntry, ShadowSyncSampleBox, SingleItemTypeReferenceBox, SoundMediaHeaderBox, SubTrackBox, SubTrackBoxChild, Subsample, SubsampleEncryption, SubsampleEntry, SubsampleInformationBox, Subsegment, SubsegmentIndexBox, SubsegmentRange, SubtitleMediaHeaderBox, SyncSample, SyncSampleBox, TEMPLATE, TrackBox, TrackBoxChild, TrackEncryptionBox, TrackExtendsBox, TrackFragmentBaseMediaDecodeTimeBox, TrackFragmentBox, TrackFragmentBoxChild, TrackFragmentHeaderBox, TrackFragmentRandomAccessBox, TrackFragmentRandomAccessEntry, TrackHeaderBox, TrackKindBox, TrackReferenceBox, TrackReferenceBoxChild, TrackReferenceTypeBox, TrackRunBox, TrackRunSample, TypeBox, UINT, UTF8, UserDataBox, UserDataBoxChild, VideoMediaHeaderBox, VisualSampleEntryBox, VisualSampleEntryType, WebVttConfigurationBox, WebVttCueBox, WebVttCueChild, WebVttCueIdBox, WebVttCuePayloadBox, WebVttEmptySampleBox, WebVttSettingsBox, WebVttSourceLabelBox, co64, createIsoBoxReadableStream, isContainer, isFullBox, readArdi, readAvc1, readAvc2, readAvc3, readAvc4, readCtts, readDref, readElng, readElst, readEmsg, readEnca, readEncv, readFree, readFrma, readFtyp, readHdlr, readHev1, readHvc1, readIden, readImda, readIsoBoxes, readKind, readLabl, readMdat, readMdhd, readMehd, readMeta, readMfhd, readMfro, readMp4a, readMvhd, readPayl, readPrft, readPrsl, readPssh, readSchm, readSdtp, readSidx, readSkip, readSmhd, readSsix, readSthd, readStsd, readStss, readSttg, readStts, readStyp, readSubs, readTenc, readTfdt, readTfhd, readTfra, readTkhd, readTrex, readTrun, readUrl, readUrn, readVlab, readVmhd, readVttC, readVtte, stz2, traverseIsoBoxes, url, urn, writeArdi, writeAvc1, writeAvc2, writeAvc3, writeAvc4, writeCtts, writeElng, writeElst, writeEmsg, writeEnca, writeEncv, writeFree, writeFrma, writeFtyp, writeHdlr, writeHev1, writeHvc1, writeIden, writeImda, writeIsoBox, writeIsoBoxes, writeKind, writeLabl, writeMdat, writeMdhd, writeMehd, writeMeta, writeMfhd, writeMfro, writeMp4a, writeMvhd, writePayl, writePrft, writePrsl, writePssh, writeSchm, writeSdtp, writeSidx, writeSkip, writeSmhd, writeSsix, writeSthd, writeStss, writeSttg, writeStts, writeStyp, writeSubs, writeTenc, writeTfdt, writeTfhd, writeTfra, writeTkhd, writeTrex, writeTrun, writeUrl, writeUrn, writeVisualSampleEntryBox, writeVlab, writeVmhd, writeVttC, writeVtte };
2827
3839
  //# sourceMappingURL=index.d.ts.map