Skip to content

Function: writeKind() ​

ts
function writeKind(cursor, box): void;

Defined in: writers/writeKind.ts:20

Write the kind box (KindBox).

Parameters ​

cursor ​

IsoBoxWriteCursor

The write cursor

box ​

KindBox

The KindBox fields to write

Returns ​

void

Throws ​

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

Example ​

ts
const box: KindBox = {
	type: 'kind',
	version: 0,
	flags: 0,
	schemeUri: 'urn:mpeg:dash:role:2011',
	value: 'main',
}

const writer = writeIsoBox(box, { writers: { kind: writeKind } })

A Streaming Video Technology Alliance project.