UNPKG

matrix-react-sdk

Version:
30 lines (29 loc) 1.11 kB
import { AsyncStoreWithClient } from "./AsyncStoreWithClient"; import { ActionPayload } from "../dispatcher/payloads"; import { VoiceRecording } from "../voice/VoiceRecording"; interface IState { recording?: VoiceRecording; } export declare class VoiceRecordingStore extends AsyncStoreWithClient<IState> { private static internalInstance; constructor(); /** * Gets the active recording instance, if any. */ get activeRecording(): VoiceRecording | null; static get instance(): VoiceRecordingStore; protected onAction(payload: ActionPayload): Promise<void>; /** * Starts a new recording if one isn't already in progress. Note that this simply * creates a recording instance - whether or not recording is actively in progress * can be seen via the VoiceRecording class. * @returns {VoiceRecording} The recording. */ startRecording(): VoiceRecording; /** * Disposes of the current recording, no matter the state of it. * @returns {Promise<void>} Resolves when complete. */ disposeRecording(): Promise<void>; } export {};