Function: readSchm()
ts
function readSchm(cursor): SchemeTypeBox;Defined in: readers/readSchm.ts:22
Read the schm box (SchemeTypeBox).
Parameters
cursor
The read cursor at the first byte after the box header
Returns
A parsed SchemeTypeBox
Example
ts
// A schm box with flag 0x000001 and the UTF-8 bytes of the scheme_uri 'é日😀'.
const bytes = new Uint8Array([
0, 0, 0, 30, 115, 99, 104, 109, 0, 0, 0, 1, 99, 101, 110, 99, 0, 1, 0, 0, 0xc3, 0xa9, 0xe6,
0x97, 0xa5, 0xf0, 0x9f, 0x98, 0x80, 0,
])
const [schm] = readIsoBoxes(bytes, { readers: { schm: readSchm } })