Function: writeSchm()
ts
function writeSchm(cursor, box): void;Defined in: writers/writeSchm.ts:27
Write the schm box (SchemeTypeBox).
When flag 0x000001 is set, the writer writes schemeUri.
ISO/IEC 14496-12:2015 - 8.12.5
Parameters
cursor
The write cursor
box
The SchemeTypeBox fields to write
Returns
void
Throws
RangeError if a value of the box does not fit its field.
Throws
RangeError if schemeType does not have 4 characters.
Example
ts
const writer = writeIsoBox(
{
type: 'schm',
version: 0,
flags: 1,
schemeType: 'cenc',
schemeVersion: 0x00010000,
schemeUri: '',
},
{ writers: { schm: writeSchm } },
)