biometry-react-components
Version:
React UI component library for capturing high-quality biometric data (voice, face, documents, video) to facilitate integration with Biometry services
72 lines (63 loc) • 2.05 kB
TypeScript
import React from 'react';
interface DocScanProps {
rectWidth?: number;
rectHeight?: number;
onCapture: (file: File) => void;
className?: string;
style?: React.CSSProperties;
noShadow?: boolean;
}
declare const DocScan: React.FC<DocScanProps>;
interface FaceCaptureProps {
rectWidth?: number;
rectHeight?: number;
onCapture: (file: File) => void;
className?: string;
style?: React.CSSProperties;
noShadow?: boolean;
}
declare const FaceCapture: React.FC<FaceCaptureProps>;
interface FaceRecorderProps {
rectWidth?: number;
rectHeight?: number;
onCapture: (file: File, audio: File, phrase: string) => void;
className?: string;
style?: React.CSSProperties;
noShadow?: boolean;
}
declare const FaceRecorder: React.FC<FaceRecorderProps>;
interface VoiceRecorderProps {
rectWidth?: number;
rectHeight?: number | undefined;
onCapture: (file: File, phrase: string) => void;
className?: string;
style?: React.CSSProperties;
noShadow?: boolean;
}
declare const VoiceRecorder: React.FC<VoiceRecorderProps>;
type OnStopRecordingFunc = (blob: Blob) => void;
declare const useRecorder: (stream: MediaStream | null, type: "audio" | "video", onStopRecording: OnStopRecordingFunc) => {
isRecording: boolean;
startRecording: () => void;
stopRecording: () => void;
cancelRecording: () => void;
};
interface UsePermissionsProps {
rectWidth?: number;
rectHeight?: number;
}
declare const usePermissions: ({ rectWidth, rectHeight }?: UsePermissionsProps) => {
permission: boolean;
stream: MediaStream | null;
stopStreamTracks: () => void;
requestPermissions: () => Promise<void>;
isLoading: boolean;
};
declare const useAudioPermissions: () => {
permission: boolean;
stream: MediaStream | null;
stopStreamTracks: () => void;
requestPermissions: () => Promise<void>;
isLoading: boolean;
};
export { DocScan, FaceCapture, FaceRecorder, VoiceRecorder, useAudioPermissions, usePermissions, useRecorder };