@svta/common-media-library
Version:
A common library for media playback in JavaScript
18 lines • 478 B
JavaScript
import { findBox } from './findBox.js';
/**
* Find a box from an IsoView that matches a given type
*
* @param type - The type of box to find
* @param raw - The raw ISO data
* @param config - The configuration for the IsoView
*
* @returns The first box that matches the type
*
* @group ISOBMFF
*
* @beta
*/
export function findBoxByType(raw, type, config = {}) {
return findBox(raw, (box) => box.type === type, config);
}
//# sourceMappingURL=findBoxByType.js.map