idmission-web-sdk 2.1.74 → 2.1.76
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/dist/components/video_id/IdVideoCapture.d.ts +1 -0
- package/dist/sdk2.cjs.development.js +8 -6
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +8 -6
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +8 -6
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -38,6 +38,7 @@ export type VideoIdCaptureThresholds = IdCaptureThresholds & {
|
|
|
38
38
|
/** Number of good frames of the ID card back that must be captured before moving on during video capture. */
|
|
39
39
|
idCardBack: number;
|
|
40
40
|
};
|
|
41
|
+
flipShortcutThreshold: number;
|
|
41
42
|
};
|
|
42
43
|
export declare const defaultVideoIdCaptureThresholds: VideoIdCaptureThresholds;
|
|
43
44
|
export type IdVideoCaptureProps = {
|
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.1.
|
|
237
|
+
var webSdkVersion = '2.1.76';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -6882,7 +6882,7 @@ var esTranslation = {
|
|
|
6882
6882
|
'Document not detected': 'No se ha detectado el documento',
|
|
6883
6883
|
'Document is not centered': 'Documento no centrado',
|
|
6884
6884
|
'Document too close, please back up': 'Documento muy cerca, favor de alejarse',
|
|
6885
|
-
'Please hold your ID document steady': 'Por favor,
|
|
6885
|
+
'Please hold your ID document steady': 'Por favor, hay que mantener firme su identificación',
|
|
6886
6886
|
'Document out of focus – try improving the lighting': 'Documento no enfocado - hay que tratar de mejorar la iluminación',
|
|
6887
6887
|
'ID card front detected - please flip your ID card': 'Anverso de ID detectado, por favor voltea tu identificación',
|
|
6888
6888
|
'ID card back detected - please flip your ID card': 'Reverso de ID detectado, por favor voltea tu identificación',
|
|
@@ -13939,7 +13939,7 @@ var edgeBoundary = 0.05;
|
|
|
13939
13939
|
var defaultVideoIdCaptureThresholds = {
|
|
13940
13940
|
detection: {
|
|
13941
13941
|
idCardFront: 0.4,
|
|
13942
|
-
idCardBack: 0.
|
|
13942
|
+
idCardBack: 0.5,
|
|
13943
13943
|
passport: 1
|
|
13944
13944
|
},
|
|
13945
13945
|
focus: {
|
|
@@ -13959,7 +13959,8 @@ var defaultVideoIdCaptureThresholds = {
|
|
|
13959
13959
|
goodFrames: {
|
|
13960
13960
|
idCardFront: 1,
|
|
13961
13961
|
idCardBack: 1
|
|
13962
|
-
}
|
|
13962
|
+
},
|
|
13963
|
+
flipShortcutThreshold: 0.7
|
|
13963
13964
|
};
|
|
13964
13965
|
var IdVideoCapture = function IdVideoCapture(_a) {
|
|
13965
13966
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
@@ -14115,14 +14116,15 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
14115
14116
|
setCurrentFocusScore(prediction.focusScore);
|
|
14116
14117
|
var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
|
|
14117
14118
|
var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
|
|
14118
|
-
|
|
14119
|
+
var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= videoIdCaptureThresholds.flipShortcutThreshold;
|
|
14120
|
+
if (shouldShortcutFlipAnimation) {
|
|
14119
14121
|
return setRequestedAction('SHOW_ID_BACK');
|
|
14120
14122
|
}
|
|
14121
14123
|
setGoodFramesCount(isGoodFrame ? function (n) {
|
|
14122
14124
|
return n + 1;
|
|
14123
14125
|
} : 0);
|
|
14124
14126
|
});
|
|
14125
|
-
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction]);
|
|
14127
|
+
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, videoIdCaptureThresholds.flipShortcutThreshold]);
|
|
14126
14128
|
var _29 = React.useState(null),
|
|
14127
14129
|
idFrontCaptureStartedAt = _29[0],
|
|
14128
14130
|
setFirstGoodFrameTime = _29[1];
|