@types/recorder-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Installation

npm install --save @types/recorder-js

Summary

This package contains type definitions for recorder-js (https://github.com/ijsnow/studiojs#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/recorder-js.

index.d.ts

export = Recorder;

declare class Recorder {
    constructor(audioContext: AudioContext, config?: Recorder.RecorderConfig);
    static download(blob: Blob, filename: string): void;
    init(stream: MediaStream): Promise<void>;
    start(): Promise<MediaStream | undefined>;
    stop(): Promise<Recorder.RecorderResult>;
}

declare namespace Recorder {
    type OnAnalysedHandler = (data: number[], lastNonZero: number) => void;

    interface RecorderConfig {
        onAnalysed?: OnAnalysedHandler | undefined;
    }

    interface RecorderResult {
        blob: Blob;
        buffer: Float32Array[];
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Yusuke Higuchi.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/recorder-js

Weekly Downloads

2,407

Version

1.0.4

License

MIT

Unpacked Size

3.77 kB

Total Files

5

Last publish

Collaborators

  • types