idmission-web-sdk 2.1.75 → 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 +7 -5
- 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 +7 -5
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +7 -5
- 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
package/dist/sdk2.esm.js
CHANGED
|
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
204
204
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var webSdkVersion = '2.1.
|
|
207
|
+
var webSdkVersion = '2.1.76';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -13909,7 +13909,7 @@ var edgeBoundary = 0.05;
|
|
|
13909
13909
|
var defaultVideoIdCaptureThresholds = {
|
|
13910
13910
|
detection: {
|
|
13911
13911
|
idCardFront: 0.4,
|
|
13912
|
-
idCardBack: 0.
|
|
13912
|
+
idCardBack: 0.5,
|
|
13913
13913
|
passport: 1
|
|
13914
13914
|
},
|
|
13915
13915
|
focus: {
|
|
@@ -13929,7 +13929,8 @@ var defaultVideoIdCaptureThresholds = {
|
|
|
13929
13929
|
goodFrames: {
|
|
13930
13930
|
idCardFront: 1,
|
|
13931
13931
|
idCardBack: 1
|
|
13932
|
-
}
|
|
13932
|
+
},
|
|
13933
|
+
flipShortcutThreshold: 0.7
|
|
13933
13934
|
};
|
|
13934
13935
|
var IdVideoCapture = function IdVideoCapture(_a) {
|
|
13935
13936
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
@@ -14085,14 +14086,15 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
14085
14086
|
setCurrentFocusScore(prediction.focusScore);
|
|
14086
14087
|
var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
|
|
14087
14088
|
var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
|
|
14088
|
-
|
|
14089
|
+
var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= videoIdCaptureThresholds.flipShortcutThreshold;
|
|
14090
|
+
if (shouldShortcutFlipAnimation) {
|
|
14089
14091
|
return setRequestedAction('SHOW_ID_BACK');
|
|
14090
14092
|
}
|
|
14091
14093
|
setGoodFramesCount(isGoodFrame ? function (n) {
|
|
14092
14094
|
return n + 1;
|
|
14093
14095
|
} : 0);
|
|
14094
14096
|
});
|
|
14095
|
-
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction]);
|
|
14097
|
+
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, videoIdCaptureThresholds.flipShortcutThreshold]);
|
|
14096
14098
|
var _29 = useState(null),
|
|
14097
14099
|
idFrontCaptureStartedAt = _29[0],
|
|
14098
14100
|
setFirstGoodFrameTime = _29[1];
|