The raw ISO data
The configuration for the IsoView
The parsed boxes
// Sample 'ftyp' box (20 bytes)
const bytes = new Uint8Array([
0x00, 0x00, 0x00, 0x14,
0x66, 0x74, 0x79, 0x70,
0x69, 0x73, 0x6f, 0x6d,
0x00, 0x00, 0x00, 0x01,
0x69, 0x73, 0x6f, 0x6d
])
const boxes = readIsoBoxes(bytes.buffer, { readers: { ftyp: readFtyp, stsd: readStsd } })
assert.strictEqual(boxes.length, 1)
const box = boxes[0]
assert.strictEqual(box.type, 'ftyp')
assert.strictEqual(box.size, 20)
assert.strictEqual(box.majorBrand, 'isom')
assert.strictEqual(box.minorVersion, 1)
assert.deepEqual(box.compatibleBrands, ['isom'])
Optionalconfig: IsoBoxReadViewConfig
Reads ISO boxes from a data source.