useMediaDevices
Use the user media devices (camera and microphone) with their MediaStream (opens in a new tab) object.
Type Definitions
const useMediaDevices: (args?: MediaStreamConstraints & {
startOnMount?: boolean;
}) => {
stream: MediaStream | null;
devices: MediaDeviceInfo[];
start: (constraints?: MediaStreamConstraints) => Promise<MediaStream>;
stop: () => void;
};