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.
@@ -215,7 +215,7 @@
215
215
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
216
216
  };
217
217
 
218
- var webSdkVersion = '2.1.75';
218
+ var webSdkVersion = '2.1.76';
219
219
 
220
220
  function getPlatform() {
221
221
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -23541,7 +23541,7 @@
23541
23541
  var defaultVideoIdCaptureThresholds = {
23542
23542
  detection: {
23543
23543
  idCardFront: 0.4,
23544
- idCardBack: 0.4,
23544
+ idCardBack: 0.5,
23545
23545
  passport: 1
23546
23546
  },
23547
23547
  focus: {
@@ -23561,7 +23561,8 @@
23561
23561
  goodFrames: {
23562
23562
  idCardFront: 1,
23563
23563
  idCardBack: 1
23564
- }
23564
+ },
23565
+ flipShortcutThreshold: 0.7
23565
23566
  };
23566
23567
  var IdVideoCapture = function IdVideoCapture(_a) {
23567
23568
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
@@ -23717,14 +23718,15 @@
23717
23718
  setCurrentFocusScore(prediction.focusScore);
23718
23719
  var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
23719
23720
  var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
23720
- if (requestedAction === 'FLIP_ID' && isGoodFrame) {
23721
+ var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= videoIdCaptureThresholds.flipShortcutThreshold;
23722
+ if (shouldShortcutFlipAnimation) {
23721
23723
  return setRequestedAction('SHOW_ID_BACK');
23722
23724
  }
23723
23725
  setGoodFramesCount(isGoodFrame ? function (n) {
23724
23726
  return n + 1;
23725
23727
  } : 0);
23726
23728
  });
23727
- }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction]);
23729
+ }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, videoIdCaptureThresholds.flipShortcutThreshold]);
23728
23730
  var _29 = React.useState(null),
23729
23731
  idFrontCaptureStartedAt = _29[0],
23730
23732
  setFirstGoodFrameTime = _29[1];