feat: implement async probe

This commit is contained in:
skdhg committed 2023-08-23 21:02:36 +05:45
1 parent 3f96a50859
commit ed309d9870
6 files changed
+57 -70

No files matched your search

Vendored
+12 -1
View File
@@ -17,9 +17,20 @@ export interface Metadata {
bpm: number | null;
}
export interface ProbeStreamOptions {
/**
* If true, mediaplex will probe the stream synchronously. Defaults to false.
*/
sync?: boolean;
/**
* The maximum number of bytes to read from the stream. Defaults to 2MB.
*/
probeSize?: number;
}
export * from './js-binding';
export function probeStream(
stream: Readable,
probeSize?: number
options?: ProbeStreamOptions
): Promise<StreamProbeResult>;
export function readMetadata(result: ProbeResult): Metadata;