Skip to content

Function: readUrn() ​

ts
function readUrn(cursor): DataEntryUrnBox;

Defined in: readers/readUrn.ts:20

Read the urn box (DataEntryUrnBox).

Parameters ​

cursor ​

IsoBoxReadCursor<IsoInt64>

The read cursor at the first byte after the box header

Returns ​

DataEntryUrnBox

A parsed DataEntryUrnBox

Example ​

ts
// A urn box with the UTF-8 bytes of the name 'é日😀' and the location 'a.mp4'.
const bytes = new Uint8Array([
	0, 0, 0, 28, 117, 114, 110, 32, 0, 0, 0, 0, 0xc3, 0xa9, 0xe6, 0x97, 0xa5, 0xf0, 0x9f, 0x98,
	0x80, 0, 97, 46, 109, 112, 52, 0,
])
const [urn] = readIsoBoxes(bytes, { readers: { 'urn ': readUrn } })

A Streaming Video Technology Alliance project.