Skip to main content

MediaCaptureOperation

interface
interface MediaCaptureOperation

Import

import { MediaCaptureOperation } from '@modular/sdk';

Members4

result
Promise<MediaCaptureError | MediaCaptureSession>
state
Readonly<Readonly<{ kind: 'preparing' }>> | Readonly<Readonly<{ kind: 'captured'; session: Readonly<Readonly<{ capturedAt: string; id: string & $brand<'MediaCaptureSessionId'>; kind: 'capturing'; tracks: readonly (Readonly<...> | Readonly<...>)[] }>> | Readonly<Readonly<{ capturedAt: string; id: string & $brand<'MediaCaptureSessionId'>; kind: 'stopping'; tracks: readonly (Readonly<...> | Readonly<...>)[] }>> | Readonly<Readonly<{ capturedAt: string; endedAt: string; id: string & $brand<'MediaCaptureSessionId'>; kind: 'stopped'; tracks: readonly (Readonly<...> | Readonly<...>)[] }>> | Readonly<Readonly<{ capturedAt: string; endedAt: string; id: string & $brand<'MediaCaptureSessionId'>; kind: 'cancelled'; tracks: readonly (Readonly<...> | Readonly<...>)[] }>> | Readonly<Readonly<{ capturedAt: string; endedAt: string; error: { code: 'cancelled' | 'permission-denied' | 'audio-overrun' | 'capability-invalid' | 'capture-failed' | 'device-not-found' | 'input-closed' | 'no-audio-input' | 'platform-unsupported' | 'source-ended' | 'source-unavailable'; message: string; operation: 'stop' | 'capture' | 'acquire-audio' | 'cancel' | 'list-sources' | 'mix' | 'observe-audio-level' | 'record'; sessionId: ... & ... | null }; id: string & $brand<'MediaCaptureSessionId'>; kind: 'failed'; tracks: readonly (Readonly<...> | Readonly<...>)[] }>> }>> | Readonly<Readonly<{ kind: 'cancelled' }>> | Readonly<Readonly<{ error: { code: 'cancelled' | 'permission-denied' | 'audio-overrun' | 'capability-invalid' | 'capture-failed' | 'device-not-found' | 'input-closed' | 'no-audio-input' | 'platform-unsupported' | 'source-ended' | 'source-unavailable'; message: string; operation: 'stop' | 'capture' | 'acquire-audio' | 'cancel' | 'list-sources' | 'mix' | 'observe-audio-level' | 'record'; sessionId: string & $brand<'MediaCaptureSessionId'> | null }; kind: 'failed' }>>
cancel
() => void
subscribe
(listener: (state: Readonly<Readonly<{ kind: 'preparing' }>> | Readonly<Readonly<{ kind: 'captured'; session: Readonly<Readonly<{ capturedAt: string; id: string & $brand<...>; kind: 'capturing'; tracks: readonly (... | ...)[] }>> | Readonly<Readonly<{ capturedAt: string; id: string & $brand<...>; kind: 'stopping'; tracks: readonly (... | ...)[] }>> | Readonly<Readonly<{ capturedAt: string; endedAt: string; id: string & $brand<...>; kind: 'stopped'; tracks: readonly (... | ...)[] }>> | Readonly<Readonly<{ capturedAt: string; endedAt: string; id: string & $brand<...>; kind: 'cancelled'; tracks: readonly (... | ...)[] }>> | Readonly<Readonly<{ capturedAt: string; endedAt: string; error: { code: ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ...; message: string; operation: ... | ... | ... | ... | ... | ... | ... | ...; sessionId: ... | ... }; id: string & $brand<...>; kind: 'failed'; tracks: readonly (... | ...)[] }>> }>> | Readonly<Readonly<{ kind: 'cancelled' }>> | Readonly<Readonly<{ error: { code: 'cancelled' | 'permission-denied' | 'audio-overrun' | 'capability-invalid' | 'capture-failed' | 'device-not-found' | 'input-closed' | 'no-audio-input' | 'platform-unsupported' | 'source-ended' | 'source-unavailable'; message: string; operation: 'stop' | 'capture' | 'acquire-audio' | 'cancel' | 'list-sources' | 'mix' | 'observe-audio-level' | 'record'; sessionId: string & $brand<'MediaCaptureSessionId'> | null }; kind: 'failed' }>>) => void) => Disposable