Skip to content

AudioRecorderPluginInstance

Unofficial

Plugin instance for the audio recorder, providing methods to record and save audio clips.

Import:

import type { AudioRecorderPluginInstance } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface AudioRecorderPluginInstance extends InternalPluginInstance<AudioRecorderPlugin>

Extends: InternalPluginInstance<AudioRecorderPlugin>

Properties

Property Type Description
app App Reference to the app.
description string Human-readable description of this plugin.
(Inherited from InternalPluginInstance)
extension string File extension used for saved audio recordings.
id string Unique identifier for this plugin.
(Inherited from InternalPluginInstance)
name string Human-readable display name of this plugin.
(Inherited from InternalPluginInstance)
plugin AudioRecorderPlugin Reference to the audio recorder plugin registration.
recorder MediaRecorder | null Active MediaRecorder instance, or null when not recording.
recording boolean Whether audio is currently being recorded.

Methods

Method Returns Description
checkPermission() Promise<boolean> Check if the user has granted microphone permission.
init(app, plugin) void Initialize the plugin instance with app and plugin references.
(Inherited from InternalPluginInstance)
onDisable(app, plugin) void Called when the plugin is disabled.
(Inherited from InternalPluginInstance)
onEnable(app, plugin) Promise<void> Called when the plugin is enabled.
(Inherited from InternalPluginInstance)
onRecordAudio() Promise<void> Initiate the audio recording flow.
onStartRecording() Promise<void> Start a new audio recording session.
onStopRecording() void Stop the current audio recording session.
onUserDisable(app) void Called when the user manually disables the plugin.
(Inherited from InternalPluginInstance)
onUserEnable(app) void Called when the user manually enables the plugin.
(Inherited from InternalPluginInstance)
saveRecording(audioBuffer) Promise<void> Save the recorded audio buffer to a file in the vault.
showRecordingMessage(message, isError) void Display a recording status message or error to the user.
startRecording(stream) void Begin recording audio from the given media stream.

Links to this page: