import type { MutableRefObject } from 'react'; import type { Pausable } from "../use-pausable/index.cjs"; export interface UseUserMediaOptions { /** * Callback when MediaStream is ready */ onStart?: (stream: MediaStream) => void; /** * Callback when MediaStream is stopped */ onStop?(): void; /** * Recreate stream when deviceIds or constraints changed * * @defaultValue true */ autoSwitch?: boolean; /** * MediaStreamConstraints to be applied to the requested MediaStream * If provided, the constraints will override videoDeviceId and audioDeviceId * * @defaultValue {} */ constraints?: MediaStreamConstraints; } export interface UseUserMediaReturns extends Pausable { /** * The current MediaStream */ stream: MutableRefObject; /** * Whether the browser supports getUserMedia */ isSupported: boolean; } /** * A React Hook that helps to manage the user media. */ export declare function useUserMedia(options?: UseUserMediaOptions): UseUserMediaReturns;