ProtectedoptionsProtectedscopeA disposal scope owned by the plugin chassis, disposed by destroy().
definePlugin (see define-plugin.ts) replaces this with a fresh Scope
on every (re-)init; class-based plugins that support destroy() ->
_init() re-init must do the same in onInit().
ProtectedsubscriptionsProtected OptionalwavesurferProtecteddestroyedWhether destroy() has been called. Subclasses use this to guard async work.
Do not call directly, only called by WavesSurfer internally
Destroy the plugin
ProtectedemitEmit an event
Get the duration of the recording
Check if the audio is being recorded
Subscribe to an event. Returns an unsubscribe function.
Optionaloptions: { once?: boolean }Subscribe to an event only once
ProtectedonCalled after this.wavesurfer is available
Pause the recording
Resume the recording
Request access to the microphone and start monitoring incoming audio
Optionaloptions: MediaTrackConstraintsStart recording audio from the microphone.
Calling this while a recording is already active restarts: the previous session is discarded (no 'record-end' is emitted for it -- call stopRecording() first if you want its final blob).
Optionaloptions: MediaTrackConstraintsStop monitoring incoming audio
Stop the recording
Unsubscribe from an event
Clear all events
StaticcreateCreate an instance of the Record plugin
Optionaloptions: RecordPluginOptionsStaticgetGet 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
Create an instance of the Record plugin