Type Alias: IsoBoxReadCursor<V>
type IsoBoxReadCursor<V> = object & ([V] extends [bigint] ? object : object);Defined in: IsoBoxReadCursor.ts:17
A position in the bytes of ISO BMFF data, for the read field functions and the box readers.
start, pos, and end count bytes from the first byte of view. A field function reads at pos and moves pos past the field. A field function that reads past end throws a RangeError.
The type parameter V is the type of every 64-bit integer field that the built-in readers return. A cursor of either mode is assignable to IsoBoxReadCursor<IsoInt64>.
Type Parameters
V
V extends IsoInt64 = number
Type Declaration
end
readonly end: number;The first byte after the box, or the byte length of the data for a new cursor.
pos
pos: number;The position of the next read. A reader can move the position, as in cursor.pos += 4.
readers?
readonly readers?: Record<IsoBoxType, object["r"]>;Map of each box type to the reader of that box. readChildBoxes uses the map. If a reader returns undefined, readChildBoxes returns a raw box. IsoBoxReaderMap allows undefined only for the uuid key.
start
readonly start: number;The first byte of the box header, or 0 for a new cursor.
truncated?
readonly truncated?: "stop" | "throw";What a function that reads a list of boxes does before a truncated box: 'stop' or 'throw'. The default is 'stop'. IsoBoxReadConfig has the rules of the option. Each cursor that a function creates from this cursor has the same option.
view
readonly view: DataView;The bytes to read.