A singleton class for handling audio recording using the MediaRecorder API.

Constructors

Methods

  • Starts recording audio.

    Returns Promise<void>

    A Promise resolving when recording starts.

    Throws an error if the MediaRecorder instance is not initialized.

  • Stops recording audio.

    Returns Promise<Blob>

    A Promise resolving to the recorded audio Blob.

    Throws an error if the MediaRecorder instance is not initialized.