import { ReactElement } from "react"; export declare type ReactMediaRecorderRenderProps = { error: string; muteAudio: () => void; unMuteAudio: () => void; startRecording: () => void; pauseRecording: () => void; resumeRecording: () => void; stopRecording: () => void; mediaBlobUrl: undefined | string; status: StatusMessages; isAudioMuted: boolean; previewStream: MediaStream | null; previewAudioStream: MediaStream | null; clearBlobUrl: () => void; }; export declare type ReactMediaRecorderHookProps = { audio?: boolean | MediaTrackConstraints; video?: boolean | MediaTrackConstraints; screen?: boolean; selfBrowserSurface?: SelfBrowserSurface; preferCurrentTab?: PreferCurrentTab; onStop?: (blobUrl: string, blob: Blob) => void; onStart?: () => void; blobPropertyBag?: BlobPropertyBag; mediaRecorderOptions?: MediaRecorderOptions | undefined; customMediaStream?: MediaStream | null; stopStreamsOnStop?: boolean; askPermissionOnMount?: boolean; }; export declare type ReactMediaRecorderProps = ReactMediaRecorderHookProps & { render: (props: ReactMediaRecorderRenderProps) => ReactElement; }; /** * Experimental (optional). * An enumerated value specifying whether the browser should allow the user to select the current tab for capture. * This helps to avoid the "infinite hall of mirrors" effect experienced when a video conferencing app inadvertently shares its own display. * Possible values are include, which hints that the browser should include the current tab in the choices offered for capture, * and exclude, which hints that it should be excluded. * A default value is not mandated by the spec. * See specs at: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#selfbrowsersurface */ export declare type SelfBrowserSurface = undefined | 'include' | 'exclude'; /** * Experimental (optional). * A boolean; a value of true instructs the browser to offer the current tab as the most prominent capture source, i.e. as a separate "This Tab" option in the "Choose what to share" options presented to the user. * This is useful as many app types generally just want to share the current tab. * See specs at: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#prefercurrenttab */ export declare type PreferCurrentTab = true | false; export declare type StatusMessages = "media_aborted" | "permission_denied" | "no_specified_media_found" | "media_in_use" | "invalid_media_constraints" | "no_constraints" | "recorder_error" | "idle" | "acquiring_media" | "delayed_start" | "recording" | "stopping" | "stopped" | "paused"; export declare enum RecorderErrors { AbortError = "media_aborted", NotAllowedError = "permission_denied", NotFoundError = "no_specified_media_found", NotReadableError = "media_in_use", OverconstrainedError = "invalid_media_constraints", TypeError = "no_constraints", NONE = "", NO_RECORDER = "recorder_error" } export declare function useReactMediaRecorder({ audio, video, selfBrowserSurface, preferCurrentTab, onStop, onStart, blobPropertyBag, screen, mediaRecorderOptions, customMediaStream, stopStreamsOnStop, askPermissionOnMount, }: ReactMediaRecorderHookProps): ReactMediaRecorderRenderProps; export declare const ReactMediaRecorder: (props: ReactMediaRecorderProps) => ReactElement>;