@regulaforensics/vp-frontend-face-components 6.5.1578-rc → 6.5.1594-nightly
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 +2 -3
- package/dist/index.d.ts +4 -2
- package/dist/main.iife.js +19 -19
- package/dist/main.js +11162 -10718
- package/package.json +1 -1
package/README.md
CHANGED
@@ -134,7 +134,6 @@ component.settings = {
|
|
134
134
|
tag: 'sessionIdValue',
|
135
135
|
retryCount: 5,
|
136
136
|
recordingProcess: 1,
|
137
|
-
workerPath: 'https://your-worker-path.com',
|
138
137
|
customization: {
|
139
138
|
fontFamily: 'Noto Sans, sans-serif',
|
140
139
|
fontSize: '16px',
|
@@ -200,7 +199,7 @@ Here are all the available settings:
|
|
200
199
|
| `closeDisabled` | Whether to disable the "Close" button of the component. If set to `true`, the "Close" button is hidden from the user. | `boolean` | `false` | `true`, `false` | `face-liveness`, `face-capture` |
|
201
200
|
| `recordingProcess` | Whether to enable a video recording of the process. If set to `0`, the video is sent to the server with an additional request. If set to `1`, the video is sent to the server with the liveness package. If set to `2`, the video isn't sent. The video format depends on the browser: MP4 for Safari, WEB for other browsers. | `number` | `0` | `0`, `1`, `2` | `face-liveness` |
|
202
201
|
| `tag` | The server generates a unique identifier for each session before starting a verification process. Using `tag`, you can set a custom value. Make sure that `tag` is unique for each session. | `string` | `undefined` | any unique for each session | `face-liveness` |
|
203
|
-
| `retryCount` | Using the `retryCount` setter, you can set the number of liveness transaction attempts for the user. Once the attempts are exhausted, the component will display a white screen and throw the "RETRY_COUNTER_EXCEEDED" event. By default, the number of attempts is unlimited. Setting the value to **0** removes the limit on the number of attempts, while any positive number limits the attempts. | `number` |
|
202
|
+
| `retryCount` | Using the `retryCount` setter, you can set the number of liveness transaction attempts for the user. Once the attempts are exhausted, the component will display a white screen and throw the "RETRY_COUNTER_EXCEEDED" event. By default, the number of attempts is unlimited. Setting the value to **0** removes the limit on the number of attempts, while any positive number limits the attempts. | `number` | `undefined` | number of the attempts count | `face-liveness` |
|
204
203
|
| `headers` | Before starting the camera capture, the component sends a `start` request to the server and receives the initialization data in response. Once the component successfully completes two stages of verification, it sends the received data to the API for processing. You can use the `headers` setter to set the headers for the HTTP POST method. Additionally, the video recording is transmitted to the server along with these `headers`. | `object` | `undefined` | object with headers (key, value). | `face-liveness` |
|
205
204
|
| `customization` | You can customize the element's color, font, and image by using this object. See the [Customization](#customization) section below. | `object` | `undefined` | object with customization settings | `face-liveness`, `face-capture` |
|
206
205
|
| `nonce` | You can set a unique nonce value to maintain the CSP policy. | `string` | `undefined` | unique nonce value | `face-liveness`, `face-capture` |
|
@@ -208,7 +207,6 @@ Here are all the available settings:
|
|
208
207
|
| `holdStillDuration` | For the Capture screen, sets the duration that the user needs to stand straight and look in the camera. | `number` | `undefined` | seconds | `face-capture` |
|
209
208
|
| `timeoutInterval` | Timeout for the Capture screen. | `number` | `undefined` | seconds | `face-capture` |
|
210
209
|
| `livenessType` | You can choose a scenario for the liveness assessment. `0` - active liveness, full process that requires head rotation; `1` - passive liveness, a person is asked to only take a selfie, no head rotation required. | `number` | `0` | `0`, `1` | `face-liveness` |
|
211
|
-
| `workerPath` | The URL with path to your worker file. | `string` | `unique regula wasm url` | your URL to worker | `face-liveness`, `face-capture` |
|
212
210
|
| `detectOcclusion` | Whether to disable face occlusion hint. | `boolean` | `true` | `true`, `false` | `face-capture` |
|
213
211
|
|
214
212
|
## Customization
|
@@ -335,6 +333,7 @@ Table of event causes:
|
|
335
333
|
| `INCORRECT_CAMERA_ID` | No camera with the specified ID found. |
|
336
334
|
| `WEBSERVICE_NOT_COMPATIBLE` | The web service and component versions are incompatible. |
|
337
335
|
| `HTTP_NOT_SUPPORTED` | The web component does not work over the HTTP protocol, use HTTPS instead. |
|
336
|
+
| `CANCELLED` | The user has clicked by close button |
|
338
337
|
|
339
338
|
The table below describes the cases of event generation:
|
340
339
|
|
package/dist/index.d.ts
CHANGED
@@ -27,6 +27,7 @@ export declare type CustomEventDataType<R> = {
|
|
27
27
|
status: ResponseCode;
|
28
28
|
reason?: ErrorTypes;
|
29
29
|
response?: R;
|
30
|
+
transactionId?: string;
|
30
31
|
};
|
31
32
|
|
32
33
|
declare type DebugOptions = {
|
@@ -43,7 +44,7 @@ export declare interface DetailEvent<A, R> {
|
|
43
44
|
|
44
45
|
export declare type ErrorTypes = 'WASM_ERROR' | 'UNKNOWN_ERROR' | 'NOT_SUPPORTED' | 'CAMERA_UNKNOWN_ERROR' | 'CAMERA_PERMISSION_DENIED' | 'NO_CAMERA' | 'INCORRECT_CAMERA_ID' | 'CONNECTION_ERROR' | 'LANDSCAPE_MODE_RESTRICTED' | 'TIMEOUT_ERROR' | 'CHANGE_CAMERA' | 'DEVICE_ROTATE' | 'APP_INACTIVE' | 'HTTP_NOT_SUPPORTED';
|
45
46
|
|
46
|
-
export declare type FaceCaptureDetailType = DetailEvent<FaceEventActions, FaceDetectionResponseType>;
|
47
|
+
export declare type FaceCaptureDetailType = Omit<DetailEvent<FaceEventActions, FaceDetectionResponseType>, 'transactionId'>;
|
47
48
|
|
48
49
|
export declare type FaceDetectionResponseType = {
|
49
50
|
capture: Array<string>;
|
@@ -66,6 +67,7 @@ export declare interface FaceDetectionSettings {
|
|
66
67
|
timeoutInterval?: number;
|
67
68
|
workerPath?: string;
|
68
69
|
detectOcclusion?: boolean;
|
70
|
+
showFaceAnimation?: boolean;
|
69
71
|
}
|
70
72
|
|
71
73
|
export declare class FaceDetectionWebComponent extends HTMLElement {
|
@@ -103,7 +105,7 @@ export declare type FaceLivenessResponseType = {
|
|
103
105
|
type: number;
|
104
106
|
};
|
105
107
|
|
106
|
-
export declare interface FaceLivenessSettings extends Omit<FaceDetectionSettings, 'holdStillDuration' | 'timeoutInterval'> {
|
108
|
+
export declare interface FaceLivenessSettings extends Omit<FaceDetectionSettings, 'holdStillDuration' | 'timeoutInterval' | 'showFaceAnimation'> {
|
107
109
|
url?: string;
|
108
110
|
deviceOrientation?: boolean;
|
109
111
|
videoRecording?: boolean;
|