@getyoti/react-face-capture 2.7.0 → 2.8.0
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/CHANGELOG.md +19 -0
- package/README.md +26 -25
- package/index.d.ts +6 -2
- package/index.js +7 -7
- package/index.js.LICENSE.txt +0 -37
- package/package.json +1 -2
- package/vanilla/index.js +10 -10
- package/vanilla/index.js.LICENSE.txt +1 -1
- package/vanilla/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v2.8.0
|
|
4
|
+
|
|
5
|
+
### New features
|
|
6
|
+
|
|
7
|
+
- Axios has been removed and now fetch is used across the app.
|
|
8
|
+
- Improve user guidance in `center` mode.
|
|
9
|
+
- Extra on-screen feedback is displayed if the user has not placed their face in the frame after a certain amount of time.
|
|
10
|
+
- Add new localisation:
|
|
11
|
+
- `ka-GE`: Georgian
|
|
12
|
+
- `sr-RS`: Serbian (Cyrillic script)
|
|
13
|
+
- `sr-Latn-RS`: Serbian (Latin script)
|
|
14
|
+
- Localisation has been revised. The following languages have been updated:
|
|
15
|
+
- `el-GR`: Greek
|
|
16
|
+
- `bs-BA`: Bosnian
|
|
17
|
+
- Improve user feedback stability.
|
|
18
|
+
- Improve documentation:
|
|
19
|
+
- `returnPreviewImage` property. Highlighting that the preview image is not signed and should only be used for user feedback.
|
|
20
|
+
- `EXCEEDED_TIME_TO_LOAD` error. Making it more straightforward.
|
|
21
|
+
|
|
3
22
|
## v2.7.0
|
|
4
23
|
|
|
5
24
|
### New features
|
package/README.md
CHANGED
|
@@ -22,14 +22,14 @@ The package depends on the following peer dependencies
|
|
|
22
22
|
|
|
23
23
|
<browserSupportTable>
|
|
24
24
|
|
|
25
|
-
| Browser | Versions
|
|
26
|
-
| ------- |
|
|
27
|
-
| and_chr |
|
|
28
|
-
| chrome | 138,137
|
|
29
|
-
| edge |
|
|
30
|
-
| firefox | 140,139
|
|
31
|
-
| ios_saf | 18.5,18.4,18.3 |
|
|
32
|
-
| safari | 18.5,18.4,18.3,18.2 |
|
|
25
|
+
| Browser | Versions |
|
|
26
|
+
| ------- | ------------------------ |
|
|
27
|
+
| and_chr | 139 |
|
|
28
|
+
| chrome | 140,139,138,137 |
|
|
29
|
+
| edge | 140,139 |
|
|
30
|
+
| firefox | 142,141,140,139 |
|
|
31
|
+
| ios_saf | 18.5-18.6,18.4,18.3 |
|
|
32
|
+
| safari | 18.5-18.6,18.4,18.3,18.2 |
|
|
33
33
|
|
|
34
34
|
</browserSupportTable>
|
|
35
35
|
|
|
@@ -141,7 +141,7 @@ The CSS custom properties must be defined using the `:root` CSS selector. Here i
|
|
|
141
141
|
| showGetHelpButton | Boolean | `true` | - | Show the Get Help button. |
|
|
142
142
|
| autoSessionReload | Boolean | `true` | - | Automatically renews sessions after they expire. |
|
|
143
143
|
| userRetryError | Boolean | `true` | - | Gives the possibility to users to retry several times when an error occurs. |
|
|
144
|
-
| returnPreviewImage | Boolean | `false` | - | Provide the image captured (`base64PreviewImage`) in the `onSuccess` callback.
|
|
144
|
+
| returnPreviewImage | Boolean | `false` | - | Provide the image captured (`base64PreviewImage`) in the `onSuccess` callback. Please note that the preview image is not signed, so it should only be used for user feedback. For applications that need to store or use the actual image, we recommend setting `encryptImage` to false. |
|
|
145
145
|
| encryptImage | Boolean | `true` | - | Encrypt the image inside the payload argument on the `onSuccess` callback when it runs the secure mode. |
|
|
146
146
|
| allowBackgroundFaces | Boolean | `false` | - | Allows faces to be present in the background when the image is being captured. The Face Capture will return a cropped image with the main face when set to `true`. If `multiframe` is `true`, this field will be ignored and treated as `false`. Note: This feature is designed for retail terminals and is unsuitable for online users' face capture. |
|
|
147
147
|
| faceSelectionMethod | String `center/area` | `center` | - | Defines where the main face can be placed, in the center or anywhere in the image. Note: This feature is designed for retail terminals and unsuitable for online user's face capture. It is recommend to enable `allowBackgroundFaces` when `faceSelectionMethod` is set to `area`. |
|
|
@@ -193,7 +193,8 @@ Current languages supported:
|
|
|
193
193
|
- `ro-RO`: Romanian
|
|
194
194
|
- `ru-RU`: Russian
|
|
195
195
|
- `sk-SK`: Slovak
|
|
196
|
-
- `sr-RS`: Serbian (
|
|
196
|
+
- `sr-RS`: Serbian (Cyrillic script)
|
|
197
|
+
- `sr-Latn-RS`: Serbian (Latin script)
|
|
197
198
|
- `sv-SE`: Swedish
|
|
198
199
|
- `th-TH`: Thai
|
|
199
200
|
- `tl-PH`: Tagalog
|
|
@@ -216,21 +217,21 @@ A mechanism used for the property `language` to avoid issues when the value pass
|
|
|
216
217
|
|
|
217
218
|
#### Error codes
|
|
218
219
|
|
|
219
|
-
| Error code | Description
|
|
220
|
-
| ------------------------------ |
|
|
221
|
-
| `NO_CAMERA` | No camera detected on the user’s device.
|
|
222
|
-
| `GENERIC_CAMERA_ERROR` | Undefined camera error. The reasons can be [various](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) and inconsistent across browsers.
|
|
223
|
-
| `UNSUPPORTED_BROWSER` | The user’s browser is not supported. This could be because the API needed for the camera interaction is missing. `Note: Older Non-Safari browsers on iOS fall into this category.`
|
|
224
|
-
| `NO_CAMERA_PERMISSION` | The user rejected the camera permission.
|
|
225
|
-
| `OVERCONSTRAINED` | The camera constraints are not compatible with available camera devices. `Note: One recovery option could be to use hd resolution.`
|
|
226
|
-
| `FACE_DETECTION_INIT_ERROR` | The face detection has failed to initialise. This usually means the required model assets are missing from the host application.
|
|
227
|
-
| `INTERNAL_ERROR` | This can be due to a programming error, or the user using an old unsupported browser.
|
|
228
|
-
| `CAPTURE_LOAD_ERROR` | The secure module could not be loaded. This usually means your token is not updated, or there is an error on the module provider.
|
|
229
|
-
| `VIDEO_STREAM_INTERRUPTED` | The camera stream has stopped unexpectedly.
|
|
230
|
-
| `SECURE_SESSION_EXPIRED` | The secure session has expired (the token expire field is older than the current time).
|
|
231
|
-
| `EXCEEDED_TIME_TO_LOAD` | The module is taking
|
|
232
|
-
| `VERSION_NO_LONGER_AVAILABLE` | The requested Face Capture secure module is no longer available. Note that the FCM will log a warning in the console if the module was deprecated.
|
|
233
|
-
| `INVALID_SECURE_CLIENT_SDK_ID` | The client SDK ID has a wrong format, it isn't included on the internal product mapping or there is a mismatch between the SDK from the JWT and the one related to the internal product contained in the BE request.
|
|
220
|
+
| Error code | Description |
|
|
221
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
222
|
+
| `NO_CAMERA` | No camera detected on the user’s device. |
|
|
223
|
+
| `GENERIC_CAMERA_ERROR` | Undefined camera error. The reasons can be [various](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) and inconsistent across browsers. |
|
|
224
|
+
| `UNSUPPORTED_BROWSER` | The user’s browser is not supported. This could be because the API needed for the camera interaction is missing. `Note: Older Non-Safari browsers on iOS fall into this category.` |
|
|
225
|
+
| `NO_CAMERA_PERMISSION` | The user rejected the camera permission. |
|
|
226
|
+
| `OVERCONSTRAINED` | The camera constraints are not compatible with available camera devices. `Note: One recovery option could be to use hd resolution.` |
|
|
227
|
+
| `FACE_DETECTION_INIT_ERROR` | The face detection has failed to initialise. This usually means the required model assets are missing from the host application. |
|
|
228
|
+
| `INTERNAL_ERROR` | This can be due to a programming error, or the user using an old unsupported browser. |
|
|
229
|
+
| `CAPTURE_LOAD_ERROR` | The secure module could not be loaded. This usually means your token is not updated, or there is an error on the module provider. |
|
|
230
|
+
| `VIDEO_STREAM_INTERRUPTED` | The camera stream has stopped unexpectedly. |
|
|
231
|
+
| `SECURE_SESSION_EXPIRED` | The secure session has expired (the token expire field is older than the current time). |
|
|
232
|
+
| `EXCEEDED_TIME_TO_LOAD` | The module is taking longer than the time set in the FaceCapture component to load. _This error does not prevent the module from continuing to load_. It alerts the integrator so they can decide to give additional reassurance to their users. The timeout value can be changed by updating the `loadTimeout` option, which defaults to 60 seconds (60000ms). |
|
|
233
|
+
| `VERSION_NO_LONGER_AVAILABLE` | The requested Face Capture secure module is no longer available. Note that the FCM will log a warning in the console if the module was deprecated. |
|
|
234
|
+
| `INVALID_SECURE_CLIENT_SDK_ID` | The client SDK ID has a wrong format, it isn't included on the internal product mapping or there is a mismatch between the SDK from the JWT and the one related to the internal product contained in the BE request. |
|
|
234
235
|
|
|
235
236
|
The error codes can be imported as follow:
|
|
236
237
|
|
package/index.d.ts
CHANGED
|
@@ -149,6 +149,8 @@ declare module '@getyoti/react-face-capture' {
|
|
|
149
149
|
IT_IT = 'it-IT',
|
|
150
150
|
JA = 'ja',
|
|
151
151
|
JA_JP = 'ja-JP',
|
|
152
|
+
KA = 'ka',
|
|
153
|
+
KA_GE = 'ka-GE',
|
|
152
154
|
KO = 'ko',
|
|
153
155
|
KO_KR = 'ko-KR',
|
|
154
156
|
LT = 'lt',
|
|
@@ -174,6 +176,8 @@ declare module '@getyoti/react-face-capture' {
|
|
|
174
176
|
SK_SK = 'sk-SK',
|
|
175
177
|
SR = 'sr',
|
|
176
178
|
SR_RS = 'sr-RS',
|
|
179
|
+
SR_LATN = 'sr-Latn',
|
|
180
|
+
SR_LATN_RS = 'sr-Latn-RS',
|
|
177
181
|
SV = 'sv',
|
|
178
182
|
SV_SE = 'sv-SE',
|
|
179
183
|
TH = 'th',
|
|
@@ -260,8 +264,8 @@ declare module '@getyoti/react-face-capture' {
|
|
|
260
264
|
/** The language code to set the language of the feedback messages. (default: en) */
|
|
261
265
|
language?: LANGUAGE_CODE;
|
|
262
266
|
/** Determines the politeness setting of the live region used to read out prompts for screen reader users. (default: polite)
|
|
263
|
-
|
|
264
|
-
|
|
267
|
+
* @deprecated will be remove in next major release
|
|
268
|
+
*/
|
|
265
269
|
a11yLiveRegionMode?: A11Y_LIVE_REGION_MODE;
|
|
266
270
|
/** Show the initial help guidance. (default: true) */
|
|
267
271
|
showInitialGuidance?: boolean;
|