Skip to content

Function: writePayl() ​

ts
function writePayl(cursor, box): void;

Defined in: writers/writePayl.ts:20

Write the payl box (WebVttCuePayloadBox).

Parameters ​

cursor ​

IsoBoxWriteCursor

The write cursor

box ​

WebVttCuePayloadBox

The WebVttCuePayloadBox fields to write

Returns ​

void

Throws ​

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

Example ​

ts
const box: WebVttCuePayloadBox = {
	type: 'payl',
	cueText: 'Hello world',
}

const writer = writeIsoBox(box, { writers: { payl: writePayl } })

A Streaming Video Technology Alliance project.