@yudiel/react-qr-scanner
Version:
A library to scan QR codes in React.
14 lines • 636 B
TypeScript
/**
* Returns the list of available video input devices.
*
* The list is fetched on mount and refreshed whenever the browser fires a
* `devicechange` event (e.g., when a camera is plugged in or unplugged, or
* when the user grants/revokes camera permission). Errors from
* `enumerateDevices()` produce an empty list rather than throwing.
*
* Device labels are only populated after the user has granted camera
* permission to the origin. Before that, the list still contains the devices
* but each `label` is an empty string.
*/
export declare function useDevices(): MediaDeviceInfo[];
//# sourceMappingURL=useDevices.d.ts.map