UNPKG

@independo/capacitor-voice-recorder

Version:
25 lines (24 loc) 1.36 kB
import { WebPlugin } from '@capacitor/core'; import type { CurrentRecordingStatus, GenericResponse, RecordingData, RecordingOptions, VoiceRecorderPlugin } from './definitions'; /** Web implementation of the VoiceRecorder Capacitor plugin. */ export declare class VoiceRecorderWeb extends WebPlugin implements VoiceRecorderPlugin { /** Service layer that normalizes behavior and errors. */ private readonly service; constructor(); /** Checks whether the browser can record audio. */ canDeviceVoiceRecord(): Promise<GenericResponse>; /** Returns whether microphone permission is currently granted. */ hasAudioRecordingPermission(): Promise<GenericResponse>; /** Requests microphone permission from the user. */ requestAudioRecordingPermission(): Promise<GenericResponse>; /** Starts a recording session. */ startRecording(options?: RecordingOptions): Promise<GenericResponse>; /** Stops the current 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>; }