UNPKG

react-vision-camera

Version:

Camera component for React. We can use this component for computer vision tasks like barcode scanning, text recognition, etc.

19 lines (18 loc) 580 B
import React, { ReactNode } from 'react'; export interface Resolution { width: number; height: number; } export interface CameraProps { isActive?: boolean; isPause?: boolean; desiredCamera?: string; desiredResolution?: Resolution; facingMode?: string; children?: ReactNode; onOpened?: (cam: HTMLVideoElement, camLabel: string) => void; onClosed?: () => void; onDeviceListLoaded?: (list: MediaDeviceInfo[]) => void; } declare const VisionCamera: (props: CameraProps) => React.ReactElement; export default VisionCamera;