Skip to content

Type Alias: IsoBoxWriter<B> ​

ts
type IsoBoxWriter<B> = (cursor, box) => void;

Defined in: IsoBoxWriter.ts:15

A function that writes one box at the position of a write cursor. writeIsoBoxes calls the function for each box of its type.

A writer writes the box header with beginIsoBox or beginIsoFullBox, then the fields, then the size with endIsoBox. A writer of a box with child boxes writes them with writeChildBoxes, so the writers of cursor.writers apply.

A writer reads and writes only the bytes of its own box. In writeIsoBoxes, cursor.pos is not the offset of the box in the result. cursor.bytes also does not hold the earlier raw boxes.

Type Parameters ​

B ​

B

Parameters ​

cursor ​

IsoBoxWriteCursor

box ​

B

Returns ​

void

A Streaming Video Technology Alliance project.