Function: createIsoBoxReadCursor()
ts
function createIsoBoxReadCursor<V>(data, config?): IsoBoxReadCursor<V>;Defined in: createIsoBoxReadCursor.ts:21
Creates a read cursor for ISO BMFF data.
The cursor keeps the byteOffset and the byteLength of a view input, so pos starts at 0. The cursor shares memory with the input.
Type Parameters
V
V extends IsoInt64 = number
Parameters
data
The data to read.
config?
The readers map, the int64 option, and the truncated option.
Returns
A cursor at the first byte of the data.
Example
ts
const cursor = createIsoBoxReadCursor(
new Uint8Array([0x00, 0x00, 0x00, 0x08, 0x66, 0x72, 0x65, 0x65]),
)
const size = readUint32(cursor) // 8, and cursor.pos is 4