biometry-react-components 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -85,21 +85,19 @@ function FaceCapture() {
85
85
 
86
86
  ### FaceRecorder
87
87
 
88
- Records video with facial guidance overlay. This component could be used for [Process Video](https://developer.biometrysolutions.com/api/process-video/)
88
+ Records video with facial guidance overlay and displays 10 random numbers (0-9) for the user to read aloud. Automatically extracts audio from the recorded video. This component could be used for [Process Video](https://developer.biometrysolutions.com/api/process-video/) and [Voice Enrollment](https://developer.biometrysolutions.com/api/voice-enrollment/)
89
89
 
90
90
  ```tsx
91
91
  import { FaceRecorder } from 'biometry-react-components';
92
92
 
93
93
  function FaceRecorder() {
94
- const handleCapture = (video: File, face: File, audio: File, phrase: string) => {
94
+ const handleCapture = (video: File, audio: File, phrase: string) => {
95
95
  console.log('Captured video:', video);
96
- console.log('Captured face image:', face);
97
96
  console.log('Captured audio:', audio);
98
97
  console.log('Phrase:', phrase);
99
98
  // Send files to your endpoint that will process the biometric data
100
99
  // or
101
100
  // const response = await sdk.processVideo(video, phrase, userFullName);
102
- // const faceResponse = await sdk.enrollFace(face, userFullName);
103
101
  // const voiceResponse = await sdk.enrollVoice(audio, userFullName);
104
102
  };
105
103
 
@@ -111,7 +109,7 @@ function FaceRecorder() {
111
109
 
112
110
  | Prop | Type | Default | Description |
113
111
  |------|------|---------|-------------|
114
- | `onCapture` | `(video: File, face: File, audio: File, phrase: string) => void` | **required** | Callback with captured video file, face image file, audio file, and phrase |
112
+ | `onCapture` | `(video: File, audio: File, phrase: string) => void` | **required** | Callback with captured video file, audio file, and phrase |
115
113
  | `rectWidth` | `number` | `360` | Width of camera area |
116
114
  | `rectHeight` | `number` | `576` | Height of camera area |
117
115
  | `className` | `string` | - | Custom CSS class |
@@ -142,7 +140,7 @@ function VoiceRecorder() {
142
140
 
143
141
  | Prop | Type | Default | Description |
144
142
  |------|------|---------|-------------|
145
- | `onCapture` | `(file: File) => void` | **required** | Callback with captured audio file |
143
+ | `onCapture` | `(file: File, phrase: string) => void` | **required** | Callback with captured audio file and phrase |
146
144
  | `rectWidth` | `number` | `360` | Width of component area |
147
145
  | `rectHeight` | `number` | `undefined` | Height of component area (optional) |
148
146
  | `className` | `string` | - | Custom CSS class |
package/dist/index.d.ts CHANGED
@@ -23,7 +23,7 @@ declare const FaceCapture: React.FC<FaceCaptureProps>;
23
23
  interface FaceRecorderProps {
24
24
  rectWidth?: number;
25
25
  rectHeight?: number;
26
- onCapture: (video: File, face: File, audio: File, phrase: string) => void;
26
+ onCapture: (file: File, audio: File, phrase: string) => void;
27
27
  className?: string;
28
28
  style?: React.CSSProperties;
29
29
  noShadow?: boolean;