Function: createAudioSampleEntryReader()
ts
function createAudioSampleEntryReader<T>(type): (view) => AudioSampleEntryBox<T>;Defined in: libs/iso-bmff/src/readers/createAudioSampleEntryReader.ts:28
Creates a reader function for AudioSampleEntryBox with a custom type.
This utility allows reading audio sample entry boxes with types that aren't in the standard AudioSampleEntryType union (e.g., 'mp4a', 'enca').
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) => AudioSampleEntryBox<T>
Example
ts
const boxes = readIsoBoxes(data, {
readers: {
'ac-3': createAudioSampleEntryReader('ac-3'),
'ec-3': createAudioSampleEntryReader('ec-3'),
}
})