Skip to content

Function: readCo64() ​

ts
function readCo64<V>(cursor): ChunkLargeOffsetBox<V>;

Defined in: readers/readCo64.ts:26

Read the co64 box (ChunkLargeOffsetBox).

ISO/IEC 14496-12:2015 - 8.7.5

The 64-bit integer fields of the result have the type that the int64 function of the cursor returns. With no option, they are numbers.

Type Parameters ​

V ​

V extends IsoInt64

Parameters ​

cursor ​

IsoBoxReadCursor<V>

The read cursor at the first byte after the box header

Returns ​

ChunkLargeOffsetBox<V>

A parsed ChunkLargeOffsetBox

Example ​

ts
const bytes = boxBytes('co64', [0, 1], [0, 3], [2, 4], [64, 8], [2 ** 33, 8])
const [box] = readIsoBoxes(bytes, { readers: { co64: readCo64 } })

assert.ok(isIsoBoxType('co64', box))
assert.deepStrictEqual(box.chunkOffset, [64, 2 ** 33])

A Streaming Video Technology Alliance project.