mirror of
https://github.com/darksaid98/mediaplex.git
synced 2026-12-02 22:17:32 +00:00
feat: implement async probe
This commit is contained in:
1 parent
3f96a50859
commit
ed309d9870
6 files changed
+57
-70
No files matched your search
Vendored
+12
-1
@@ -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;
|
||||
Reference in new issue
Block a user