import * as React from 'react'; /** * @param audio If `true`, request audio. An object of media constraints may be used instead. * @param video If `true`, request video. An object of media constraints may be used instead. * @param auto If `true`, request media immediately when rendered. * @param share If `true`, requested media will be immediately marked as shareable with peers. * @param audioTypeHint Hint to the browser on how to treat the audio source. Options are "speech" or "music". * @param videoTypeHint Hint to the browser on how to treat the video source. Options are "motion", "detail", "text". * @param audioProcessing If explicitly set to `false`, disable the default echo cancellation, gain control, and noise suppression processing. * @param volumeMonitoring If explicitly set to `false`, disable volume and speech detection monitoring. */ export interface RequestUserMediaProps { audio?: boolean | MediaTrackConstraints; video?: boolean | MediaTrackConstraints; audioTypeHint?: undefined | 'speech' | 'music'; videoTypeHint?: undefined | 'motion' | 'detail' | 'text'; audioProcessing?: boolean; volumeMonitoring?: boolean; auto?: boolean; share?: boolean; mirrored?: boolean; name?: string; audioName?: string; videoName?: string; screenCapture?: boolean; replaceAudio?: string; replaceVideo?: string; requestingCapture?: boolean; requestingCameraCapture?: boolean; requestingMicrophoneCapture?: boolean; children?: React.ReactNode | ((props: () => Promise) => React.ReactNode); addLocalAudio?: (track: MediaStreamTrack, stream: MediaStream, replace?: string, volumeMonitoring?: boolean, name?: string) => void; addLocalVideo?: (track: MediaStreamTrack, stream: MediaStream, mirrored?: boolean, replace?: string, name?: string) => void; addLocalScreen?: (track: MediaStreamTrack, stream: MediaStream, replace?: string, name?: string) => void; removeAllMedia?: (kind: 'audio' | 'video') => void; shareLocalMedia?: (id: string) => void; deviceCaptureRequest?: (camera: boolean, microphone: boolean) => void; fetchDevices?: () => void; cameraPermissionDenied?: (err?: Error) => void; microphonePermissionDenied?: (err?: Error) => void; onSuccess?: (trackIds?: UserMediaIds) => void; onError?: (err?: Error) => void; render?: (getMedia: (additional?: MediaStreamConstraints) => Promise, captureState: { requestingCapture?: boolean; requestingCameraCapture?: boolean; requestingMicrophoneCapture?: boolean; }) => React.ReactNode; } export interface UserMediaIds { audio?: string; video?: string; } /** * @description * The `` component can be used to request user audio and video media. * * @public * * @example *
* {/* Request audio and immediately share *\/} * * {/* Request audio and video, but use custom renderer to trigger it *\/} * ( * * )} /> *
*/ export declare class RequestUserMedia extends React.Component { private errorCount; constructor(props: RequestUserMediaProps); getMedia(additional?: MediaStreamConstraints): Promise; componentDidMount(): void; componentDidUpdate(prevProps: RequestUserMediaProps): void; render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined; } declare const _default: import("react-redux").ConnectedComponent | undefined; audio?: boolean | MediaTrackConstraints | undefined; video?: boolean | MediaTrackConstraints | undefined; audioTypeHint?: "speech" | "music" | undefined; videoTypeHint?: "detail" | "text" | "motion" | undefined; audioProcessing?: boolean | undefined; volumeMonitoring?: boolean | undefined; auto?: boolean | undefined; share?: boolean | undefined; mirrored?: boolean | undefined; name?: string | undefined; audioName?: string | undefined; videoName?: string | undefined; screenCapture?: boolean | undefined; replaceAudio?: string | undefined; replaceVideo?: string | undefined; requestingCapture?: boolean | undefined; requestingCameraCapture?: boolean | undefined; requestingMicrophoneCapture?: boolean | undefined; children?: React.ReactNode | ((props: () => Promise) => React.ReactNode); addLocalAudio?: ((track: MediaStreamTrack, stream: MediaStream, replace?: string | undefined, volumeMonitoring?: boolean | undefined, name?: string | undefined) => void) | undefined; addLocalVideo?: ((track: MediaStreamTrack, stream: MediaStream, mirrored?: boolean | undefined, replace?: string | undefined, name?: string | undefined) => void) | undefined; addLocalScreen?: ((track: MediaStreamTrack, stream: MediaStream, replace?: string | undefined, name?: string | undefined) => void) | undefined; removeAllMedia?: ((kind: "audio" | "video") => void) | undefined; shareLocalMedia?: ((id: string) => void) | undefined; deviceCaptureRequest?: ((camera: boolean, microphone: boolean) => void) | undefined; fetchDevices?: (() => void) | undefined; cameraPermissionDenied?: ((err?: Error | undefined) => void) | undefined; microphonePermissionDenied?: ((err?: Error | undefined) => void) | undefined; onSuccess?: ((trackIds?: UserMediaIds | undefined) => void) | undefined; onError?: ((err?: Error | undefined) => void) | undefined; render?: ((getMedia: (additional?: MediaStreamConstraints | undefined) => Promise, captureState: { requestingCapture?: boolean | undefined; requestingCameraCapture?: boolean | undefined; requestingMicrophoneCapture?: boolean | undefined; }) => React.ReactNode) | undefined; context?: React.Context> | undefined; store?: import("redux").Store | undefined; }>; export default _default;