Skip to content

Function: readUint64() ​

ts
function readUint64(cursor): bigint;

Defined in: cursor/readUint64.ts:20

Reads an unsigned integer of 8 bytes as a bigint.

The function needs the getBigUint64 method of DataView.

Parameters ​

cursor ​

IsoBoxReadCursor<IsoInt64>

The cursor to read from. The function moves the cursor past the field.

Returns ​

bigint

The value of the field.

Throws ​

RangeError if the field passes cursor.end.

Example ​

ts
// The body of an `mfhd` box: version, flags, and sequence_number.
const cursor = createIsoBoxReadCursor(new Uint8Array([0, 0, 0, 0, 0, 0, 0, 7]))

const version = readUint8(cursor) // 0
const flags = readUint24(cursor) // 0
const sequenceNumber = readUint32(cursor) // 7

A Streaming Video Technology Alliance project.