Hierarchy

Constructors

Properties

dataWindow: null | Float32Array = null
duration: number = 0
isWaveformPaused: boolean = false
lastDuration: number = 0
lastStartTime: number = 0
mediaRecorder: null | MediaRecorder = null
originalOptions: undefined | {
    cursorWidth: number;
    interact: boolean;
}

Type declaration

  • cursorWidth: number
  • interact: boolean
stream: null | MediaStream = null
subscriptions: (() => void)[] = []

Type declaration

    • (): void
    • Returns void

timer: Timer
wavesurfer?: default

Methods

  • Do not call directly, only called by WavesSurfer internally

    Parameters

    Returns void

  • Destroy the plugin

    Returns void

  • Emit an event

    Type Parameters

    • EventName extends "destroy" | "record-start" | "record-pause" | "record-resume" | "record-end" | "record-progress"

    Parameters

    Returns void

  • Check if the audio is being recorded

    Returns boolean

  • Subscribe to an event. Returns an unsubscribe function.

    Type Parameters

    • EventName extends "destroy" | "record-start" | "record-pause" | "record-resume" | "record-end" | "record-progress"

    Parameters

    • event: EventName
    • listener: EventListener<RecordPluginEvents, EventName>
    • Optional options: {
          once?: boolean;
      }
      • Optional once?: boolean

    Returns (() => void)

      • (): void
      • Subscribe to an event. Returns an unsubscribe function.

        Returns void

  • Called after this.wavesurfer is available

    Returns void

  • Subscribe to an event only once

    Type Parameters

    • EventName extends "destroy" | "record-start" | "record-pause" | "record-resume" | "record-end" | "record-progress"

    Parameters

    Returns (() => void)

      • (): void
      • Subscribe to an event only once

        Returns void

  • Parameters

    • stream: MediaStream

    Returns MicStream

  • Unsubscribe from an event

    Type Parameters

    • EventName extends "destroy" | "record-start" | "record-pause" | "record-resume" | "record-end" | "record-progress"

    Parameters

    Returns void

  • Clear all events

    Returns void

  • Get a list of available audio devices You can use this to get the device ID of the microphone to use with the startMic and startRecording methods Will return an empty array if the browser doesn't support the MediaDevices API or if the user has not granted access to the microphone You can ask for permission to the microphone by calling startMic

    Returns Promise<MediaDeviceInfo[]>

Generated using TypeDoc