@independo/capacitor-voice-recorder
Version:
Capacitor plugin for voice recording
24 lines (23 loc) • 1.38 kB
TypeScript
import type { CurrentRecordingStatus, GenericResponse, RecordingData, RecordingOptions } from '../definitions';
import type { VoiceRecorderPlatform } from '../service/VoiceRecorderService';
/** Web adapter that delegates to the browser-specific implementation. */
export declare class VoiceRecorderWebAdapter implements VoiceRecorderPlatform {
/** Browser implementation that talks to MediaRecorder APIs. */
private readonly voiceRecorderImpl;
/** Checks whether the browser can record audio. */
canDeviceVoiceRecord(): Promise<GenericResponse>;
/** Returns whether the browser has microphone permission. */
hasAudioRecordingPermission(): Promise<GenericResponse>;
/** Requests microphone permission through the browser. */
requestAudioRecordingPermission(): Promise<GenericResponse>;
/** Starts a recording session using MediaRecorder. */
startRecording(options?: RecordingOptions): Promise<GenericResponse>;
/** Stops the recording session and returns the payload. */
stopRecording(): Promise<RecordingData>;
/** Pauses the recording session when supported. */
pauseRecording(): Promise<GenericResponse>;
/** Resumes a paused recording session when supported. */
resumeRecording(): Promise<GenericResponse>;
/** Returns the current recording state. */
getCurrentStatus(): Promise<CurrentRecordingStatus>;
}