/** * How long a piece of audio or video is, read from the file's own headers, without decoding it and * without a dependency: WAV, MP4 and MOV, WebM and Matroska, MP3, Ogg (Vorbis and Opus), and FLAC. * Portable: plain bytes in, a number out. */ /** What the headers say: the length, the container's type, and whether it holds a picture. */ export interface MediaDuration { /** Its length in milliseconds. */ durationMs: number; /** Its container's MIME type, such as `video/mp4` or `audio/ogg`. */ mimeType: string; /** `video` when it holds a picture track, `audio` when only sound. */ kind: 'audio' | 'video'; } /** * The length of audio or video from its headers, or `undefined` when the bytes are none of the * containers read, or say no length: a stream still being written, or a file cut short before the * part that says it. */ export declare function readMediaDuration(bytes: Uint8Array): MediaDuration | undefined;