UNPKG

@fishjam-cloud/react-client

Version:
50 lines 1.69 kB
/** * Manage microphone * @category Devices */ export declare function useMicrophone(): { /** Toggles current microphone on/off */ toggleMicrophone: () => Promise<undefined | import("../..").DeviceError>; /** Mutes/unmutes the microphone */ toggleMicrophoneMute: () => Promise<void>; /** Selects the microphone device */ selectMicrophone: (deviceId: string) => Promise<undefined | import("../..").DeviceError>; /** * @deprecated Use `currentMicrophone` and `isMicrophoneOn` instead * Indicates which microphone is now turned on and streaming audio */ activeMicrophone: import("../..").DeviceItem | null; /** * Indicates which microphone is now selected */ currentMicrophone: MediaDeviceInfo | null; /** * Indicates whether the microphone is streaming audio */ isMicrophoneOn: boolean; /** * Indicates whether the microphone is muted */ isMicrophoneMuted: boolean; /** * The MediaStream object containing the current audio stream */ microphoneStream: MediaStream | null; /** * The currently set microphone middleware function */ currentMicrophoneMiddleware: import("../..").TrackMiddleware; /** * Sets the microphone middleware */ setMicrophoneTrackMiddleware: (middleware: import("../..").TrackMiddleware | null) => Promise<void>; /** * List of available microphone devices */ microphoneDevices: import("../..").DeviceItem[]; /** * Possible error thrown while setting up the microphone */ microphoneDeviceError: import("../..").DeviceError | null; }; //# sourceMappingURL=useMicrophone.d.ts.map