Skip to content

Function: writeStco() ​

ts
function writeStco(cursor, box): void;

Defined in: writers/writeStco.ts:22

Write the stco box (ChunkOffsetBox).

ISO/IEC 14496-12:2015 - 8.7.5

Parameters ​

cursor ​

IsoBoxWriteCursor

The write cursor

box ​

ChunkOffsetBox

The ChunkOffsetBox fields to write

Returns ​

void

Throws ​

RangeError if a value of the box does not fit its field.

Example ​

ts
const box = {
	type: 'stco' as const,
	version: 0,
	flags: 0,
	chunkOffset: [1000, 5000, 9000],
}

const writer = writeIsoBox(box, { writers: { stco: writeStco } })
const buffer = new Uint8Array(writer.buffer)

A Streaming Video Technology Alliance project.