Function: createVisualSampleEntryReader()
ts
function createVisualSampleEntryReader<T>(type): (view) => VisualSampleEntryBox<T>;Defined in: libs/iso-bmff/src/readers/createVisualSampleEntryReader.ts:28
Creates a reader function for VisualSampleEntryBox with a custom type.
This utility allows reading visual sample entry boxes with types that aren't in the standard VisualSampleEntryType union (e.g., 'avc1', 'hvc1').
Type Parameters
T
T extends string
Parameters
type
T
The 4-character box type
Returns
A reader function that can be passed to readIsoBoxes
(view) => VisualSampleEntryBox<T>
Example
ts
const boxes = readIsoBoxes(data, {
readers: {
'vp09': createVisualSampleEntryReader('vp09'),
'av01': createVisualSampleEntryReader('av01'),
}
})